/* Project 17 site — pixel-art design system (v2 tokens)
   Palette, pixel rules and layout from the owner-approved design spec (13.11).
   Typography: exactly six sizes. Spacing: the 8px scale only.
   Budget: <= 40 KB. No external requests, no CDN. */

@font-face {
  font-family: "Plex Sans";
  src: url("/static/fonts/plex-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0301, U+0400-045F, U+0490-0491, U+2116;
}

@font-face {
  font-family: "Pixelify";
  src: url("/static/fonts/pixelify-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0301, U+0400-045F, U+0490-0491, U+2116;
}

:root {
  --bg: #F4F1E8;
  --surface: #FFFFFF;
  --text: #17212B;
  --muted: #4D5B68;
  --accent: #1D4ED8;
  --accent-ink: #FFFFFF;
  --success: #166534;
  --warning: #8A4B00;
  --warning-bg: #FDF3E3;
  --border: #23364A;
  --shadow: 4px 4px 0 var(--border);
  --shadow-lg: 6px 6px 0 var(--border);
  --focus: #1D4ED8;
  --wrap: 1160px;
  --radius: 0;
  --max-text: 68ch;

  /* Type scale — six sizes, nothing in between. */
  --fs-meta: 12px;                       /* meta, legal fine print */
  --fs-label: 14px;                      /* labels, captions, footer, badges */
  --fs-body: 16px;                       /* body, navigation, buttons, forms */
  --fs-h3: 20px;                         /* H3, card and block titles */
  --fs-h2: clamp(24px, 3vw, 28px);       /* H2 */
  --fs-h1: clamp(32px, 5vw, 40px);       /* H1 */

  /* Spacing scale — every gap is a multiple of 8. */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  --font-body: "Plex Sans", "Helvetica Neue", Arial, sans-serif;
  /* The pixel face is an accent, not a reading face: eyebrow and badges only. */
  --font-pixel: "Pixelify", "Plex Sans", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181D;
    --surface: #1F232B;
    --text: #E9E6DE;
    --muted: #9AA0AC;
    --accent: #5B8CFF;
    --accent-ink: #10131A;
    --success: #3DBB74;
    --warning: #E8943A;
    --warning-bg: #2A2116;
    --border: #E9E6DE;
    --focus: #5B8CFF;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-body);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}

/* H1 and H2 are the page's reading face: Plex Sans 700. The pixel face is an
   accent for the eyebrow and the badges, never for a sentence the reader has
   to parse at 360px. */
h1, h2 { font-weight: 700; }
h3 { font-weight: 600; }

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--space-2); }
blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-style: solid; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
.wrap--narrow { max-width: 760px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: var(--space-2);
  border: 2px solid var(--border);
  z-index: 50;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

/* ---------- header ---------- */

.site-header {
  border-bottom: 2px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 72px;
}

/* S4.2 logo v2 — pixelness lives in the mark, the letters stay Plex Sans.
   Glyph 24px (a multiple of 8), wordmark 20px semibold, clear space 8px. */
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.logo__mark {
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--accent);
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}

.logo__text {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.2;
}

.nav-desktop { margin-inline-start: auto; }
.nav-list {
  display: flex;
  gap: var(--space-3);
  list-style: none;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  padding-block: var(--space-1);
  border-bottom: 2px solid transparent;
}
.nav-link:hover { border-bottom-color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.lang-switch {
  display: flex;
  gap: 0;
  list-style: none;
  border: 2px solid var(--border);
  padding: 0;
  background: var(--bg);
}
.lang-link {
  /* 16px text and a 44px tap target: the switch is a control, not a caption. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: var(--space-1);
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.lang-link.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.nav-mobile { display: none; margin-inline-start: auto; }
.nav-mobile__toggle {
  list-style: none;
  cursor: pointer;
  padding: var(--space-1);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-mobile__toggle::-webkit-details-marker { display: none; }
.nav-mobile__panel {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--surface);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  padding: var(--space-2) var(--space-3) var(--space-3);
}
.nav-mobile__list { list-style: none; }
.nav-mobile__link {
  display: block;
  min-height: 44px;
  padding: var(--space-1) 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 30%, transparent);
}
.lang-switch--mobile { margin-top: var(--space-2); width: max-content; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
  color: var(--text);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--border); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--border); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; }
.btn--sm { min-height: 44px; padding: var(--space-1) var(--space-2); }
/* The header's ghost button keeps the same 2px frame as every other button.
   Dropping the offset shadow keeps that frame from reading as a double one
   against the white header — the ghost variant is a frame, not a slab. */
.header-cabinet {
  border-width: 2px;
  box-shadow: none;
}
.header-cabinet:hover {
  border-width: 2px;
  box-shadow: none;
}
.btn--lg { min-height: 56px; padding: var(--space-2) var(--space-4); }
.button-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- shared section chrome ---------- */

.section { padding-block: var(--space-7); }
.section--alt { background: var(--surface); border-block: 2px solid var(--border); }
.section__head { max-width: var(--max-text); margin-bottom: var(--space-6); }
.section__subtitle { color: var(--muted); font-size: var(--fs-h3); }
.section__note {
  color: var(--muted);
  font-size: var(--fs-label);
  /* No paragraph margin below: the note → arrow gap is the element gap (24). */
  margin-top: var(--space-3);
  margin-bottom: 0;
}
.section__note + .link-arrow { margin-top: var(--space-3); }
.section__title { margin-bottom: var(--space-3); }

.page-head { max-width: var(--max-text); margin-bottom: var(--space-5); }
.page-head__note,
.page-head__intro { color: var(--muted); }
.page-head--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  max-width: none;
}

.eyebrow {
  font-family: var(--font-pixel);
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- banner / alerts ---------- */

.banner {
  margin: 0;
  padding: var(--space-1) var(--space-3);
  background: var(--warning-bg);
  color: var(--warning);
  border-bottom: 2px solid var(--border);
  font-size: var(--fs-label);
  text-align: center;
}
.alert {
  padding: var(--space-2);
  border: 2px solid var(--border);
  margin-bottom: var(--space-3);
  font-size: var(--fs-body);
}
.alert--error { color: var(--warning); background: var(--warning-bg); }
.alert--warning { color: var(--warning); background: var(--warning-bg); }

/* ---------- hero ---------- */

/* Rhythm: a band is 96px top and bottom, so the gap either side of the thin
   trust strip (32px) is the same: 96 + 32 = 32 + 96. */
.hero { padding-block: var(--space-7); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-6);
  align-items: center;
}
.hero__title { max-width: 16ch; }
.hero__subtitle {
  font-size: var(--fs-h3);
  color: var(--muted);
  max-width: 52ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block: var(--space-3);
}
.hero__note { font-size: var(--fs-label); color: var(--muted); max-width: 46ch; }

/* The hero's right column is a real post example, not a grey placeholder:
   channel, delivery metadata, body text, tags and an explicit «пример» badge. */
.post-card {
  margin: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3);
}
.post-card__badge {
  display: inline-block;
  margin: 0 0 var(--space-2);
  padding: 0 var(--space-1);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-pixel);
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.post-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.post-card__avatar {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border: 2px solid var(--border);
  display: block;
  flex: none;
}
.post-card__channel { font-weight: 600; margin: 0; }
.post-card__meta { margin: 0; font-size: var(--fs-label); color: var(--muted); }
.post-card__text { margin-bottom: var(--space-2); }
.post-card__tags { margin: 0; color: var(--accent); font-size: var(--fs-label); }

/* ---------- trust bar ---------- */

.trust {
  border-block: 2px solid var(--border);
  background: var(--surface);
  padding-block: var(--space-4);
}
.trust__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  list-style: none;
  align-items: stretch;
}
/* A grid cell per fact, with the tick in its own 16px column: a fact that
   wraps to two lines no longer shifts its tick against the single-line ones,
   and the four columns stay equal at every width. Ticks align to the first
   line, so the four of them sit on one visual row. */
