/* =========================================================================
   Genesis Forge — gdGraph
   Shared stylesheet. One file, all pages.

   Design thesis: calm, exact, confident — aerospace-grade determinism for AI.
   Two visual registers run through everything:
     CREATIVE (proposes) — VIOLET -> MAGENTA. Looser, exploratory, generative,
                           "allowed to be wrong."
     TRUST    (decides)  — TEAL. Crisp, monospace, quenched and sealed/locked.
   The base is a layered deep navy lit by calm, additive radial glows. FLAME
   (amber -> magenta -> violet) survives only as a controlled accent for the
   squeeze / urgency / danger beat. A conservative risk lattice
   (ABSENT < POSSIBLE < PRESENT) keeps its own green/amber/red axis, because it
   encodes real meaning.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Ink — cool, layered deep-navy base */
  --ink-0:      #070a12;   /* deepest base / hero / CTA floor */
  --ink:        #070a12;   /* body base */
  --ink-1:      #0a0f1b;   /* raised section base / footer / panels */
  --ink-2:      #0e1422;   /* alternating base / cards / fields */
  --ink-3:      #141c2b;   /* chips, toggles, icon wells */
  --ink-4:      #1b2438;   /* highest raised surface */

  --hair:        rgba(255, 255, 255, 0.08);
  --hair-strong: rgba(255, 255, 255, 0.14);
  --hairline:    rgba(255, 255, 255, 0.14);  /* card borders */
  --hairline-2:  rgba(255, 255, 255, 0.08);  /* soft dividers */

  --text:       #eef2f7;
  --fg:         #eef2f7;
  --text-dim:   rgba(255, 255, 255, 0.66);
  --dim:        rgba(255, 255, 255, 0.62);
  --text-faint: rgba(255, 255, 255, 0.50);
  --dimmer:     rgba(255, 255, 255, 0.46);

  /* TRUST register — deterministic / decides & locks (TEAL) */
  --trust:      #3fe0c5;
  --trust-1:    #7af0dc;
  --reg-trust:  #3fe0c5;
  --reg-trust-2:#7af0dc;
  --trust-deep: #04130f;   /* near-black teal floor — primary-button ink */
  --trust-glow: rgba(63, 224, 197, 0.16);

  /* CREATIVE register — proposing / AI generates (VIOLET → MAGENTA) */
  --creative:   #b59cff;
  --creative-2: #ff89c9;
  --reg-creA:   #b59cff;
  --reg-creB:   #ff89c9;
  --ember:      #ff8a3c;    /* flame accent highlight (urgency only) */
  --creative-grad: linear-gradient(115deg, #b59cff 0%, #ff89c9 100%);
  --creative-glow: rgba(181, 156, 255, 0.16);

  /* FLAME — reserved tertiary accent: the squeeze / urgency / danger beat only */
  --flame-a:    #ff8a3c;
  --flame-b:    #ff3ea5;
  --flame-c:    #9b5cff;
  --flame-grad: linear-gradient(90deg, #ff8a3c 0%, #ff3ea5 55%, #9b5cff 100%);

  /* Risk lattice — semantic, NOT decorative; do not restyle */
  --absent:     #54d98a;   /* clear */
  --possible:   #ffc233;   /* caution */
  --present:    #ff3b66;   /* forbidden / risk */

  /* Type */
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "Space Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Rhythm */
  --container: 1160px;
  --container-narrow: 760px;
  --radius: 14px;
  --radius-sm: 9px;
  --section-y: clamp(4.5rem, 9vw, 8rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Calm, additive radial glows tinting the navy base. Breathes slowly. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(920px 640px at 86% -6%, rgba(63, 224, 197, 0.08), transparent 58%),
    radial-gradient(1020px 720px at 10% 2%, rgba(181, 156, 255, 0.06), transparent 58%),
    radial-gradient(1100px 760px at 50% 118%, rgba(63, 224, 197, 0.05), transparent 62%);
  pointer-events: none;
  animation: forgeBreathe 12s var(--ease) infinite;
  transform-origin: 50% 50%;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(circle at center, var(--hairline-2) 1px, transparent 1.4px);
  background-size: 46px 46px;
  opacity: 0.5;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 90%);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: #fff;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h4 { font-size: 1.05rem; letter-spacing: -0.01em; }
p  { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

strong { color: #fff; font-weight: 600; }
.lede { font-size: clamp(1.12rem, 1.7vw, 1.35rem); color: var(--text-dim); line-height: 1.55; }

/* The recurring monospace "audit" voice */
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--trust);
  margin: 0 0 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--trust);
  opacity: 0.7;
}
.eyebrow.is-creative { color: var(--creative); }
.eyebrow.is-creative::before { background: var(--creative); }

/* Inline tokens for the two layers, used in prose */
.tok { font-family: var(--mono); font-size: 0.86em; padding: 0.08em 0.4em; border-radius: 5px; white-space: nowrap; }
.tok-creative { color: var(--creative); background: var(--creative-glow); }
.tok-trust    { color: var(--trust);    background: var(--trust-glow); }
.tok-absent   { color: var(--absent);   background: rgba(84, 217, 138,0.12); }
.tok-possible { color: var(--possible);  background: rgba(255, 194, 51,0.12); }
.tok-present  { color: var(--present);   background: rgba(255, 59, 102,0.12); }

/* ---------- Layout primitives ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.narrow    { width: min(100% - 2.5rem, var(--container-narrow)); margin-inline: auto; }
.section   { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.divider-dag { height: 1px; border: 0; background: var(--hairline); margin: 0; position: relative; }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.6rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.stack-sm > * + * { margin-top: 0.6rem; }

/* ---------- Skip link / focus ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--trust); color: var(--ink); padding: 0.7rem 1.1rem;
  border-radius: 0 0 8px 0; font-weight: 700; font-family: var(--mono);
}
.skip-link:focus { left: 0; }

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

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 10, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-2);
}
.nav {
  display: flex; align-items: center; gap: 1.4rem;
  width: min(100% - 2.5rem, 1280px); margin-inline: auto;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; flex-shrink: 0; }
.brand svg { width: 26px; height: 26px; }
.brand-name { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: 1.04rem; color: #fff; }
.brand-tag {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.01em;
  text-transform: none; color: var(--ink);
  background: var(--trust); padding: 0.16rem 0.42rem; border-radius: 5px; line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a {
  text-decoration: none; color: var(--text-dim); font-size: 0.92rem; font-weight: 500;
  padding: 0.5rem 0.7rem; border-radius: 8px; transition: color 0.18s, background 0.18s; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--ink-3); }
.nav-links a[aria-current="page"] { color: var(--trust); }
.nav-cta { margin-left: 0.6rem; }

.nav-toggle {
  display: none; margin-left: auto; background: var(--ink-3); border: 1px solid var(--hairline);
  color: var(--text); width: 42px; height: 42px; border-radius: 9px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.1rem;
    background: var(--ink-1); border-bottom: 1px solid var(--hairline);
    padding: 0.6rem 1.25rem 1.1rem; margin-left: 0;
    max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease), padding 0.3s var(--ease);
    padding-block: 0;
  }
  .nav-links.open { max-height: 80vh; padding-block: 0.6rem 1.1rem; }
  .nav-links a { padding: 0.8rem 0.7rem; }
  .nav-cta { margin-left: 0; margin-top: 0.4rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  padding: 0.78rem 1.3rem; border-radius: 10px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--trust); color: var(--ink);
  box-shadow: 0 0 0 1px var(--trust), 0 8px 30px -12px var(--trust-glow);
}
.btn-primary:hover { background: var(--trust-1); box-shadow: 0 0 0 1px var(--trust-1), 0 10px 36px -10px var(--trust-glow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--trust); color: var(--trust); }
.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.86rem; }
.btn svg { width: 17px; height: 17px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 2.5vw, 2rem);
  position: relative;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.card:hover { border-color: var(--hairline); }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-dim); font-size: 0.97rem; }

.card-num {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: var(--trust);
  border: 1px solid var(--trust); border-radius: 7px; padding: 0.2rem 0.5rem; display: inline-block; margin-bottom: 1rem;
  background: var(--trust-glow);
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(3rem, 6vw, 5.5rem); padding-bottom: clamp(3rem, 6vw, 5rem); position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 1.2rem; }
.hero h1 .split-c { color: var(--creative); }
.hero h1 .split-t { color: var(--trust); }
.hero-sub { max-width: 38ch; margin-bottom: 1.8rem; }

/* The propose → decide → prove drumbeat */
.beats { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 1.6rem 0; }
.beat {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em;
  padding: 0.4rem 0.7rem; border-radius: 8px; border: 1px solid var(--hairline);
}
.beat.b-propose { color: var(--creative); border-color: rgba(181, 156, 255,0.35); background: var(--creative-glow); }
.beat.b-decide  { color: var(--trust);    border-color: rgba(63, 224, 197,0.35);  background: var(--trust-glow); }
.beat.b-prove   { color: var(--text); }
.beat-arrow { color: var(--text-faint); font-family: var(--mono); }

/* ---------- Pillars ---------- */
.pillars { counter-reset: pillar; }
.pillar {
  display: grid; grid-template-columns: auto 1fr; gap: 1.3rem;
  padding: 1.6rem 0; border-top: 1px solid var(--hairline-2);
}
.pillar:last-child { border-bottom: 1px solid var(--hairline-2); }
.pillar-index {
  font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--trust);
  line-height: 1; padding-top: 0.2rem; min-width: 2.4ch;
}
.pillar h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.pillar p { color: var(--text-dim); font-size: 0.98rem; margin: 0; }
.pillar .pillar-origin {
  font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint);
  margin-top: 0.55rem; display: block;
}

