/* ============================================================
   Circuex — the autonomous operations layer for electronics.
   Shared stylesheet. Committed dark "solder-mask" palette.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Core surface — same background on every page */
  --bg: oklch(0.19 0.028 195);
  --bg-deep: oklch(0.15 0.026 196);
  --surface: oklch(0.235 0.03 196);
  --surface-2: oklch(0.285 0.032 197);
  --surface-3: oklch(0.32 0.033 198);
  --line: oklch(0.34 0.03 198);
  --line-soft: oklch(0.30 0.028 197 / 0.55);

  --ink: oklch(0.972 0.008 200);
  --ink-2: oklch(0.86 0.012 200);
  --muted: oklch(0.745 0.018 202);
  --silver: oklch(0.88 0.006 210);

  /* Brand accents */
  --teal: oklch(0.80 0.125 190);
  --teal-strong: oklch(0.72 0.13 191);
  --teal-dim: oklch(0.80 0.125 190 / 0.14);
  --teal-ink: oklch(0.20 0.03 196);
  --amber: oklch(0.79 0.145 66);
  --amber-dim: oklch(0.79 0.145 66 / 0.14);
  --amber-ink: oklch(0.20 0.04 60);

  /* Per-page product accent (defaults to teal) */
  --accent: var(--teal);
  --accent-strong: var(--teal-strong);
  --accent-dim: var(--teal-dim);
  --accent-ink: var(--teal-ink);

  /* Status */
  --ok: oklch(0.80 0.125 190);
  --warn: oklch(0.79 0.145 66);
  --defect: oklch(0.68 0.19 25);
  --info: oklch(0.74 0.11 245);

  /* Fluid spacing */
  --s-1: clamp(0.35rem, 0.3rem + 0.2vw, 0.5rem);
  --s-2: clamp(0.6rem, 0.5rem + 0.4vw, 0.85rem);
  --s-3: clamp(0.9rem, 0.75rem + 0.6vw, 1.25rem);
  --s-4: clamp(1.35rem, 1.1rem + 1vw, 2rem);
  --s-5: clamp(2rem, 1.6rem + 1.8vw, 3rem);
  --s-6: clamp(3rem, 2.3rem + 3vw, 5rem);
  --s-7: clamp(4.5rem, 3.4rem + 4.6vw, 7.5rem);

  --container: 1200px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;

  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* z-index scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Substrate texture: faint solder-mask sheen (not a decorative grid) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: none;
}

img, svg { display: block; max-width: 100%; }
svg { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1.2rem;
  border-radius: 0 0 10px 10px; font-weight: 600; z-index: var(--z-toast);
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 1.7rem + 3.6vw, 5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3.1rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem); }
h4 { font-size: 1.12rem; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
strong { color: var(--ink); font-weight: 650; }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.kicker::before {
  content: "";
  width: 22px; height: 2px; background: var(--accent); display: inline-block;
}
.lede { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); color: var(--ink-2); max-width: 62ch; line-height: 1.5; }
.mono { font-family: var(--font-mono); }
.measure { max-width: 68ch; }
.muted { color: var(--muted); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.15rem, 0.6rem + 2.4vw, 2.5rem); }
.section { padding-block: var(--s-7); }
.section-sm { padding-block: var(--s-6); }
.band { background: var(--bg-deep); border-block: 1px solid var(--line-soft); }
.band-surface { background: var(--surface); border-block: 1px solid var(--line-soft); }

.section-head { max-width: 760px; margin-bottom: var(--s-5); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lede { margin-inline: auto; }
.section-head .lede { margin-top: var(--s-3); }
.eyebrow-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-5); }

.grid { display: grid; gap: var(--s-3); }
.auto-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.two-col { display: grid; gap: var(--s-5); grid-template-columns: 1fr 1fr; align-items: center; }
.split { display: grid; gap: var(--s-5); grid-template-columns: 1.05fr 0.95fr; align-items: center; }
@media (max-width: 860px) { .two-col, .split { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.8rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.18s var(--ease-out), background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1.05rem; }
.btn .arrow { transition: transform 0.2s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }

.textlink { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 0.4rem; }
.textlink .arrow { transition: transform 0.2s var(--ease-out); }
.textlink:hover .arrow { transform: translateX(3px); }
.textlink:hover { color: var(--accent-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: oklch(0.19 0.028 195);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--ink); }
.brand svg { width: 26px; height: 26px; }
.brand:hover { color: var(--teal); }

.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav a { padding: 0.5rem 0.8rem; border-radius: 8px; color: var(--ink-2); font-size: 0.95rem; font-weight: 500; transition: color 0.15s, background 0.15s; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--teal); }

