/* Публичные страницы: главная, вход, тарифы, документы. Те же цвета, что у приложения. */
:root, :root[data-theme="dark"] {
  --bg: #0e1c22; --bg-2: #0a161b; --surface: #132630; --surface-2: #19313b; --line: #23414c; --line-soft: #1a333c;
  --text: #e4eded; --text-2: #a2b8bb; --text-3: #6f8a8f;
  --accent: #f0b447; --accent-bg: #f0b447; --accent-ink: #2a1d05; --accent-soft: rgba(240, 180, 71, .13);
  --teal: #67d3c9; --red: #f08a7e; --green: #8bd49a;
  --shadow: 0 24px 60px rgba(2, 10, 13, .5);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f8f7; --bg-2: #edf2f1; --surface: #ffffff; --surface-2: #eef3f2; --line: #d3dfde; --line-soft: #e2eaea;
  --text: #11262c; --text-2: #48646b; --text-3: #7a9394;
  --accent: #9c5f05; --accent-bg: #e3a33a; --accent-ink: #2a1d05; --accent-soft: rgba(168, 104, 10, .1);
  --teal: #0b7a72; --red: #b9412f; --green: #2c8a43;
  --shadow: 0 24px 60px rgba(16, 38, 44, .12);
  color-scheme: light;
}
:root[data-theme="black"] {
  --bg: #000; --bg-2: #070707; --surface: #111; --surface-2: #1a1a1a; --line: #2a2a2a; --line-soft: #1b1b1b;
  --text: #ededed; --text-2: #a9a9a9; --text-3: #707070; --shadow: 0 24px 60px rgba(0, 0, 0, .8);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 "Onest", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.narrow { width: min(760px, 100% - 40px); margin: 0 auto; }

.nav { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line-soft); }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.logo svg { width: 26px; height: 26px; color: var(--accent); }
.nav-links { display: flex; gap: 20px; margin-left: 12px; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 10px 18px;
  background: var(--accent-bg); color: var(--accent-ink); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-line { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-big { padding: 14px 26px; font-size: 17px; border-radius: 14px; }

/* главная */
.hero { padding: 96px 0 56px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; }
.eyebrow b { color: var(--teal); font-weight: 600; }
.hero h1 { font-size: clamp(38px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -.035em; margin: 22px auto 18px; max-width: 14ch; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: clamp(17px, 2vw, 20px); color: var(--text-2); max-width: 60ch; margin: 0 auto 32px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero small { display: block; margin-top: 14px; color: var(--text-3); font-size: 14px; }
.models-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin: 56px auto 0; max-width: 900px; }
.models-strip span { font-size: 14px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-soft); padding: 6px 12px; border-radius: 10px; }
.models-strip span.open { color: var(--teal); }

.demo { margin: 24px auto 0; max-width: 880px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); padding: 26px; text-align: left; }
.demo .q { margin-left: auto; width: fit-content; max-width: 80%; background: var(--surface-2); border-radius: 18px 18px 6px 18px; padding: 10px 16px; }
.demo .a { margin-top: 18px; }
.demo .step { color: var(--text-3); font-size: 14px; display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.demo table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.demo th, .demo td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.demo th { color: var(--text-2); font-weight: 600; }
.demo .opts { display: grid; gap: 8px; margin-top: 12px; }
.demo .opt { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line-soft); border-radius: 12px; padding: 9px 12px; font-size: 15px; }
.demo .opt b { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-2); font-size: 13px; }

.section { padding: 80px 0; }
.section h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.025em; line-height: 1.1; margin: 0 0 14px; }
.section .sub { color: var(--text-2); font-size: 18px; max-width: 60ch; margin: 0 0 40px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature { border: 1px solid var(--line-soft); background: var(--surface); border-radius: 18px; padding: 22px; }
.feature .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; font-size: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--text-2); font-size: 15px; }