/* ---------- Two-layer explainer (creative vs trust) ---------- */
.layers { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch; }
@media (max-width: 820px) { .layers { grid-template-columns: 1fr; } }
.layer {
  padding: clamp(1.5rem, 3vw, 2.2rem); border-radius: var(--radius);
}
.layer-creative {
  background:
    linear-gradient(180deg, rgba(181, 156, 255,0.10), rgba(181, 156, 255,0.02)),
    var(--ink-1);
  border: 1px solid rgba(181, 156, 255,0.28);
}
.layer-trust {
  background:
    linear-gradient(180deg, rgba(63, 224, 197,0.08), rgba(63, 224, 197,0.015)),
    var(--ink-1);
  border: 1px solid rgba(63, 224, 197,0.30);
}
.layer h3 { display: flex; align-items: center; gap: 0.6rem; }
.layer-creative h3 { color: var(--creative); }
.layer-trust h3 { color: var(--trust); }
.layer-trust .layer-body, .layer-trust code { font-family: var(--mono); }
.layer ul { margin: 0.9rem 0 0; padding-left: 1.1rem; color: var(--text-dim); }
.layer li { margin-bottom: 0.45rem; }
.layer-join {
  display: flex; align-items: center; justify-content: center; padding: 0 1rem; color: var(--text-faint);
  font-family: var(--mono); font-size: 1.4rem;
}
@media (max-width: 820px) { .layer-join { padding: 0.4rem 0; transform: rotate(90deg); } }

/* ---------- Section heading block ---------- */
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lede { margin-top: 0.4rem; }

/* =========================================================================
   INTERACTIVE: Branched-DAG visualizer
   ========================================================================= */
.dag-tool {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  overflow: hidden;
}
.dag-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--hairline-2);
}
.dag-modeswitch { display: inline-flex; padding: 0.25rem; gap: 0.25rem; background: var(--ink-3); border-radius: 10px; border: 1px solid var(--hairline-2); }
.dag-mode {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 0.5rem 0.85rem; border-radius: 8px; border: 0; background: transparent; color: var(--text-dim);
  cursor: pointer; transition: background 0.2s, color 0.2s; display: inline-flex; align-items: center; gap: 0.45rem;
}
.dag-mode .dot { width: 8px; height: 8px; border-radius: 50%; }
.dag-mode[data-mode="creative"] .dot { background: var(--creative); }
.dag-mode[data-mode="trust"] .dot { background: var(--trust); }
.dag-mode[aria-pressed="true"][data-mode="creative"] { background: var(--creative-glow); color: var(--creative); }
.dag-mode[aria-pressed="true"][data-mode="trust"]    { background: var(--trust-glow);    color: var(--trust); }
.dag-status {
  margin-left: auto; font-family: var(--mono); font-size: 0.8rem; display: inline-flex; align-items: center; gap: 0.5rem;
}
.dag-status .pill {
  padding: 0.28rem 0.6rem; border-radius: 999px; font-weight: 700; letter-spacing: 0.02em;
}
.dag-status .pill.bad  { color: var(--present); background: rgba(255, 59, 102,0.12); border: 1px solid rgba(255, 59, 102,0.4); }
.dag-status .pill.good { color: var(--absent);  background: rgba(84, 217, 138,0.12); border: 1px solid rgba(84, 217, 138,0.4); }

.dag-stage { position: relative; }
.dag-svg { width: 100%; height: auto; display: block; background: transparent; }

/* DAG node + edge styling (driven by classes set in JS) */
.dnode-box {
  fill: var(--ink-3); stroke: var(--hairline); stroke-width: 1.5;
  transition: fill 0.4s var(--ease), stroke 0.4s var(--ease);
}
.dnode-label { fill: var(--text); font-family: var(--sans); font-size: 13px; font-weight: 600; }
.dnode-sub   { fill: var(--text-faint); font-family: var(--mono); font-size: 10.5px; }
.dnode-note  { fill: var(--text-faint); font-family: var(--mono); font-size: 8.5px; opacity: 0.82; }

.dnode--present .dnode-box  { stroke: var(--present);  fill: rgba(255, 59, 102,0.10); }
.dnode--possible .dnode-box { stroke: var(--possible); fill: rgba(255, 194, 51,0.09); }
.dnode--absent .dnode-box   { stroke: var(--absent);   fill: rgba(84, 217, 138,0.08); }
.dnode--break .dnode-box    { stroke: var(--creative); fill: rgba(181, 156, 255,0.10); }
.dnode--mitigation .dnode-box { stroke: var(--trust); fill: rgba(63, 224, 197,0.12); stroke-dasharray: 0; }
.dnode--violation .dnode-box {
  stroke: var(--present); stroke-width: 2.4; fill: rgba(255, 59, 102,0.16);
}
.dnode--cleared .dnode-box { stroke: var(--absent); stroke-width: 2.2; fill: rgba(84, 217, 138,0.12); }

.dedge { stroke: var(--hairline); stroke-width: 1.6; fill: none; transition: stroke 0.4s, stroke-dasharray 0.4s; }
.dedge--creative { stroke: var(--creative); stroke-dasharray: 5 5; opacity: 0.85; }
.dedge--trust    { stroke: var(--trust); stroke-dasharray: 0; }
.dedge--present  { stroke: var(--present); }

.dchip {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
}
.dchip-present  { fill: var(--present); }
.dchip-possible { fill: var(--possible); }
.dchip-absent   { fill: var(--absent); }

/* Lock seal that appears in TRUST view */
.dag-seal { transition: opacity 0.5s var(--ease); }

.dag-legend {
  display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; padding: 1rem 1.2rem; border-top: 1px solid var(--hairline-2);
  font-size: 0.82rem; color: var(--text-dim);
}
.dag-legend .key { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--mono); font-size: 0.78rem; }
.dag-legend .swatch { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid; }
.dag-explain {
  padding: 1.1rem 1.2rem 1.3rem; border-top: 1px solid var(--hairline-2);
  font-size: 0.95rem; color: var(--text-dim);
}
.dag-explain strong { color: var(--text); }

.illustrative-tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-faint); border: 1px dashed var(--hairline); border-radius: 6px; padding: 0.2rem 0.5rem;
}

/* =========================================================================
   INTERACTIVE: Industry Explorer
   ========================================================================= */
.explorer { border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; background: var(--ink-1); }
.explorer-tabs {
  display: flex; gap: 0.4rem; padding: 0.8rem; overflow-x: auto; border-bottom: 1px solid var(--hairline-2);
  scrollbar-width: thin;
}
.explorer-tab {
  flex-shrink: 0; font-family: var(--sans); font-size: 0.85rem; font-weight: 600;
  padding: 0.55rem 0.85rem; border-radius: 9px; border: 1px solid var(--hairline-2);
  background: var(--ink-3); color: var(--text-dim); cursor: pointer; white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s; display: inline-flex; align-items: center; gap: 0.45rem;
}
.explorer-tab:hover { color: var(--text); border-color: var(--hairline); }
.explorer-tab[aria-selected="true"] { background: var(--trust-glow); color: var(--trust); border-color: var(--trust); }
.explorer-tab .flag {
  font-family: var(--mono); font-size: 0.6rem; padding: 0.1rem 0.32rem; border-radius: 4px;
  background: rgba(181, 156, 255,0.18); color: var(--creative); letter-spacing: 0.06em;
}
.explorer-panel { padding: clamp(1.4rem, 3vw, 2.2rem); }
.explorer-panel h3 { margin-bottom: 0.25rem; }
.explorer-domain { font-family: var(--mono); font-size: 0.8rem; color: var(--text-faint); margin-bottom: 1.4rem; }

