/* ============================================================
   deyaaldeen.com — COBALT LEDGER v3 "Precision Instrument"
   The page is a ledger sheet: one continuous margin rule (the
   spine), tabular data, status-semantic color. No glass, no
   gradients, no glow decoration. Sharp corners. Data first.
   Space Grotesk display · Instrument Sans body · JetBrains Mono data.
   All text pairs verified WCAG 2.1 AA.
   ============================================================ */

:root {
  /* color */
  --bg: #05080F;
  --bg-raised: #0A101E;
  --panel: #070C17;
  --line: rgba(160, 180, 220, 0.14);
  --line-strong: rgba(160, 180, 220, 0.26);

  --text-hi: #EDF1F9;      /* 17.8:1 on --bg */
  --text-mid: #A6B0C6;     /* 9.2:1 */
  --text-low: #7C87A0;     /* 5.6:1 */

  --cobalt: #2553E9;       /* action; white text 6.0:1 */
  --cobalt-hot: #3B66F5;
  --cobalt-bright: #7DA2FF;/* accent text, 8.1:1 */
  --ok: #4ADE9C;           /* matched / signed off, 11.7:1 */
  --flag: #F2B33D;         /* pending / attention, 10.4:1 */
  --wa-green: #0B7A39;     /* white text 5.4:1 */

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --text-xs: 0.72rem;
  --text-sm: 0.9rem;
  --text-base: 1.02rem;
  --text-lg: 1.15rem;
  --text-xl: 1.35rem;
  --text-2xl: 1.8rem;
  --text-3xl: clamp(1.9rem, 3.6vw, 2.9rem);
  --text-hero: clamp(2.6rem, 5.6vw, 4.8rem);
  --text-metric: clamp(3rem, 6vw, 4.6rem);

  /* spacing, 8px grid */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s8: 64px; --s10: 80px;
  --s12: 96px; --s16: 128px;

  --r: 3px;

  --container: 1200px;
  --rail-pad: clamp(20px, 4vw, 56px);
  --nav-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  -webkit-tap-highlight-color: transparent;
  scrollbar-color: #26314B var(--bg);
}
a, button, input, textarea, summary, label { touch-action: manipulation; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-hi);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--cobalt); color: #fff; }

section { scroll-margin-top: calc(var(--nav-h) + 8px); position: relative; }

:focus-visible {
  outline: 2px solid var(--cobalt-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--cobalt); color: #fff;
  padding: var(--s1) var(--s2); z-index: 100;
  font-family: var(--font-mono); font-size: var(--text-sm);
}
.skip-link:focus { left: var(--s2); top: var(--s2); }

/* film grain — the one piece of atmosphere */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- shared ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* the ledger spine: every content band hangs off one margin rule */
.rail {
  position: relative;
  border-left: 1px solid var(--line);
  padding-left: var(--rail-pad);
}
/* the spine rules itself in as each band is read (--fill set from scroll) */
.rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 1px;
  background: var(--cobalt);
  transform: scaleY(var(--fill, 0));
  transform-origin: top;
  pointer-events: none;
}
html:not(.js) .rail::before { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rail::before { transform: none; }
}
.rail-pad { padding-block: var(--s12); }

.kicker {
  position: relative;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-low);
  margin-bottom: var(--s3);
}
.kicker::before {
  /* posting mark on the spine; fills once the section has been read */
  content: "";
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--rail-pad));
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  background: var(--bg);
  border: 1px solid var(--cobalt-bright);
  transition: background-color 0.5s var(--ease);
}
.kicker.posted::before {
  background: var(--cobalt-bright);
  animation: post 0.45s var(--ease);
}
@keyframes post {
  0% { transform: translate(-50%, -50%) scale(1); }
  45% { transform: translate(-50%, -50%) scale(1.7); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
.kicker strong { color: var(--cobalt-bright); font-weight: 500; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-title { font-size: var(--text-3xl); max-width: 26ch; }
.section-head { margin-bottom: var(--s6); }

/* buttons — flat, sharp, instrument-like */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 15px 28px;
  border-radius: var(--r);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease),
    transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover {
  background: var(--cobalt-hot);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(37, 83, 233, 0.38);
}
.btn-ghost { background: transparent; color: var(--text-hi); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--cobalt-bright); color: var(--cobalt-bright); }
.btn-block { width: 100%; }

/* terminal panel with corner brackets */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.panel::before, .panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-top: 2px solid var(--cobalt-bright); border-left: 2px solid var(--cobalt-bright); }
.panel::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--cobalt-bright); border-right: 2px solid var(--cobalt-bright); }