/* тарифы */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line-soft); border-radius: 18px; padding: 22px; background: var(--surface); display: flex; flex-direction: column; }
.plan.hot { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan h3 { margin: 0; font-size: 19px; display: flex; justify-content: space-between; align-items: center; }
.plan h3 small { font-size: 12px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.plan .price { margin: 8px 0 4px; } .plan .price b { font-size: 36px; letter-spacing: -.03em; } .plan .price span { color: var(--text-3); }
.plan .tag { color: var(--text-2); font-size: 14.5px; margin: 0 0 14px; min-height: 3em; }
.plan ul { padding-left: 1.1em; margin: 0 0 18px; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); flex: 1; }
.plan .btn { width: 100%; }
.engines { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.engines th, .engines td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.engines th { color: var(--text-3); font-weight: 600; }
.engines td:first-child { font-weight: 600; white-space: nowrap; }
.engines .plus { color: var(--text-3); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--surface); }
.note { color: var(--text-3); font-size: 14px; }

/* вход */
.auth { min-height: calc(100dvh - 64px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.auth-card .lead { color: var(--text-2); margin: 0 0 22px; font-size: 15px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.tabs button { border: 0; background: none; padding: 8px; border-radius: 9px; color: var(--text-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.f { display: grid; gap: 6px; margin-bottom: 14px; }
.f label { font-size: 14px; color: var(--text-2); }
.f input { border: 1px solid var(--line); background: var(--bg); border-radius: 11px; padding: 11px 13px; outline: none; }
.f input:focus { border-color: var(--accent); }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); margin: 4px 0 18px; }
.chk input { accent-color: var(--accent); width: 17px; height: 17px; margin-top: 3px; flex: none; }
.err { color: var(--red); font-size: 14px; min-height: 1.4em; margin: 0 0 10px; }
.auth-card .btn { width: 100%; padding: 12px; }
.auth-foot { text-align: center; color: var(--text-3); font-size: 13.5px; margin-top: 18px; }

/* документы и FAQ */
.doc { padding: 56px 0 80px; }
.doc h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.025em; line-height: 1.1; margin: 0 0 8px; }
.doc .updated { color: var(--text-3); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font-size: 21px; margin: 36px 0 10px; letter-spacing: -.01em; }
.doc p, .doc li { color: var(--text-2); }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--text); }
.doc .box { border: 1px solid var(--line-soft); background: var(--surface); border-radius: 14px; padding: 16px 18px; margin: 18px 0; }
.doc .toc { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line-soft); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 400; font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p, .faq details ul { margin: 0 0 16px; color: var(--text-2); }

.footer { border-top: 1px solid var(--line-soft); padding: 40px 0 48px; color: var(--text-3); font-size: 14px; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 30px; }
.footer h4 { margin: 0 0 10px; color: var(--text-2); font-size: 14px; }
.footer a { color: var(--text-3); text-decoration: none; display: block; margin: 4px 0; }
.footer a:hover { color: var(--text); }
.footer .logo { display: flex; color: var(--text-2); margin: 0 0 8px; }
.footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.pay-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-badges span { border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; font-size: 12px; }

@media (max-width: 960px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .plans, .features { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .footer .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 60px; }
  .nav-cta .btn-line { display: none; }
}

.oauth-btn { width: 100%; padding: 11px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ok-msg { color: var(--green); font-size: 14px; margin: 0 0 10px; }
/* общий чат */
.share .msg-u { margin: 22px 0 8px auto; width: fit-content; max-width: 85%; background: var(--surface-2); border-radius: 18px 18px 6px 18px; padding: 10px 16px; white-space: pre-wrap; }
.share .msg-a { margin: 8px 0 22px; color: var(--text); }
.share .msg-a p, .share .msg-a li { color: var(--text); }
.share .who { font-size: 13px; color: var(--text-3); margin-bottom: 4px; }
.share .md table { border-collapse: collapse; width: 100%; font-size: 14px; }
.share .md th, .share .md td { border-bottom: 1px solid var(--line-soft); padding: 7px 10px; text-align: left; }
.share .md pre { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; overflow-x: auto; }
.share .md code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .88em; }
.share .md img, .share .shot { max-width: 100%; border-radius: 10px; }
.share .code-bar { display: none; }
.share .tool-note { color: var(--text-3); font-size: 14px; margin: 6px 0; }
.captcha { margin: 6px 0 12px; min-height: 65px; }
.captcha[hidden] { display: none; }

.footer .disclaimer { grid-column: 1 / -1; font-size: .8em; color: var(--text-3, #8a9a9f); max-width: 90ch; margin: 8px 0 0; line-height: 1.5; }