.schema-grid { display: grid; gap: 0; border: 1px solid var(--hairline-2); border-radius: var(--radius-sm); overflow: hidden; }
.schema-row { display: grid; grid-template-columns: 230px 1fr; gap: 0; border-top: 1px solid var(--hairline-2); }
.schema-row:first-child { border-top: 0; }
.schema-slot {
  padding: 0.95rem 1.1rem; background: var(--ink-2);
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--trust); text-transform: uppercase; display: flex; align-items: flex-start; gap: 0.5rem;
}
.schema-slot .n { color: var(--text-faint); }
.schema-val { padding: 0.95rem 1.2rem; color: var(--text-dim); font-size: 0.95rem; line-height: 1.5; }
@media (max-width: 720px) {
  .schema-row { grid-template-columns: 1fr; }
  .schema-slot { padding-bottom: 0.4rem; }
  .schema-val { padding-top: 0.2rem; }
}
.explorer-ai {
  margin-top: 1.4rem; padding: 1.1rem 1.2rem; border-radius: var(--radius-sm);
  border: 1px solid rgba(63, 224, 197,0.25); background: var(--trust-glow);
  font-family: var(--mono); font-size: 0.88rem; color: var(--text); line-height: 1.55;
}
.explorer-ai .lbl { color: var(--trust); font-weight: 700; }

/* =========================================================================
   INTERACTIVE: Trust-layer micro-demo + Lock-for-Service card
   ========================================================================= */
.trustdemo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2vw, 1.4rem); align-items: start; }
@media (max-width: 860px) { .trustdemo { grid-template-columns: 1fr; } }

.proposal {
  border: 1px solid rgba(181, 156, 255,0.3);
  background: linear-gradient(180deg, rgba(181, 156, 255,0.06), var(--ink-1));
  border-radius: var(--radius); padding: 1.4rem;
}
.proposal h4 { color: var(--creative); display: flex; align-items: center; gap: 0.5rem; }
.proposal ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.proposal li {
  font-family: var(--mono); font-size: 0.86rem; color: var(--text-dim);
  padding: 0.5rem 0; border-top: 1px dashed var(--hairline-2); display: flex; justify-content: space-between; gap: 1rem;
}
.proposal li:first-of-type { border-top: 0; }

.validate-col { display: flex; flex-direction: column; gap: 1rem; }
.checks { list-style: none; padding: 0; margin: 0; min-height: 1px; }
.checks li {
  font-family: var(--mono); font-size: 0.85rem; padding: 0.55rem 0; display: flex; align-items: center; gap: 0.6rem;
  color: var(--text-dim); opacity: 0; transform: translateX(-6px); transition: opacity 0.3s, transform 0.3s;
}
.checks li.show { opacity: 1; transform: none; }
.checks li .mark { color: var(--trust); font-weight: 700; }
.checks li.is-fix .mark { color: var(--possible); }

/* Lock-for-Service seal card */
.lockcard {
  border: 1px solid var(--trust); border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(63, 224, 197,0.10), transparent 55%),
    var(--ink-1);
  padding: 1.4rem; position: relative; opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.lockcard.show { opacity: 1; transform: none; }
.lockcard.idle { opacity: 0.4; }
.lockcard-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.lockcard-head h4 { color: var(--trust); margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.lockcard dl { display: grid; grid-template-columns: auto 1fr; gap: 0.55rem 1rem; margin: 0; font-family: var(--mono); font-size: 0.84rem; }
.lockcard dt { color: var(--text-faint); white-space: nowrap; }
.lockcard dd { margin: 0; color: var(--text); word-break: break-all; text-align: right; }
.lockcard dd.hash { color: var(--trust); }
.lockcard-foot {
  margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--hairline-2);
  font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint);
}

/* =========================================================================
   Comparison table (Why DAG OS)
   ========================================================================= */
.compare { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.compare th, .compare td { text-align: left; padding: 0.95rem 1rem; border-bottom: 1px solid var(--hairline-2); vertical-align: top; }
.compare thead th { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-faint); font-weight: 700; }
.compare thead th.is-dagos { color: var(--trust); }
.compare tbody th { font-family: var(--display); font-weight: 600; color: #fff; font-size: 0.96rem; width: 22%; }
.compare td { color: var(--text-dim); }
.compare td.is-dagos { color: var(--text); background: rgba(63, 224, 197,0.04); }
.compare .verdict { font-family: var(--mono); font-size: 0.8rem; }
.compare .v-bad { color: var(--present); }
.compare .v-mid { color: var(--possible); }
.compare .v-good { color: var(--absent); }
.compare-wrap { overflow-x: auto; border: 1px solid var(--hairline-2); border-radius: var(--radius); }
@media (max-width: 720px) { .compare { min-width: 640px; } }

/* =========================================================================
   Manifesto / long-form prose
   ========================================================================= */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--hairline-2); }
.prose h3 { margin-top: 1.8rem; color: var(--trust); }
.prose p, .prose li { color: var(--text-dim); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.5rem; }
.prose blockquote {
  margin: 1.6rem 0; padding: 1rem 1.3rem; border-left: 3px solid var(--trust);
  background: var(--trust-glow); border-radius: 0 8px 8px 0; color: var(--text); font-style: normal;
}
.prose code { font-family: var(--mono); font-size: 0.88em; color: var(--trust-1); background: var(--ink-3); padding: 0.1em 0.4em; border-radius: 5px; }
.toc {
  border: 1px solid var(--hairline-2); border-radius: var(--radius); padding: 1.3rem 1.5rem;
  background: var(--ink-1); position: sticky; top: 86px;
}
.toc h4 { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); }
.toc ol { list-style: none; padding: 0; margin: 0.6rem 0 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: 0.5rem; }
.toc a { text-decoration: none; color: var(--text-dim); font-size: 0.9rem; display: flex; gap: 0.6rem; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); color: var(--trust); font-size: 0.8rem; }
.toc a:hover { color: var(--text); }
.manifesto-layout { display: grid; grid-template-columns: 240px 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .manifesto-layout { grid-template-columns: 1fr; } .toc { position: static; } }

/* Reference architecture diagram block */
.refarch { border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--ink-1); padding: 1.2rem; overflow-x: auto; }
.refarch svg { min-width: 600px; margin-inline: auto; }

/* =========================================================================
   Engagements ladder
   ========================================================================= */
.ladder { display: grid; gap: 1rem; }
.rung {
  border: 1px solid var(--hairline-2); border-radius: var(--radius); padding: 1.6rem 1.8rem;
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1)); position: relative; overflow: hidden;
}
.rung::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--trust); opacity: 0.5;
}
.rung-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.8rem; margin-bottom: 0.6rem; }
.rung-step { font-family: var(--mono); font-size: 0.78rem; color: var(--trust); font-weight: 700; }
.rung h3 { margin: 0; }
.rung-meta { font-family: var(--mono); font-size: 0.8rem; color: var(--text-faint); margin-left: auto; }
.rung p { color: var(--text-dim); margin: 0; }
.rung-deliver { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: var(--mono); font-size: 0.74rem; padding: 0.28rem 0.6rem; border-radius: 6px;
  border: 1px solid var(--hairline); color: var(--text-dim);
}
.rung.is-academy::before { background: var(--creative); }
.rung.is-academy .rung-step { color: var(--creative); }

/* =========================================================================
   Origin / stage-honesty callout
   ========================================================================= */
.stage-note {
  border: 1px solid var(--hairline); border-left: 3px solid var(--possible);
  background: rgba(255, 194, 51,0.05); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.4rem; font-size: 0.95rem; color: var(--text-dim);
}
.stage-note strong { color: var(--possible); }

