/* ==========================================================
   VIBETUNERS — site.css
   Dark telemetry look. Cyan/violet = AI, amber = Krispy partners.
   Chart colours live in the .viz block and were validated with the
   dataviz palette checker against --surface (#0D1117).
   ========================================================== */

/* Self-hosted variable fonts (SIL Open Font License), latin subset.
   Inter + Space Grotesk are preloaded in <head>. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/inter-latin.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/assets/fonts/space-grotesk-latin.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/jetbrains-mono-latin.woff2) format('woff2'); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #07090D;
  --bg-alt:    #0A0D13;
  --surface:   #0D1117;
  --card:      #10151D;
  --card-h:    #151B25;
  --line:      rgba(255,255,255,0.08);
  --line-s:    rgba(255,255,255,0.16);

  --text:      #E8ECF1;
  --muted:     #A9B2C0;
  --faint:     #7C8696;

  --cyan:      #4FE3D1;
  --cyan-d:    #1FB5A4;
  --violet:    #9B8CFF;
  --ai-grad:   linear-gradient(100deg, #4FE3D1 0%, #7FB8FF 45%, #9B8CFF 100%);
  --amber:     #FF8C00;
  --amber-l:   #FFB347;
  --red:       #FF6B6B;
  --green:     #3DDC97;

  /* chart series (validated dark palette) */
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;

  --f-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --f-body:    'Inter', system-ui, -apple-system, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --r:   10px;
  --r-s: 6px;
  --max: 1200px;
  --nav-h: 68px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(79,227,209,0.3); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.mono { font-family: var(--f-mono); }
.grad { background: var(--ai-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip { position: absolute; left: -999px; top: 0; background: var(--cyan); color: #000; padding: .5rem 1rem; z-index: 999; }
.skip:focus { left: 1rem; }

/* ---------- background grid ---------- */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(155,140,255,0.13), transparent 60%),
    radial-gradient(800px 500px at -10% 10%, rgba(79,227,209,0.10), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.15) 100%);
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(7,9,13,0.78); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; height: 100%; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.brand b { font-weight: 700; }
.brand span { color: var(--cyan); }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; list-style: none; align-items: center; }
.nav-links a { color: var(--muted); font-size: .92rem; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav-links a.btn-amber, .nav-links a.btn-amber:hover { color: #120800; }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--cyan); padding-bottom: 4px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-s); color: var(--text); border-radius: var(--r-s); padding: .4rem .7rem; font: inherit; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .95rem;
  padding: .8rem 1.3rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
  font-family: var(--f-body);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-ai { background: var(--ai-grad); color: #061015; box-shadow: 0 6px 30px rgba(79,227,209,0.25); }
.btn-ai:hover { box-shadow: 0 8px 40px rgba(127,184,255,0.35); }
.btn-ghost { border-color: var(--line-s); color: var(--text); background: rgba(255,255,255,0.03); }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-amber { background: var(--amber); color: #120800; }
.btn-amber:hover { box-shadow: 0 8px 30px rgba(255,140,0,.35); }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--f-display); letter-spacing: -.02em; line-height: 1.12; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.3rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.02rem; font-weight: 600; }
p { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--f-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--cyan); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--cyan); }
.eyebrow.amber { color: var(--amber-l); }
.eyebrow.amber::before { background: var(--amber-l); }

/* ---------- sections ---------- */
section { padding: 6rem 0; position: relative; }
.sec-head { max-width: 760px; margin-bottom: 3rem; }
.sec-head p { margin-top: 1rem; font-size: 1.08rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015) 20%, rgba(255,255,255,0.015) 80%, transparent); }

