/*
  Sistemio V3: "Harness the Model. Own the System."
  Built on V2's dark system (same tokens, same 3-typeface set, same single
  accent). What's new is structural: every page is diagram-led, the harness
  is drawn, not described. Diagrams are inline SVG rendered by main.js from
  small data specs, so they stay consistent and cheap (no WebGL, no CDN).
*/

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  --bg: #08080D;
  --bg-elevated: #101018;
  --bg-elevated-2: #16161F;
  --ink: #F4F2EC;
  --muted: #8B8A97;
  --accent: #1F4FE0;
  --accent-light: #5B7FFF;
  --accent-glow: rgba(31, 79, 224, 0.45);
  --accent-glow-soft: rgba(31, 79, 224, 0.18);
  --accent-dim: rgba(31, 79, 224, 0.08);
  --border: rgba(244, 242, 236, 0.10);
  --border-strong: rgba(244, 242, 236, 0.22);
  --color-error: #FF6B5E;

  --font-title: 'Inter Tight', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --space-24: 96px; --space-32: 128px;

  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 20px;

  --nav-height: 76px;
  --container-max: 1240px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-family: var(--font-title); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 2px; }
.accent { color: var(--accent-light); }
.mono { font-family: var(--font-mono); }
::selection { background: var(--accent); color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================================================
   3. LAYOUT
   ============================================================ */
.container { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--space-16); }
@media (max-width: 1023px) { .container { padding-inline: var(--space-8); } }
@media (max-width: 767px)  { .container { padding-inline: var(--space-4); } }
.section { padding-block: var(--space-24); position: relative; }
@media (max-width: 767px) { .section { padding-block: var(--space-16); } }
.section--tight { padding-block: var(--space-16); }

/* Scroll reveal: one class, one observer (main.js) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   4. NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--space-16);
  background: rgba(8, 8, 13, 0.72);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 767px) { .nav { padding-inline: var(--space-4); } }
.logo-lockup { display: flex; align-items: center; gap: var(--space-3); }
.logo-lockup__word { font-family: var(--font-title); font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.nav__links { display: flex; align-items: center; gap: var(--space-8); }
@media (max-width: 900px) { .nav__links { display: none; } }
.nav__link { font-size: 14px; color: var(--muted); transition: color .2s var(--ease-out); position: relative; }
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"] { pointer-events: none; }
.nav__link[aria-current="page"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.nav__right { display: flex; align-items: center; gap: var(--space-4); }
.nav__toggle { display: none; }
@media (max-width: 900px) { .nav__toggle { display: flex; } }
.nav__panel {
  display: none; position: fixed; inset: var(--nav-height) 0 0 0; z-index: 49;
  background: var(--bg); padding: var(--space-8) var(--space-4);
  flex-direction: column; gap: var(--space-6);
}
.nav__panel.open { display: flex; }
.nav__panel a { font-size: 20px; font-family: var(--font-title); font-weight: 600; }
.nav__panel a[aria-current="page"] { color: var(--accent-light); }

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 48px; padding-inline: var(--space-6);
  font-family: var(--font-body); font-weight: 500; font-size: 15px;
  border-radius: var(--radius-sm); white-space: nowrap;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), border-color .18s var(--ease-out), background .18s var(--ease-out);
}
.btn--primary { background: var(--accent); color: var(--ink); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px -6px var(--accent-glow); }
.btn--outline { background: transparent; color: var(--ink); border: 1px solid var(--border-strong); }
.btn--outline:hover { border-color: var(--accent-light); background: var(--accent-dim); }
.btn--small { height: 36px; padding-inline: var(--space-4); font-size: 13px; }

/* ============================================================
   6. HERO
   ============================================================ */