.trust__item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: var(--space-1);
  align-items: start;
  font-size: var(--fs-label);
  line-height: 1.4;
  color: var(--text);
}
.trust__item .icon { width: 16px; height: 16px; color: var(--success); }

.icon { flex: none; }

/* ---------- benefits ---------- */

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.benefit-card {
  background: var(--surface);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  padding: var(--space-3);
}
.benefit-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--accent);
  margin-bottom: var(--space-2);
}
.benefit-card__title { font-size: var(--fs-h3); }
.benefit-card__text { color: var(--muted); margin-bottom: 0; }

/* ---------- post demo ---------- */

/* The narrow reading column belongs to an inner element: capping the shared
   .wrap would centre this section 170px right of every other section's edge. */
.sample__inner { max-width: 820px; }
.post-demo {
  background: var(--bg);
  border: 2px solid var(--border);
  padding: var(--space-3);
  box-shadow: var(--shadow);
}
.post-demo__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.post-demo__avatar {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border: 2px solid var(--border);
  display: block;
  flex: none;
}
.post-demo__channel { font-weight: 600; margin: 0; }
.post-demo__meta { margin: 0; font-size: var(--fs-meta); color: var(--muted); }
.post-demo__text { margin-bottom: var(--space-2); }
.post-demo__tags { margin: 0; color: var(--accent); font-size: var(--fs-label); }