/* reveal on scroll */
html.js .reveal { opacity: 0; transform: translateY(18px); }
html.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}
.brand { display: flex; align-items: baseline; text-decoration: none; white-space: nowrap; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text-hi);
}
.brand-tick { color: var(--cobalt-bright); }
.nav-links { display: flex; align-items: center; gap: var(--s3); overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links > * { flex-shrink: 0; }
.nav-links a:not(.btn) {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.nav-links a:not(.btn):hover { color: var(--text-hi); }
.nav-links a:not(.btn).active {
  color: var(--cobalt-bright);
  text-decoration: underline;
  text-decoration-color: var(--cobalt);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}
.nav .btn { padding: 10px 18px; font-size: var(--text-sm); }

@media (max-width: 767px) {
  .nav { height: auto; }
  .nav-inner { flex-wrap: wrap; padding-block: 10px; row-gap: 6px; }
  .nav-links { width: 100%; gap: var(--s2); }
  .nav .btn { padding: 7px 14px; font-size: var(--text-xs); }
  body { --nav-h: 100px; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + var(--s12)) 0 var(--s12);
  overflow: hidden;
}
.hero::before {
  /* faint ledger grid, hero only: minor rules every 64px, major every 256px */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-strong) 1px, transparent 1px),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 256px 256px, 256px 256px, 64px 64px, 64px 64px;
  opacity: 0.22;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--s8);
  align-items: center;
}
.hero-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cobalt-bright);
  margin-bottom: var(--s3);
}
.hero h1 {
  font-size: var(--text-hero);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: var(--s3);
}
.hero h1 .accent { color: var(--cobalt-bright); }
.hero-sub {
  font-size: var(--text-lg);
  color: var(--text-mid);
  max-width: 48ch;
  margin-bottom: var(--s5);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.hero-trust {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.8;
  color: var(--text-low);
  max-width: 52ch;
}
.hero-trust::before { content: "✓"; color: var(--ok); margin-right: 8px; }

html.js .hero-stagger > * { opacity: 0; transform: translateY(16px); animation: rise 0.7s var(--ease) forwards; }
html.js .hero-stagger > *:nth-child(1) { animation-delay: 0.05s; }
html.js .hero-stagger > *:nth-child(2) { animation-delay: 0.14s; }
html.js .hero-stagger > *:nth-child(3) { animation-delay: 0.23s; }
html.js .hero-stagger > *:nth-child(4) { animation-delay: 0.32s; }
html.js .hero-stagger > *:nth-child(5) { animation-delay: 0.41s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* --- signature: recon terminal --- */
.recon { padding: var(--s3); animation: rise 0.8s var(--ease) 0.45s backwards; }
.recon-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-low);
  padding: 2px 6px var(--s2);
  border-bottom: 1px solid var(--line);
}
.recon-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.recon-rows { padding-top: var(--s1); }
.recon-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 0.95fr;
  gap: var(--s2);
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 9px 6px;
  border-bottom: 1px solid rgba(160, 180, 220, 0.06);
  color: var(--text-mid);
  font-variant-numeric: tabular-nums;
}
.recon-row:last-child { border-bottom: 0; }
.recon-row .rid { color: var(--text-low); }
.recon-row .amt { text-align: right; }
.recon-row .st { text-align: right; color: var(--flag); transition: color 0.4s var(--ease); white-space: nowrap; }
.recon-row.matched .st { color: var(--ok); }
.recon-row.matched { color: var(--text-hi); }
.recon-row.matched .rid { color: var(--text-mid); }
.recon-row.flagged { color: var(--text-hi); }
.recon-row.flagged .rid { color: var(--text-mid); }
.recon-row.flagged span:nth-child(3) { color: var(--flag); }
.recon-row.flagged .st { color: var(--flag); font-weight: 700; }
.recon-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-low);
  padding: var(--s2) 6px 2px;
  border-top: 1px solid var(--line);
}
.recon-foot .ok { color: var(--ok); }
.recon-foot .flag { color: var(--flag); }

/* annotation line: the engine explains the exception it caught.
   Fixed height so the panel never shifts while running. */