.hero { position: relative; padding-block: var(--space-24) var(--space-16); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  width: 70vw; height: 70vw; max-width: 1000px; max-height: 1000px;
  right: -20vw; top: -30%;
  background: radial-gradient(circle, var(--accent-glow-soft) 0%, transparent 62%);
  animation: drift 16s ease-in-out infinite;
}
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-3%, 4%); } }
@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-12); align-items: center; }
@media (max-width: 1023px) { .hero__grid { grid-template-columns: 1fr; } }
.hero--home { min-height: 92vh; display: flex; align-items: center; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: var(--space-6);
}
.hero__kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .hero__kicker .dot { animation: none; } }
.hero__headline { font-size: clamp(2.5rem, 5.6vw, 4.8rem); line-height: 1.03; max-width: 16ch; }
.hero__headline .accent {
  background: linear-gradient(100deg, var(--accent-light), var(--accent) 60%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__lede { margin-top: var(--space-6); font-size: 1.15rem; color: var(--muted); max-width: 46ch; line-height: 1.6; }
.hero__cta-row { display: flex; gap: var(--space-4); margin-top: var(--space-8); flex-wrap: wrap; }
.hero__visual { position: relative; }
.hero__caption { margin-top: var(--space-3); font-family: var(--font-mono); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }

/* ============================================================
   7. HARNESS ORBIT (home hero): SVG driven by main.js
   ============================================================ */
.orbit { width: 100%; aspect-ratio: 4 / 3; }
.orbit svg { width: 100%; height: 100%; overflow: visible; }
.orbit__ring { fill: none; stroke: var(--ink); stroke-opacity: .2; stroke-width: 1; }
.orbit__ring--outer { stroke-opacity: .12; }
.orbit__link { stroke: var(--accent); stroke-opacity: .28; stroke-width: 1; }
.orbit__node circle { fill: var(--ink); fill-opacity: .8; transition: r .2s var(--ease-out), fill-opacity .2s; }
.orbit__node text { fill: var(--muted); font-family: var(--font-mono); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; transition: fill .2s; }
.orbit__node:hover circle, .orbit__node.is-hot circle { fill: var(--accent-light); fill-opacity: 1; }
.orbit__node:hover text, .orbit__node.is-hot text { fill: var(--ink); }
.orbit__flow { fill: var(--accent-light); }
.orbit__core { fill: var(--bg-elevated-2); stroke: var(--accent); stroke-width: 1.5; filter: drop-shadow(0 0 18px var(--accent-glow)); }
.orbit__core-label { fill: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; text-anchor: middle; }
.orbit__model { fill: var(--ink); font-family: var(--font-title); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; text-anchor: middle; transition: opacity .25s, transform .25s; }
.orbit__model.is-swapping { opacity: 0; transform: translateY(6px); }
.orbit__halo { fill: none; stroke: var(--accent-light); stroke-opacity: 0; stroke-width: 1; }
.orbit__halo.is-pulse { animation: halo .9s var(--ease-out); }
@keyframes halo { 0% { stroke-opacity: .8; r: 60; } 100% { stroke-opacity: 0; r: 140; } }
.orbit__shell { fill: none; stroke: var(--ink); stroke-opacity: .25; stroke-width: 1; stroke-dasharray: 3 5; }
.orbit__shell-label { fill: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

/* ============================================================
   8. LOGO / STACK STRIP (marquee, two rows)
   ============================================================ */
.strip { border-block: 1px solid var(--border); padding-block: var(--space-6); overflow: hidden; }
.strip__row { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: var(--space-6); }
.strip__row + .strip__row { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px dashed var(--border); }
@media (max-width: 767px) { .strip__row { grid-template-columns: 1fr; gap: var(--space-2); } }
.strip__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.strip__track { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.strip__list { display: flex; gap: var(--space-12); width: max-content; animation: marquee 38s linear infinite; }
.strip__list:hover { animation-play-state: paused; }
.strip__list li { font-family: var(--font-mono); font-size: 14px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: var(--space-2); }
.strip__list li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--border-strong); }
.strip__list li[data-hot]::before { background: var(--accent-light); box-shadow: 0 0 6px var(--accent-glow); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .strip__list { animation: none; flex-wrap: wrap; width: auto; gap: var(--space-4) var(--space-8); } .strip__list li[aria-hidden] { display: none; } .strip__track { mask-image: none; -webkit-mask-image: none; } }

/* ============================================================
   9. SECTION HEADER
   ============================================================ */
.section-header { max-width: 62ch; margin-bottom: var(--space-12); }
.section-header--center { margin-inline: auto; text-align: center; }
.section-header__kicker { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-light); margin-bottom: var(--space-3); }
.section-header__title { font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.12; }
.section-header__lede { margin-top: var(--space-4); color: var(--muted); font-size: 1.05rem; }

/* ============================================================
   10. STATS (count-up)
   ============================================================ */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.stat-row--pair { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .stat-row, .stat-row--pair { grid-template-columns: 1fr; } }
.stat-block { border-top: 1px solid var(--border); padding-top: var(--space-6); }
.stat-block__number { font-family: var(--font-mono); font-weight: 500; font-size: clamp(2.4rem, 5vw, 3.4rem); color: var(--ink); display: flex; align-items: baseline; gap: 2px; text-shadow: 0 0 30px var(--accent-glow-soft); }
.stat-block__label { margin-top: var(--space-2); color: var(--muted); font-size: 14px; line-height: 1.5; max-width: 32ch; }
.stat-block__source { margin-top: var(--space-2); font-family: var(--font-mono); font-size: 11px; color: rgba(139,138,151,0.7); }

/* ============================================================
   11. "WHAT MOVES / WHAT STAYS" (problem diagram)
   ============================================================ */
.moves { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--space-8); align-items: stretch; }
@media (max-width: 900px) { .moves { grid-template-columns: 1fr; } .moves__divider { display: none; } }
.moves__col { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6); }
.moves__col--stays { border-color: var(--accent-glow-soft); box-shadow: 0 0 0 1px var(--accent-dim), 0 30px 60px -40px var(--accent-glow); }
.moves__title { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-4); display: flex; align-items: center; gap: var(--space-2); }
.moves__col--stays .moves__title { color: var(--accent-light); }
.moves__item { display: grid; grid-template-columns: 1fr auto; gap: var(--space-4); padding-block: var(--space-3); border-top: 1px solid var(--border); font-size: 15px; }
.moves__item:first-of-type { border-top: 0; }
.moves__value { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-align: right; transition: opacity .3s, transform .3s; }
.moves__value.is-swapping { opacity: 0; transform: translateY(-4px); }
.moves__col--moves .moves__value { color: #E0A83A; }
.moves__col--stays .moves__value { color: var(--accent-light); }
.moves__divider { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; writing-mode: vertical-rl; }
.moves__divider::before, .moves__divider::after { content: ''; width: 1px; flex: 1; background: linear-gradient(180deg, transparent, var(--border-strong), transparent); }

/* ============================================================
   12. ANATOMY (harness stack, interactive)
   ============================================================ */
.anatomy { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-8); align-items: start; }
@media (max-width: 1023px) { .anatomy { grid-template-columns: 1fr; } }
.anatomy__stack { display: flex; flex-direction: column; gap: var(--space-3); }
.anatomy__layer { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-elevated); padding: var(--space-4) var(--space-6); position: relative; }
.anatomy__layer-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.anatomy__layer-label em { font-style: normal; color: var(--border-strong); }
.anatomy__layer--harness { border-color: var(--accent-glow-soft); background: linear-gradient(180deg, var(--accent-dim), transparent); box-shadow: 0 0 0 1px var(--accent-dim); }
.anatomy__layer--harness .anatomy__layer-label { color: var(--accent-light); }
.anatomy__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.anatomy__chip {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 12px;
  background: var(--bg); transition: border-color .2s, background .2s, transform .2s var(--ease-out);
}
.anatomy__chip:hover { border-color: var(--accent-light); transform: translateY(-1px); }
.anatomy__chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--ink); box-shadow: 0 0 18px var(--accent-glow-soft); }
.anatomy__row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.anatomy__row span { font-size: 14px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 6px 12px; }
.anatomy__model { display: inline-flex; align-items: center; gap: var(--space-3); margin-top: var(--space-3); font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.anatomy__model b { font-weight: 500; color: var(--ink); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 12px; min-width: 9ch; text-align: center; transition: opacity .25s; }
.anatomy__model b.is-swapping { opacity: 0; }
.anatomy__joint { display: flex; justify-content: center; color: var(--border-strong); font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; }
.anatomy__detail { position: sticky; top: calc(var(--nav-height) + var(--space-6)); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6); min-height: 200px; }
.anatomy__detail-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-light); }
.anatomy__detail-title { font-size: 22px; margin-top: var(--space-2); }
.anatomy__detail-body { margin-top: var(--space-3); color: var(--muted); font-size: 15px; line-height: 1.65; }
.anatomy__detail-hint { margin-top: var(--space-4); font-family: var(--font-mono); font-size: 11px; color: rgba(139,138,151,0.7); }

