/* Юридический ассистент — landing styles. No external fonts (152-ФЗ, speed). */
:root {
  --paper: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #172033;
  --muted: #4a5468;
  --faint: #6b7487;
  --line: #d6dce6;
  --stamp: #5a3fc0;
  --stamp-ink: #ffffff;
  --stamp-soft: #ece8fb;
  --stamp-line: #c9bff2;
  --ok: #1d7a4b;
  --warn-bg: #fff6dc;
  --warn-line: #ecd48a;
  --danger: #b42318;
  --sheet: #ffffff;
  --sheet-ink: #1b1b1b;
  --shadow: 0 1px 2px rgba(23, 32, 51, .06), 0 12px 32px -12px rgba(23, 32, 51, .18);
  --radius-s: 6px;
  --radius-m: 12px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-doc: "Times New Roman", Times, "Liberation Serif", "Nimbus Roman", serif;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111827;
    --surface: #182133;
    --surface-2: #1e293d;
    --ink: #e8ebf2;
    --muted: #b0b8c9;
    --faint: #8f98ab;
    --line: #2c3850;
    --stamp: #a897ff;
    --stamp-ink: #160f33;
    --stamp-soft: #262046;
    --stamp-line: #4a3f86;
    --ok: #5fd39a;
    --warn-bg: #3a3218;
    --warn-line: #6b5a22;
    --danger: #ff8a80;
    --sheet: #f3f1ea;
    --sheet-ink: #1b1b1b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111827; --surface: #182133; --surface-2: #1e293d; --ink: #e8ebf2; --muted: #b0b8c9;
  --faint: #8f98ab; --line: #2c3850; --stamp: #a897ff; --stamp-ink: #160f33; --stamp-soft: #262046;
  --stamp-line: #4a3f86; --ok: #5fd39a; --warn-bg: #3a3218; --warn-line: #6b5a22; --danger: #ff8a80;
  --sheet: #f3f1ea; --sheet-ink: #1b1b1b; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--stamp); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.015em; }
h1 { font-size: clamp(1.95rem, 1.25rem + 2.5vw, 3rem); font-weight: 700; letter-spacing: -.022em; line-height: 1.1; }
.nowrap { white-space: nowrap; }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.45rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: var(--radius-s); }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.25em; border-radius: var(--radius-s);
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--stamp); color: var(--stamp-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--stamp) 86%, var(--ink)); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--stamp); color: var(--stamp); }
.btn-small { min-height: 40px; padding: .5em 1em; font-size: .95rem; }
.btn[disabled] { opacity: .55; cursor: progress; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; line-height: 1.15; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-weight: 400; color: var(--faint); font-size: .78rem; }
.nav { display: none; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: .97rem; }
.nav a:hover { color: var(--ink); }
.header-cta { margin-left: auto; }
@media (min-width: 900px) { .nav { display: flex; } .header-cta { margin-left: 8px; } }
@media (max-width: 420px) { .brand small { display: none; } }

/* Hero */
.hero { padding: 44px 0 56px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .hero { padding: 72px 0 88px; } .hero .wrap { grid-template-columns: 1.05fr .95fr; gap: 56px; } }
.hero-lead { font-size: 1.15rem; color: var(--muted); margin-top: 20px; max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: .93rem; color: var(--faint); max-width: 38em; }
.hero-note a { color: inherit; }