.placeholder-note {
  border: 1px dashed var(--hairline); border-radius: var(--radius); padding: 1.2rem 1.4rem;
  background: var(--ink-1); color: var(--text-faint); font-size: 0.92rem;
}
.placeholder-note .tag-ph { font-family: var(--mono); color: var(--creative); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* =========================================================================
   Figures / image placeholders
   Real images drop into /img/. Until a file exists, app.js marks the figure
   .is-empty and the labeled placeholder frame shows in place of a broken
   image. When the file loads, .is-ready fades it in. No layout shift.
   ========================================================================= */
.figure {
  position: relative;
  margin: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(130% 130% at 12% 0%, var(--creative-glow), transparent 52%),
    radial-gradient(130% 130% at 100% 100%, var(--trust-glow), transparent 52%),
    var(--ink-2);
}
.figure--wide   { aspect-ratio: 21 / 9; }
.figure--hero   { aspect-ratio: 16 / 10; }
.figure--card   { aspect-ratio: 4 / 3; }
.figure--square { aspect-ratio: 1 / 1; }
.figure--tall   { aspect-ratio: 4 / 5; }

.figure img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.figure.is-ready img { opacity: 1; }
.figure.is-empty img { display: none; }

.figure-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 0.55rem;
  align-items: center; justify-content: center; text-align: center;
  padding: 1.4rem;
}
.figure.is-ready .figure-ph { display: none; }
.figure-ph::before {
  content: ""; position: absolute; inset: 0.7rem;
  border: 1px dashed var(--hairline); border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}
.figure-ph-tag {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--creative);
}
.figure-ph-note {
  font-family: var(--sans); font-size: 0.9rem; color: var(--text-faint);
  max-width: 40ch; line-height: 1.5;
}
.figure-credit {
  margin-top: 0.55rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em;
  color: var(--text-faint);
}

/* ---------- Contact form (client-side only) ---------- */
.form-grid { display: grid; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); }
.field input, .field select, .field textarea {
  background: var(--ink-2); border: 1px solid var(--hairline); border-radius: 9px; color: var(--text);
  padding: 0.75rem 0.9rem; font-family: var(--sans); font-size: 0.95rem; transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--trust); outline: none; box-shadow: 0 0 0 3px var(--trust-glow); }
.field textarea { resize: vertical; min-height: 120px; }
.form-status {
  font-family: var(--mono); font-size: 0.85rem; padding: 0.9rem 1.1rem; border-radius: 9px;
  background: var(--trust-glow); border: 1px solid var(--trust); color: var(--trust); display: none;
}
.form-status.show { display: block; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { border-top: 1px solid var(--hairline-2); padding-block: 3.5rem 2.5rem; margin-top: 2rem; background: var(--ink-1); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--text-faint); font-size: 0.9rem; max-width: 34ch; margin-top: 0.9rem; }
.footer-col h5 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 0.9rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { text-decoration: none; color: var(--text-dim); font-size: 0.9rem; }
.footer-col a:hover { color: var(--trust); }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.6rem; border-top: 1px solid var(--hairline-2);
  display: flex; flex-direction: column; gap: 0.9rem; align-items: stretch;
  font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint); line-height: 1.7;
}
.footer-bottom .disclaimer { max-width: none; }

/* =========================================================================
   Scroll reveal
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Utility */
.center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.text-dim { color: var(--text-dim); }
.maxw-prose { max-width: 64ch; }
.hr-space { height: 1px; background: var(--hairline-2); border: 0; margin-block: clamp(2.5rem, 5vw, 4rem); }

/* ---------- Hero stacked layer visual ---------- */
.hero-visual { display: flex; flex-direction: column; gap: 0; }
.hero-visual .layer { padding: 1.3rem 1.4rem; }
.hero-visual .layer h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.hero-visual .layer p { color: var(--text-dim); font-size: 0.92rem; margin: 0; }
.hero-join { display: flex; align-items: center; justify-content: center; padding: 0.55rem 0; color: var(--text-faint); font-family: var(--mono); font-size: 1.3rem; }
.hero-visual .lockline {
  margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid var(--hairline-2);
  font-family: var(--mono); font-size: 0.74rem; color: var(--trust); display: flex; align-items: center; gap: 0.5rem;
}
.hero-visual .lockline .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--trust); }

/* ---------- Small reusable seal badge ---------- */
.seal-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.78rem; color: var(--trust);
  border: 1px solid var(--trust); background: var(--trust-glow);
  padding: 0.4rem 0.7rem; border-radius: 8px;
}

/* ---------- Feature row (icon + text) ---------- */
.feature { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.feature .ficon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--ink-3); border: 1px solid var(--hairline); color: var(--trust);
  font-family: var(--mono); font-weight: 700; flex-shrink: 0;
}
.feature h4 { margin-bottom: 0.3rem; }
.feature p { color: var(--text-dim); font-size: 0.95rem; margin: 0; }

/* ---------- Inline note / aside ---------- */
.aside-note {
  border: 1px solid var(--hairline-2); border-radius: var(--radius-sm);
  background: var(--ink-1); padding: 1rem 1.2rem; font-size: 0.9rem; color: var(--text-dim);
}

/* =========================================================================
   FLAME DYNAMICS  —  the page should feel like a forge: hot creative,
   cool deterministic, embers rising. All of this is neutralized by the
   prefers-reduced-motion guard above, so it is safe by default.
   ========================================================================= */

@keyframes forgeBreathe {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.06); }
}
@keyframes flameShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes glyphPulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(181,156,255,0.45)); }
  50%      { filter: drop-shadow(0 0 9px rgba(181,156,255,0.85)); }
}
@keyframes emberBeat {
  0%, 100% { box-shadow: 0 0 0 0 rgba(181,156,255,0); }
  50%      { box-shadow: 0 0 22px -4px rgba(181,156,255,0.55); }
}
@keyframes coolBeat {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63,224,197,0); }
  50%      { box-shadow: 0 0 22px -4px rgba(63,224,197,0.55); }
}
@keyframes dripDown {
  0%   { transform: translateY(-3px); opacity: 0.55; }
  50%  { transform: translateY(3px);  opacity: 1; }
  100% { transform: translateY(-3px); opacity: 0.55; }
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63,224,197,0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(63,224,197,0); }
}
@keyframes sweepLine {
  0%   { background-position: -120% 0; }
  100% { background-position: 220% 0; }
}

