:root, html.theme-light {
  --bg: #ffffff;
  --bg-elevated: #f6f7f8;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-soft: #f1f3f5;
  --surface-2: #e9edf1;
  --line: #dfe4e9;
  --line-strong: #acb7c2;
  --text: #20242b;
  --text-soft: #52606d;
  --text-faint: #626f7c;
  --text-muted: #626f7c;
  --muted: #626f7c;
  --primary: #176d91;
  --primary-hover: #1b6d8d;
  --primary-soft: #e6f3fa;
  --primary-rgb: 36, 123, 157;
  --accent: #176d91;
  --accent-strong: #125d7e;
  --violet: #176d91;
  --green: #276044;
  --danger: #913e43;
  --button-bg: #247b9d;
  --button-hover: #1b6d8d;
  --button-text: #ffffff;
  --button-edge: #111315;
  --header-surface: #fffffff5;
  --product-grid: #20242b0c;
  --shadow-card: 0 2px 8px #20242b0a;
  --shadow-soft: 0 12px 40px #20242b0f;
  --shadow: 0 12px 40px #20242b0f;
  --focus-ring: #23a9f240;
}
html.theme-dark {
  --bg: #111315;
  --bg-elevated: #181b1f;
  --surface: #20242a;
  --surface-solid: #20242a;
  --surface-soft: #252a31;
  --surface-2: #2c333c;
  --line: #353d47;
  --line-strong: #687587;
  --text: #e7ebef;
  --text-soft: #b5bec8;
  --text-faint: #a0aab6;
  --text-muted: #a0aab6;
  --muted: #a0aab6;
  --primary: #63bce8;
  --primary-hover: #8bd4f4;
  --primary-soft: #153647;
  --primary-rgb: 99, 188, 232;
  --accent: #63bce8;
  --accent-strong: #8bd4f4;
  --violet: #63bce8;
  --green: #8bc7a4;
  --danger: #efa0a5;
  --button-bg: #247b9d;
  --button-hover: #1b6d8d;
  --button-text: #ffffff;
  --button-edge: #111315;
  --focus-ring: #23a9f240;
  --header-surface: #111315f5;
  --product-grid: #ffffff0d;
  --shadow-card: 0 2px 8px #00000024;
  --shadow-soft: 0 12px 40px #00000033;
  --shadow: 0 12px 40px #00000033;
}

html { color-scheme: light; background: var(--bg); }
body { background: var(--bg); color: var(--text); }
::selection { color: var(--text); background: var(--surface-2); }
:focus-visible { outline-color: var(--primary); }

/* Let typography and the product carry the first screen. */
.page-bg, .hero-ambient, .hero__visual::before,
.auth-page-bg::after, .auth-card__halo,
.auth-card::before, .auth-showcase::after { display: none; }
.site-header, .site-header.is-scrolled {
  background: var(--header-surface);
  border-bottom-color: var(--line);
  box-shadow: none;
  backdrop-filter: blur(12px);
}
.site-footer { background: var(--bg-elevated); }
.section--tint { background: var(--bg-elevated); }
.section-kicker { color: var(--text-faint); }
.section-kicker::after { background: var(--line-strong); }
.text-gradient,
.landing-body .hero__title .text-gradient,
.auth-intro h1 span {
  background: none;
  color: var(--text);
  -webkit-text-fill-color: currentColor;
}
.landing-body .hero__title { max-width: 1000px; margin-inline: auto; }
.hero__proofs svg { color: var(--text-soft); }
.button--primary { color: var(--button-text); background: var(--button-bg); box-shadow: none; }
.button--primary:hover { color: var(--button-text); background: var(--primary-hover); box-shadow: none; }
.button--secondary { background: var(--bg); color: var(--text); box-shadow: none; backdrop-filter: none; }
.button:hover, .feature-card:hover, .scenario-card:hover, .price-card:hover { transform: none; }
.feature-card, .step-card, .scenario-card, .price-card,
.workflow-cta, .billing-note, .faq-item, .contact-card { background: var(--surface-solid); }
.price-card--featured { border-color: var(--text); background: var(--surface-solid); box-shadow: none; }
.doc-reading-progress span { background: var(--text); box-shadow: none; }
.docs-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }

/* Neutral authentication surfaces, including the small assistant preview. */
.auth-card, .auth-showcase {
  background: var(--surface-solid);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}