/* The document sheet (signature element) */
.sheet-box { position: relative; }
.sheet-tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.sheet-tabs button {
  font: 500 .93rem/1.2 var(--font); color: var(--muted); background: transparent; border: 0;
  padding: .55em .9em; border-radius: 7px; cursor: pointer; min-height: 40px;
}
.sheet-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.sheet {
  background: var(--sheet); color: var(--sheet-ink); border-radius: 4px; box-shadow: var(--shadow);
  padding: 28px 24px 30px; font: 400 1.02rem/1.55 var(--font-doc);
  border: 1px solid rgba(0,0,0,.06); position: relative;
}
@media (min-width: 560px) { .sheet { padding: 36px 40px 40px; } }
.sheet-head { margin-left: auto; width: min(100%, 19em); font-size: .95rem; }
.sheet-head p + p { margin-top: 6px; }
.sheet-title { text-align: center; font-weight: 700; letter-spacing: .04em; margin: 22px 0 4px; }
.sheet-sub { text-align: center; margin-bottom: 14px; }
.sheet-body { text-indent: 1.6em; text-align: justify; hyphens: auto; }
.pd { position: relative; display: inline; white-space: normal; }
.pd .tok {
  display: none; font: 600 .82em/1 var(--font); color: #3b2a8f; background: #ebe6ff;
  border: 1px solid #b9adf0; border-radius: 4px; padding: .2em .38em; white-space: nowrap; text-indent: 0;
}
.sheet.is-masked .pd .real { display: none; }
.sheet.is-masked .pd .tok { display: inline-block; animation: stampIn .38s cubic-bezier(.2,.9,.3,1.3) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes stampIn { from { transform: scale(1.35) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet.is-masked .pd .tok { animation: none; } }
.sheet-stamp {
  position: absolute; left: 18px; top: 18px; width: 84px; height: 84px; opacity: 0; transform: rotate(-12deg) scale(1.3);
  transition: opacity .3s .5s, transform .35s .5s cubic-bezier(.2,.9,.3,1.3); pointer-events: none;
}
.sheet.is-masked .sheet-stamp { opacity: .9; transform: rotate(-12deg) scale(1); }
@media (prefers-reduced-motion: reduce) { .sheet-stamp { transition: none; } }
.sheet-caption { margin-top: 14px; font-size: .92rem; color: var(--faint); max-width: 34em; }

/* Sections */
section { padding: 32px 0; }
@media (min-width: 980px) { section { padding: 48px 0; } }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin: 0 auto 20px; text-align: center; }
.section-head h2 { text-align: center; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 1.1rem; text-align: center; }
@media (min-width: 980px) { .section-head p { font-size: 1rem; } }
/* Body text in every section block: justified on tablet/desktop; left on phones (narrow columns make word gaps) */
@media (min-width: 720px) {
  .pain p, .step p, .feature-text > p, .feature-text li, .pro-item p, .sec-list p, .faq .answer p, .final p { text-align: justify; hyphens: auto; }
}

/* Pains */
.pains { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pain { display: grid; gap: 10px 40px; padding: 24px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .pain { grid-template-columns: 1fr 1.2fr; } }
.pain h3 { font-size: 1.15rem; }
.pain p { color: var(--muted); }
.pain .fix { color: var(--ink); }
.pain .fix::before { content: ""; display: inline-block; width: .55em; height: .55em; margin-right: .55em; background: var(--stamp); border-radius: 2px; transform: translateY(-.08em) rotate(45deg); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 980px) { .steps { grid-template-columns: repeat(5, 1fr); gap: 0; } }
.step { counter-increment: step; position: relative; padding: 20px 20px 22px 64px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); }
.step::before {
  content: counter(step); position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font: 700 1rem/1 var(--font); color: var(--stamp); border: 2px solid var(--stamp);
}
@media (min-width: 980px) {
  .step { padding: 64px 20px 4px 0; background: none; border: 0; border-top: 2px solid var(--line); border-radius: 0; margin-right: 20px; }
  .step::before { left: 0; top: -17px; background: var(--surface); }
}
.step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .98rem; }