/* ============================================================
   13. LADDER (services by depth)
   ============================================================ */
.ladder { display: flex; flex-direction: column; gap: var(--space-3); }
.ladder__row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--space-4); align-items: stretch;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-elevated);
  padding: var(--space-4) var(--space-6); position: relative; overflow: hidden;
  transition: border-color .25s var(--ease-out), transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.ladder__row:hover { border-color: var(--accent-light); transform: translateX(4px); box-shadow: 0 16px 40px -20px var(--accent-glow); }
.ladder__row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--depth, 25%); background: linear-gradient(90deg, var(--accent-dim), transparent); pointer-events: none; transition: width .8s var(--ease-out); }
.ladder__index { font-family: var(--font-mono); font-size: 13px; color: var(--accent-light); padding-top: 4px; }
.ladder__main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6); align-items: center; }
@media (max-width: 767px) { .ladder__main { grid-template-columns: 1fr; } }
.ladder__title { font-size: 19px; }
.ladder__scope { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 2px; letter-spacing: .04em; text-transform: uppercase; }
.ladder__body { margin-top: var(--space-2); color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 60ch; }
.ladder__link { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ladder__row:hover .ladder__link { color: var(--ink); }
.ladder__link .arrow { transition: transform .2s var(--ease-out); }
.ladder__row:hover .arrow { transform: translateX(3px); }

/* ============================================================
   14. BAR COMPARE (evidence chart: one measure, thin bars,
       direct labels, table view below)
   ============================================================ */
.compare { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
@media (max-width: 900px) { .compare { grid-template-columns: 1fr; } }
.chart { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6); }
.chart__title { font-size: 17px; }
.chart__sub { margin-top: var(--space-1); color: var(--muted); font-size: 13px; }
.bars { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.bar { display: grid; grid-template-columns: 150px 1fr 64px; gap: var(--space-3); align-items: center; font-size: 13px; }
@media (max-width: 600px) { .bar { grid-template-columns: 1fr; gap: 4px; } }
.bar__name { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.bar__track { height: 12px; background: rgba(244,242,236,0.06); border-radius: 4px; overflow: hidden; }
.bar__fill { height: 100%; width: 0; border-radius: 4px; background: var(--muted); transition: width 1.1s var(--ease-out); }
.bar--hot .bar__fill { background: var(--accent-light); box-shadow: 0 0 12px var(--accent-glow-soft); }
.in-view .bar__fill { width: var(--w); }
@media (prefers-reduced-motion: reduce) { .bar__fill { width: var(--w); transition: none; } }
.bar__value { font-family: var(--font-mono); font-size: 13px; color: var(--ink); text-align: right; }
.chart__source { margin-top: var(--space-4); font-family: var(--font-mono); font-size: 11px; color: rgba(139,138,151,0.7); }
.chart__table { margin-top: var(--space-3); font-size: 12px; color: var(--muted); }
.chart__table summary { cursor: pointer; font-family: var(--font-mono); }
.chart__table table { border-collapse: collapse; margin-top: var(--space-2); width: 100%; }
.chart__table td, .chart__table th { text-align: left; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--border); font-weight: 400; }
.chart__table td:last-child { font-family: var(--font-mono); }

/* ============================================================
   15. CONTROL PANEL (proof: our own operation)
   ============================================================ */
.panel { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 900px) { .panel { grid-template-columns: 1fr; } }
.panel__side { padding: var(--space-6); border-right: 1px solid var(--border); }
@media (max-width: 900px) { .panel__side { border-right: 0; border-bottom: 1px solid var(--border); } }
.panel__head { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); }
.panel__head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); animation: pulse 2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .panel__head .dot { animation: none; } }
.panel__row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding-block: var(--space-3); border-top: 1px solid var(--border); font-size: 14px; }
.panel__row:first-of-type { border-top: 0; }
.panel__row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.switch { width: 38px; height: 22px; border-radius: 999px; background: var(--accent); position: relative; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.switch::after { content: ''; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); }
.switch--off { background: rgba(244,242,236,0.12); }
.switch--off::after { right: auto; left: 3px; background: var(--muted); }
.panel__log { padding: var(--space-6); font-family: var(--font-mono); font-size: 12.5px; line-height: 1.8; color: var(--muted); background: var(--bg); }
.panel__log-line { display: grid; grid-template-columns: 72px 1fr; gap: var(--space-3); opacity: 0; transform: translateX(-6px); transition: opacity .4s var(--ease-out), transform .4s var(--ease-out); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.in-view .panel__log-line { opacity: 1; transform: none; }
.panel__log-line:nth-child(1) { transition-delay: .05s; } .panel__log-line:nth-child(2) { transition-delay: .2s; }
.panel__log-line:nth-child(3) { transition-delay: .35s; } .panel__log-line:nth-child(4) { transition-delay: .5s; }
.panel__log-line:nth-child(5) { transition-delay: .65s; } .panel__log-line:nth-child(6) { transition-delay: .8s; }
.panel__log-line:nth-child(7) { transition-delay: .95s; } .panel__log-line:nth-child(8) { transition-delay: 1.1s; }
.panel__log-line time { color: rgba(139,138,151,0.6); }
.panel__log-line b { font-weight: 500; color: var(--ink); }
.panel__log-line .ok { color: var(--accent-light); }
.panel__log-line .hold { color: #E0A83A; }
.panel__note { margin-top: var(--space-4); font-size: 12px; color: rgba(139,138,151,0.7); font-family: var(--font-mono); }
@media (prefers-reduced-motion: reduce) { .panel__log-line { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   16. WORKFLOW DIAGRAMS (rendered by main.js from data-wf)
   ============================================================ */
/* One example per row: the diagram needs width to stay legible (its SVG scales
   with the container), so text sits left and the diagram takes the wider column. */
.examples { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
.example {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6);
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-template-areas: "head wf" "body wf" "meta wf";
  gap: var(--space-3) var(--space-8); align-items: start; transition: border-color .25s var(--ease-out);
}
.example > div:first-child { grid-area: head; }
.example .wf { grid-area: wf; align-self: center; }
.example__body { grid-area: body; }
.example__meta { grid-area: meta; }
@media (max-width: 900px) { .example { grid-template-columns: 1fr; grid-template-areas: "head" "wf" "body" "meta"; } }
.example:hover { border-color: var(--border-strong); }
.example__kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-light); }
.example__title { font-size: 20px; margin-top: var(--space-1); }
.example__body { color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 52ch; }
.example__meta { font-family: var(--font-mono); font-size: 11px; color: rgba(139,138,151,0.7); }
.wf { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-3); }
.wf svg { width: 100%; height: auto; overflow: visible; }
.wf__node rect { fill: var(--bg-elevated-2); stroke: var(--border-strong); stroke-width: 1; rx: 6; }
.wf__node text { fill: var(--ink); font-family: var(--font-mono); font-size: 12px; text-anchor: middle; dominant-baseline: middle; }
.wf__node--model rect { stroke: var(--accent-light); fill: var(--accent-dim); }
.wf__node--model text { fill: var(--accent-light); }
.wf__node--human rect { stroke-dasharray: 4 3; stroke: var(--ink); stroke-opacity: .6; }
.wf__node--gate rect { stroke: #E0A83A; fill: rgba(224,168,58,0.08); }
.wf__node--gate text { fill: #E0A83A; }
.wf__node--store rect { rx: 14; }
.wf__edge { fill: none; stroke: var(--ink); stroke-opacity: .28; stroke-width: 1.2; stroke-dasharray: 4 4; animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -16; } }
.wf__dot { fill: var(--accent-light); filter: drop-shadow(0 0 4px var(--accent-glow)); }
@media (prefers-reduced-motion: reduce) { .wf__edge { animation: none; } .wf__dot { display: none; } }
.wf-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: var(--space-6); }
.wf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wf-legend i { width: 14px; height: 10px; border: 1px solid var(--border-strong); border-radius: 3px; display: inline-block; }
.wf-legend i.model { border-color: var(--accent-light); background: var(--accent-dim); }
.wf-legend i.human { border-style: dashed; border-color: rgba(244,242,236,.6); }
.wf-legend i.gate { border-color: #E0A83A; background: rgba(224,168,58,0.08); }

/* ============================================================
   16b. WORKFLOW SWITCHER (per-area tabs above a .wf host)
   ============================================================ */
.wf-switch { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.wf-switch .anatomy__chip[aria-pressed="true"] { cursor: default; }

/* ============================================================
   17. STEPS (how the service works)
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); position: relative; }
.steps--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1023px) { .steps, .steps--5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .steps, .steps--5 { grid-template-columns: 1fr; } }
.step { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6); position: relative; transition: border-color .3s ease; }
.step:hover { border-color: var(--accent-light); }
.step__index { font-family: var(--font-mono); font-size: 13px; color: var(--accent-light); display: flex; align-items: center; gap: var(--space-2); }
.step__index::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); background-size: 200% 100%; }
.step.in-view .step__index::after { animation: flow-move 1.8s linear infinite; }
@keyframes flow-move { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .step.in-view .step__index::after { animation: none; } }
.step__when { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: var(--space-3); letter-spacing: .04em; text-transform: uppercase; }
.step__title { font-size: 18px; margin-top: var(--space-1); letter-spacing: -0.01em; }
.step__body { margin-top: var(--space-2); color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ============================================================
   18. INCLUDED / NOT INCLUDED
   ============================================================ */
.scope { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
@media (max-width: 700px) { .scope { grid-template-columns: 1fr; } }
.scope__cell { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6); }
.scope__cell--in { border-color: var(--accent-glow-soft); }
.scope__title { font-size: 18px; }
.scope__cell--out .scope__title { color: var(--muted); }
.scope__fact { font-family: var(--font-mono); font-size: 13px; color: var(--accent-light); margin-top: var(--space-1); }
.scope__list { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.scope__list li { font-size: 14px; color: var(--muted); padding-left: var(--space-4); position: relative; line-height: 1.5; }
.scope__cell--in .scope__list li::before { content: '+'; position: absolute; left: 0; color: var(--accent-light); font-family: var(--font-mono); }
.scope__cell--out .scope__list li::before { content: '–'; position: absolute; left: 0; color: var(--border-strong); font-family: var(--font-mono); }

/* ============================================================
   19. CTA + LEAD FORM
   ============================================================ */
.cta { background: linear-gradient(180deg, transparent, var(--accent-dim) 40%, transparent); }
.cta__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12); align-items: start; }
@media (max-width: 1023px) { .cta__grid { grid-template-columns: 1fr; } }
.cta__points { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.cta__points li { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-3); color: var(--muted); font-size: 14px; line-height: 1.5; }
.cta__points li::before { content: '→'; color: var(--accent-light); font-family: var(--font-mono); }
.form { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-8); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; padding: var(--space-6); } }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select {
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4); transition: border-color .2s ease, box-shadow .2s ease; width: 100%;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { border-color: var(--accent-light); box-shadow: 0 0 0 3px var(--accent-glow-soft); outline: none; }
.field__error { font-size: 12px; color: var(--color-error); min-height: 1em; }
.form__error-summary { grid-column: 1 / -1; color: var(--color-error); font-size: 14px; }
.form__error-summary ul { padding-left: 1em; list-style: disc; }
.form__actions { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.form__fine { font-size: 12px; color: var(--muted); }
.form__success { grid-column: 1 / -1; padding: var(--space-4); background: var(--accent-dim); border: 1px solid var(--accent-glow-soft); border-radius: var(--radius-sm); font-size: 14px; }

/* ============================================================
   20. FAQ
   ============================================================ */
.faq { max-width: 74ch; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-6); cursor: pointer; list-style: none; font-family: var(--font-title); font-weight: 600; font-size: 17px; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-family: var(--font-mono); font-size: 20px; color: var(--accent-light); transition: transform .25s var(--ease-out); flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item__body { padding-bottom: var(--space-6); color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 68ch; }
@media (prefers-reduced-motion: reduce) { .faq-item summary::after { transition: none; } }

/* ============================================================
   21. FOOTER
   ============================================================ */
footer.site { border-top: 1px solid var(--border); padding-block: var(--space-12); }
footer.site .container { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-8); align-items: center; }
@media (max-width: 900px) { footer.site .container { grid-template-columns: 1fr; } }
.footer__nav { display: flex; gap: var(--space-6); flex-wrap: wrap; justify-content: center; }
.footer__nav a, .footer__contact { font-size: 14px; color: var(--muted); padding-block: var(--space-2); transition: color .2s ease; }
.footer__nav a:hover, .footer__contact:hover { color: var(--ink); }
.footer__meta { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); }
@media (max-width: 900px) { .footer__meta { align-items: flex-start; } }
.footer__slogan { font-family: var(--font-title); font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.footer__copyright { font-family: var(--font-mono); font-size: 12px; color: rgba(139,138,151,0.6); }

/* ============================================================
   22. SKIP LINK
   ============================================================ */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent); color: var(--ink); padding: var(--space-3) var(--space-6); }
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