.recon-note {
  min-height: 1.5rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-low);
  padding: 3px 6px 0;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.recon-note.show { opacity: 1; transform: none; }

.recon-row.scan {
  background: rgba(37, 83, 233, 0.1);
  box-shadow: inset 2px 0 0 var(--cobalt);
}
/* status settles into place when a row resolves */
.recon-row.matched .st, .recon-row.flagged .st { animation: settle 0.35s var(--ease); }
@keyframes settle {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1023px) {
  .hero .container { grid-template-columns: 1fr; }
  .recon { max-width: 560px; }
}
@media (max-width: 479px) {
  .recon-row { gap: 10px; font-size: 0.72rem; }
}

/* ============================================================
   PROOF — oversized tabular numerals on the spine
   ============================================================ */
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.proof-card { padding: var(--s2) var(--s4) var(--s2) 0; }
.proof-card + .proof-card { border-left: 1px solid var(--line); padding-left: var(--s4); }
.proof-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-metric);
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s2);
}
.proof-num .unit { font-size: 0.42em; font-weight: 500; color: var(--cobalt-bright); }
.proof-num .unit.gap { margin-left: 0.35em; }
/* the accountant's double rule: this figure is a total */
.proof-num::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 12px;
  border-top: 1px solid rgba(125, 162, 255, 0.55);
  border-bottom: 1px solid rgba(125, 162, 255, 0.55);
}
.proof-desc { font-size: var(--text-sm); color: var(--text-mid); max-width: 32ch; }
.proof-ref {
  margin-top: var(--s1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: var(--text-low);
}
.proof-foot { margin-top: var(--s4); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-low); }
@media (max-width: 767px) {
  .proof-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .proof-card + .proof-card { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: var(--s4); }
}

/* ============================================================
   STORY — large statement type, no card
   ============================================================ */
.story p {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.55;
  color: var(--text-mid);
  margin-top: var(--s3);
  max-width: 34em;
}
.story p strong { color: var(--text-hi); font-weight: 600; }

/* ============================================================
   BUILD — spec-sheet rows, not cards
   ============================================================ */
.spec-list { border-top: 1px solid var(--line); }
.spec-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 0.9fr) minmax(0, 1.4fr) auto;
  gap: var(--s3);
  align-items: baseline;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s var(--ease);
}
.spec-row:hover {
  background: rgba(160, 180, 220, 0.03);
  box-shadow: inset 2px 0 0 var(--cobalt);
}
.spec-code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-low);
  transition: color 0.2s;
}
.spec-row:hover .spec-code { color: var(--cobalt-bright); }
.spec-row h3 { font-size: var(--text-lg); font-weight: 600; }
.spec-row p { font-size: var(--text-sm); color: var(--text-mid); }
.spec-tags {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: var(--text-low);
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 1023px) {
  .spec-row { grid-template-columns: 64px 1fr; grid-template-rows: auto auto auto; }
  .spec-row h3 { grid-column: 2; }
  .spec-row p { grid-column: 2; }
  .spec-tags { grid-column: 2; text-align: left; }
}

/* ============================================================
   WORK — the tie-out table
   ============================================================ */
.work-band { background: var(--bg-raised); border-block: 1px solid var(--line); }
.tieout { width: 100%; border-collapse: collapse; }
.tieout caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-low);
  padding-bottom: var(--s2);
}
.tieout th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-low);
  text-align: left;
  padding: var(--s2) var(--s3) var(--s2) 0;
  border-bottom: 1px solid var(--line-strong);
}
.tieout tbody tr { transition: background-color 0.2s var(--ease); }
@media (hover: hover) {
  .tieout tbody tr:hover {
    background: rgba(160, 180, 220, 0.03);
    box-shadow: inset 2px 0 0 var(--cobalt);
  }
}
.tieout td {
  vertical-align: top;
  padding: var(--s3) var(--s3) var(--s3) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  color: var(--text-mid);
}
.tieout .t-ref {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cobalt-bright);
  white-space: nowrap;
  width: 72px;
}
.tieout .t-build { width: 34%; }
.tieout .t-build h3 { font-size: var(--text-lg); font-weight: 600; color: var(--text-hi); margin-bottom: 4px; }
.tieout .t-result { color: var(--text-hi); }
.tieout .t-result .metric { font-family: var(--font-mono); font-weight: 700; color: var(--cobalt-bright); }
.tieout .t-status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.7;
  color: var(--ok);
  white-space: nowrap;
  width: 140px;
}
/* the sign-off, stamped like an audit mark */
.tieout .stamp {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid rgba(74, 222, 156, 0.55);
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.12em;
  transform: rotate(-1.5deg);
  margin-bottom: 6px;
}
.tieout .t-status small { display: block; color: var(--text-low); font-size: 1em; white-space: normal; }
.work-note { margin-top: var(--s3); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-low); }