/* Features */
.feature { display: grid; gap: 28px; align-items: start; padding: 20px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 980px) {
  .feature { grid-template-columns: .9fr 1.1fr; gap: 56px; padding: 28px 0; }
  .feature.flip .feature-text { order: 2; }
}
.feature-text h3 { font-size: 1.45rem; margin-bottom: 12px; }
.feature-wide .feature-text h3 { text-align: center; }
.feature-text > p { color: var(--muted); }
.feature-text ul { margin: 16px 0 0; padding-left: 1.2em; color: var(--muted); }
.feature-text li + li { margin-top: 6px; }
.feature-text li::marker { color: var(--stamp); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding: 0; list-style: none; }
.chips li { font-size: .9rem; padding: .32em .7em; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--surface); }
.section-alt .chips li { background: var(--paper); }
.shot { margin: 0; }
.shot picture, .shot > img { display: block; border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #f2f4f8; }
.shot figcaption { margin-top: 10px; font-size: .9rem; color: var(--faint); }
.pro-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; margin-top: 8px; }
@media (min-width: 720px) { .pro-list { grid-template-columns: 1fr 1fr; } }
.pro-item { background: var(--surface); padding: 22px; }
.section-alt .pro-item { background: var(--paper); }
.pro-item h3 { font-size: 1.1rem; margin-bottom: 6px; }
.pro-item p { color: var(--muted); font-size: .98rem; }
.pro-item .plan-tag { display: inline-block; margin-top: 10px; font-size: .85rem; color: var(--stamp); font-weight: 600; }

/* Security */
.sec-grid { display: grid; gap: 32px; }
@media (min-width: 980px) { .sec-grid { grid-template-columns: 1.15fr .85fr; gap: 56px; } }
.sec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.sec-list li { padding-left: 40px; position: relative; }
.sec-list li svg { position: absolute; left: 0; top: 2px; width: 26px; height: 26px; color: var(--stamp); }
.sec-list h3 { font-size: 1.1rem; margin-bottom: 4px; }
.sec-list p { color: var(--muted); }
.callout { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius-m); padding: 18px 20px; font-size: .97rem; }
.callout + .callout { margin-top: 14px; }
.callout strong { display: block; margin-bottom: 4px; }

/* Gallery */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 640px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; overscroll-behavior-x: contain; }
.gallery .shot { scroll-snap-align: start; }