/* ---------- plans ---------- */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: stretch;
}
.plan-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  padding: var(--space-3);
  position: relative;
}
/* The featured card keeps the 2px border of its siblings: a wider border moves
   its inner text 2px against the row. Emphasis is the accent edge, the heavier
   shadow and the 8px accent bar drawn inside the padding box. */
.plan-card--featured {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
  background: var(--surface);
}
.plan-card--featured::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 8px;
  background: var(--accent);
}
.plan-card__badge-row {
  /* A fixed 32px row on every card: the badge of one plan must not push its
     own name and price below the others in the same grid row. */
  min-height: var(--space-4);
  margin-bottom: var(--space-2);
}
.plan-card__badge {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--accent);
  margin: 0;
  padding: 0 var(--space-1);
  border: 2px solid var(--accent);
  width: max-content;
}
.plan-card__name { font-size: var(--fs-h3); margin-bottom: var(--space-2); }
.plan-card__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1); margin-bottom: var(--space-2); }
.plan-card__amount { font-size: var(--fs-h1); font-weight: 600; line-height: 1.1; }
.plan-card__period { font-size: var(--fs-label); color: var(--muted); }
.plan-card__tagline { color: var(--muted); font-size: var(--fs-body); margin-bottom: var(--space-2); }
.plan-card__desc { color: var(--muted); margin-bottom: var(--space-2); }
.plan-card__features {
  list-style: none;
  display: grid;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}
.plan-card__features li {
  display: flex;
  gap: var(--space-1);
  align-items: flex-start;
  font-size: var(--fs-body);
}
.plan-card__features .icon { color: var(--success); margin-top: 0; }
.plan-card__cta { margin-top: auto; }

/* ---------- quote ---------- */

.quote {
  max-width: 720px;
  border-inline-start: 8px solid var(--accent);
  padding-inline-start: var(--space-3);
}
.quote__label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--warning);
  margin-bottom: var(--space-2);
}
.quote__text { font-size: var(--fs-h3); line-height: 1.5; margin-bottom: var(--space-2); }
.quote__note { color: var(--muted); font-size: var(--fs-label); }

/* ---------- faq ---------- */

.faq-list { display: grid; gap: var(--space-2); max-width: 840px; }
.faq-item {
  border: 2px solid var(--border);
  background: var(--surface);
  padding: var(--space-2);
}
.faq-item__question {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--fs-body);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  /* The whole summary row is the tap target (>= 44px, on the 8px grid). */
  min-height: 48px;
}
.faq-item__question::-webkit-details-marker { display: none; }
.faq-item__question::after {
  content: "+";
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  color: var(--accent);
  flex: none;
}
.faq-item[open] .faq-item__question::after { content: "–"; }
.faq-item__answer { margin: var(--space-2) 0 0; color: var(--muted); }

/* ---------- steps ---------- */

.steps { list-style: none; display: grid; gap: var(--space-3); counter-reset: step; }
.steps--compact { gap: var(--space-2); }
.step { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-3); }
.step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 2px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--accent);
}
.step__title { font-size: var(--fs-h3); margin-bottom: var(--space-1); }
.step__text { color: var(--muted); margin-bottom: 0; }

/* ---------- rules ---------- */

.rule-list { list-style: none; display: grid; gap: var(--space-2); margin-bottom: var(--space-3); }
.rule-list__item { display: flex; gap: var(--space-2); align-items: flex-start; }
.rule-list__item .icon { color: var(--success); margin-top: 0; }

/* ---------- cta band ---------- */

.cta-band {
  background: var(--text);
  color: var(--bg);
  border-block: 2px solid var(--border);
  padding-block: var(--space-7);
}
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.cta-band__title { color: var(--bg); max-width: 22ch; }
.cta-band__text { color: var(--bg); opacity: 0.85; margin-bottom: 0; max-width: 46ch; }
.cta-band .btn--primary { background: var(--accent); color: var(--accent-ink); }