/* ============================================================
   23. BLOG (index cards + post page)
   ============================================================ */
.tone-1 { --tone: #C9CBE6; } .tone-2 { --tone: #C97A58; } .tone-3 { --tone: #E6D2BE; } .tone-4 { --tone: #5B7FFF; }

.blog-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin-bottom: var(--space-8); }
.blog-search {
  flex: 1 1 260px; max-width: 420px; height: 44px; padding-inline: var(--space-4);
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--ink);
}
.blog-search:focus { outline: none; border-color: var(--accent-light); box-shadow: 0 0 0 3px var(--accent-dim); }
.blog-chips { margin-top: 0; }

.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 900px) { .posts { grid-template-columns: 1fr; } }
.post-card {
  display: flex; flex-direction: column; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; transition: border-color .25s var(--ease-out), transform .25s var(--ease-out);
}
.post-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.post-card__tile { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--tone, var(--accent-dim)); color: var(--bg); }
.post-card__tile svg { width: 38%; }
.post-card__body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.post-card__date { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.post-card__title { font-size: 20px; line-height: 1.25; }
.post-card__tag { margin-top: auto; padding-top: var(--space-3); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-light); }
.posts__empty { margin-top: var(--space-8); color: var(--muted); }

.post { padding-block: var(--space-12) var(--space-24); }
.post__crumb { display: flex; gap: var(--space-3); font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: var(--space-12); }
.post__crumb a { color: var(--ink); }
.post__crumb a:hover { color: var(--accent-light); }
.post__grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: var(--space-16); align-items: start; }
.post__tile { width: 160px; aspect-ratio: 1; border-radius: var(--radius-lg); display: grid; place-items: center; background: var(--tone, var(--accent-dim)); color: var(--bg); margin-bottom: var(--space-8); }
.post__tile svg { width: 56%; }
.post__title { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; max-width: 18ch; }
.post__lede { margin-top: var(--space-6); font-size: 1.25rem; line-height: 1.5; color: var(--muted); max-width: 58ch; }
.post__meta { position: sticky; top: calc(var(--nav-height) + var(--space-6)); }
.post__meta dl { display: grid; gap: var(--space-6); margin: 0; }
.post__meta dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-1); }
.post__meta dd { margin: 0; font-size: 15px; }
.post__meta dd a, .post__meta dd button { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.post__back { margin-top: var(--space-16); }
@media (max-width: 900px) {
  .post__grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .post__meta { position: static; }
  .post__meta dl { grid-template-columns: repeat(2, 1fr); }
}

.prose { margin-top: var(--space-16); max-width: 68ch; font-size: 17px; line-height: 1.7; }
.prose > * + * { margin-top: var(--space-6); }
.prose h2 { font-size: 1.6rem; line-height: 1.2; margin-top: var(--space-16); }
.prose h3 { font-size: 1.2rem; margin-top: var(--space-12); }
.prose ul, .prose ol { padding-left: 1.3em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: var(--space-2); }
.prose a { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin-inline: 0; padding-left: var(--space-6); border-left: 2px solid var(--accent-light); color: var(--muted); font-size: 1.15rem; }
.prose code { font-family: var(--font-mono); font-size: .9em; background: var(--bg-elevated-2); padding: 2px 6px; border-radius: 4px; }
.prose pre { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4) var(--space-6); overflow-x: auto; }
.prose pre code { background: none; padding: 0; font-size: 14px; }
.prose img { border-radius: var(--radius-md); border: 1px solid var(--border); }
.prose figcaption { margin-top: var(--space-2); font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: var(--space-12); }
.prose .wf { margin-block: var(--space-8); }