.has-menu { position: relative; }
.menu-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.5rem 0.8rem; border-radius: 8px; background: transparent; border: 0; color: var(--ink-2); font-size: 0.95rem; font-weight: 500; cursor: pointer; }
.menu-btn:hover { color: var(--ink); background: var(--surface); }
.menu-btn svg { width: 14px; transition: transform 0.2s; }
.has-menu[data-open="true"] .menu-btn svg { transform: rotate(180deg); }
.has-menu[data-open="true"] .menu-btn { color: var(--ink); background: var(--surface); }

.megamenu {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(6px);
  width: min(680px, 90vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--s-3); z-index: var(--z-dropdown);
  box-shadow: none;
  opacity: 0; visibility: hidden; transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out), visibility 0.2s;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem;
}
.has-menu[data-open="true"] .megamenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-item { display: flex; gap: 0.75rem; padding: 0.7rem 0.8rem; border-radius: 10px; transition: background 0.15s; }
.mega-item:hover { background: var(--surface-2); }
.mega-ico { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; }
.mega-ico svg { width: 20px; height: 20px; }
.mega-item b { display: block; color: var(--ink); font-size: 0.95rem; }
.mega-item span { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.mega-foot { grid-column: 1 / -1; margin-top: 0.35rem; padding: 0.7rem 0.8rem; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; }

.header-cta { display: flex; align-items: center; gap: 0.6rem; }
.menu-toggle { display: none; background: transparent; border: 1px solid var(--line); border-radius: 9px; width: 42px; height: 42px; cursor: pointer; place-items: center; color: var(--ink); }
.menu-toggle svg { width: 20px; }

@media (max-width: 1040px) {
  .nav, .header-cta .btn { display: none; }
  .menu-toggle { display: grid; }
}

/* Mobile drawer */
.mobile-nav { display: none; }
.mobile-nav[data-open="true"] { display: block; position: fixed; inset: 68px 0 0; z-index: var(--z-backdrop); background: var(--bg); overflow-y: auto; padding: var(--s-4) 0 var(--s-6); animation: fade 0.2s var(--ease-out); }
.mobile-nav a, .mobile-nav details summary { display: block; padding: 0.85rem clamp(1.15rem, 0.6rem + 2.4vw, 2.5rem); font-size: 1.1rem; font-weight: 500; border-bottom: 1px solid var(--line-soft); }
.mobile-nav details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.mobile-nav details summary::-webkit-details-marker { display: none; }
.mobile-nav details[open] summary { color: var(--teal); }
.mobile-nav .sub a { padding-left: clamp(2.4rem, 1.6rem + 3vw, 4rem); font-size: 1rem; color: var(--muted); border-bottom: 0; }
.mobile-cta { padding: var(--s-3) clamp(1.15rem, 0.6rem + 2.4vw, 2.5rem); display: grid; gap: 0.6rem; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(3rem, 2rem + 6vw, 6.5rem) var(--s-7); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: var(--s-5); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-block: var(--s-3) var(--s-3); max-width: 15ch; }
.hero .lede { margin-bottom: var(--s-4); }
.hero-stats { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line-soft); }
.hero-stat b { display: block; font-family: var(--font-mono); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); color: var(--teal); letter-spacing: -0.02em; }
.hero-stat span { color: var(--muted); font-size: 0.82rem; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: var(--s-4); transition: transform 0.25s var(--ease-out), border-color 0.25s, background 0.25s; }
.card:hover { transform: translateY(-4px); border-color: var(--line); background: var(--surface-2); }
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.96rem; }
.card-ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; margin-bottom: var(--s-3); background: var(--accent-dim); color: var(--accent); }
.card-ico svg { width: 24px; height: 24px; }

