/* Главная, тарифы и регистрация topinad.com (docs/saas/08-produkt-glavnaya-tarify-demo.md, разделы 2, 3, 6). Стили взяты из макета
   docs/saas/mockup/topinad-landing.html; инлайновых стилей и скриптов на странице нет (PAGE_CSP: style-src self, script-src нет),
   переключатель «в месяц / в год» — радиокнопки и селектор :checked. */
:root {
  --bg: #f6f7fb; --card: #ffffff; --ink: #15192b; --muted: #5d6478; --line: #e2e5ee;
  --accent: #2f5bea; --accent-ink: #ffffff; --soft: #eaf0ff;
  --organic: #1b8f4f; --organic-bg: #e4f5ea; --buy: #d9601f; --buy-bg: #fdeee3; --warn: #a66b00; --warn-bg: #fff4d6;
  --hero: #0f1530; --hero-ink: #ffffff; --hero-muted: #aab2cf;
  --logo-ink: #10235f; --logo-dot: #2f6bff; --accent-text: #2f5bea;
  --radius: 14px; --shadow: 0 1px 2px rgba(20,25,43,.06), 0 8px 24px rgba(20,25,43,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1220; --card: #171b2e; --ink: #eef0f7; --muted: #a2a9c2; --line: #2a3050;
    --soft: #1d2745; --organic-bg: #143326; --buy-bg: #3a2113; --warn-bg: #3a2d10; --warn: #e6b85c;
    --hero: #0a0d1c; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --logo-ink: #eaf0ff; --logo-dot: #6e9bff; --accent-text: #8fb0ff;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1220; --card: #171b2e; --ink: #eef0f7; --muted: #a2a9c2; --line: #2a3050;
  --soft: #1d2745; --organic-bg: #143326; --buy-bg: #3a2113; --warn-bg: #3a2d10; --warn: #e6b85c;
  --hero: #0a0d1c; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --logo-ink: #eaf0ff; --logo-dot: #6e9bff; --accent-text: #8fb0ff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.6vw, 46px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 10px; font-weight: 600; border: 1px solid transparent; cursor: pointer; font-size: 16px; line-height: 1.2; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn.block { display: block; width: 100%; text-align: center; }
.note { font-size: 13px; color: var(--muted); }


/* ---- шапка ---- */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 32px; height: 32px; flex: none; }
.brand .word { width: 96px; height: 31px; margin-top: 5px; flex: none; }
.nav { display: flex; gap: 18px; margin-left: 8px; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a.on, .nav a:hover { color: var(--ink); text-decoration: none; }
.topbar .spacer { flex: 1; }
.topbar .login { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) { .nav { display: none; } }
@media (max-width: 440px) { .topbar .btn { display: none; } }

/* ---- hero ---- */
.hero { background: var(--hero); color: var(--hero-ink); padding: 64px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.06fr; gap: 28px; align-items: center; }
.hero p.lead { font-size: 18px; color: var(--hero-muted); max-width: 540px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.kicker { display: inline-block; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--hero-muted); margin-bottom: 14px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* ---- демо-таблица ---- */
.shot { background: var(--card); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.shot .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tabs { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tabs span { padding: 5px 10px; }
.tabs span.on { background: var(--soft); color: var(--accent-text); font-weight: 600; }
.shot table { width: 100%; border-collapse: collapse; font-size: 13px; }
.shot th, .shot td { padding: 8px 9px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.shot th { font-weight: 600; color: var(--muted); font-size: 12px; }
.shot td.num, .shot th.num { text-align: right; font-variant-numeric: tabular-nums; }
.app { display: flex; align-items: center; gap: 8px; }
.app i { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), #8bb0ff); display: inline-block; flex: none; }
.app .dev { display: block; color: var(--muted); font-size: 11px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge.organic { background: var(--organic-bg); color: var(--organic); }
.badge.buy { background: var(--buy-bg); color: var(--buy); }
.badge.unk { background: var(--line); color: var(--muted); }
.shot .foot { padding: 10px 14px; font-size: 13px; background: var(--soft); color: var(--accent-text); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.shot .foot b { font-weight: 600; }
.blur td { filter: blur(3px); opacity: .55; user-select: none; }

/* ---- секции ---- */
section.block { padding: 56px 0; }
section.block.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }
.grid4 { grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid4 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card ul { padding-left: 18px; margin: 0 0 14px; }
.card li { margin: 4px 0; }
.card .price { margin-top: auto; font-weight: 700; font-size: 18px; }
.card .price small { color: var(--muted); font-weight: 500; font-size: 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 8px; }
.tag.ios { color: #6a5acd; } .tag.tracker { color: var(--organic); }
.gift { background: var(--organic-bg); color: var(--organic); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; margin: 6px 0 12px; display: inline-block; }

.advantage { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow); margin-top: -28px; position: relative; }
.advantage .word { font-size: 30px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; color: var(--organic); }
@media (max-width: 700px) { .advantage { grid-template-columns: 1fr; } }

.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--muted); }

footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }

/* ---- тарифы ---- */
.page-head { padding: 48px 0 8px; text-align: center; }
.toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; background: var(--card); margin: 10px 0 30px; }
.toggle button { border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.toggle button.on { background: var(--accent); color: var(--accent-ink); }
.toggle .save { font-size: 12px; margin-left: 6px; opacity: .85; }
.plan { position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft), var(--shadow); }
.plan .big { font-size: 40px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 0; }
.plan .big small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan .per { color: var(--muted); font-size: 14px; min-height: 22px; }
.plan .btn { margin-top: 16px; }
.ribbon { position: absolute; top: -12px; right: 16px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.cmp { width: 100%; border-collapse: collapse; margin-top: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cmp th, .cmp td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: center; font-size: 14px; }
.cmp td:first-child, .cmp th:first-child { text-align: left; }
.cmp th { background: var(--soft); font-weight: 600; }
.cmp td.yes { color: var(--organic); font-weight: 700; }
.cmp td.no { color: var(--muted); }
.table-wrap { overflow-x: auto; }
.pricing-link { text-align: center; padding-bottom: 56px; }
.hidden { display: none !important; }

/* ---- вместо инлайновых стилей макета ---- */
.mt14 { margin-top: 14px; }
.mt16 { margin-top: 16px; }
.mcp-card { flex-direction: row; gap: 28px; align-items: center; flex-wrap: wrap; }
.mcp-text { flex: 1 1 320px; }
.mcp-text p { margin: 0; }
.mcp-side { flex: 0 0 auto; }
.ribbon.buy { background: var(--buy); }
.tag.buy { color: var(--buy); }
.soon { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--warn-bg); color: var(--warn); vertical-align: 2px; }
.shot .empty { padding: 28px 14px; color: var(--muted); font-size: 14px; }
.shot .asof { color: var(--muted); font-weight: 400; }

/* ---- переключатель периода без скриптов ---- */
.period-input { position: absolute; opacity: 0; pointer-events: none; }
.toggle label { border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 999px; font-weight: 600; cursor: pointer; }
#period-month:checked ~ .page-head .toggle label[for=period-month], #period-year:checked ~ .page-head .toggle label[for=period-year] { background: var(--accent); color: var(--accent-ink); }
#period-month:focus-visible ~ .page-head .toggle label[for=period-month], #period-year:focus-visible ~ .page-head .toggle label[for=period-year] { outline: 2px solid var(--accent); outline-offset: 2px; }
.y { display: none; }
#period-year:checked ~ * .y { display: inline; }
#period-year:checked ~ * .m { display: none; }
#period-year:checked ~ * div.y { display: block; }

/* ---- формы входа и регистрации ---- */
.auth { max-width: 440px; margin: 48px auto; padding: 0 16px; }
.auth .card { gap: 10px; }
.auth label { font-weight: 600; font-size: 14px; }
.auth input[type=email], .auth input[type=password], .auth input[type=text] { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.auth .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth .error { background: var(--buy-bg); color: var(--buy); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.auth button { margin-top: 6px; }
.btn { font-family: inherit; }
.auth h1 { font-size: 28px; }

/* /docs/mcp — инструкция подключения ИИ-ассистента */
.docs { max-width: 860px; padding-top: 32px; padding-bottom: 48px; }
.docs h2 { margin-top: 28px; }
.docs h3 { margin: 18px 0 6px; font-size: 16px; }
pre.code { background: var(--soft); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 13px; line-height: 1.5; }
pre.code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