/* Pricing */
.period-switch { display: inline-flex; padding: 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); margin: 0 0 28px; }
.period-switch legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.period-switch label { position: relative; display: block; cursor: pointer; }
.period-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.period-switch span { display: block; padding: .6em 1.1em; border-radius: 7px; font-weight: 500; color: var(--muted); min-height: 40px; }
.period-switch input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.period-switch input:focus-visible + span { outline: 3px solid var(--stamp); outline-offset: 2px; }
fieldset.period-switch { border: 1px solid var(--line); min-width: 0; }
.plans { display: grid; gap: 18px; }
@media (min-width: 700px) { .plans { grid-template-columns: repeat(2, 1fr); align-items: stretch; } }
@media (min-width: 1200px) { .plans { grid-template-columns: repeat(4, 1fr); gap: 16px; } .plan { padding: 24px 18px; } }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 26px 24px; display: flex; flex-direction: column; }
.plan.is-featured { border: 2px solid var(--stamp); background: var(--surface); position: relative; }
.plan-badge { position: absolute; top: -13px; left: 22px; background: var(--stamp); color: var(--stamp-ink); font-size: .82rem; font-weight: 600; padding: .25em .7em; border-radius: 999px; }
.plan h3 { font-size: 1.35rem; }
.plan-for { color: var(--faint); font-size: .95rem; margin-top: 4px; }
.price { margin: 18px 0 2px; font: 700 2.2rem/1.1 var(--font-display); letter-spacing: -.02em; }
.price small { font: 500 1rem/1 var(--font); color: var(--muted); letter-spacing: 0; }
.price-alt { color: var(--faint); font-size: .92rem; min-height: 1.5em; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 8px; font-size: .98rem; }
.plan li { padding-left: 1.5em; position: relative; }
.plan li::before { content: ""; position: absolute; left: .15em; top: .62em; width: .7em; height: .38em; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan li.quota { color: var(--muted); }
.plan li.quota::before { border: 0; width: .45em; height: .45em; background: var(--faint); border-radius: 50%; top: .55em; transform: none; }
.plan .btn { margin-top: auto; width: 100%; }
.plan .trial-link { margin-top: 10px; text-align: center; font-size: .92rem; }
.plan-custom { border-style: dashed; }
.plan-custom .price span { font-size: 1.6rem; }
.plan-text { margin-top: 14px; font-size: .96rem; color: var(--muted); }
.plan-custom ul { margin-top: 14px; }
.pricing-notes { display: grid; gap: 14px; margin-top: 28px; }
@media (min-width: 900px) { .pricing-notes { grid-template-columns: 1fr 1fr 1fr; } }
.pricing-notes div { border-left: 3px solid var(--stamp-line); padding: 4px 0 4px 14px; color: var(--muted); font-size: .96rem; }
.pricing-notes strong { color: var(--ink); display: block; }

/* Compare table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.compare { border-collapse: collapse; width: 100%; min-width: 720px; font-size: .97rem; }
.compare th, .compare td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { font-weight: 650; background: var(--surface-2); }
.compare thead th:nth-child(2) { color: var(--stamp); }
.compare tbody th { font-weight: 600; width: 26%; }
.compare td:nth-child(2) { background: color-mix(in srgb, var(--stamp-soft) 55%, transparent); color: var(--ink); font-weight: 500; }
.compare td { color: var(--muted); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare-note { margin-top: 12px; font-size: .9rem; color: var(--faint); }

/* FAQ */
.faq { max-width: 860px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 1.12rem; font-weight: 600; display: inline; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 26px; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq .answer { padding: 0 0 22px; color: var(--muted); max-width: 46em; }
.faq .answer p + p { margin-top: 10px; }

/* Final CTA */
.final { text-align: left; }
.final h2 { text-align: center; }
.final .wrap { display: grid; gap: 24px; }
@media (min-width: 900px) { .final .wrap { grid-template-columns: 1.3fr 1fr; align-items: center; } }
.final p { color: var(--muted); margin-top: 12px; }
.final .hero-actions { margin-top: 0; }
@media (min-width: 900px) { .final .hero-actions { justify-content: flex-end; } }
.disclaimer { margin-top: 28px; font-size: .92rem; color: var(--faint); border-top: 1px solid var(--line); padding-top: 18px; grid-column: 1 / -1; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0 36px; font-size: .95rem; color: var(--muted); }
.footer-grid { display: grid; gap: 28px; }
/* Phones and small tablets: brand block on top, then «Контакты» and «Документы» side by side */
@media (max-width: 819px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .site-footer ul a, .site-footer .cc-link { overflow-wrap: anywhere; }
}
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { font-size: 1rem; color: var(--ink); margin-bottom: 10px; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); }
.social a:hover { border-color: var(--stamp); color: var(--stamp); }
.social svg { width: 20px; height: 20px; }
.footer-legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--faint); }

/* Modal */
dialog.buy {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius-m); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
}
dialog.buy::backdrop { background: rgba(10, 14, 25, .55); }
.buy form { padding: 24px 22px 22px; display: grid; gap: 18px; }
@media (min-width: 560px) { .buy form { padding: 28px 30px 26px; } }
.buy-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.buy-head h2 { font-size: 1.45rem; }
.icon-btn { background: none; border: 0; color: var(--muted); width: 44px; height: 44px; margin: -10px -10px 0 0; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { color: var(--ink); background: var(--surface-2); }
.buy fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.buy legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.choice-row { display: grid; gap: 8px; }
@media (min-width: 480px) { .choice-row.three { grid-template-columns: repeat(3, 1fr); } .choice-row.two { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: block; border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; background: var(--paper); }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice b { display: block; font-weight: 600; }
.choice span { display: block; font-size: .88rem; color: var(--muted); }
.choice:has(input:checked) { border-color: var(--stamp); background: var(--stamp-soft); }
.choice:has(input:focus-visible) { outline: 3px solid var(--stamp); outline-offset: 2px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type="email"] {
  width: 100%; min-height: 48px; padding: .6em .8em; font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 8px;
}
.field input[type="email"]:focus { border-color: var(--stamp); outline: none; box-shadow: 0 0 0 3px var(--stamp-soft); }
.field .hint { font-size: .88rem; color: var(--faint); margin-top: 6px; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: .95rem; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--stamp); }
.buy-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.buy-total b { font: 700 1.5rem/1 var(--font-display); }
.buy-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.buy-actions .btn-primary { flex: 1 1 220px; }
.buy-small { font-size: .86rem; color: var(--faint); }
.form-error { display: none; background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); color: var(--ink); border-radius: 8px; padding: 12px 14px; font-size: .95rem; }
.form-error.is-on { display: block; }