.product-card { display: flex; flex-direction: column; gap: 0.75rem; position: relative; overflow: hidden; }
.product-card .pc-top { display: flex; align-items: center; gap: 0.8rem; }
.product-card .pc-logo { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.product-card .pc-name { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.product-card .pc-tag { color: var(--muted); font-size: 0.93rem; flex: 1; }
.product-card .pc-role { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.product-card .pc-link { margin-top: auto; }

.tag { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; padding: 0.3rem 0.65rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--ink-2); }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Feature list */
.flist { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.flist li { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--ink-2); }
.flist li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 6px; background: var(--accent-dim); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2340d6c8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-size: 13px; background-repeat: no-repeat; background-position: center; }
.flist li b { color: var(--ink); }

/* ---------- Metric / proof band ---------- */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.metric { background: var(--bg); padding: var(--s-4); }
.metric b { display: block; font-family: var(--font-mono); font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); letter-spacing: -0.03em; color: var(--ink); }
.metric b .u { color: var(--accent); }
.metric span { color: var(--muted); font-size: 0.9rem; }
.metric small { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 0.3rem; opacity: 0.8; }

/* ---------- Loop diagram ---------- */
.loop { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-2); counter-reset: step; }
.loop-node { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: var(--s-3); position: relative; }
.loop-node .ln-step { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.08em; }
.loop-node h4 { margin: 0.35rem 0; }
.loop-node p { color: var(--muted); font-size: 0.86rem; }

/* ---------- Comparison table ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); }
table.cmp { width: 100%; border-collapse: collapse; min-width: 620px; }
table.cmp th, table.cmp td { padding: 0.9rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 0.94rem; }
table.cmp thead th { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
table.cmp tbody tr:hover { background: var(--surface); }
table.cmp td:first-child { color: var(--ink); font-weight: 600; }
.cell-yes { color: var(--teal); font-weight: 700; }
.cell-yes svg { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
.cell-no { color: var(--muted); }

/* ---------- Pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-3); align-items: stretch; }
.tier { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.tier.featured { border-color: var(--accent); background: var(--accent-dim); position: relative; }
.tier.featured::after { content: "Most adopted"; position: absolute; top: -11px; right: var(--s-4); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: 0.25rem 0.7rem; border-radius: 999px; }
.tier h3 { font-size: 1.3rem; }
.tier .price { font-family: var(--font-mono); font-size: clamp(1.7rem, 1.4rem + 1vw, 2.2rem); color: var(--ink); letter-spacing: -0.02em; }
.tier .price small { font-size: 0.9rem; color: var(--muted); font-family: var(--font-sans); }
.tier .flist { margin-block: var(--s-2); }
.tier .btn { margin-top: auto; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.6rem; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.faq summary { padding: var(--s-3) var(--s-4); cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; gap: 1rem; align-items: center; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { flex: none; width: 20px; height: 20px; position: relative; transition: transform 0.25s var(--ease-out); }
.faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; background: var(--accent); inset: 0; margin: auto; }
.faq summary .pm::before { width: 14px; height: 2px; }
.faq summary .pm::after { width: 2px; height: 14px; }
.faq details[open] summary .pm { transform: rotate(135deg); }
.faq details[open] summary { color: var(--ink); }
.faq .faq-body { padding: 0 var(--s-4) var(--s-4); color: var(--muted); }

/* ---------- CTA band ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center;
  background: oklch(0.24 0.05 195);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 1.8rem + 4vw, 5rem) var(--s-4);
}
.cta h2 { max-width: 20ch; margin-inline: auto; }
.cta .lede { margin: var(--s-3) auto var(--s-4); }
.cta .btn-row { justify-content: center; }

/* ---------- Logos / marquee ---------- */
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1.2rem, 3vw, 3rem); justify-content: center; opacity: 0.86; }
.trust span { font-weight: 600; color: var(--muted); letter-spacing: 0.02em; font-size: 0.95rem; }

/* ---------- Steps / timeline ---------- */
.steps { display: grid; gap: var(--s-3); }
.step { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: start; padding-bottom: var(--s-3); border-bottom: 1px solid var(--line-soft); }
.step:last-child { border-bottom: 0; }
.step .num { font-family: var(--font-mono); font-size: 1.1rem; color: var(--accent); width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 11px; display: grid; place-items: center; }
.step h4 { margin-bottom: 0.3rem; }
.step p { color: var(--muted); }

