/* ==========================================================================
   Noskhe (نسخه) landing page
   Brand: noskhe.brand.md v2.0 · Terminal theme on screen, Paper theme for print.
   Mobile-first. Breakpoints: 640 / 768 / 1024 / 1280.
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Pelak";
  src: url("../../webfonts/woff2/PelakFA-Regular.woff2") format("woff2"),
       url("../../webfonts/woff/PelakFA-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pelak";
  src: url("../../webfonts/woff2/PelakFA-Bold.woff2") format("woff2"),
       url("../../webfonts/woff/PelakFA-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pelak";
  src: url("../../webfonts/woff2/PelakFA-Black.woff2") format("woff2"),
       url("../../webfonts/woff/PelakFA-Black.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../../webfonts/jetbrains-mono/jetbrains-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../../webfonts/jetbrains-mono/jetbrains-mono-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Terminal theme (default on screen) */
  --bg: #0A0E17;
  --surface: #111726;
  --surface-raised: #182033;
  --line: #243049;
  --text: #E9EDF5;
  --text-muted: #8F9AB3;
  --brand: #3450F0;
  --on-brand: #FFFFFF;
  --brand-text: #7B93FF;
  --volt: #C5F04A;
  --on-volt: #0A0E17;
  --mint: #34D399;

  --font-fa: "Pelak", Tahoma, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Spacing (8px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 32px;
  --s-6: 48px;

  /* Radius: sharp, not round */
  --r-sm: 4px;   /* inputs, code, tags */
  --r-md: 8px;   /* buttons, cards */
  --r-lg: 14px;  /* big panels */
  --r-pill: 999px;

  --gutter: 16px;
  --header-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* z-index scale */
  --z-header: 50;
  --z-skip: 60;

  color-scheme: dark;
}

@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; --header-h: 72px; } }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-fa);
  font-size: 16px;
  line-height: 1.875; /* 16 / 30, tall leading for Persian */
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-family: var(--font-mono); }
s { text-decoration-thickness: 1.5px; }

::selection { background: var(--brand); color: var(--on-brand); }

:focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: calc(1200px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: 8px;
  inset-inline-start: 8px;
  z-index: var(--z-skip);
  padding: 8px 16px;
  background: var(--brand);
  color: var(--on-brand);
  border-radius: var(--r-md);
  transform: translateY(-150%);
  transition: transform .2s var(--ease);
}
.skip-link:focus-visible { transform: none; }

.sentinel { position: absolute; top: 0; height: 1px; width: 1px; }

/* ---------- Type primitives ---------- */
.kicker {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-text);
  text-align: right; /* mono runs are dir="ltr" inside an RTL page */
}

.display {
  font-weight: 900;
  font-size: clamp(40px, 4.6vw, 60px);
  line-height: 1.24;
  text-wrap: balance;
}

.h2 {
  font-weight: 900;
  font-size: clamp(28px, 4.6vw, 40px);
  line-height: 1.45;
  text-wrap: balance;
}

.hl { color: var(--brand-text); }

.code {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .08em;
  color: var(--text-muted);
}

.caption {
  font-size: 13px;
  line-height: 22px;
  color: var(--text-muted);
}

/* Visible placeholder for missing facts: [قیمت], [شماره تماس] */
.ph {
  display: inline-block;
  padding: 0 6px;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- Cursor block (once per page) ---------- */
.cursor {
  display: inline-block;
  width: .4em;
  height: .82em;
  margin-inline-start: .14em;
  vertical-align: -.06em;
  background: var(--volt);
}
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1s steps(1, end) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Status chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  direction: ltr;
}
.chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.chip--sm { min-height: 22px; padding: 1px 10px; font-size: 10.5px; line-height: 18px; gap: 6px; }
.chip--sm::before { width: 6px; height: 6px; }
.chip--mint { color: var(--mint); }
.chip--brand { color: var(--brand-text); }