.auth-showcase__top { background: var(--bg-elevated); border-bottom-color: var(--line); color: var(--text-faint); }
.auth-showcase__top > span i { background: var(--line-strong); }
.auth-showcase__top > em i { background: var(--green); box-shadow: none; }
.auth-showcase__assistant b { color: var(--text); }
.auth-showcase__assistant small { color: var(--text-faint); }
.auth-showcase__mark { background: var(--surface-soft); border-color: var(--line); color: var(--text); }
.auth-showcase__message { border-color: var(--line); background: var(--bg-elevated); color: var(--text-soft); }
.auth-showcase__message > span { color: var(--text); }
.auth-showcase__tags span { border-color: var(--line); background: var(--surface-soft); color: var(--text-soft); }
.auth-benefits li > span { background: var(--surface-soft); border-color: var(--line); color: var(--text-soft); }
.auth-plan-strip { background: var(--bg-elevated); border-color: var(--line); }
.auth-plan-strip__label { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.auth-provider--yandex { border-color: var(--line-strong); box-shadow: none; }
.auth-provider--yandex:hover { border-color: var(--text-faint); box-shadow: none; }
.auth-provider:hover { transform: none; }
.auth-input-wrap input { background: var(--bg); }
.auth-input-wrap input::placeholder { opacity: 1; }
.auth-input-wrap input:focus { background: var(--bg); border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.auth-consent input:focus-visible, .password-toggle:focus-visible { outline-color: var(--primary); }
.password-toggle:hover { background: var(--surface-soft); }

/* Conversion panels use the same paper surfaces as the rest of the site. */
.section--automation-showcase { background: var(--bg-elevated); border-color: var(--line); }
.section--automation-showcase::before, .home-contact-cta::before,
.landing-body .workflow-cta--spotlight::before,
.automation-cta::after, .automation-flow__card::before,
.pricing-partner-note--spotlight::after { display: none; }
.landing-body .workflow-cta--spotlight,
.automation-cta, .pricing-partner-note--spotlight,
.pricing-partner-note--spotlight:hover {
  background: var(--surface-solid);
  border-color: var(--line-strong);
  box-shadow: none;
  border-radius: 12px;
}
.automation-flow__card, .landing-body .launch-path--managed { box-shadow: none; background: var(--surface-solid); }
.landing-body .workflow-cta--spotlight .button,
.automation-cta .button, .pricing-partner-note__action {
  background: var(--button-bg);
  border-color: var(--button-bg);
  color: var(--button-text);
  box-shadow: none;
}
.landing-body .workflow-cta--spotlight .button:hover,
.automation-cta .button:hover, .pricing-partner-note__action:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--button-text);
  transform: none;
}
.pricing-partner-note__action small { color: #d9dde3; }
.pricing-partner-note--spotlight .pricing-partner-note__icon { background: var(--surface-soft); border-color: var(--line); box-shadow: none; }

/* Product illustrations follow the neutral cabinet palette. */
.landing-body .tour-screen, .seo-body .seo-demo,
.tour-screen--widget .widget-preview, .seo-widget-demo {
  box-shadow: var(--shadow-soft);
}
.seo-demo__rail-nav > span.is-active,
.seo-demo__tab.is-active,
.tour-screen--knowledge .knowledge-file.is-active,
.seo-demo--knowledge .knowledge-file.is-active,
.seo-billing-demo__tabs span.is-active,
.seo-workspace-demo__steps article.is-active {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line-strong);
}
.tour-screen--knowledge .knowledge-answer__query,
.seo-demo--knowledge .knowledge-answer__query,
.seo-demo__bubble--user { background: var(--button-bg); color: #ffffff; }
.seo-billing-demo__line { stroke: var(--text-soft); }
.seo-widget-demo header, .tour-screen--widget .widget-preview header { background: var(--button-bg); }

.section--product-tour, .section--launch-choice { background: var(--bg-elevated); }
.section--product-tour::before, .section--launch-choice::before,
.seo-body .seo-hero::before, .seo-body .docs-hero::before,
.seo-body .seo-demo::before, .tour-screen::before,
.implementation-hero::before { display: none; }
.tour-carousel, .implementation-delivery { box-shadow: none; }
.tour-slide__eyebrow::before { box-shadow: none; }
.seo-demo__rail { background: var(--bg-elevated); }
.seo-demo__rail-brand > span { background: var(--nineai-brand-accent); color: var(--nineai-brand-ink); box-shadow: none; }
.tour-screen--knowledge .knowledge-file > i,
.seo-demo--knowledge .knowledge-file > i,
.tour-screen--knowledge .knowledge-answer > div > i,
.seo-demo--knowledge .knowledge-answer > div > i,
.tour-screen--knowledge .knowledge-answer p small,
.seo-demo--knowledge .knowledge-answer p small { color: var(--text-soft); }

.partner-program-card, .seo-partner, .seo-plan--featured {
  background: var(--surface-solid);
  border-color: var(--line-strong);
  box-shadow: none;
}
.partner-program-card::before, .seo-partner::before { display: none; }
.contact-card, .scroll-top { box-shadow: var(--shadow-card); }