/* ---------- Quote ---------- */
.quote { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: clamp(1.8rem, 1.3rem + 2vw, 3rem); }
.quote blockquote { font-size: clamp(1.2rem, 1rem + 1vw, 1.8rem); line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.quote .qmark { font-family: var(--font-mono); color: var(--accent); font-size: 2.4rem; line-height: 1; }
.quote figcaption { margin-top: var(--s-3); color: var(--muted); display: flex; align-items: center; gap: 0.7rem; }
.quote figcaption b { color: var(--ink); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-family: var(--font-mono); color: var(--accent); font-weight: 600; flex: none; }

/* ---------- Data-viz panels ---------- */
.viz-panel { background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-4); position: relative; }
.viz-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.viz-head .dot-row { display: flex; gap: 0.4rem; }
.viz-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.viz-head .dot.live { background: var(--teal); box-shadow: none; animation: pulse 2.4s infinite; }
.viz-label { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
@keyframes pulse { 0% { box-shadow: none; } 70% { box-shadow: none; } 100% { box-shadow: none; } }

.readout { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line-soft); border-radius: 10px; overflow: hidden; margin-top: var(--s-3); }
.readout div { background: var(--bg-deep); padding: 0.7rem 0.85rem; }
.readout b { font-family: var(--font-mono); font-size: 1.15rem; color: var(--ink); display: block; }
.readout span { font-size: 0.72rem; color: var(--muted); }

/* Board scene */
.board-scene { width: 100%; border-radius: var(--radius-lg); overflow: hidden; }

/* ---------- Split feature ---------- */
.feature-media { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-deep); }

/* ---------- Stat inline ---------- */
.inline-stats { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.inline-stats div b { font-family: var(--font-mono); font-size: 1.5rem; color: var(--accent); display: block; }
.inline-stats div span { color: var(--muted); font-size: 0.85rem; }

/* ---------- Personas / audience ---------- */
.persona { display: flex; flex-direction: column; gap: 0.6rem; }
.persona .role { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s-3); }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- Article / prose ---------- */
.prose { max-width: 68ch; }
.prose p { color: var(--ink-2); margin-block: var(--s-3); }
.prose h2 { margin-top: var(--s-5); }
.prose h3 { margin-top: var(--s-4); }
.prose ul { color: var(--ink-2); padding-left: 1.2rem; display: grid; gap: 0.4rem; }

/* Post cards */
.post { display: flex; flex-direction: column; gap: 0.7rem; }
.post .post-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.05em; text-transform: uppercase; }
.post h3 { font-size: 1.2rem; }
.post p { color: var(--muted); font-size: 0.92rem; }

/* Page hero (interior) */
.page-hero { padding-block: clamp(2.4rem, 1.8rem + 4vw, 4.5rem) var(--s-5); }
.page-hero h1 { max-width: 18ch; }
.page-hero .lede { margin-top: var(--s-3); }
.breadcrumb { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); letter-spacing: 0.05em; margin-bottom: var(--s-3); display: flex; gap: 0.5rem; }
.breadcrumb a:hover { color: var(--teal); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-deep); border-top: 1px solid var(--line); padding-block: var(--s-6) var(--s-4); margin-top: var(--s-6); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: var(--s-4); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--muted); font-size: 0.92rem; max-width: 34ch; margin-top: var(--s-2); }
.footer-col h5 { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-2); }
.footer-col a { display: block; padding: 0.28rem 0; color: var(--ink-2); font-size: 0.92rem; }
.footer-col a:hover { color: var(--teal); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); align-items: center; margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 0.85rem; }
.footer-bottom .mono { font-size: 0.78rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.06s; }
.reveal[data-d="2"] { transition-delay: 0.12s; }
.reveal[data-d="3"] { transition-delay: 0.18s; }
.reveal[data-d="4"] { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .viz-head .dot.live { animation: none; }
  .draw { stroke-dashoffset: 0 !important; animation: none !important; }
}

/* SVG draw */
.draw { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); }
.draw.in { animation: draw 1.6s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Utility */
.center { text-align: center; }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none; } }
.divider { height: 1px; background: var(--line-soft); border: 0; margin-block: var(--s-5); }
.accent-text { color: var(--accent); }