/* Pay page */
.pay-main { padding: 48px 0 80px; }
.pay-card { max-width: 680px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 28px 22px; box-shadow: var(--shadow); }
@media (min-width: 560px) { .pay-card { padding: 36px 36px; } }
.pay-card h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); }
.pay-card > p, .pay-state > p { color: var(--muted); margin-top: 12px; }
.pay-state[hidden] { display: none; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--stamp); animation: spin 1s linear infinite; margin-bottom: 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.key-box { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.key-box output { flex: 1 1 260px; font: 700 clamp(1.15rem, .9rem + 1.2vw, 1.5rem)/1.2 Consolas, "Cascadia Mono", "Courier New", monospace; letter-spacing: .06em; padding: 14px 16px; border: 2px dashed var(--stamp); border-radius: 8px; background: var(--stamp-soft); color: var(--ink); word-break: break-all; }
.howto { margin: 22px 0 0; padding-left: 1.3em; display: grid; gap: 8px; color: var(--muted); }
.pay-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.status-line { font-size: .9rem; color: var(--faint); margin-top: 16px; }

/* Cookie consent */
.cc {
  position: fixed; z-index: 50; left: 12px; right: 12px; bottom: 12px;
  max-height: 40vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: 0 18px 50px -12px rgba(10, 14, 25, .35); padding: 14px 16px;
  font-size: .9rem; line-height: 1.45;
}
.cc[hidden] { display: none; }
@media (min-width: 720px) { .cc { left: auto; right: 20px; bottom: 20px; width: 500px; max-height: 70vh; padding: 18px 20px; } .cc-actions .btn { flex: 0 1 auto; } }
.cc-title { font-weight: 650; margin-bottom: 4px; }
.cc-text { color: var(--muted); }
.cc-prefs { display: grid; gap: 10px; margin-top: 12px; }
.cc-prefs[hidden] { display: none; }
.cc-toggle { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; color: var(--muted); cursor: pointer; }
.cc-toggle input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--stamp); }
.cc-toggle input:disabled { cursor: not-allowed; }
.cc-toggle b { display: block; color: var(--ink); font-weight: 600; }
.cc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.cc-actions .btn { flex: 1 1 140px; min-height: 40px; font-size: .9rem; }
.cc-actions .btn[hidden] { display: none; }
.cc-link { background: none; border: 0; padding: 8px 4px; min-height: 40px; font: inherit; color: var(--stamp); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.site-footer .cc-link { color: var(--muted); padding: 0; min-height: 0; font-size: inherit; }
.site-footer .cc-link:hover { color: var(--ink); }
@media (max-width: 559px) { .sheet-stamp { display: none; } }
.feature-text ul.chips { padding-left: 0; margin-top: 16px; }
.feature-text .chips li + li { margin-top: 0; }
.feature-text .chips li { text-align: left; hyphens: manual; }
.pro-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.soon { display: inline-block; vertical-align: .12em; padding: .12em .55em; font-family: var(--font); font-size: .72rem; font-weight: 600; line-height: 1.4; letter-spacing: .02em; text-transform: lowercase; white-space: nowrap; color: var(--ink); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 999px; }
.plan li.soon-item { color: var(--muted); }
.plan li.soon-item::before { width: .55em; height: .55em; top: .5em; border: 1.5px solid var(--faint); border-radius: 50%; transform: none; }
@media (min-width: 980px) {
  .step { padding-top: 40px; }
  .gallery { grid-auto-flow: row; grid-template-columns: 1.25fr 1fr; overflow: visible; align-items: start; }
  .gallery .shot:first-child { grid-row: span 2; }
}
@media (max-width: 719px) {
  .cc { left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; font-size: .8rem; line-height: 1.38; }
  .cc-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cc-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-top: 8px; }
  .cc-actions .btn { min-height: 40px; padding: .35em .5em; font-size: .82rem; line-height: 1.15; }
  .cc-actions [data-cc="save"] { grid-column: 1 / -1; }
  .cc-link { padding: 6px 2px; min-height: 40px; }
}
@media (max-width: 559px) {
  .hero { padding-top: 24px; }
  .hero-lead { font-size: 1rem; margin-top: 14px; }
  .hero-actions { margin-top: 20px; }
  h1 { font-size: 1.8rem; }
}
@media (max-width: 559px) {
  .sheet-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .sheet-tabs button { font-size: .86rem; padding: .5em .4em; line-height: 1.2; }
}