/* ---------- hero ---------- */
.hero { padding: 5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: center; }
.hero h1 { margin-bottom: 1.4rem; }
.hero .lead { margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.chip {
  font-family: var(--f-mono); font-size: .75rem; color: var(--muted);
  border: 1px solid var(--line-s); border-radius: 999px; padding: .3rem .75rem; background: rgba(255,255,255,0.02);
}
.chip.on { color: var(--cyan); border-color: rgba(79,227,209,0.4); }

/* terminal / agent window */
.window {
  background: var(--surface); border: 1px solid var(--line-s); border-radius: var(--r);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(79,227,209,0.05);
  overflow: hidden;
}
.window-bar { display: flex; align-items: center; gap: .45rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2A313C; display: block; }
.window-bar i:nth-child(1) { background: #FF5F57; } .window-bar i:nth-child(2) { background: #FEBC2E; } .window-bar i:nth-child(3) { background: #28C840; }
.window-bar span { margin-left: .6rem; font-family: var(--f-mono); font-size: .75rem; color: var(--faint); }
.window-body { padding: 1rem; }

.hero-chart { position: relative; height: 220px; }
.hero-chart svg { width: 100%; height: auto; overflow: visible; }
svg.compact .lane-t { font-size: 17px; }
svg.compact .finding-t { font-size: 19px; font-weight: 600; }
.agent-log { font-family: var(--f-mono); font-size: .8rem; line-height: 1.6; margin-top: .9rem; border-top: 1px dashed var(--line-s); padding-top: .9rem; min-height: 9.5rem; }
.agent-log .l { opacity: 0; transform: translateY(4px); transition: opacity .4s, transform .4s; color: var(--muted); }
.agent-log .l.show { opacity: 1; transform: none; }
.agent-log .who { color: var(--cyan); }
.agent-log .warn { color: #FFC56B; }
.agent-log .bad { color: var(--red); }
.agent-log .ok { color: var(--green); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 1.25rem; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.6rem; position: relative; transition: border-color .2s, background .2s, transform .2s;
}
.card:hover { border-color: var(--line-s); background: var(--card-h); }
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(79,227,209,0.35); }
.card h3 { margin: .9rem 0 .5rem; }
.card p { font-size: .95rem; }
.card .more { display: inline-block; margin-top: 1rem; font-size: .88rem; font-weight: 600; color: var(--cyan); }
.icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(79,227,209,0.08); border: 1px solid rgba(79,227,209,0.25); color: var(--cyan);
}
.icon svg { width: 24px; height: 24px; }
.icon.v { background: rgba(155,140,255,0.08); border-color: rgba(155,140,255,0.3); color: var(--violet); }
.icon.a { background: rgba(255,140,0,0.08); border-color: rgba(255,140,0,0.3); color: var(--amber-l); }
.num {
  position: absolute; top: 1.3rem; right: 1.4rem; font-family: var(--f-mono); font-size: .8rem; color: var(--faint);
}

/* pillars */
.pillar { padding: 2rem; overflow: hidden; }
.pillar .viz-mini { height: 120px; margin: -0.4rem -0.4rem 1.2rem; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.pillar .viz-mini svg { width: 100%; height: 100%; }

/* ---------- ECU grid ---------- */
.ecu {
  display: flex; flex-direction: column; gap: .4rem;
}
.ecu .tag { font-family: var(--f-mono); font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; }
.ecu h3 { margin: 0; font-size: 1.4rem; }
.ecu .sw { font-family: var(--f-mono); font-size: .8rem; color: var(--cyan); }
.ecu ul { list-style: none; margin-top: .6rem; font-size: .9rem; color: var(--muted); }
.ecu li { padding: .25rem 0 .25rem 1.1rem; position: relative; }
.ecu li::before { content: "›"; position: absolute; left: 0; color: var(--cyan); }
.ecu.big { border-top: 2px solid var(--cyan); }
.also { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; align-items: center; }
.also span:first-child { color: var(--faint); font-size: .9rem; margin-right: .3rem; }

/* ---------- loop diagram ---------- */
.loop-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.loop svg { width: 100%; height: auto; }
.loop .node rect { fill: var(--card); stroke: var(--line-s); }
.loop .node.human rect { stroke: var(--amber-l); stroke-dasharray: 4 3; }
.loop .node text { fill: var(--text); font-family: var(--f-display); font-weight: 600; font-size: 15px; }
.loop .node text.s { fill: var(--muted); font-family: var(--f-body); font-weight: 400; font-size: 11.5px; }
.loop .node .n { fill: var(--cyan); font-family: var(--f-mono); font-size: 11px; font-weight: 500; }
.loop .ring { fill: none; stroke: url(#ringGrad); stroke-width: 2; stroke-dasharray: 6 8; animation: dash 30s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -600; } }
.steps { list-style: none; counter-reset: s; }
.steps li { counter-increment: s; padding: 1rem 0 1rem 3.2rem; position: relative; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 1rem;
  font-family: var(--f-mono); font-size: .85rem; color: var(--cyan);
  width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid rgba(79,227,209,0.35);
  display: grid; place-items: center;
}
.steps h4 { margin-bottom: .2rem; }
.steps p { font-size: .93rem; }
.steps li.human::before { color: var(--amber-l); border-color: rgba(255,179,71,0.5); }

/* ---------- chat transcript ---------- */
.chat { display: flex; flex-direction: column; gap: .9rem; }
.msg { max-width: 92%; border-radius: 14px; padding: .9rem 1.1rem; font-size: .93rem; line-height: 1.6; }
.msg.user { align-self: flex-end; background: #1A2230; border: 1px solid var(--line-s); color: var(--text); border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: rgba(79,227,209,0.05); border: 1px solid rgba(79,227,209,0.22); color: var(--text); border-bottom-left-radius: 4px; }
.msg .from { display: block; font-family: var(--f-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: .35rem; }
.msg.ai .from { color: var(--cyan); }
.msg ul { margin: .4rem 0 0 1.1rem; }
.msg li { margin: .2rem 0; color: var(--text); }
.msg code, p code, li code, td code { font-family: var(--f-mono); font-size: .85em; background: rgba(255,255,255,0.06); padding: .1em .35em; border-radius: 4px; color: #D6F7F2; }
.msg .tool { display: inline-flex; gap: .4rem; align-items: center; font-family: var(--f-mono); font-size: .76rem; color: var(--violet); background: rgba(155,140,255,0.08); border: 1px solid rgba(155,140,255,0.25); border-radius: 6px; padding: .2rem .5rem; margin: .2rem 0; }

/* ---------- callouts ---------- */
.callout { border: 1px solid var(--line-s); border-left: 3px solid var(--cyan); background: rgba(79,227,209,0.04); border-radius: var(--r-s); padding: 1.1rem 1.3rem; margin: 1.5rem 0; }
.callout.warn { border-left-color: #FFC56B; background: rgba(255,197,107,0.05); }
.callout.danger { border-left-color: var(--red); background: rgba(255,107,107,0.05); }
.callout strong { color: var(--text); }
.callout p, .prose .callout p { margin: 0; }
.callout p + p, .prose .callout p + p { margin-top: .5rem; }

/* safety band */
.safety {
  border: 1px solid rgba(255,107,107,0.3); border-radius: var(--r);
  background: linear-gradient(135deg, rgba(255,107,107,0.06), rgba(255,197,107,0.04));
  padding: 2.5rem;
}
.safety-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2rem; }
.safety-grid div { border-top: 1px solid rgba(255,107,107,0.3); padding-top: 1rem; }
.safety-grid h4 { margin-bottom: .4rem; display: flex; gap: .5rem; align-items: center; }
.safety-grid p { font-size: .9rem; }
.safety-grid .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); display: inline-block; }

/* ---------- partner (Krispy) ---------- */
.partner {
  border: 1px solid rgba(255,140,0,0.3); border-radius: var(--r); overflow: hidden;
  background: radial-gradient(600px 300px at 100% 0%, rgba(255,140,0,0.14), transparent 60%), #0E0B07;
}
.partner-grid { display: grid; grid-template-columns: 1fr 1fr; }
.partner-col { padding: 2.5rem; }
.partner-col + .partner-col { border-left: 1px solid rgba(255,140,0,0.18); }
.partner h3 { font-size: 1.6rem; margin: .8rem 0 .7rem; }
.partner h3 em { font-style: normal; color: var(--amber); }
.partner p { margin-bottom: 1.4rem; }
.partner ul { list-style: none; margin-bottom: 1.6rem; }
.partner li { padding: .3rem 0 .3rem 1.4rem; position: relative; color: var(--muted); font-size: .95rem; }
.partner li::before { content: ""; position: absolute; left: 0; top: .78rem; width: 8px; height: 8px; border-radius: 2px; background: var(--amber); }
.partner-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; justify-content: space-between;
  border: 1px solid rgba(255,140,0,0.3); border-radius: var(--r); padding: 1.3rem 1.6rem;
  background: linear-gradient(90deg, rgba(255,140,0,0.08), transparent);
}
.partner-strip p { margin: 0; color: var(--text); }
.partner-strip p span { color: var(--muted); }

/* gauge visual (svg) */
.gauge-art { width: 100%; max-width: 360px; margin: 0 auto 1.5rem; }

/* ---------- page header (inner pages) ---------- */
.page-head { padding: 4.5rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.page-head .lead { margin-top: 1rem; }
.crumbs { font-family: var(--f-mono); font-size: .78rem; color: var(--faint); margin-bottom: 1.3rem; }
.crumbs a { color: var(--faint); }
.crumbs a:hover { color: var(--cyan); }

/* article layout */
.doc { display: grid; grid-template-columns: 220px 1fr; gap: 3.5rem; padding: 3.5rem 0 5rem; }
.toc { position: sticky; top: calc(var(--nav-h) + 1.5rem); align-self: start; font-size: .88rem; }
.toc h4 { font-family: var(--f-mono); font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .12em; margin-bottom: .8rem; font-weight: 500; }
.toc ol { list-style: none; border-left: 1px solid var(--line); }
.toc a { display: block; color: var(--muted); padding: .35rem 0 .35rem 1rem; margin-left: -1px; border-left: 1px solid transparent; }
.toc a:hover, .toc a.active { color: var(--text); border-left-color: var(--cyan); text-decoration: none; }
.prose { min-width: 0; max-width: 820px; }
.prose > section { padding: 0 0 3.5rem; scroll-margin-top: calc(var(--nav-h) + 1rem); }
.prose h2 { font-size: 1.85rem; margin-bottom: 1rem; }
.prose h3 { margin: 2rem 0 .7rem; }
.prose p { margin-bottom: 1rem; }
.prose ul.list, .prose ol.list { margin: 0 0 1.2rem 1.3rem; color: var(--muted); }
.prose ul.list li, .prose ol.list li { margin: .35rem 0; }
.prose strong { color: var(--text); }

/* code blocks */
.code {
  position: relative; background: #0A0E14; border: 1px solid var(--line-s); border-radius: var(--r-s);
  margin: 1.2rem 0 1.6rem; overflow: hidden;
}
.code-head { display: flex; align-items: center; justify-content: space-between; padding: .5rem .9rem; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: .74rem; color: var(--faint); }
.code pre { padding: 1rem 1.1rem; overflow-x: auto; font-family: var(--f-mono); font-size: .82rem; line-height: 1.65; color: #D5DCE6; white-space: pre; }
.code pre .c { color: #6E7A8C; }
.code pre .k { color: var(--cyan); }
.code pre .s { color: #FFC56B; }
.code pre .h { color: var(--violet); font-weight: 600; }
.copy {
  background: rgba(255,255,255,0.05); border: 1px solid var(--line-s); color: var(--muted);
  font: 500 .72rem var(--f-mono); padding: .25rem .6rem; border-radius: 5px; cursor: pointer;
}
.copy:hover { color: var(--text); border-color: var(--cyan); }
.copy.done { color: var(--green); border-color: var(--green); }

/* tables */
.tbl-wrap { overflow-x: auto; margin: 1.2rem 0 1.6rem; border: 1px solid var(--line); border-radius: var(--r-s); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--f-mono); font-weight: 500; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); background: rgba(255,255,255,0.02); }
td { color: var(--muted); }
td:first-child { color: var(--text); }
tr:last-child td { border-bottom: 0; }

/* ---------- viz (charts) ---------- */
.viz { background: var(--surface); border: 1px solid var(--line-s); border-radius: var(--r); padding: 1.2rem 1.2rem 1rem; margin: 1.5rem 0; position: relative; }
.viz-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; }
.viz-head h3 { font-size: 1.05rem; margin: 0; }
.viz-head .sub { font-size: .82rem; color: var(--faint); font-family: var(--f-mono); }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: 14px; height: 2px; display: inline-block; border-radius: 2px; }
.legend i.dash { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important; }
.viz svg { width: 100%; height: auto; overflow: visible; }
.grid-l { stroke: rgba(255,255,255,0.06); }
.axis-t { fill: var(--faint); font-family: var(--f-mono); font-size: 10px; }
.lane-t { fill: var(--muted); font-family: var(--f-body); font-size: 11px; font-weight: 600; }
.zone { fill: rgba(255,255,255,0.045); }
.zone-l { stroke: rgba(255,255,255,0.35); stroke-dasharray: 2 3; }
.finding-t { fill: var(--text); font-family: var(--f-mono); font-size: 10.5px; }
.xhair { stroke: rgba(255,255,255,0.45); stroke-width: 1; }
.viz-controls { display: flex; flex-wrap: wrap; gap: .5rem; }
.toggle {
  font: 500 .78rem var(--f-mono); color: var(--muted); background: transparent;
  border: 1px solid var(--line-s); border-radius: 999px; padding: .35rem .8rem; cursor: pointer;
}
.toggle[aria-pressed="true"] { color: #061015; background: var(--cyan); border-color: var(--cyan); }
.tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 190px;
  background: rgba(16,21,29,0.97); border: 1px solid var(--line-s); border-radius: 8px;
  padding: .6rem .75rem; font-size: .78rem; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0; transition: opacity .12s;
}
.tip.show { opacity: 1; }
.tip h5 { font: 600 .78rem var(--f-mono); color: var(--text); margin-bottom: .35rem; }
.tip div { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); line-height: 1.55; }
.tip div b { color: var(--text); font-weight: 500; font-family: var(--f-mono); }
.tip div i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: .4rem; }
.findings { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1rem; }
.finding { border: 1px solid var(--line); border-radius: var(--r-s); padding: .8rem .9rem; font-size: .86rem; background: rgba(255,255,255,0.015); }
.finding b { display: flex; align-items: center; gap: .45rem; color: var(--text); font-family: var(--f-mono); font-size: .78rem; margin-bottom: .3rem; }
.finding p { font-size: .84rem; margin: 0; }
.sev { font-family: var(--f-mono); font-size: .68rem; padding: .05rem .4rem; border-radius: 4px; border: 1px solid; }
.sev.high { color: var(--red); border-color: rgba(255,107,107,.5); }
.sev.med { color: #FFC56B; border-color: rgba(255,197,107,.5); }
.sev.low { color: var(--muted); border-color: var(--line-s); }
details.table-view { margin-top: .8rem; font-size: .85rem; }
details.table-view summary { cursor: pointer; color: var(--muted); font-family: var(--f-mono); font-size: .78rem; }
details.table-view .tbl-wrap { max-height: 320px; overflow: auto; }
details.table-view td, details.table-view th { padding: .35rem .6rem; font-family: var(--f-mono); font-size: .76rem; white-space: nowrap; }

/* heatmap */
.heat { display: grid; gap: 2px; font-family: var(--f-mono); font-size: .72rem; overflow-x: auto; padding: 2px; }
.heat .hc { padding: .45rem 0; text-align: center; border-radius: 3px; color: var(--text); cursor: default; position: relative; }
.heat .hh { color: var(--faint); text-align: center; padding: .3rem 0; }
.heat .hc:hover { outline: 2px solid var(--text); z-index: 2; }
.heat-scale { display: flex; align-items: center; gap: .6rem; font-size: .78rem; color: var(--muted); margin-top: .8rem; font-family: var(--f-mono); }
.heat-scale .bar { flex: 0 0 200px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #3987e5, #3a4150 50%, #d95926); }

/* prompt library */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.prompt-card { display: flex; flex-direction: column; }
.prompt-card .meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.prompt-card .cat { font-family: var(--f-mono); font-size: .72rem; color: var(--violet); text-transform: uppercase; letter-spacing: .1em; }
.prompt-card h3 { margin: .7rem 0 .5rem; font-size: 1.1rem; }
.prompt-card pre {
  flex: 1; margin-top: .8rem; background: #0A0E14; border: 1px solid var(--line); border-radius: var(--r-s);
  padding: .9rem; font-family: var(--f-mono); font-size: .76rem; line-height: 1.6; color: #C9D2DE;
  white-space: pre-wrap; max-height: 260px; overflow: auto;
}
.prompt-card[hidden] { display: none; }

/* computer-use diagram */
.cu-diagram svg { width: 100%; height: auto; }
.cu-diagram text { font-family: var(--f-body); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2.5rem; margin-top: 2rem; background: var(--bg-alt); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
footer h4 { font-family: var(--f-mono); font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; font-weight: 500; }
footer ul { list-style: none; }
footer li { margin: .45rem 0; }
footer li a { color: var(--muted); font-size: .92rem; }
footer li a:hover { color: var(--text); }
footer .krispy a { color: var(--amber-l); }
.foot-note { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .8rem; color: var(--faint); }
.foot-note p { color: var(--faint); font-size: .8rem; max-width: 760px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .loop .ring { animation: none; }
  html { scroll-behavior: auto; }
  * { animation-duration: 0s !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid, .loop-wrap, .partner-grid { grid-template-columns: 1fr; }
  .partner-col + .partner-col { border-left: 0; border-top: 1px solid rgba(255,140,0,0.18); }
  .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
  .safety-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .doc { grid-template-columns: 1fr; }
  .toc { display: none; }
  .findings { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  section { padding: 4rem 0; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: flex-start;
    background: rgba(7,9,13,0.97); border-bottom: 1px solid var(--line); padding: 1rem 1.5rem 1.5rem; gap: 1rem;
  }
  .nav-links.open { display: flex; }
  .g2, .g3, .g4, .safety-grid { grid-template-columns: 1fr; }
  .safety, .partner-col { padding: 1.6rem; }
  .foot-grid { grid-template-columns: 1fr; }
}

/* ---------- SEO additions: meta line, next-guide, FAQ ---------- */
.meta-line { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: 1.4rem; font-family: var(--f-mono); font-size: .76rem; color: var(--faint); }
.meta-line a { color: var(--muted); }
.next-guides { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; }
.next-guides a { display: block; border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.3rem; background: var(--card); color: var(--text); }
.next-guides a:hover { border-color: rgba(79,227,209,0.4); text-decoration: none; }
.next-guides small { display: block; font-family: var(--f-mono); font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .3rem; }
.next-guides a.next { text-align: right; }
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.15rem 2.2rem 1.15rem 0; position: relative; font-family: var(--f-display); font-weight: 600; font-size: 1.08rem; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: 1rem; font-family: var(--f-mono); font-size: 1.3rem; color: var(--cyan); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.2rem; margin: 0; }
.faq details p + p { margin-top: -.6rem; }
.ecu-hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 1rem 0 3rem; }
@media (max-width: 1000px) { .ecu-hub { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .next-guides { grid-template-columns: 1fr; } .next-guides a.next { text-align: left; } }
.next-guides + .partner-strip { margin-top: 1.5rem; }
a.card.ecu .more { margin-top: .6rem; }