/* ---------- Tag ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags[dir="ltr"] { justify-content: flex-end; }
.tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .04em;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: none;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
  text-align: center;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 20px; height: 20px; stroke-width: 2; transition: transform .3s var(--ease); }
.btn:active { transform: translateY(1px) scale(.99); }

.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: color-mix(in srgb, var(--brand) 86%, #fff); }
.btn--primary:hover .icon { transform: translateX(-4px); }

.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--brand-text); }

.btn--sm { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.btn--lg { min-height: 52px; padding: 12px 26px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text);
  transition: border-color .2s ease;
}
.icon-btn:hover { border-color: var(--brand-text); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgb(10 14 23 / .94);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand-link { display: block; flex: none; }
.brand-link img { height: 40px; width: auto; }

.nav { display: none; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--text-muted);
  transition: color .2s ease;
}
.nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-cta { display: none; }

.mobile-nav {
  border-top: 1px solid var(--line);
  background: var(--bg);
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}
.mobile-nav-inner { display: grid; gap: 4px; padding-block: 16px 24px; }
.mobile-nav a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn { margin-top: 16px; }

@media (min-width: 640px) {
  .header-cta { display: inline-flex; }
}
@media (min-width: 1024px) {
  .brand-link img { height: 44px; }
  .nav { display: flex; gap: 32px; }
  .menu-btn, .mobile-nav { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 32px 72px; }

.hero-grid { display: grid; gap: 48px; }

.hero-copy {
  display: grid;
  gap: 20px;
  justify-items: start;
  align-content: center;
}

.lede {
  max-width: 34em;
  text-wrap: pretty;
  font-size: 17px;
  line-height: 1.9;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}
.hero-actions .btn { flex: 1 1 auto; }

@media (min-width: 640px) {
  .hero-actions { width: auto; }
  .hero-actions .btn { flex: 0 0 auto; }
}
@media (min-width: 768px) {
  .lede { font-size: 18px; line-height: 34px; }
}
@media (min-width: 1024px) {
  .hero {
    display: grid;
    align-items: center;
    min-height: min(760px, calc(100dvh - var(--header-h)));
    padding-block: 48px 96px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: 64px;
    align-items: center;
  }
  .hero-copy { gap: 24px; }
}

/* Hero entrance (h1 keeps full opacity so it is painted immediately for LCP) */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .7s var(--ease) both; }
  .hero-copy > :nth-child(1) { animation-delay: .05s; }
  .hero-copy > :nth-child(2) { animation-name: lift; animation-delay: .1s; }
  .hero-copy > :nth-child(3) { animation-delay: .2s; }
  .hero-copy > :nth-child(4) { animation-delay: .3s; }
  .hero-visual { animation: rise .8s var(--ease) .25s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes lift { from { transform: translateY(14px); } }

/* Hero visual: dot grid lives behind the terminal, never behind body text */
.hero-visual { position: relative; isolation: isolate; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -32px calc(var(--gutter) * -1);
  z-index: -1;
  background-image: radial-gradient(var(--line) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  background-position: center;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
  mask-image: radial-gradient(closest-side, #000 55%, transparent);
}

/* ---------- Terminal ---------- */
.term {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
}

.term-body {
  padding: 16px 16px 20px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(11.5px, 3.1vw, 13.5px);
  line-height: 2;
  color: var(--text);
}

.t-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 2.15em;
  white-space: pre;
  overflow: hidden;
}
.t-out { padding-inline-start: 2ch; color: var(--text-muted); }
.t-prompt { color: var(--brand-text); }
.t-dim { color: var(--text-muted); }
.t-ok { color: var(--brand-text); }

.t-bar { display: inline-flex; gap: 3px; }
.t-bar i { width: .62em; height: 1em; background: var(--brand); border-radius: 1px; }

/* JS-driven playback: lines appear in sequence */
.js .term[data-anim] .t-line { visibility: hidden; }
.js .term[data-anim] .t-line.is-on { visibility: visible; }
.js .term[data-anim] .t-bar i { background: var(--line); }
.js .term[data-anim] .t-bar i.is-on { background: var(--brand); }

@media (min-width: 1024px) {
  .term-body { padding: 20px 24px 24px; }
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(72px, 11vw, 128px);
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 16px;
  max-width: 40rem;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-lede {
  max-width: 36em;
  text-wrap: pretty;
  font-size: 17px;
  line-height: 1.9;
  color: var(--text-muted);
}

/* ---------- Method: stepper ---------- */
.steps { display: grid; }

.step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  padding-bottom: 40px;
}
.step:last-child { padding-bottom: 0; }
/* connector */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 56px;
  bottom: 8px;
  inset-inline-start: 23.5px;
  width: 1px;
  background: var(--line);
}

.step-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--brand-text);
  background: var(--bg);
}
.step-num--filled { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

.step-body { display: grid; gap: 6px; align-content: start; padding-top: 4px; }
.step-body h3 { font-size: 22px; line-height: 1.5; font-weight: 700; }
.step-body p { color: var(--text-muted); }
.step-en, .step-out {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .08em;
  text-align: right;
}
.step-en { color: var(--text-muted); }
.step-out { margin-top: 6px; color: var(--brand-text); }

@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .step { grid-template-columns: 1fr; gap: 24px; padding-bottom: 0; }
  .step:not(:last-child)::before {
    top: 24px;
    bottom: auto;
    inset-inline-start: 64px;
    inset-inline-end: -16px;
    width: auto;
    height: 1px;
  }
}