/* --- exhibit: the OC·03 catch as a ledger fragment --- */
.exhibit {
  max-width: 560px;
  margin-top: var(--s5);
  padding: var(--s3);
}
.exhibit-head {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-low);
  padding: 2px 6px var(--s2);
  border-bottom: 1px solid var(--line);
}
.exhibit-rows { padding-top: var(--s1); }
.exhibit-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  padding: 9px 6px;
  border-bottom: 1px solid rgba(160, 180, 220, 0.06);
  color: var(--text-mid);
}
.exhibit-row .amt { color: var(--text-hi); }
.exhibit-row.flagged { border-bottom: 0; }
.exhibit-row.flagged .k { color: var(--flag); }
.exhibit-row.flagged .amt { color: var(--flag); font-weight: 700; }
.exhibit-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-low);
  padding: var(--s2) 6px 2px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1023px) {
  .tieout thead { position: absolute; left: -9999px; }
  .tieout, .tieout tbody, .tieout tr, .tieout td { display: block; width: 100%; }
  .tieout caption { display: block; }
  .tieout tr { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3); margin-bottom: var(--s2); }
  .tieout td { border-bottom: 0; padding: 0 0 var(--s2); }
  .tieout td:last-child { padding-bottom: 0; }
  .tieout .t-ref, .tieout .t-build, .tieout .t-status { width: auto; }
}

/* ============================================================
   HOW — a true sequence, numbered honestly
   ============================================================ */
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4) var(--s3); }
.how-step { padding-top: var(--s2); border-top: 1px solid var(--line-strong); }
.how-step .num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--cobalt-bright);
  display: block;
  margin-bottom: var(--s1);
}
.how-step h3 { font-size: var(--text-lg); margin-bottom: var(--s1); }
.how-step p { font-size: var(--text-sm); color: var(--text-mid); }
@media (max-width: 1023px) { .how-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) { .how-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); align-items: stretch; }
.tier {
  padding: var(--s5) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.tier-featured { border-color: var(--cobalt); }
.tier-featured::before, .tier-featured::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.tier { position: relative; }
.tier-featured::before { top: -1px; left: -1px; border-top: 2px solid var(--cobalt-bright); border-left: 2px solid var(--cobalt-bright); }
.tier-featured::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--cobalt-bright); border-right: 2px solid var(--cobalt-bright); }
.tier-badge {
  position: absolute;
  top: calc(-1 * var(--s2) + 2px);
  left: var(--s4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  background: var(--cobalt);
  color: #fff;
  border-radius: var(--r);
  padding: 5px 12px;
}
.tier h3 { font-size: var(--text-xl); }
.tier-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
}
.tier-price .per { font-size: var(--text-sm); font-weight: 500; color: var(--text-low); }
.tier p { font-size: var(--text-sm); color: var(--text-mid); flex-grow: 1; }
.pricing-note {
  margin-top: var(--s4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-mid);
}
@media (max-width: 1023px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 560px; }
  .tier-featured { order: -1; margin-top: var(--s2); }
}

/* ============================================================
   CALCULATOR — terminal panel
   ============================================================ */
