:root {
  --bg: #0d0f0f;
  --bg-strong: #131616;
  --panel: rgba(22, 26, 25, 0.78);
  --panel-strong: rgba(26, 31, 30, 0.92);
  --text: #f3f5f4;
  --muted: #a5adab;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --button: #f3f5f4;
  --button-text: #0d0f0f;
  --font-sans: "OpenAI Sans", "Soehne", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --anchor-offset: 108px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--anchor-offset);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 18%, rgba(58, 77, 69, 0.28), transparent 24%),
    radial-gradient(circle at 84% 16%, rgba(35, 54, 48, 0.34), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(28, 38, 36, 0.22), transparent 30%),
    linear-gradient(180deg, #0d1010 0%, #121616 100%);
  font-family: var(--font-sans);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.theme-root {
  min-height: 100vh;
  position: relative;
}

[id] {
  scroll-margin-top: var(--anchor-offset);
}

.orb {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.orb-left {
  top: -10rem;
  left: -9rem;
  background: rgba(47, 72, 64, 0.55);
}

.orb-right {
  top: 9rem;
  right: -11rem;
  background: rgba(35, 49, 45, 0.62);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(13, 16, 16, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #f3f5f4;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.06);
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-menu {
  display: none;
  position: relative;
  flex: 0 0 auto;
}

.site-menu__summary {
  list-style: none;
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  max-width: 46px;
  max-height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  align-self: center;
  flex: 0 0 46px;
  overflow: hidden;
}

.site-menu__summary::-webkit-details-marker {
  display: none;
}

.site-menu__summary span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #f3f5f4;
}

.site-menu[open] .site-menu__summary span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.site-menu[open] .site-menu__summary span:nth-child(2) {
  opacity: 0;
}

.site-menu[open] .site-menu__summary span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

.site-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(88vw, 320px);
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 16, 16, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
}

.site-menu__links,
.site-menu__actions {
  display: grid;
  gap: 10px;
}

.site-menu__actions {
  margin-top: 12px;
}

.site-nav__link {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.landing,
.admin-main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.landing > section + section {
  margin-top: 112px;
}

.hero-openai,
.section-grid,
.pricing-section,
.timeline-section,
.cta-band,
.auth-shell-openai,
.stats-grid,
.data-grid {
  animation: rise 520ms ease both;
}

.hero-openai {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 20px;
  padding: 54px 0 28px;
  align-items: start;
}

.hero-openai__copy h1,
.auth-intro h1,
.admin-hero h1 {
  margin: 0 0 18px;
  max-width: 14ch;
  font-family: var(--font-sans);
  font-size: clamp(3rem, 8vw, 5.9rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 32px;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f3f5f4;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--button);
  color: var(--button-text);
}

.button-quiet {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

.button-telegram {
  background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
  min-height: 58px;
  padding: 0 24px;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 18px 40px rgba(34, 158, 217, 0.28);
}

.button-telegram-header {
  min-height: 46px;
  padding: 0 18px;
  font-size: 0.96rem;
  box-shadow: 0 12px 30px rgba(34, 158, 217, 0.24);
}

.button-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.button-icon-large {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.prompt-shell,
.story-card,
.info-card,
.timeline-card,
.cta-band,
.auth-card-openai,
.panel,
.stat-card,
.phone-mockup {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.prompt-shell {
  padding: 24px;
}

.phone-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100%;
  padding-top: 4px;
}

.phone-mockup {
  width: min(100%, 288px);
  padding: 10px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(34, 39, 39, 0.98) 0%, rgba(17, 20, 20, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.phone-notch {
  width: 92px;
  height: 20px;
  margin: 0 auto 7px;
  border-radius: 0 0 16px 16px;
  background: #060707;
}

.phone-screen {
  border-radius: 23px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(78, 109, 96, 0.24), transparent 28%),
    #0f1717;
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.telegram-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.telegram-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
  color: #ffffff;
  font-weight: 700;
}

.telegram-meta {
  display: grid;
  gap: 2px;
}

.telegram-meta strong {
  font-size: 0.88rem;
}

.telegram-meta span {
  color: var(--muted);
  font-size: 0.78rem;
}

.telegram-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  justify-content: center;
}

.bubble {
  max-width: 82%;
  padding: 11px 13px;
  border-radius: 15px;
  line-height: 1.42;
  font-size: 0.84rem;
}

.bubble-user {
  align-self: flex-end;
  background: #2aabee;
  color: #ffffff;
  border-bottom-right-radius: 6px;
}

.bubble-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: #eef2f1;
  border-bottom-left-radius: 6px;
}

.telegram-input {
  min-height: 60px;
  padding: 10px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.telegram-send {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
  position: relative;
  flex: 0 0 32px;
  display: inline-block;
}

.telegram-send::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  clip-path: polygon(0 48%, 100% 0, 72% 100%, 50% 64%);
  background: #ffffff;
}

.prompt-shell__header,
.panel-head h2,
.story-card h2,
.info-card h2,
.timeline-card h3,
.auth-card-openai h2 {
  margin: 0;
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  font-weight: 500;
}

.prompt-shell__body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.prompt-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d9dedd;
}

.prompt-bar {
  min-height: 62px;
  border-radius: 999px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.prompt-bar__badge {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.92rem;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 18px;
  padding: 8px 0 12px;
}

.story-card,
.info-card,
.timeline-card,
.cta-band,
.panel,
.stat-card,
.auth-card-openai {
  padding: 26px;
}

.story-card h2,
.info-card h2 {
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.08;
  max-width: 14ch;
}

.story-card p,
.info-card p,
.timeline-card p,
.cta-band p {
  color: var(--muted);
  line-height: 1.7;
}

.timeline-section {
  padding: 12px 0 12px;
}

.pricing-section {
  padding: 12px 0;
}

.pricing-lead {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.pricing-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.pricing-currency-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pricing-currency-toggle__button {
  min-width: 74px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.pricing-currency-toggle__button.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: #0d0f0f;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pricing-card {
  display: grid;
  gap: 22px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(34, 158, 217, 0.14), transparent 34%),
    radial-gradient(circle at left bottom, rgba(53, 88, 76, 0.16), transparent 28%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.pricing-card__head {
  display: grid;
  gap: 10px;
}

.pricing-card__head h3 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.pricing-card__price,
.pricing-card__price-note {
  margin: 0;
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.pricing-card__price-currency {
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0;
}

.pricing-card__facts {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-card__facts li {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #e8eceb;
  line-height: 1.55;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2,
.cta-band h2 {
  margin: 0;
  max-width: 15ch;
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.96;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.timeline-card strong {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.timeline-card h3 {
  margin-top: 18px;
  font-size: 1.6rem;
}

.cta-band {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  padding: 36px 38px;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at left center, rgba(53, 88, 76, 0.34), transparent 30%),
    radial-gradient(circle at right top, rgba(34, 158, 217, 0.22), transparent 26%),
    linear-gradient(135deg, rgba(21, 26, 26, 0.96) 0%, rgba(11, 14, 14, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 70px rgba(0, 0, 0, 0.28);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 26%, transparent 74%, rgba(255, 255, 255, 0.03));
  pointer-events: none;
}

.cta-band::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 158, 217, 0.2), transparent 68%);
  pointer-events: none;
}

.cta-band__copy h2 {
  max-width: none;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  font-size: clamp(2.35rem, 4vw, 4.3rem);
}

.cta-band__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.cta-note {
  margin: 0;
  color: #d7ebe3;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button-telegram-large {
  min-height: 74px;
  padding: 0 36px;
  font-size: 1.18rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 26px 60px rgba(34, 158, 217, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.site-footer {
  margin-top: 112px;
  padding: 56px 24px 28px;
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: center;
}

.site-footer__lead {
  margin: 0 auto;
  max-width: 760px;
  color: #f3f5f4;
  line-height: 1.72;
  font-size: 0.94rem;
}

.site-footer__logos {
  margin-top: 28px;
}

.site-footer__logos img {
  display: block;
  width: min(100%, 980px);
  height: auto;
  margin: 0 auto;
}

.site-footer__meta {
  margin-top: 28px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.88rem;
  justify-items: center;
}

.site-footer__meta p,
.site-footer__bottom p {
  margin: 0;
}

.site-footer__bottom {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.84rem;
}

.auth-shell-openai {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: 1.1fr minmax(340px, 420px);
  gap: 26px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.admin-login-page .auth-shell-openai {
  grid-template-columns: minmax(340px, 420px);
  justify-content: center;
}

.admin-login-page .auth-card label {
  color: #f3f6f5;
  font-weight: 500;
}

.auth-card-openai h2 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.auth-card label,
.subscription-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #303030;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.flash {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f0f2f1;
}

.admin-header {
  position: static;
  background: transparent;
  border-bottom: none;
}

.admin-main {
  padding-top: 6px;
}

.admin-page .site-header__inner,
.admin-page .admin-main {
  max-width: none;
  width: 100%;
}

.admin-hero {
  padding: 18px 0 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-card strong {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.stats-grid-dense {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.dashboard-toolbar {
  margin-bottom: 18px;
  padding: 22px 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-toolbar__copy h2,
.dashboard-section__head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.dashboard-toolbar__copy p {
  margin: 6px 0 0;
  color: var(--muted);
}

.dashboard-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.dashboard-toolbar__filters label {
  display: grid;
  gap: 6px;
  min-width: 160px;
}

.dashboard-toolbar__filters label span {
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-section + .dashboard-section {
  margin-top: 18px;
}

.dashboard-section__head {
  margin-bottom: 14px;
}

.stat-card-metric {
  min-height: 168px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at top right, rgba(77, 117, 104, 0.16), transparent 44%),
    rgba(255, 255, 255, 0.03);
}

.stat-card-metric span {
  margin-bottom: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-card-metric strong {
  margin: 16px 0 10px;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1;
}

.stat-card-metric small {
  color: rgba(215, 221, 218, 0.72);
  line-height: 1.52;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.chart-card {
  padding: 24px;
  overflow: hidden;
}

.chart-summary {
  min-width: 170px;
  text-align: right;
}

.chart-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.chart-summary strong {
  font-family: var(--font-sans);
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.chart-shell {
  margin-top: 22px;
  position: relative;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart-grid-line,
.chart-zero-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.chart-y-label {
  fill: rgba(214, 220, 217, 0.72);
  font-size: 10px;
  text-anchor: end;
}

.chart-zero-line {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-dasharray: 6 6;
}

.chart-area {
  fill: color-mix(in srgb, var(--chart-accent) 20%, transparent);
}

.chart-line {
  fill: none;
  stroke: var(--chart-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point {
  fill: var(--chart-accent);
  stroke: rgba(9, 12, 12, 0.9);
  stroke-width: 2;
  transition: r 120ms ease, filter 120ms ease;
}

.chart-point.is-active {
  r: 4.8;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--chart-accent) 60%, transparent));
}

.chart-point-hit {
  fill: rgba(255, 255, 255, 0.001);
  cursor: pointer;
  pointer-events: all;
}

.chart-point-hit:focus {
  outline: none;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 96px;
  max-width: 220px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 9, 9, 0.96);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  transform: translateZ(0);
}

.chart-tooltip span {
  display: block;
}

.chart-tooltip__label {
  color: rgba(214, 220, 217, 0.72);
  font-size: 0.72rem;
  margin-bottom: 2px;
  white-space: nowrap;
}

.chart-tooltip__value {
  color: #f3f5f4;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.chart-axis {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.chart-axis span:nth-child(2) {
  text-align: center;
}

.cohort-card {
  margin-top: 18px;
  padding: 24px;
}

.cohort-table-shell {
  overflow-x: auto;
}

.cohort-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.cohort-table thead th {
  position: sticky;
  top: 0;
}

.cohort-label,
.cohort-size {
  white-space: nowrap;
}

.cohort-size {
  color: var(--muted);
}

.cohort-table td {
  padding: 10px 12px;
}

.cohort-cell {
  min-width: 78px;
  padding: 12px 10px;
  border-radius: 18px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cohort-cell strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.cohort-cell span {
  display: block;
  margin-top: 4px;
  color: rgba(232, 238, 236, 0.8);
  font-size: 0.75rem;
}

.cohort-cell-empty {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(214, 220, 217, 0.45);
}

.data-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
  margin-top: 18px;
}

.data-grid-balanced {
  grid-template-columns: 0.9fr 1.1fr;
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 {
  font-size: 1.8rem;
}

.table-shell {
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

thead th {
  color: var(--muted);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.02);
}

tbody tr:last-child td {
  border-bottom: none;
}

.subscription-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.subscription-form textarea,
.subscription-form button {
  grid-column: 1 / -1;
}

.subscription-form-inline,
.settings-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.subscription-form-inline label,
.settings-form label {
  display: grid;
  gap: 8px;
  margin: 0;
}

.subscription-form-inline > label {
  grid-column: span 1;
}

.subscription-form-inline__notes {
  grid-column: span 3;
}

.subscription-form-inline__user-search {
  grid-column: span 2;
}

.subscription-form-inline__submit,
.settings-form__submit {
  display: flex;
  align-items: end;
}

.subscription-form-inline__submit {
  grid-column: span 1;
}

.settings-form label {
  grid-column: span 4;
}

.settings-form label small {
  color: var(--muted);
  line-height: 1.45;
}

.settings-form__submit {
  grid-column: 1 / -1;
}

.subscription-form-inline input[type="hidden"] {
  display: none;
}

.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.users-panel {
  padding: 0;
  margin-top: 10px;
}

.messages-panel {
  padding: 0;
  margin-top: 18px;
}

.payments-panel {
  padding: 0;
}

.subscriptions-form-panel,
.settings-panel,
.subscriptions-panel {
  margin-top: 18px;
}

.users-table-shell {
  overflow-x: auto;
  border-radius: 32px;
}

.payments-table-shell {
  overflow-x: auto;
  border-radius: 32px;
}

.subscriptions-table-shell {
  overflow-x: auto;
  border-radius: 32px;
}

.users-table {
  font-size: 0.84rem;
}

.payments-table {
  font-size: 0.84rem;
}

.subscriptions-table {
  font-size: 0.84rem;
}

.users-table th,
.users-table td {
  padding: 10px 10px;
  white-space: nowrap;
}

.payments-table th,
.payments-table td {
  padding: 10px 10px;
  white-space: nowrap;
}

.subscriptions-table th,
.subscriptions-table td {
  padding: 10px 10px;
  white-space: nowrap;
}

.payments-table .payments-comment-cell {
  max-width: 320px;
  min-width: 220px;
  white-space: normal;
  line-height: 1.45;
}

.users-table thead th {
  font-size: 0.78rem;
}

.payments-table thead th {
  font-size: 0.78rem;
}

.subscriptions-table thead th {
  font-size: 0.78rem;
}

.subscriptions-table .subscriptions-note-cell {
  max-width: 320px;
  min-width: 220px;
  white-space: normal;
  line-height: 1.45;
}

.users-table .table-actions {
  gap: 6px;
  flex-wrap: nowrap;
}

.payments-table .inline-form {
  gap: 6px;
  flex-wrap: nowrap;
}

.button-small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.76rem;
  line-height: 1;
}

.inline-form select {
  min-width: 140px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f3f5f4;
}

.status-pill.is-demo {
  background: rgba(243, 202, 98, 0.18);
  color: #f7df8e;
}

.status-pill.is-muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.status-pill.is-danger {
  background: rgba(232, 81, 81, 0.14);
  color: #ffb5b5;
}

.status-stack {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.users-table .status-pill {
  min-height: 26px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.messages-table {
  font-size: 0.84rem;
}

.messages-table th,
.messages-table td {
  padding: 10px 10px;
  white-space: nowrap;
}

.messages-table thead th {
  font-size: 0.78rem;
}

.reveal {
  animation: rise 640ms ease both;
}

.reveal-delay {
  animation-delay: 70ms;
}

.reveal-delay-2 {
  animation-delay: 140ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  :root {
    --anchor-offset: 126px;
  }

  .hero-openai,
  .section-grid,
  .pricing-grid,
  .timeline-grid,
  .auth-shell-openai,
  .chart-grid,
  .data-grid,
  .data-grid-balanced,
  .cta-band,
  .site-footer__top {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .cta-band__copy h2 {
    white-space: normal;
  }

  .cta-band__action {
    align-items: stretch;
  }

  .pricing-section__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header__inner {
    align-items: center;
    justify-content: space-between;
  }

  .site-nav--desktop,
  .site-header__actions--desktop {
    display: none;
  }

  .site-menu {
    display: block;
    position: static;
  }

  .site-menu__panel {
    position: fixed;
    left: 0;
    right: 0;
    top: 83px;
    width: 100vw;
    max-width: none;
    border-radius: 0 0 24px 24px;
    padding: 18px;
  }

  .hero-openai__copy h1,
  .auth-intro h1,
  .admin-hero h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  :root {
    --anchor-offset: 118px;
  }

  .site-header__inner,
  .landing,
  .admin-main,
  .auth-shell-openai {
    padding-left: 18px;
    padding-right: 18px;
  }

  .button,
  .prompt-bar {
    width: 100%;
  }

  .pricing-card {
    padding: 24px;
  }

  .dashboard-toolbar {
    padding: 20px 18px;
    align-items: stretch;
  }

  .dashboard-toolbar,
  .dashboard-toolbar__filters {
    flex-direction: column;
  }

  .dashboard-toolbar__filters label {
    min-width: 0;
  }

  .stats-grid-dense {
    grid-template-columns: 1fr;
  }

  .stat-card-metric {
    min-height: 0;
  }

  .chart-card {
    padding: 20px 18px;
  }

  .chart-summary {
    min-width: 0;
    text-align: left;
  }

  .chart-summary strong {
    font-size: 1.6rem;
  }

  .chart-axis {
    flex-wrap: wrap;
  }

  .hero-actions,
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .subscription-form-inline,
  .settings-form {
    grid-template-columns: 1fr;
  }

  .subscription-form-inline > label,
  .subscription-form-inline__notes,
  .subscription-form-inline__submit,
  .settings-form label,
  .settings-form__submit {
    grid-column: 1 / -1;
  }

  .site-menu__summary {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
    padding: 11px;
    box-sizing: content-box;
    flex-basis: 20px;
  }

  .site-menu__summary span {
    width: 14px;
    height: 2px;
    transform-origin: center;
  }

  .site-menu[open] .site-menu__summary span:nth-child(1) {
    transform: translateY(2px) rotate(45deg);
  }

  .site-menu[open] .site-menu__summary span:nth-child(3) {
    transform: translateY(-2px) rotate(-45deg);
  }

  .site-menu__panel {
    top: 79px;
    width: 100vw;
    padding: 16px 18px 18px;
  }

  .landing > .cta-band {
    margin-top: 0;
  }

  .site-footer {
    margin-top: 0;
  }
}

.admin-page .panel,
.admin-page .stat-card,
.admin-page .table-shell,
.admin-page .users-table-shell,
.admin-page .payments-table-shell,
.admin-page .subscriptions-table-shell,
.admin-page .cohort-cell,
.admin-page .button,
.admin-page .status-pill,
.admin-page input,
.admin-page select,
.admin-page textarea,
.admin-page .flash,
.admin-login-page .auth-card-openai,
.admin-login-page .button,
.admin-login-page input,
.admin-login-page select,
.admin-login-page textarea,
.admin-login-page .flash {
  border-radius: 5px;
}

.admin-page .panel,
.admin-page .stat-card,
.admin-page .table-shell,
.admin-page .users-table-shell,
.admin-page .payments-table-shell,
.admin-page .subscriptions-table-shell,
.admin-login-page .auth-card-openai {
  border-radius: 5px;
}