/* Brand glyph: calm — the steel-blue mark + orange flame carry themselves */
.brand svg { transition: transform 0.25s var(--ease); }
.brand:hover svg { transform: rotate(-6deg) scale(1.08); }
.brand-name {
  background: linear-gradient(100deg, #fff 0%, #b8f0e4 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* Hero headline: animated register gradients on the split words */
.hero h1 .split-c,
.hero h1 .split-t {
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: flameShift 6s linear infinite alternate;
}
.hero h1 .split-c { background-image: linear-gradient(100deg, #b59cff 0%, #ff89c9 100%); }   /* creative register */
.hero h1 .split-t { background-image: linear-gradient(100deg, #7af0dc 0%, #3fe0c5 100%); }   /* trust register */

/* Dividers: a register seam sweeping creative -> trust */
.divider-dag { overflow: hidden; }
.divider-dag::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--reg-creA) 26%, var(--reg-creB) 46%, var(--reg-trust) 70%, transparent 100%);
  background-size: 220% 100%; opacity: 0.55;
  animation: sweepLine 7s linear infinite;
}

/* Buttons: lift + glow; plus an optional flame-filled variant */
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost:hover { box-shadow: 0 8px 26px -14px var(--creative-glow); }
.btn-flame {
  background-image: var(--creative-grad); color: #190f24; font-weight: 700;
  background-size: 170% 100%;
  box-shadow: 0 0 0 1px rgba(181,156,255,0.6), 0 12px 34px -14px rgba(2,8,18,0.6);
}
.btn-flame:hover {
  transform: translateY(-2px); background-position: 100% 0;
  box-shadow: 0 0 0 1px var(--ember), 0 16px 42px -14px rgba(2,8,18,0.8);
}

/* Cards: ember lift */
.card { transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.3s var(--ease); }
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(181,156,255,0.4);
  box-shadow: 0 22px 60px -28px rgba(2,8,18,0.5);
}

/* The propose -> decide drumbeat, alive */
.beat.b-propose { animation: emberBeat 3.2s ease-in-out infinite; }
.beat.b-decide  { animation: coolBeat 3.2s ease-in-out infinite 1.1s; }

/* Hero two-layer card: breathing halo, flowing join, pulsing lock dot */
.hero-visual { position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: -14% -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 30% 16%, var(--creative-glow), transparent 70%),
    radial-gradient(60% 55% at 72% 90%, var(--trust-glow), transparent 70%);
  filter: blur(10px);
  animation: forgeBreathe 8s var(--ease) infinite;
}
.hero-join { animation: dripDown 2.6s ease-in-out infinite; }
.hero-visual .lockline .dot { animation: dotPulse 2.4s ease-in-out infinite; }

/* Forge-ember canvas (landing hero only) sits behind hero content */
.ember-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero { overflow: hidden; }
.hero .hero-grid { position: relative; z-index: 1; }

/* =========================================================================
   MOBILE POLISH  —  most people view this on a phone.
   ========================================================================= */
@media (max-width: 940px) {
  .nav { height: 60px; }
  .nav-links { top: 60px; }
}
/* Fallback: if background-clip:text is unsupported, show solid colors, not transparent */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand-name { -webkit-text-fill-color: initial; color: #fff; }
  .hero h1 .split-c { color: var(--creative); -webkit-text-fill-color: initial; }
  .hero h1 .split-t { color: var(--trust); -webkit-text-fill-color: initial; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .figure--wide { aspect-ratio: 16 / 9; }   /* more presence on a phone */
  .btn { padding: 0.85rem 1.2rem; }
  .hero { padding-top: 2.2rem; }
  .hero-sub { max-width: none; }
  .beats { gap: 0.4rem; margin: 1.2rem 0; }
  .beat { font-size: 0.72rem; padding: 0.34rem 0.58rem; }
  .beat-arrow { font-size: 0.85rem; }
  .section-head .lede { max-width: none; }
  .footer-bottom { gap: 0.6rem; }
}
@media (max-width: 520px) {
  /* full-width, thumb-friendly button stacks */
  .btn-row { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .btn-row .btn { width: 100%; justify-content: center; }
  h1 { letter-spacing: -0.02em; }
  .figure-ph-note { font-size: 0.82rem; }
}
/* DAG toolbar stacks cleanly on small screens */
@media (max-width: 560px) {
  .dag-toolbar { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .dag-modeswitch { width: 100%; }
  .dag-mode { flex: 1; justify-content: center; }
  /* the richer recipe is dense — keep it legible and swipeable rather than tiny */
  .dag-stage { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dag-svg { min-width: 1040px; }
}

/* =========================================================================
   Site update 2026.1 — brand logo/wordmark images, 4th lattice value,
   whole-page TOC groups, and the Compare cross-reference card
   ========================================================================= */

/* Fourth value of the allergen/risk lattice (used in the MagicMenu deep-dive) */
.tok-unknown { color: #9fb0c2; background: rgba(159,176,194,0.12); }

/* Brand mark + wordmark images (replace the former inline SVG glyph + text) */
.brand-mark {
  height: 30px; width: auto; display: block;
  transition: transform 0.25s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.08); }
.brand-wordmark { height: 17px; width: auto; display: block; }
.footer-brand .brand-wordmark { height: 19px; }
@media (max-width: 940px) {
  .brand-mark { height: 26px; }
  .brand-wordmark { height: 15px; }
}

/* Whole-page table-of-contents group labels (Method / The whitepaper) */
.toc-group {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--trust);
  margin: 1.2rem 0 0.3rem;
}
.toc-group:first-of-type { margin-top: 0.7rem; }

/* Compare cross-reference card — echoes the cool "steel" temperature of Foundry */
.xref-foundry { border-left: 3px solid var(--trust); }
.xref-foundry:hover { border-left-color: var(--creative); }

/* =========================================================================
   Method page (2026.1 reorg) — sticky Contents rail, content flow,
   the principle strip, and section sub-headings
   ========================================================================= */

/* Two-column shell: Contents pinned left, methodical flow right */
.method-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.method-nav {
  position: sticky;
  top: 92px;                       /* clears the 68px sticky header + breathing room */
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
}
.method-flow { min-width: 0; }     /* let wide SVGs scroll instead of stretching the grid */
.method-flow > section { scroll-margin-top: 92px; }
.method-flow > section + section { margin-top: clamp(3rem, 6vw, 5rem); }
.anchor-alias { display: block; height: 0; scroll-margin-top: 92px; }

/* Active section highlight (scroll-spy adds .is-active) */
.method-nav a.is-active { color: var(--trust); }
.method-nav a.is-active::before { color: var(--trust); }

/* Quiet sub-heading inside a flow section (embedded demo / vocabulary) */
.subhead h3 { font-family: var(--display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.01em; margin-bottom: 0.3rem; }

@media (max-width: 900px) {
  .method-shell { grid-template-columns: 1fr; gap: 1.4rem; }
  .method-nav { position: static; max-height: none; overflow: visible; }
  .method-flow > section + section { margin-top: clamp(2.5rem, 9vw, 3.5rem); }
}

/* The principle: propose → decide → prove, in the two-temperature palette */
.principle { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1.6rem; }
.principle-step {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--display); font-weight: 600; font-size: 0.97rem; color: var(--text);
  padding: 0.6rem 0.95rem; border-radius: 11px;
  border: 1px solid var(--hairline-2); background: var(--ink-1);
}
.principle-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.principle-step.is-creative { border-color: rgba(181, 156, 255, 0.40); }
.principle-step.is-creative .principle-dot { background: var(--creative); box-shadow: 0 0 8px -1px var(--creative); }
.principle-step.is-trust { border-color: rgba(63, 224, 197, 0.40); }
.principle-step.is-trust .principle-dot { background: var(--trust); box-shadow: 0 0 8px -1px var(--trust); }
.principle-step.is-lock { background: var(--trust); border-color: var(--trust); color: #06121f; }
.principle-step.is-lock .principle-dot { background: #06121f; box-shadow: none; }
.principle-arrow { color: var(--text-faint); font-family: var(--mono); padding: 0 0.1rem; }

@media (max-width: 560px) {
  .principle { flex-direction: column; align-items: stretch; }
  .principle-arrow { display: none; }
  .principle-step { justify-content: flex-start; }
}

/* =========================================================================
   Site-wide Contents rail (2026.2) — generalize the method flow to every
   page, intro→image whitespace utilities, the Book-a-call email modal,
   and the industries composite image map.
   ========================================================================= */

/* --- Generalize .method-flow to pages whose sections use .section/.container.
       Sections keep their markup; these overrides make them flow like the
       method page (no per-section padding, full-width inside the column). --- */
.method-flow > section { padding-block: 0; }
.method-flow .container { width: 100%; max-width: 100%; margin-inline: 0; padding-inline: 0; }
.method-flow > section.center { text-align: left; }   /* center utility shouldn't apply inside the flow */

/* --- Intro → image: halve the whitespace between intro text and the image --- */
.gf-pb-half { padding-bottom: calc(var(--section-y) / 2); }
.gf-pb-half-hero { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.gf-pt-half { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

/* --- Full-bleed: let a section span the whole page width (replaces .container).
       Keeps comfortable, viewport-scaled side gutters so content never touches
       the edge. .section-head stays at a readable measure; heavy content
       (DAG tool, pillar rows, tables) expands to fill. --- */
.gf-fluid { width: 100%; margin-inline: 0; padding-inline: clamp(1.25rem, 4vw, 4rem); }
.gf-fluid .section-head, .gf-fluid .section-head .lede { max-width: none; }
@media (max-width: 560px) { .gf-fluid { padding-inline: 1.25rem; } }

/* --- Tight section spacing: collapse the gap between adjacent sections.
       Physical longhands, declared after .section, so they win the cascade. --- */
.gf-pt-min { padding-top: clamp(1.25rem, 2.5vw, 2rem); }
.gf-pb-min { padding-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.gf-pt-0 { padding-top: 0; }
.gf-pb-0 { padding-bottom: 0; }

/* --- Heat-gradient text (the hot-flame register), used inline in headings
       and statement lines. Mirrors the creative/heat gradient. --- */
.heat-t { background: var(--creative-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* --- Uncap a section-head's measure so the heading + lede span the full
       width of their column (used where a section should read edge-to-edge
       without the full-bleed padding of .gf-fluid). --- */
.gf-wide-head .section-head, .gf-wide-head .section-head .lede { max-width: none; }

/* --- Book-a-call modal: composes an email to info@magicmenu.ai --- */
[hidden] { display: none !important; }
body.book-open { overflow: hidden; }
.book-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: clamp(1rem, 4vw, 2rem); }
.book-overlay { position: absolute; inset: 0; background: rgba(2, 5, 12, 0.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.book-dialog {
  position: relative; z-index: 1;
  width: min(100%, 520px); max-height: calc(100vh - 2rem); overflow-y: auto;
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem); box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8);
}
.book-dialog .eyebrow { margin-bottom: 0.5rem; }
.book-dialog h3 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
.book-sub { color: var(--text-dim); font-size: 0.92rem; margin: 0 0 1.2rem; }
.book-x {
  position: absolute; top: 0.7rem; right: 0.7rem; width: 36px; height: 36px;
  display: grid; place-items: center; font-size: 1.5rem; line-height: 1;
  background: transparent; border: 1px solid var(--hairline-2); border-radius: 8px;
  color: var(--text-dim); cursor: pointer; transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.book-x:hover { color: var(--text); border-color: var(--hairline); }
.book-form .field { margin-bottom: 0.85rem; }
.book-form label { display: block; font-size: 0.82rem; color: var(--text-dim); margin-bottom: 0.32rem; }
.book-form input, .book-form textarea {
  width: 100%; background: var(--ink); color: var(--text);
  border: 1px solid var(--hairline-2); border-radius: 9px; padding: 0.6rem 0.7rem;
  font: inherit; font-size: 0.95rem;
}
.book-form input:focus, .book-form textarea:focus { outline: none; border-color: var(--trust); box-shadow: 0 0 0 3px var(--trust-glow); }
.book-form textarea { resize: vertical; min-height: 88px; }
.book-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.4rem; }
.book-form .form-status { margin-top: 0.7rem; }

/* --- Industries composite: one image, ten clickable industry tiles --- */
.composite-map { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hairline); line-height: 0; }
.composite-map > img { width: 100%; height: auto; display: block; }
.composite-grid {
  position: absolute; inset: 0; display: grid;
  grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(2, 1fr);
}
.composite-grid a {
  position: relative; display: block; text-decoration: none;
  border: 1px solid transparent; transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.composite-grid a:hover, .composite-grid a:focus-visible {
  background: rgba(63, 224, 197, 0.14);
  border-color: rgba(63, 224, 197, 0.55);
  box-shadow: inset 0 0 0 1px rgba(63, 224, 197, 0.35);
  outline: none;
}
.composite-grid a::after {
  content: "View ↓"; position: absolute; left: 0.7rem; bottom: 0.7rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--trust); background: rgba(2,5,12,0.66); padding: 0.18rem 0.4rem; border-radius: 5px;
  opacity: 0; transform: translateY(4px); transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.composite-grid a:hover::after, .composite-grid a:focus-visible::after { opacity: 1; transform: translateY(0); }
.composite-grid .vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (max-width: 560px) {
  .composite-grid a::after { content: ""; }   /* labels would crowd small tiles */
}

/* =========================================================================
   Industries (2026.3) — panoramic horizontal-scroll banner + deep-dive anchors
   ========================================================================= */
.banner-hint { color: var(--text-faint); font-size: 0.74rem; letter-spacing: 0.04em; margin: 0 0 0.7rem; }

.ind-banner {
  display: flex; gap: 1rem; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity; padding-bottom: 0.9rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--hairline) transparent;
}
.ind-banner::-webkit-scrollbar { height: 8px; }
.ind-banner::-webkit-scrollbar-track { background: var(--ink-1); border-radius: 4px; }
.ind-banner::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 4px; }
.ind-banner::-webkit-scrollbar-thumb:hover { background: var(--trust); }
.ind-banner a {
  flex: 0 0 auto; scroll-snap-align: start; display: block; line-height: 0;
  border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.ind-banner a:hover, .ind-banner a:focus-visible {
  border-color: var(--trust);
  box-shadow: 0 0 0 1px var(--trust), 0 20px 45px -26px rgba(0,0,0,0.75);
  transform: translateY(-3px); outline: none;
}
.ind-banner img { height: clamp(208px, 30vw, 320px); width: auto; display: block; }
@media (max-width: 640px) { .ind-banner img { height: 168px; } }

/* deep-dive card anchors clear the sticky header on jump */
.ind-deep { scroll-margin-top: 100px; }

/* =========================================================================
   Round 7 — index brand lockup, CREATIVE/TRUST icons, deep-dive images, embeds
   ========================================================================= */

/* Large brand lockup near the top of the landing page */
.brand-hero { display: flex; align-items: center; gap: clamp(0.7rem, 1.6vw, 1.15rem); margin: 0 0 1.4rem; }
.brand-hero .bh-mark { height: clamp(46px, 7vw, 66px); width: auto; display: block; }
.brand-hero .bh-word { height: clamp(26px, 4vw, 38px); width: auto; display: block; }
@media (max-width: 560px) { .brand-hero { gap: 0.65rem; } }

/* Icons inside the CREATIVE / TRUST hero boxes */
.layer h3 { display: flex; align-items: center; gap: 0.55rem; }
.layer-icon { width: 1.18em; height: 1.18em; flex: none; display: block; }

/* Deep-dive cards: text left, square image right (industries) */
.ind-deep { display: grid; grid-template-columns: 1fr minmax(220px, 300px); gap: clamp(1.25rem, 2.6vw, 2rem); align-items: start; }
.ind-deep-text { min-width: 0; }
.ind-deep-text > :first-child { margin-top: 0; }
.ind-deep-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--hairline); display: block; }
@media (max-width: 720px) {
  .ind-deep { grid-template-columns: 1fr; }
  .ind-deep-img { max-width: 360px; order: -1; }
}

/* Embedded self-contained HTML artifacts (architecture diagram, market/TAM) */
.embed-wrap { border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; background: var(--ink-1); box-shadow: 0 24px 70px -40px rgba(0,0,0,0.8); }
.embed-frame { width: 100%; border: 0; display: block; }
.embed-cap { color: var(--text-faint); font-size: 0.78rem; margin: 0.7rem 0 0; }

/* Founder headshot (about) */
.founder-photo { width: 132px; height: 132px; border-radius: var(--radius); object-fit: cover; object-position: center top; display: block; margin: 0 0 1rem; border: 1px solid var(--hairline); }
.founder-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center top; flex: none; border: 1px solid var(--hairline); }
.founder-row { display: flex; align-items: center; gap: 0.85rem; }
.founder-row h3 { margin: 0; }
.team-headshot { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; object-position: center top; display: block; margin: 0 0 1.1rem; border: 1px solid var(--hairline); }
.team-headshot--ph { display: grid; place-items: center; background: var(--ink-3); border-style: dashed; }
.team-headshot--ph span { font-family: var(--mono); font-size: 1.45rem; font-weight: 700; letter-spacing: 0.04em; color: var(--text-dim); }

/* =========================================================================
   Positioning map (compare.html) — interactive adaptability/defensibility plot.
   Markup lives in compare.html (#map); behavior in app.js initPositioningMap().
   ========================================================================= */
  .posmap{
    display:grid;
    grid-template-columns:minmax(0,1.34fr) minmax(0,1fr);
    gap:clamp(1rem,2.4vw,1.7rem);
    align-items:stretch;
    margin-top:1.4rem;
  }
  @media (max-width:780px){ .posmap{ grid-template-columns:1fr; } }

  .posmap-figure{
    border:1px solid var(--hairline);
    border-radius:var(--radius);
    background:
      radial-gradient(120% 92% at 90% 4%, rgba(63,224,197,0.07), transparent 58%),
      radial-gradient(120% 92% at 6% 98%, rgba(181,156,255,0.05), transparent 58%),
      var(--ink-1);
    padding:clamp(0.8rem,1.6vw,1.15rem);
    display:flex; flex-direction:column; gap:0.65rem; min-width:0;
  }
  .posmap-svg{ width:100%; height:auto; display:block; overflow:visible; }

  .posmap-legend{
    display:flex; flex-wrap:wrap; align-items:center; gap:0.35rem 1.1rem;
    font-family:var(--mono); font-size:0.69rem; letter-spacing:0.03em; color:var(--text-faint);
    margin:0; padding-top:0.55rem; border-top:1px solid var(--hairline-2);
  }
  .posmap-legend span{ display:inline-flex; align-items:center; gap:0.42rem; }
  .posmap-legend b{ color:var(--text-dim); font-weight:700; }
  .posmap-legend .lg-min{ width:7px; height:7px; border-radius:50%; background:var(--trust); box-shadow:0 0 8px var(--trust-glow); }
  .posmap-legend .lg-max{ width:13px; height:13px; border-radius:50%; border:1px solid #8aa6c9; background:rgba(138,166,201,0.10); }
  .posmap-legend .lg-tap{ width:9px; height:9px; border:1px solid var(--text-faint); border-radius:3px; }

  .posmap-panel{
    border:1px solid var(--hairline);
    border-radius:var(--radius);
    background:linear-gradient(180deg,var(--ink-2),var(--ink-1));
    padding:clamp(1.1rem,2vw,1.5rem);
    display:flex; flex-direction:column; min-width:0;
    transition:border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  }
  .posmap-panel.is-gf{ border-color:rgba(63,224,197,0.34); box-shadow:0 0 0 1px rgba(63,224,197,0.05), 0 30px 70px -54px var(--trust-glow); }
  .posmap-panel.is-creative{ border-color:rgba(181,156,255,0.30); }
  .posmap-eyebrow{ font-family:var(--mono); font-size:0.7rem; font-weight:700; letter-spacing:0.15em; text-transform:uppercase;
    display:inline-flex; align-items:center; gap:0.5rem; margin:0 0 0.55rem; }
  .posmap-eyebrow::before{ content:""; width:18px; height:1px; background:currentColor; opacity:0.75; }
  .posmap-name{ font-family:var(--display); font-size:1.3rem; font-weight:600; letter-spacing:-0.01em; color:#fff; margin:0 0 0.5rem; line-height:1.12; }
  .posmap-essence{ color:var(--text-dim); font-size:0.95rem; line-height:1.55; margin:0 0 1rem; }
  .posmap-panel.is-gf .posmap-essence{ color:var(--text); }
  .posmap-rows{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; }
  .posmap-rows li{ padding:0.6rem 0; border-top:1px solid var(--hairline-2); }
  .posmap-rows li:first-child{ border-top:0; padding-top:0; }
  .posmap-k{ font-family:var(--mono); font-size:0.64rem; letter-spacing:0.13em; text-transform:uppercase; color:var(--text-faint); display:block; margin-bottom:0.18rem; }
  .posmap-v{ color:var(--text-dim); font-size:0.91rem; line-height:1.5; }
  .posmap-panel.is-gf .posmap-v{ color:var(--text); }
  .posmap-verdict{ font-family:var(--mono); font-size:0.78rem; }
  .posmap-verdict.v-bad{ color:var(--present); }
  .posmap-verdict.v-mid{ color:var(--possible); }
  .posmap-verdict.v-good{ color:var(--absent); }

  /* SVG scaffold + markers */
  .pm-frame{ fill:none; stroke:var(--hairline-2); stroke-width:1; }
  .pm-grid{ stroke:var(--hairline-2); stroke-width:1; stroke-dasharray:2 7; }
  .pm-zone{ fill:rgba(63,224,197,0.045); stroke:rgba(63,224,197,0.30); stroke-width:1; stroke-dasharray:3 5; }
  .pm-axis{ font-family:var(--mono); fill:var(--text-faint); }
  .pm-axis-name{ font-family:var(--mono); fill:var(--dimmer); letter-spacing:0.34em; }
  .pm-zone-label{ font-family:var(--mono); font-weight:700; fill:#5fcdbb; letter-spacing:0.18em; }
  .pm-zone-sub{ font-family:var(--mono); fill:rgba(95,205,187,0.7); letter-spacing:0.04em; }

  .pm-fade{ opacity:0; transition:opacity 0.55s var(--ease); }
  .posmap.is-in .pm-fade{ opacity:1; }

  .pm-node{ cursor:pointer; opacity:0; transform:scale(0.5);
    transform-box:fill-box; transform-origin:center;
    transition:opacity 0.5s var(--ease), transform 0.5s var(--ease); }
  .posmap.is-in .pm-node{ opacity:1; transform:scale(1); }
  .posmap.is-in .pm-node:hover,
  .posmap.is-in .pm-node:focus-visible{ transform:scale(1.06); }
  .pm-node:focus{ outline:none; }
  .pm-node:focus-visible .pm-ring{ stroke-width:2.4; }
  .pm-name{ font-family:var(--display); font-weight:600; letter-spacing:-0.01em; }
  .pm-sub{ font-family:var(--mono); }
  .pm-ring{ fill:none; transition:stroke-width 0.2s var(--ease); }
  .pm-sel{ fill:none; stroke-dasharray:3 4; opacity:0; transition:opacity 0.25s var(--ease); }
  .pm-node.is-selected .pm-sel{ opacity:0.85; }

  @media (prefers-reduced-motion:no-preference){
    .posmap.is-in .pm-halo{ transform-box:fill-box; transform-origin:center; animation:pmPulse 3.6s var(--ease) infinite; }
  }
  @keyframes pmPulse{ 0%,100%{ opacity:0.5; transform:scale(1);} 50%{ opacity:0.92; transform:scale(1.14);} }

/* =========================================================================
   INTERACTIVE: AI-TRUST LANDSCAPE  (compare.html #landscape)
   Self-contained scoped block, modelled on the .posmap component. Reuses
   the global primitives (.section .container .section-head .eyebrow .lede
   .btn .reveal) and tokens only. Colour language: risk lattice
   (--absent green / --possible amber / --present red) = determinism at the
   binding decision; Genesis Forge is marked apart in --creative (violet,
   "Generative") with a --trust (teal, "Deterministic") angled extension.
   The vertical axis is toggle-able between trusted operational capability
   (with an auditable / high-stakes zone) and raw AI power.
   ========================================================================= */
.lscape { margin: 0; }

/* lead thesis */
.ls-thesis {
  margin: 0 0 1.4rem; padding: 1rem 0 1rem 1.3rem;
  border-left: 2px solid var(--trust);
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.12rem, 1.9vw, 1.42rem); line-height: 1.45;
  color: #f4f7fb; max-width: 64ch;
}
.ls-thesis b {
  background: linear-gradient(90deg, var(--trust), var(--trust-1));
  -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600;
}
.ls-frame { max-width: 64ch; }

/* "how to read it" key */
.ls-key { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1.6rem 0 1.3rem; }
.ls-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.03em; color: var(--text-dim);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 0.4rem 0.78rem; background: rgba(255,255,255,0.015);
}
.ls-chip svg { display: block; }
.ls-chip .sw { border-radius: 50%; background: var(--text-dim); }
.ls-chip .sw.s1 { width: 0.5rem; height: 0.5rem; }
.ls-chip .sw.s2 { width: 0.92rem; height: 0.92rem; }

/* figure — mirrors .posmap-figure */
.lscape-figure {
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background:
    radial-gradient(120% 92% at 90% 4%, rgba(63,224,197,0.07), transparent 58%),
    radial-gradient(120% 92% at 6% 98%, rgba(181,156,255,0.05), transparent 58%),
    var(--ink-1);
  padding: clamp(0.8rem, 1.6vw, 1.15rem);
  display: flex; flex-direction: column; gap: 0.7rem; min-width: 0;
}

/* vertical-axis toggle */
.ls-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.9rem; }
.ls-toggle-label { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-faint); }
.ls-toggle-btns { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--ink-2); }
.ls-toggle-btn {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em; color: var(--text-dim);
  background: transparent; border: 0; border-radius: 999px; padding: 0.4rem 0.82rem; cursor: pointer; white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.ls-toggle-btn:hover { color: var(--text); }
.ls-toggle-btn.is-on { background: var(--trust); color: var(--ink); font-weight: 700; }
.ls-toggle-btn:focus-visible { outline: 2px solid var(--trust); outline-offset: 2px; }

.ls-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ls-svg { width: 100%; height: auto; display: block; overflow: visible; }
@media (max-width: 640px) { .ls-svg { min-width: 560px; } }
.ls-figcap { font-family: var(--mono); font-size: 0.69rem; letter-spacing: 0.04em; color: var(--text-faint); margin: 0; padding-top: 0.4rem; }

/* SVG scaffold (modelled on .pm-frame / .pm-grid / .pm-axis / .pm-zone) */
.ls-frame-rect { fill: none; stroke: var(--hairline-2); stroke-width: 1; }
.ls-grid { stroke: var(--hairline-2); stroke-width: 1; stroke-dasharray: 2 7; }
.ls-zone { fill: rgba(63,224,197,0.06); stroke: rgba(63,224,197,0.30); stroke-width: 1; stroke-dasharray: 3 5; }
.ls-threshold { stroke: var(--trust); stroke-width: 1; stroke-dasharray: 4 4; opacity: 0.55; }
.ls-axis { font-family: var(--mono); fill: var(--text-faint); }
.ls-axis-name { font-family: var(--mono); fill: var(--dimmer); letter-spacing: 0.2em; }
.ls-zone-label { font-family: var(--mono); font-weight: 700; fill: #5fcdbb; letter-spacing: 0.16em; }
.ls-zone-sub { font-family: var(--mono); fill: rgba(95,205,187,0.72); letter-spacing: 0.04em; }
.ls-arrow { fill: none; stroke: var(--text-faint); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* markers (modelled on .pm-node) */
.ls-node {
  cursor: pointer; opacity: 0; transform: scale(0.5);
  transform-box: fill-box; transform-origin: center;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.lscape.is-in .ls-node { opacity: 1; transform: scale(1); }
.lscape.is-in .ls-node:hover,
.lscape.is-in .ls-node:focus-visible { transform: scale(1.07); }
.ls-node:focus { outline: none; }
.ls-hit { fill: transparent; }
.ls-node:focus-visible .ls-hit { stroke: #fff; stroke-width: 2; }
.ls-core { transition: filter 0.2s var(--ease); }
.ls-node:hover .ls-core, .ls-node.is-active .ls-core { filter: brightness(1.18); }
/* during an axis toggle, swap instantly (no entrance pop) */
.lscape.ls-switching .ls-node { transition: none; opacity: 1; transform: none; }

/* determinism colours on the core (no hex in JS — classes carry the tokens) */
.ls-node--present .ls-core { fill: rgba(255, 59, 102,0.16); stroke: var(--present); stroke-width: 1.6; }
.ls-node--present .ls-dot  { fill: var(--present); }
.ls-node--possible .ls-core { fill: rgba(255, 194, 51,0.15); stroke: var(--possible); stroke-width: 1.6; }
.ls-node--possible .ls-dot  { fill: var(--possible); }
.ls-node--absent .ls-core { fill: rgba(84, 217, 138,0.14); stroke: var(--absent); stroke-width: 1.6; }
.ls-node--absent .ls-dot  { fill: var(--absent); }

/* Genesis Forge — violet core (Generative) + angled teal extension (Deterministic) */
.ls-node--gf .ls-glow { fill: rgba(181,156,255,0.20); }
.ls-node--gf .ls-core { fill: rgba(181,156,255,0.20); stroke: var(--creative); stroke-width: 1.8; }
.ls-node--gf .ls-dot  { fill: var(--creative); }
.ls-gf-ext { fill: rgba(63,224,197,0.16); stroke: var(--trust); stroke-width: 1.5; }
.ls-gf-tip { fill: var(--trust-1); }

/* tooltip */
.ls-tip { pointer-events: none; visibility: hidden; }
.ls-tip.is-on { visibility: visible; }
.ls-tip-bg { fill: rgba(9,13,22,0.97); stroke: var(--hairline-2); stroke-width: 1; }
.ls-tip-title { font-family: var(--display); font-weight: 600; fill: var(--text); }
.ls-tip-title.t-present { fill: var(--present); }
.ls-tip-title.t-possible { fill: var(--possible); }
.ls-tip-title.t-absent { fill: var(--absent); }
.ls-tip-title.t-gf { fill: var(--trust-1); }
.ls-tip-2 { font-family: var(--mono); fill: var(--text-dim); }
.ls-tip-3 { font-family: var(--mono); fill: var(--text-faint); }

/* determinism legend (modelled on .posmap-legend) */
.ls-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.2rem;
  font-family: var(--mono); font-size: 0.69rem; letter-spacing: 0.03em; color: var(--text-faint);
  margin: 0; padding-top: 0.55rem; border-top: 1px solid var(--hairline-2);
}
.ls-legend span { display: inline-flex; align-items: center; gap: 0.42rem; }
.ls-legend .sw { width: 0.72rem; height: 0.72rem; border-radius: 50%; }
.ls-legend .sw.red { background: var(--present); }
.ls-legend .sw.amber { background: var(--possible); }
.ls-legend .sw.green { background: var(--absent); }
.ls-legend svg { display: block; }

/* archetype cards */
.ls-arch-grid { display: grid; gap: 1.1rem; margin-top: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 880px) { .ls-arch-grid { grid-template-columns: 1fr 1fr; } }
.ls-arch {
  position: relative; border: 1px solid var(--hairline); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1)); padding: 1.4rem;
  display: flex; flex-direction: column;
}
.ls-arch-ey { display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap; }
.ls-arch-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; align-self: center; flex: 0 0 auto; }
.ls-arch.is-a .ls-arch-dot { background: var(--present); }
.ls-arch.is-b .ls-arch-dot { background: var(--possible); }
.ls-arch.is-c .ls-arch-dot { background: var(--absent); }
.ls-arch.is-d .ls-arch-dot { background: var(--creative); box-shadow: 0 0 0 3px rgba(63,224,197,0.22); }
.ls-arch-letter {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.18em; color: var(--text-faint);
  border: 1px solid var(--hairline); border-radius: 6px; padding: 0.16rem 0.48rem;
}
.ls-arch h3 { font-family: var(--display); font-weight: 600; font-size: 1.14rem; margin: 0.1rem 0 0; line-height: 1.2; }
.ls-arch .ls-arch-tag {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--text-faint);
  margin: 0.5rem 0 0.75rem; text-transform: lowercase;
}
.ls-arch p { margin: 0; color: var(--text-dim); font-size: 0.95rem; line-height: 1.55; }
.ls-arch .ls-roster {
  margin: 0.9rem 0 0; font-family: var(--mono); font-size: 0.73rem; line-height: 1.7; color: var(--text-faint);
}
.ls-arch .ls-roster b { color: var(--text-dim); font-weight: 400; }
.ls-arch.is-d { border-color: rgba(181,156,255,0.42); background: linear-gradient(180deg, rgba(181,156,255,0.06), var(--ink-1)); }
.ls-arch.is-d h3 { color: #cdbcff; }
.ls-arch.is-d .ls-arch-letter { border-color: rgba(181,156,255,0.5); color: #cdbcff; }

/* capability bars (the comparison table, rolled up per archetype) */
.ls-stats { margin: 1.1rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--hairline-2); }
.ls-stat { display: grid; grid-template-columns: 9.5rem 1fr; align-items: center; gap: 0.7rem; }
.ls-stat-k { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--text-faint); text-transform: uppercase; }
.ls-stat-bar { position: relative; height: 6px; border-radius: 999px; background: var(--ink-3); overflow: hidden; }
.ls-stat-fill { position: absolute; inset: 0 auto 0 0; height: 100%; border-radius: 999px; background: #8aa6c9; }
.ls-stat-fill--gf { background: linear-gradient(90deg, var(--creative), var(--trust)); }
.ls-bestfor { margin: 1rem 0 0; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em; color: var(--text-dim); line-height: 1.5; }
.ls-bestfor b { color: var(--text); font-weight: 400; }
@media (max-width: 520px) { .ls-stat { grid-template-columns: 7.5rem 1fr; } .ls-stat-k { font-size: 0.62rem; } }

/* close + disclaimers */
.ls-close { margin-top: 2.2rem; max-width: 64ch; }
.ls-principle { font-family: var(--mono); font-size: 0.84rem; letter-spacing: 0.04em; line-height: 1.7; color: var(--text-dim); margin: 0 0 1rem; }
.ls-principle b { color: var(--trust-1); font-weight: 400; }
.ls-illu { margin: 1.4rem 0 0; max-width: 80ch; font-family: var(--mono); font-size: 0.69rem; line-height: 1.65; letter-spacing: 0.02em; color: var(--text-faint); }

@media (prefers-reduced-motion: reduce) {
  .ls-node { opacity: 1 !important; transform: none !important; transition: none; }
}