.calc-panel {
  padding: var(--s6) var(--s5);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--s6);
}
.calc-field { margin-bottom: var(--s4); }
.calc-field:last-child { margin-bottom: 0; }
.calc-field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: var(--s1);
}
.calc-field input[type="number"] {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--cobalt-bright);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 4px 10px;
  width: 88px;
  text-align: right;
  caret-color: var(--cobalt-bright);
}
.calc-field input[type="range"] { width: 100%; accent-color: var(--cobalt); cursor: pointer; }
.calc-out {
  border-left: 1px solid var(--line);
  padding-left: var(--s6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s3);
}
.calc-out-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-low);
}
.calc-out-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
}
.calc-out-num .unit { font-size: 0.5em; color: var(--cobalt-bright); }
/* the yearly cost is the total: double rule */
#calc-out-cost::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 10px;
  border-top: 1px solid rgba(125, 162, 255, 0.55);
  border-bottom: 1px solid rgba(125, 162, 255, 0.55);
}
.calc-note { font-size: var(--text-sm); color: var(--text-mid); }
.calc-disclaimer { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-low); }
@media (max-width: 1023px) {
  .calc-panel { grid-template-columns: 1fr; padding: var(--s5) var(--s4); }
  .calc-out { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: var(--s4); }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 780px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  transition: color 0.2s;
}
.faq-item summary:hover { color: var(--cobalt-bright); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--cobalt-bright);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item::details-content {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    content-visibility 0.3s allow-discrete;
}
.faq-item[open]::details-content { opacity: 1; transform: none; }
.faq-item p { padding-bottom: var(--s3); color: var(--text-mid); max-width: 64ch; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-band { background: var(--bg-raised); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: var(--s8); }
.about-bio { font-size: var(--text-lg); color: var(--text-mid); max-width: 40ch; }
.about-bio strong { color: var(--text-hi); font-weight: 600; }
.contact-rows { display: flex; flex-direction: column; gap: var(--s2); margin: var(--s5) 0; }
.contact-row {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  text-decoration: none;
  color: var(--text-hi);
  width: fit-content;
}
.contact-row .k {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-low);
  width: 96px;
  flex-shrink: 0;
}
.contact-row .v { border-bottom: 1px solid var(--line); transition: border-color 0.2s, color 0.2s; }
.contact-row:hover .v { border-bottom-color: var(--cobalt-bright); color: var(--cobalt-bright); }
.btn-wa { background: var(--wa-green); color: #fff; }
.btn-wa:hover { background: #0A6E34; }

.contact-form { display: flex; flex-direction: column; gap: var(--s2); }
.contact-form label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-low);
}
.contact-form ::placeholder { color: var(--text-low); opacity: 1; }
.contact-form input, .contact-form textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-hi);
  caret-color: var(--cobalt-bright);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 14px;
  width: 100%;
  transition: border-color 0.2s;
}
.contact-form input:hover, .contact-form textarea:hover { border-color: var(--line-strong); }
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--cobalt-bright);
  outline-offset: 0;
  border-color: transparent;
}
.contact-form textarea { min-height: 110px; resize: vertical; }
@media (max-width: 1023px) { .contact-grid { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER
   ============================================================ */
/* books closed: the ledger's closing double rule */
.footer { border-top: 3px double var(--line-strong); padding: var(--s4) 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-low);
}
.footer-links { display: flex; gap: var(--s3); }
.footer-links a { color: var(--text-mid); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--cobalt-bright); }

/* floating WhatsApp */
.whatsapp-float {
  position: fixed;
  right: calc(var(--s3) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--s3) + env(safe-area-inset-bottom, 0px));
  z-index: 95;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--wa-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.6);
  transition: background-color 0.2s var(--ease);
}
.whatsapp-float:hover { background: #0A6E34; }

/* ============================================================
   PRIVACY PAGE
   ============================================================ */
.page-prose { padding: calc(var(--nav-h) + var(--s10)) 0 var(--s12); }
.page-prose .container { max-width: 760px; }
.page-prose h1 { font-size: var(--text-3xl); margin-bottom: var(--s1); }
.page-prose .updated { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-low); margin-bottom: var(--s6); }
.page-prose h2 { font-size: var(--text-xl); margin: var(--s5) 0 var(--s2); }
.page-prose p, .page-prose li { color: var(--text-mid); }
.page-prose ul { padding-left: var(--s3); margin-top: var(--s1); }
.page-prose li { margin-bottom: var(--s1); }
.page-prose .kicker::before { display: none; }
.page-prose .contact-box {
  margin-top: var(--s2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-hi);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s2) var(--s3);
}

/* ============================================================
   LARGE SCREENS — a little more room, a little more presence
   ============================================================ */
@media (min-width: 1536px) {
  :root {
    --container: 1280px;
    --text-hero: clamp(2.6rem, 5.6vw, 5.2rem);
    --text-metric: clamp(3rem, 6vw, 5rem);
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
  html.js .reveal, html.js .hero-stagger > * { opacity: 1; transform: none; }
}