/* ===== v2: navigation, buy sheet, lightbox, touch targets ===== */
section[id] { scroll-margin-top: 76px; }
html { scroll-padding-top: 0; }
html.is-locked, html.is-locked body { overflow: hidden; }
html:has(dialog[open]), html:has(dialog[open]) body { overflow: hidden; }

/* Header navigation */
.nav-toggle {
  display: none; flex: none; width: 44px; height: 44px; margin-right: -6px; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer;
  place-items: center;
}
.nav-toggle:hover { border-color: var(--stamp); color: var(--stamp); }
.nav-toggle path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-toggle .nt-close, .nav-toggle[aria-expanded="true"] .nt-open { display: none; }
.nav-toggle[aria-expanded="true"] .nt-close { display: inline; }
.nav a { border-radius: 6px; white-space: nowrap; }
html.is-locked .site-header { z-index: 60; }
@media (min-width: 901px) {
  .nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
  .nav a { padding: 10px 9px; }
  .header-cta { margin-left: 8px; }
}
@media (min-width: 901px) and (max-width: 1099px) { .site-header .wrap { gap: 12px; } .brand small { display: none; } .nav { gap: 2px; } .nav a { padding: 10px 6px; font-size: .94rem; } }
@media (min-width: 1200px) { .nav { gap: 10px; } }
@media (max-width: 900px) {
  .site-header .wrap { gap: 10px; }
  .nav-toggle { display: inline-grid; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0; padding: 8px 16px 16px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -18px rgba(10, 14, 25, .45), 0 0 0 100vmax rgba(10, 14, 25, .45);
    clip-path: inset(0 0 -100vmax 0);
    max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain;
  }
  .nav.is-open { display: flex; }
  .nav a { display: flex; align-items: center; min-height: 52px; padding: 0 12px; font-size: 1.08rem; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a:last-child { border-bottom: 0; }
  .nav a:hover, .nav a:focus-visible { background: var(--surface-2); }
  .header-cta { min-height: 44px; margin-left: auto; }
}
@media (max-width: 380px) {
  .brand { font-size: .95rem; gap: 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-cta { padding: .5em .75em; }
}

/* Touch targets: bigger hit area without changing text size */
.hero-note a, .pricing-notes a { position: relative; display: inline-block; padding: 12px 0; margin: -12px 0; }
.sheet-tabs button { min-height: 44px; }
.pd .tok { font-size: max(.86em, 13px); }
.period-switch span { min-height: 44px; display: flex; align-items: center; }
.brand small { font-size: .8125rem; }
@media (max-width: 719px) {
  .cc { font-size: .875rem; line-height: 1.42; }
  .cc-actions .btn { min-height: 44px; font-size: .875rem; }
  .cc-link { min-height: 44px; }

  .site-footer ul { gap: 0; }
  .site-footer ul a, .site-footer .cc-link { display: inline-block; padding: 10px 0; }
}

/* Buy dialog */
dialog.buy { overflow-y: auto; overscroll-behavior: contain; }
.buy-bar { display: grid; gap: 14px; }
@media (max-width: 480px) {
  dialog.buy {
    width: 100%; max-width: 100%; height: 100%; max-height: 100%; height: 100dvh; max-height: 100dvh;
    margin: 0; inset: 0; border: 0; border-radius: 0;
  }
  .buy form { min-height: 100%; padding: 14px 16px 0; gap: 14px; display: flex; flex-direction: column; }
  .buy-head { align-items: center; }
  .buy-head h2 { font-size: 1.25rem; }
  .icon-btn { margin: -4px -8px -4px 0; }
  .buy legend { margin-bottom: 6px; font-size: .95rem; }
  .choice-row.three { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .choice-row.two { grid-template-columns: 1fr 1fr; gap: 6px; }
  .choice { padding: 8px 6px; text-align: center; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
  .choice b { font-size: .95rem; line-height: 1.2; }
  .choice span { font-size: .8125rem; line-height: 1.25; }
  .choice-row.two .choice span { display: none; }
  .field .hint { font-size: .8125rem; }
  .consent { font-size: .875rem; line-height: 1.4; }
  .consent input { width: 22px; height: 22px; }
  .buy-small { font-size: .8125rem; }
  .buy-bar {
    position: sticky; bottom: 0; margin: auto -16px 0; padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
    gap: 8px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -16px rgba(10, 14, 25, .4);
  }
  .buy-total { padding-top: 0; border-top: 0; }
  .buy-total b { font-size: 1.3rem; }
  .buy-actions .btn-primary { flex-basis: 100%; }
  .buy-cancel { display: none; }
}

/* Screenshot zoom */
.shot-zoom { display: block; position: relative; cursor: zoom-in; border-radius: var(--radius-m); color: inherit; }
.shot-zoom::after {
  content: ""; position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(23, 32, 51, .72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 20px no-repeat;
  pointer-events: none; transition: transform .15s;
}
.shot-zoom:hover::after { transform: scale(1.08); }
dialog.lb {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(8, 11, 20, .94); color: #fff; overflow: hidden;
}
dialog.lb::backdrop { background: rgba(8, 11, 20, .6); }
.lb-stage {
  position: absolute; inset: 0; display: flex; overflow: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; padding: 60px 12px 64px; cursor: zoom-out;
}
.lb-img { margin: auto; flex: none; max-width: none; height: auto; background: #f2f4f8; border-radius: 6px; cursor: zoom-out; user-select: none; -webkit-user-drag: none; }
.lb.is-fit .lb-img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; }
.lb.is-fit.can-zoom .lb-img { cursor: zoom-in; }
.lb.is-drag .lb-stage, .lb.is-drag .lb-img { cursor: grabbing; }
.lb-close {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 44px; height: 44px; margin: 0; border-radius: 50%;
  color: #fff; background: rgba(255, 255, 255, .14);
}
.lb-close:hover { color: #fff; background: rgba(255, 255, 255, .26); }
.lb-close:focus-visible { outline-color: #fff; }
.lb-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  font-size: .9rem; line-height: 1.35; color: #e8ebf2; background: linear-gradient(transparent, rgba(8, 11, 20, .9) 40%);
  text-align: center; pointer-events: none;
}
.lb-cap small { display: block; color: #b0b8c9; font-size: .8125rem; }
.lb:not(.can-zoom) .lb-cap small { display: none; }

/* "Для юристов и адвокатов": text above, cards in a horizontal grid (11 cards: the last one spans 2 columns) */
@media (min-width: 980px) {
  .feature.feature-wide { grid-template-columns: 1fr; gap: 24px; }
  .feature-wide .feature-text { max-width: none; }
  .feature-wide .pro-list { grid-template-columns: repeat(3, 1fr); }
  .feature-wide .pro-item:last-child { grid-column: span 2; }
}
@media (min-width: 1180px) {
  .feature-wide .pro-list { grid-template-columns: repeat(4, 1fr); }
}