/* ---------- Services: bento ---------- */
.bento { display: grid; gap: 16px; }

.cell {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  min-width: 0;
}
.cell h3 { font-size: 21px; line-height: 1.6; font-weight: 700; }
.cell p { color: var(--text-muted); }

.cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--brand-text);
}

/* Reels cell */
.cell--reels { gap: 24px; }
.cell-copy { display: grid; gap: 14px; align-content: start; }
.cell-copy .tags { margin-top: 6px; }

.reel-stage {
  display: grid;
  place-items: center;
  padding: 28px 16px;
  border-radius: var(--r-md);
  background-color: var(--bg);
  background-image: radial-gradient(var(--line) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  border: 1px solid var(--line);
}

.reel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 188px;
  aspect-ratio: 9 / 16;
  padding: 34px 12px 0;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.reel-mark { position: absolute; top: 10px; left: 10px; width: 16px; height: 16px; opacity: .7; }
.reel-kicker {
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 10px;
  letter-spacing: .08em;
  color: var(--brand-text);
  text-align: right;
}
.reel-hook { font-weight: 900; font-size: 17px; line-height: 1.5; }
.reel-hook span { color: var(--volt); }
.reel-card {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 11px;
  line-height: 1.7;
}
.reel-card span {
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 10px;
  letter-spacing: .08em;
  color: var(--text-muted);
  text-align: right;
}
.reel-card--myth s { color: var(--text-muted); }
.reel-card--fact { border-color: var(--mint); }
.reel-card--fact span { color: var(--mint); }
.reel-card--fact b { font-weight: 700; }
.reel-source {
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 10px;
  letter-spacing: .08em;
  color: var(--text-muted);
  text-align: right;
}
.reel-band {
  margin: auto -12px 20%;
  padding: 8px 12px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.6;
}

@media (prefers-reduced-motion: no-preference) {
  .js .reel .r-anim { opacity: 0; transform: translateY(8px); }
  .js .is-in .reel .r-anim {
    animation: reel-in .45s var(--ease) forwards;
    animation-delay: calc(var(--i) * 140ms + 250ms);
  }
}
@keyframes reel-in { to { opacity: 1; transform: none; } }

/* DM cell */
.chat {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 0 12px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.chat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  margin-inline: -12px;
  padding-inline: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.cell .bubble {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.8;
}
.cell .bubble--in { justify-self: start; background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.cell .bubble--out { justify-self: end; background: var(--brand); color: var(--on-brand); }

/* "More" cell */
.more-title { font-size: 19px; }
.more-list { display: grid; gap: 24px; margin-top: 8px; }
.more-list li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; }
.more-list .icon { color: var(--brand-text); margin-top: 3px; }
.cell .more-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  color: var(--text);
  font-weight: 700;
}
.more-list p:not(.more-name) { font-size: 15px; line-height: 1.8; }

@media (min-width: 640px) {
  .cell--reels { grid-template-columns: 1fr auto; align-items: stretch; }
  .reel-stage { padding: 28px; }
  .more-list { grid-template-columns: 1fr 1fr; gap: 28px 32px; }
}
@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell--reels, .cell--more { grid-column: 1 / -1; }
  .cell { padding: 28px; }
}
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(12, 1fr); }
  .cell--reels { grid-column: span 7; grid-row: span 2; }
  .cell--dm { grid-column: span 5; }
  .cell--map { grid-column: span 5; }
  .cell--identity { grid-column: span 4; }
  .cell--more { grid-column: span 8; }
  .cell--reels { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .more-list { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .cell { padding: 32px; }
}

/* ---------- Standards ---------- */
.standards-grid { display: grid; gap: 40px; }

.standards-copy { display: grid; gap: 24px; align-content: start; }

.founder { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.founder-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  font-weight: 900;
  font-size: 16px;
  color: var(--brand-text);
}
.founder-name { font-weight: 700; font-size: 17px; }
.founder-role { color: var(--text-muted); font-size: 15px; }

.cmd {
  display: block;
  padding: 12px 16px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

.rules {
  display: grid;
  gap: 24px;
  justify-items: start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.rules-list { display: grid; gap: 20px; }
.rules-list li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; }
.rules-list .icon { color: var(--mint); margin-top: 4px; }
.rules-list p { font-size: 17px; line-height: 1.9; }

@media (min-width: 1024px) {
  .standards-grid { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .standards-copy { position: sticky; top: calc(var(--header-h) + 32px); }
  .rules { padding: 40px; gap: 32px; }
  .rules-list { gap: 28px; }
}

/* ---------- Pricing ---------- */
.plan-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  line-height: 16px;
  letter-spacing: .08em;
  color: var(--brand-text);
  text-align: right;
}

.reel-types { display: grid; gap: 16px; }

.rtype {
  display: grid;
  gap: 20px;
  align-content: start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.rtype--sig { border-color: var(--brand); }
.rtype-head { display: grid; gap: 6px; }
.rtype-head h3 { font-size: 24px; line-height: 1.6; font-weight: 900; }
.rtype-price { color: var(--text-muted); }
.rtype-price strong {
  margin-inline-end: 6px;
  font-weight: 900;
  font-size: 36px;
  line-height: 1.3;
  color: var(--text);
}
.rtype-lead { font-weight: 700; }

.check-list, .pkg-list { display: grid; gap: 10px; }
.check-list li, .pkg-list li { position: relative; padding-inline-start: 24px; }
.check-list li::before, .pkg-list li::before {
  content: "+";
  position: absolute;
  inset-inline-start: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand-text);
}

.rule-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.rule-strip div { display: grid; gap: 4px; align-content: start; padding: 16px 20px; background: var(--surface); }
.rule-strip dt { font-size: 14px; line-height: 1.7; color: var(--text-muted); }
.rule-strip dd { font-weight: 700; font-size: 18px; line-height: 1.6; }

/* Segments + tabs */
.segments { display: grid; gap: 24px; margin-top: clamp(56px, 8vw, 96px); }
.segments-title { font-size: 24px; line-height: 1.6; font-weight: 900; }

.tabs {
  display: flex;
  gap: 8px;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.tab:hover { color: var(--text); border-color: var(--brand-text); }
.tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

.tab-panel { display: grid; gap: 16px; }
.tab-panel[hidden] { display: none; }
.tab-panel:focus-visible { outline-offset: 6px; border-radius: var(--r-lg); }
@media (prefers-reduced-motion: no-preference) {
  .tab-panel:not([hidden]) .pkg { animation: rise .45s var(--ease) both; }
  .tab-panel:not([hidden]) .pkg:nth-child(2) { animation-delay: .05s; }
  .tab-panel:not([hidden]) .pkg:nth-child(3) { animation-delay: .1s; }
}

.pkgs { display: grid; gap: 16px; }
.pkg {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.pkg--rec { border-color: var(--brand); }
.pkg-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.pkg h4 { font-size: 22px; line-height: 1.6; font-weight: 900; }
.pkg-price { color: var(--text-muted); font-size: 15px; }
.pkg-price strong { display: block; font-weight: 900; font-size: 40px; line-height: 1.3; color: var(--text); }
.pkg .btn { margin-top: auto; }
.pkg-addon { color: var(--text-muted); font-size: 15px; }

@media (min-width: 640px) {
  .check-list--cols { grid-template-columns: 1fr 1fr; gap: 10px 24px; }
}
@media (min-width: 768px) {
  .tabs { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; overflow: visible; }
  .pkgs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .reel-types { grid-template-columns: 5fr 7fr; }
  .rtype { padding: 32px; }
  .rule-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pkg { padding: 32px; }
}

/* ---------- Builder (needs JS; hidden without it) ---------- */
.builder { display: none; gap: 16px; align-items: start; }
.js .builder { display: grid; }

.builder-controls {
  padding: 0 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.bfield { min-width: 0; margin: 0; padding: 24px 0; border: 0; border-bottom: 1px solid var(--line); }
.bfield:last-child { border-bottom: 0; }
.bfield legend {
  float: right; /* lets the legend take normal margins inside the RTL fieldset */
  width: 100%;
  margin-bottom: 14px;
  padding: 0;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.6;
}
.bfield legend + * { clear: both; }

.seg { display: grid; gap: 8px; }
.seg--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg-opt {
  position: relative;
  display: grid;
  gap: 2px;
  align-content: center;
  min-height: 56px;
  padding: 10px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.seg-opt:hover { border-color: var(--brand-text); }
.seg-opt input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, var(--surface-raised)); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.seg-title { font-weight: 700; font-size: 15px; line-height: 1.6; }
.seg-meta { font-size: 13px; line-height: 1.5; color: var(--text-muted); }

.stepper { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.stepper .icon-btn { width: 48px; height: 48px; }
.stepper .icon-btn[disabled] { opacity: .4; pointer-events: none; }
.stepper-val {
  min-width: 72px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -.02em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.stepper-hint { flex: 1 1 160px; font-size: 14px; line-height: 1.7; color: var(--text-muted); }

.checks { display: grid; }
.check {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding-block: 4px;
  cursor: pointer;
  line-height: 1.7;
}
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.check-price { font-size: 14px; color: var(--text-muted); white-space: nowrap; }

.quote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.quote-unit { color: var(--brand-text); }
.quote-body { display: grid; gap: 20px; padding: 24px; }
.quote-lines { display: grid; gap: 10px; }
.quote-lines div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 15px; line-height: 1.7; }
.quote-lines dt { color: var(--text-muted); }
.quote-lines dd { font-weight: 700; white-space: nowrap; }
.quote-lines .q-off dd, .quote-lines .q-free dd { color: var(--brand-text); }
.quote-lines .q-sub { padding-top: 10px; border-top: 1px dashed var(--line); }
.quote-lines .q-empty { color: var(--text-muted); }

.quote-total { display: grid; gap: 2px; padding-top: 20px; border-top: 1px solid var(--line); }
.quote-total-label { font-size: 14px; color: var(--text-muted); }
.quote-total-val { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.quote-total-val strong { font-weight: 900; font-size: clamp(44px, 9vw, 60px); line-height: 1.2; color: var(--volt); }
.quote-total-val span { color: var(--text-muted); }

@media (min-width: 640px) {
  .builder-controls { padding: 0 32px; }
  .quote-body { padding: 32px; }
}
@media (min-width: 1024px) {
  .js .builder { grid-template-columns: 7fr 5fr; gap: 24px; }
  .quote { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* Terms + extras */
.terms { display: grid; gap: 24px; margin-top: clamp(56px, 8vw, 96px); }
.terms-grid { display: grid; gap: 24px; }
.terms-grid div { display: grid; gap: 6px; align-content: start; padding-top: 16px; border-top: 1px solid var(--line); }
.terms-grid dt { font-weight: 700; }
.terms-grid dd { font-size: 15px; line-height: 1.9; color: var(--text-muted); }
@media (min-width: 768px) { .terms-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; } }
@media (min-width: 1024px) { .terms-grid { grid-template-columns: repeat(4, 1fr); } }

.extras, .not-offered {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 15px;
}
.extras ul, .not-offered ul { display: flex; flex-wrap: wrap; gap: 8px; }
.extras li, .not-offered li {
  padding: 2px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 14px;
}
.extras li { color: var(--text); }
.not-offered li { text-decoration: line-through; text-decoration-color: var(--text-muted); }

/* ---------- Checkup ---------- */
.section--checkup { position: relative; isolation: isolate; }
.section--checkup::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 360px;
  z-index: -1;
  background-image: radial-gradient(var(--line) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
  opacity: .6;
}

.checkup-grid { display: grid; gap: 16px; align-items: start; }

/* Quiz */
.quiz {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.js .quiz { display: block; }

.quiz-count { color: var(--brand-text); }

.quiz-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 16px 24px 0; }
.quiz-progress i { height: 4px; border-radius: 2px; background: var(--line); transition: background-color .3s ease; }
.quiz-progress i.is-on { background: var(--brand); }
.quiz-progress.is-done i { background: var(--brand); }

.quiz-body {
  display: grid;
  gap: 20px;
  align-content: start;
  min-height: 300px;
  padding: 24px;
}
.quiz-q { font-size: 22px; line-height: 1.7; font-weight: 700; outline: none; }
.quiz-hint { color: var(--text-muted); font-size: 15px; }

.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.opt {
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-raised);
  font-weight: 700;
  font-size: 17px;
  transition: border-color .2s ease, background-color .2s ease, transform .2s var(--ease);
}
.opt:hover { border-color: var(--brand-text); }
.opt:active { transform: scale(.98); }
.opt[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, var(--surface-raised)); }

.quiz-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 15px;
}
.quiz-back:hover { color: var(--text); }
.quiz-back .icon { width: 18px; height: 18px; transform: scaleX(-1); }

.findings { display: grid; gap: 16px; }
.findings li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.findings .f-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  line-height: 28px;
  color: var(--brand-text);
}
.findings .f-body { display: grid; gap: 4px; }
.findings .f-text { font-weight: 700; }
.findings .f-rx { color: var(--text-muted); font-size: 15px; }
.findings .f-rx .code { color: var(--brand-text); }

.quiz-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.quiz-step { display: grid; gap: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .quiz-step { animation: rise .45s var(--ease) both; }
}

/* Lead form */
.lead-panel {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.lead { display: grid; gap: 20px; }
.lead-head { display: grid; gap: 4px; }
.lead-head h3 { font-size: 22px; line-height: 1.6; font-weight: 900; }
.lead-head p { color: var(--text-muted); font-size: 15px; }

.field-row { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 700; font-size: 15px; line-height: 1.6; }
.optional { font-weight: 400; color: var(--text-muted); }

.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 16px; /* prevents iOS zoom */
  line-height: 1.6;
  transition: border-color .2s ease;
}
.field input[dir="ltr"] { text-align: left; font-family: var(--font-mono); font-size: 15px; }
.field input::placeholder { color: var(--text-muted); opacity: 1; }
.field input:hover { border-color: color-mix(in srgb, var(--line) 50%, var(--text-muted)); }
.field input:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 1px; border-color: var(--brand-text); }
.field input[aria-invalid="true"] { border-color: var(--text); border-width: 2px; padding: 9px 13px; }

.field-error, .form-error {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.field-error::before, .form-error::before {
  content: "ERR";
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--brand-text);
}
.field-error[hidden], .form-error[hidden] { display: none; }

.lead-result { display: grid; gap: 16px; outline: none; }
.lead-result[hidden] { display: none; }
.lead-result .icon { width: 40px; height: 40px; color: var(--mint); }
.lead-result h3 { font-size: 22px; line-height: 1.6; font-weight: 900; }
.lead-result p { color: var(--text-muted); }
.lead-result textarea {
  width: 100%;
  min-height: 176px;
  padding: 12px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 1.9;
  resize: vertical;
}
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.result-actions .btn { flex: 1 1 auto; }

@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .quiz-body, .lead-panel { padding: 32px; }
  .quiz-progress { padding: 20px 32px 0; }
}
@media (min-width: 1024px) {
  .checkup-grid { grid-template-columns: 7fr 5fr; gap: 24px; }
  .quiz-body { min-height: 420px; padding: 40px; }
  .quiz-progress { padding: 24px 40px 0; }
  .quiz-q { font-size: 26px; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 32px; }

.footer-grid { display: grid; gap: 40px; }
.footer-brand { display: grid; gap: 16px; justify-items: start; }
.footer-brand img { height: 64px; width: auto; }
.footer-brand p { color: var(--text-muted); }

.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.footer-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  transition: color .2s ease;
}
.footer-nav a:hover { color: var(--text); }

.footer-contact { display: grid; gap: 12px; }
.footer-contact li { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--text-muted); }
.footer-contact .icon { color: var(--brand-text); width: 22px; height: 22px; }
.footer-contact a { font-family: var(--font-mono); font-size: 14px; color: var(--text); }
.footer-contact a:hover { color: var(--brand-text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  position: relative;
  margin-top: 48px;
  padding-top: 24px;
  font-size: 13px;
  line-height: 22px;
  color: var(--text-muted);
}
.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: var(--gutter);
  height: 1px;
  background: var(--line);
}
.mono-note { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; }

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; align-items: start; }
}

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: calc(var(--d, 0) * 90ms);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- Print: Paper theme ---------- */
@media print {
  :root {
    --bg: #F4F5F8;
    --surface: #FFFFFF;
    --surface-raised: #FFFFFF;
    --line: #DADFE8;
    --text: #0A0E17;
    --text-muted: #5B6478;
    --brand-text: #3450F0;
    --mint: #0E9F6E;
    color-scheme: light;
  }
  body { background: #fff; }
  .site-header, .skip-link, .hero-visual, .quiz, .lead-panel, .hero-actions, .pkg .btn, .tabs, .section--builder, .cursor { display: none !important; }
  .tab-panel[hidden] { display: grid !important; }
  .section { padding-block: 32px; break-inside: avoid-page; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .brand-link img, .footer-brand img { content: url("../../logos/noskhe-lockup-fa.svg"); }
}