/* ---------- stats / cabinet ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
}
.stat-card {
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  padding: var(--space-3);
}
.stat-card__label { font-size: var(--fs-label); color: var(--muted); }
.stat-card__value { margin: 0; font-size: var(--fs-h3); font-weight: 600; }

.ref-box {
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  padding: var(--space-3);
  max-width: 720px;
}
.ref-box__label { font-size: var(--fs-label); color: var(--muted); margin-bottom: var(--space-1); }
.ref-box__link { margin-bottom: var(--space-1); }
.ref-box__link code {
  font-size: var(--fs-body);
  overflow-wrap: anywhere;
  background: var(--bg);
  padding: 0 var(--space-1);
  border: 2px solid var(--border);
  display: inline-block;
}
.ref-box__hint { margin: 0; font-size: var(--fs-label); color: var(--muted); }

/* ---------- legal ---------- */

.legal__updated { color: var(--muted); font-size: var(--fs-label); }
.legal__intro { font-size: var(--fs-h3); }
.legal__disclaimer {
  font-size: var(--fs-label);
  color: var(--warning);
  border-inline-start: 4px solid var(--warning);
  padding-inline-start: var(--space-2);
}
.legal__section { margin-bottom: var(--space-4); }
.legal__heading { font-family: var(--font-body); font-size: var(--fs-h3); font-weight: 600; }
.legal__list { padding-inline-start: var(--space-3); display: grid; gap: var(--space-1); }
.legal__list li { color: var(--muted); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 44px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 2px solid var(--border);
  background: var(--surface);
  padding-block: var(--space-6) var(--space-3);
}
.footer-grid {
  display: grid;
  /* minmax(0,…) on every track: a long URL or brand string must wrap inside
     its column, not push the footer wider than the viewport (R2). */
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4);
}
.footer-brand {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.footer-heading { font-size: var(--fs-label); font-weight: 600; color: var(--muted); margin-bottom: var(--space-2); text-transform: uppercase; letter-spacing: 0.06em; }
.footer-list { list-style: none; display: grid; gap: var(--space-1); }
.footer-list a, .footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-label);
}
.footer-list a:hover, .footer-link:hover { color: var(--accent); text-decoration: underline; }
.footer-note { font-size: var(--fs-label); color: var(--muted); }
.footer-copy { font-size: var(--fs-meta); color: var(--muted); margin-top: var(--space-4); }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .hero__art { max-width: 480px; }
  .trust__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Three plans stay in three columns: a 2+1 row leaves an orphan card that the
     eye reads as a broken rhythm. Below 600px the grid is a single column. */
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav-desktop,
  .header-actions .header-cabinet { display: none; }
  .nav-mobile { display: block; }
  .header-actions { margin-inline-start: auto; }
  .site-header__inner { flex-wrap: wrap; position: relative; }
  .benefit-grid { grid-template-columns: minmax(0, 1fr); }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .wrap { padding-inline: var(--space-2); }
  .section { padding-block: var(--space-6); }
  .hero { padding-block: var(--space-6); }
  .cta-band { padding-block: var(--space-6); }
  .section__head { margin-bottom: var(--space-5); }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .step { grid-template-columns: 48px minmax(0, 1fr); gap: var(--space-2); }
  .step__num { width: 48px; height: 48px; }
  .page-head--row { flex-direction: column; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .trust__list { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; }
  .button-row .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .btn:hover, .btn:active { transform: none; }
}

@media print {
  .site-header, .site-footer, .cta-band, .nav-mobile { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- sign-in form (S4.7) ---------- */

.alert--success { color: var(--success); background: var(--surface); }

.login-form {
  display: grid;
  gap: var(--space-2);
  max-width: 420px;
  margin-block: var(--space-2) var(--space-3);
  padding: var(--space-3);
  background: var(--surface);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}

.login-form__label { font-size: var(--fs-label); font-weight: 600; }

.login-form__input {
  min-height: 44px;
  padding: var(--space-1) var(--space-2);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
}

.login-form__input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.login-form__input--code {
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
}

.login-form__timer {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-label);
}

.login-form__timer--expired { color: var(--warning); }

.login-form__resend { justify-self: start; }

.login-form[aria-busy="true"] { cursor: progress; }
.login-form[aria-busy="true"] .btn { opacity: 0.6; }

/* ---------- home demo form (S6.4) ---------- */

/* The demo form is a login-form card; this only anchors the honeypot inside
   it, so the clipped box never escapes the card. */
.demo-form { position: relative; }

/* The invisible tripwire: a 1px clipped box no human can see or tap, but a
   form-filling bot reads and fills. */
.demo-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Consent is one tappable row: the label is the control, 44px minimum. */
.demo-form__consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  min-height: 44px;
  padding-block: var(--space-1);
  font-size: var(--fs-label);
}

.demo-form__consent input { margin: 0; }
