/* Usage: black and white. (Built on the earlier violet layout; the monochrome
   overrides at the end of this file win.) Near-black with a violet tint, lavender-to-violet gradient type,
   a floating pill nav, monospace uppercase labels, white pill buttons, and
   isometric line drawings. Mint is used only for "live". */

:root {
  --bg: #0b0a12;
  --bg-2: #110f1b;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.05);
  --line: rgba(196, 181, 253, 0.16);
  --line-strong: rgba(196, 181, 253, 0.28);
  --ink: #f4f2fb;
  --ink-2: #a8a3bf;
  --ink-3: #7d7895;
  --violet: #8b5cf6;
  --violet-2: #a78bfa;
  --lavender: #c4b5fd;
  --amber-2: #fbbf24;           /* the second colour: warm gold */
  --amber-soft: #fde68a;
  --grad: linear-gradient(100deg, #c9bcff 0%, #a78bfa 30%, #fbbf24 100%);
  --mint: #6ee7b7;
  --good: #6ee7b7;
  --good-soft: rgba(110, 231, 183, 0.1);
  --bad: #fca5a5;
  --bad-soft: rgba(248, 113, 113, 0.1);
  --warn: #fcd34d;
  --warn-soft: rgba(252, 211, 77, 0.08);

  /* names the pages already use */
  --paper: var(--bg-2);
  --card-solid: var(--bg-2);
  --stone-2: var(--surface-2);
  --mist: var(--surface-2);
  --mist-2: var(--surface-2);
  --plate-lo: var(--surface-2);
  --plate-hi: var(--surface);
  --rule: var(--line);
  --rule-strong: var(--line-strong);
  --rule-soft: var(--line);
  --accent: var(--violet-2);
  --accent-hot: var(--lavender);
  --accent-soft: rgba(139, 92, 246, 0.18);
  --on-accent: #0b0a12;
  --live: var(--mint);
  --green: var(--violet-2);
  --green-hot: var(--lavender);
  --green-glow: transparent;
  --red: var(--bad);
  --red-glow: transparent;
  --amber: var(--violet-2);
  --blue: var(--violet-2);
  --orange: var(--violet-2);
  --lime: var(--violet);
  --lime-deep: var(--violet-2);
  --face: var(--surface-2);
  --face-solid: var(--surface-2);
  --module: var(--bg-2);
  --lcd-ink: var(--ink);

  --ff: "Inter Tight", "Inter", "Helvetica Neue", Arial, sans-serif;
  --ff-display: "Inter Tight", "Inter Display", "Inter", Arial, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ff-lcd: var(--ff-mono);
  --t-xs: 0.78rem;
  --t-sm: 0.9rem;
  --t-md: 1rem;
  --t-lg: 1.2rem;
  --t-xl: 1.5rem;
  --t-2xl: clamp(2rem, 3.8vw, 3rem);
  --t-3xl: clamp(3rem, 7.6vw, 6.4rem);

  --gutter: clamp(16px, 4vw, 52px);
  --measure: 38rem;
  --radius: 14px;
  --radius-lg: 22px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background:
    radial-gradient(900px 620px at 78% 18%, rgba(110, 76, 220, 0.16), transparent 65%),
    radial-gradient(700px 500px at 0% 0%, rgba(80, 60, 160, 0.08), transparent 60%),
    var(--bg);
  font-family: var(--ff); font-size: var(--t-md); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: rgba(244, 242, 251, 0.4); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code, .mono { font-family: var(--ff-mono); font-size: 0.86em; }
code { color: var(--lavender); background: rgba(139, 92, 246, 0.12); padding: 0.12em 0.4em; border-radius: 6px; }
a code { color: inherit; }

/* ---------- type */
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--ff-display); }
h1 { font-size: var(--t-3xl); line-height: 1; letter-spacing: -0.055em; font-weight: 600; }
h2 { font-size: var(--t-2xl); line-height: 1.05; margin-bottom: 0.55em; font-weight: 600; letter-spacing: -0.045em; }
h3 { font-size: var(--t-lg); line-height: 1.3; margin-bottom: 0.35em; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: clamp(1.1rem, 1.7vw, 1.4rem); color: var(--ink-2); max-width: 36rem; line-height: 1.5; letter-spacing: -0.01em; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-sm); }
/* gradient type for the emphasised line */
.hl, .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* monospace uppercase label */
.label { font-family: var(--ff-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- frame: a floating pill nav */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.site-head { position: sticky; top: 0; z-index: 40; padding-top: 14px; }
.site-head .wrap {
  display: flex; align-items: center; gap: 22px; min-height: 68px; flex-wrap: wrap;
  max-width: calc(1200px - 2 * var(--gutter) + 40px);
  margin: 0 auto; padding: 8px 8px 8px 24px;
  background: rgba(14, 12, 22, 0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 999px;
}
@media (max-width: 1240px) { .site-head .wrap { margin: 0 var(--gutter); } }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--ff-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.04em; }
.brand-mark { width: 28px; height: 28px; }
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 1rem; font-weight: 500; padding: 8px 14px; border-radius: 999px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
@media (max-width: 1180px) and (min-width: 901px) { .nav { gap: 0; } .nav a { padding: 8px 10px; font-size: 0.94rem; } .site-head .wrap { gap: 14px; } }
@media (max-width: 900px) {
  .site-head .wrap { border-radius: 26px; padding: 10px 10px 6px 18px; gap: 4px 12px; }
  .head-cta { margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 0 0 0 -14px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .nav a { white-space: nowrap; padding: 8px 12px; }
}

main.wrap { padding-top: clamp(40px, 6vw, 84px); padding-bottom: 112px; }
main > section + section { margin-top: clamp(80px, 10vw, 140px); }

.site-foot { border-top: 1px solid var(--line); padding: 28px 0 44px; font-size: var(--t-sm); color: var(--ink-3); }
.site-foot .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ---------- buttons: white pills, ghost pills */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 999px;
  background: #fff; color: #0b0a12;
  font: inherit; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 120ms, transform 80ms;
}
.btn::after { content: "→"; font-weight: 500; }
.btn.no-arrow::after, .btn.ghost::after, .btn.small::after, .btn.danger::after { content: none; }
.btn:hover { background: #ece8ff; color: #0b0a12; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: var(--t-sm); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1px rgba(252, 165, 165, 0.35); }
.btn.danger:hover { background: var(--bad-soft); }
.head-cta.btn { min-height: 50px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ---------- cards */
.panel, .glass, .stub, .statement, .meter {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.panel { padding: clamp(22px, 3vw, 32px); }
.panel h2 { font-size: var(--t-xl); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* the eyebrow pill above the headline */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; padding: 7px 18px 7px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(139, 92, 246, 0.06); margin-bottom: 34px; }
.eyebrow .dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(139, 92, 246, 0.25); box-shadow: inset 0 0 0 1px var(--line-strong); }
.eyebrow .dot i { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(var(--amber-soft) 0 50%, transparent 50% 100%); box-shadow: inset 0 0 0 1.5px var(--amber-soft); }
.eyebrow .tag { font-family: var(--ff-mono); font-size: 0.85rem; letter-spacing: 0.12em; color: var(--amber-2); font-weight: 600; }
.eyebrow .sep { width: 1px; height: 16px; background: var(--line-strong); }
.eyebrow .text { font-family: var(--ff-mono); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
@media (max-width: 560px) { .eyebrow .text { font-size: 0.7rem; letter-spacing: 0.08em; } }

/* status badge */
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(110, 231, 183, 0.4); color: var(--mint); font-family: var(--ff-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* feature cards */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .features { grid-template-columns: minmax(0, 1fr); } }
.features > div { padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.features h3 { font-size: 1.15rem; }
.features .label { display: block; margin-bottom: 14px; color: var(--amber-2); }
.features p { margin: 0; color: var(--ink-2); }

/* big figures with a caption */
.stats { display: grid; grid-template-columns: repeat(3, max-content); gap: 16px clamp(28px, 5vw, 64px); }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-family: var(--ff-mono); font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; }
.stats strong small { font-size: 0.5em; color: var(--ink-3); margin-left: 0.25em; }
.stats span { color: var(--ink-2); font-size: var(--t-sm); margin-top: 4px; }

/* tabs inside a card */
.card-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.card-tabs button { font-family: var(--ff-mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); background: none; border: 0; padding: 0 0 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; cursor: pointer; }
.card-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--violet-2); }

/* ---------- the meter */
.meter { padding: clamp(22px, 3vw, 30px); }
.meter-hud { display: flex; justify-content: space-between; gap: 12px; font-family: var(--ff-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.meter-ticks { display: none; }
.meter-reg { position: relative; display: flex; max-width: 100%; font-family: var(--ff-mono); font-weight: 500; color: var(--ink); letter-spacing: -0.04em; }
.meter-reg .d { position: relative; --dh: 1.15em; width: 0.62em; height: var(--dh); overflow: hidden; font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: var(--dh); text-align: center; }
.meter-reg .d.lead { color: rgba(196, 181, 253, 0.22); }
.meter-reg .d.red { color: var(--amber-2); }
.meter-reg .d.sep { width: 0.32em; }
.meter-reg .strip { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; align-items: center; transition: transform 1200ms cubic-bezier(0.2, 0.8, 0.1, 1); }
.meter-reg .strip span { height: var(--dh); line-height: var(--dh); }
.meter-label { margin-top: 8px; font-size: var(--t-sm); color: var(--ink-2); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.meter-label strong { color: var(--ink); font-weight: 600; }
.pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-right: 8px; vertical-align: 1px; }
@media (prefers-reduced-motion: no-preference) { .pulse { animation: breathe 2s ease-in-out infinite; } }
@keyframes breathe { 50% { box-shadow: 0 0 0 5px rgba(110, 231, 183, 0.15); } }
@media (prefers-reduced-motion: reduce) { .meter-reg .strip { transition: none; } }
.panel .meter { background: rgba(0, 0, 0, 0.25); margin: 4px 0 8px; }

.bars { display: flex; align-items: flex-end; justify-content: flex-end; gap: 4px; height: 56px; margin-top: 18px; }
.bars span { flex: 1 1 0; min-width: 2px; max-width: 18px; border-radius: 3px 3px 0 0; background: rgba(139, 92, 246, 0.3); box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.25); }
.bars span:last-child { background: linear-gradient(180deg, var(--amber-2), var(--violet)); }
.bars-cap { display: flex; justify-content: space-between; font-family: var(--ff-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 10px; }

/* ---------- hero */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 980px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero-art { position: relative; align-self: start; margin: 40px calc(-1 * var(--gutter)) 0 -40px; }
.hero-art img { width: 100%; height: auto; }
.hero-art .caption { position: absolute; right: 22%; bottom: -4%; font-family: var(--ff-mono); font-size: 0.8rem; letter-spacing: 0.16em; color: var(--violet-2); }
.hero-art .caption b { color: var(--mint); font-weight: 500; margin-left: 10px; }
@media (max-width: 980px) { .hero-art { max-width: 520px; margin: 10px auto 0; } .hero-art .caption { display: none; } }
.hero-badge { display: inline-flex; align-items: center; gap: 2px; font-size: var(--t-sm); color: var(--ink-2); }
.hero-badge strong { color: var(--ink); font-weight: 600; }
.hero-floor, .cursor, .rain { display: none; }
.meter-stage { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .iso-coin { animation: coin 3.6s ease-in-out infinite; }
  .reveal { opacity: 0; animation: rise 600ms cubic-bezier(0.2, 0.8, 0.1, 1) forwards; }
  .reveal.d1 { animation-delay: 40ms; }
  .reveal.d2 { animation-delay: 110ms; }
  .reveal.d3 { animation-delay: 200ms; }
  .reveal.d4 { animation-delay: 300ms; }
}
@keyframes coin { 50% { transform: translateY(-6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- statement */
.statement { padding: 4px clamp(18px, 3vw, 30px); }
.statement .line { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.statement .line .amt { font-family: var(--ff-mono); text-align: right; font-size: var(--t-sm); }
.statement .line .note { display: block; font-size: var(--t-sm); color: var(--ink-3); }
.statement .total { border-bottom: 0; padding: 18px 0; }
.statement .total .amt { font-size: var(--t-xl); font-weight: 500; }

/* ---------- content + side summary */
.with-stub { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 900px) { .with-stub { grid-template-columns: minmax(0, 1fr); } }
.stub { padding: 22px 24px; }
.stub dl { margin: 0; display: grid; gap: 16px; }
.stub dl > div + div { border-top: 1px solid var(--line); padding-top: 14px; }
.stub dt { font-family: var(--ff-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.stub dd { margin: 4px 0 0; font-family: var(--ff-mono); font-size: 1.4rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.2; color: var(--ink); }

/* ---------- steps: a real sequence */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 22px 22px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.steps li::before { content: "0" counter(step); display: block; margin-bottom: 16px; font-family: var(--ff-mono); font-size: 0.8rem; letter-spacing: 0.14em; color: var(--amber-2); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- gauges */
.gauge { margin: 6px 0 24px; }
.gauge-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--ink-2); }
.gauge-head strong { font-family: var(--ff-mono); font-size: 1.7rem; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); }
.gauge-track { position: relative; height: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 999px; margin: 10px 0 8px; }
.gauge-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--violet), var(--amber-2)); border-radius: 999px; }
.gauge-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--bg); }
.gauge-tick.hit { background: var(--bg); }
.gauge-scale { position: relative; height: 1.3em; font-family: var(--ff-mono); font-size: 0.72rem; color: var(--ink-3); }
.gauge-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.gauge-scale span:first-child { transform: none; }
.gauge-scale span:last-child { transform: translateX(-100%); }

/* ---------- forms */
label { font-weight: 500; font-size: var(--t-sm); display: block; margin-bottom: 8px; color: var(--ink-2); }
input[type="text"], input[type="search"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 12px 16px; min-height: 50px;
}
select option { background: var(--bg-2); color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet-2); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2); }
input[type="file"] { font: inherit; font-size: var(--t-sm); color: var(--ink-2); }
.field { margin-bottom: 20px; }
.big-input { display: flex; align-items: baseline; gap: 6px; padding: 16px 20px; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(0, 0, 0, 0.3); }
.big-input:focus-within { border-color: var(--violet-2); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2); }
.big-input input { border: 0; background: transparent; box-shadow: none; padding: 0; min-height: 0; font-family: var(--ff-mono); font-size: clamp(0.95rem, 1.8vw, 1.1rem); }
.big-input input:focus { box-shadow: none; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--violet-2) var(--fill, 0%), rgba(255, 255, 255, 0.08) var(--fill, 0%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--violet-2); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; margin-top: -8px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.35); cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 0; cursor: grab; }

.segmented { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; border: 1px solid var(--line); }
.segmented button { font: inherit; font-weight: 500; font-size: var(--t-sm); padding: 7px 16px; min-height: 38px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: #fff; color: #0b0a12; }

/* ---------- tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
th, td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-family: var(--ff-mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
td.r, th.r { text-align: right; }
td.r { font-family: var(--ff-mono); }
tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
section > .table-wrap, section > div > .table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 4px 22px; }
.panel .table-wrap { background: none; border: 0; padding: 0; }

/* ---------- code */
pre { position: relative; background: rgba(0, 0, 0, 0.35); color: #e4e0f5; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; overflow-x: auto; font-family: var(--ff-mono); font-size: 0.84rem; line-height: 1.75; }
pre code { background: none; color: inherit; padding: 0; }
pre .c { color: var(--ink-3); }
.tabs { display: inline-flex; gap: 2px; margin-bottom: 12px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { font: inherit; font-size: var(--t-sm); font-weight: 500; border: 0; border-radius: 999px; background: transparent; padding: 6px 14px; cursor: pointer; color: var(--ink-2); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: #fff; color: #0b0a12; }

/* ---------- notices */
.notice { border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); padding: 14px 16px; margin: 16px 0; }
.notice.warn { background: var(--warn-soft); border-color: rgba(252, 211, 77, 0.3); color: #fde68a; }
.notice.err { background: var(--bad-soft); border-color: rgba(252, 165, 165, 0.3); color: #fecaca; }
.notice.ok { background: var(--good-soft); border-color: rgba(110, 231, 183, 0.3); color: #a7f3d0; }
.notice p:last-child { margin-bottom: 0; }
.notice a { color: inherit; }

.key-reveal { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: rgba(139, 92, 246, 0.12); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px 14px; }
.key-reveal code { word-break: break-all; flex: 1 1 260px; background: none; }

/* ---------- chat */
.chat { display: grid; grid-template-rows: auto 1fr auto; height: min(80vh, 780px); }
.chat-log { overflow-y: auto; padding: 20px 2px; display: flex; flex-direction: column; gap: 18px; }
.msg { max-width: 46rem; }
.msg .who { font-family: var(--ff-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.msg .body { white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; }
.msg.user .who { text-align: right; }
.msg.user .body { background: #fff; color: #0b0a12; padding: 10px 16px; border-radius: 18px 18px 4px 18px; }
.msg.assistant .body { background: var(--surface-2); border: 1px solid var(--line); padding: 12px 16px; border-radius: 18px 18px 18px 4px; }
.msg .cost { font-size: var(--t-xs); color: var(--ink-3); margin-top: 6px; font-family: var(--ff-mono); }
.chat-input { display: flex; gap: 10px; align-items: flex-end; padding: 8px; border: 1px solid var(--line-strong); border-radius: 26px; background: rgba(0, 0, 0, 0.3); }
.chat-input:focus-within { border-color: var(--violet-2); }
.chat-input textarea { min-height: 48px; max-height: 200px; resize: vertical; border: 0; background: transparent; box-shadow: none; }
.chat-input textarea:focus { box-shadow: none; }

details { border-bottom: 1px solid var(--line); padding: 18px 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details summary::marker { color: var(--violet-2); }
details[open] summary { margin-bottom: 8px; }

.empty { color: var(--ink-2); padding: 18px 0; }
.empty-watt { display: flex; align-items: center; gap: 18px; padding: 18px 0; color: var(--ink-2); }
.empty-watt > span:first-child { flex: 0 0 72px; }
.status-good { color: var(--good); font-weight: 600; }
.status-bad { color: var(--bad); font-weight: 600; }

/* ---------- mascot (drawn by mascot.js) */
.mascot { display: block; width: 100%; height: auto; overflow: visible; }
.m-eyes rect { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .m-bob { animation: m-bob 3.4s ease-in-out infinite; }
  .is-sleep .m-bob { animation-duration: 5.5s; }
  .m-eyes rect { animation: m-blink 5s infinite; }
  .m-low { animation: m-led 1.2s steps(2, jump-none) infinite; }
  .m-z { animation: m-z 3s ease-in-out infinite; }
}
@keyframes m-bob { 50% { transform: translateY(-5px); } }
@keyframes m-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes m-led { 50% { opacity: 0.3; } }
@keyframes m-z { 0% { opacity: 0; transform: translateY(6px); } 40%, 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }

/* ================= black & white ================= */


:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --surface: rgba(255, 255, 255, 0.02);
  --surface-2: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --ink: #ffffff;
  --ink-2: #a3a3a3;
  --ink-3: #737373;
  --violet: #ffffff;
  --violet-2: #ffffff;
  --lavender: #ffffff;
  --amber-2: #ffffff;
  --amber-soft: #ffffff;
  --grad: linear-gradient(#ffffff, #ffffff);
  --mint: #ffffff;
  --good: #e5e5e5;
  --bad: #ff6b6b;
}
body { background: #000; }
/* the gradient line becomes outlined type: white stroke, hollow middle */
.grad, .hl { background: none !important; -webkit-background-clip: border-box; background-clip: border-box; color: transparent; -webkit-text-stroke: 1.5px #fff; }
.site-head .wrap { background: rgba(0, 0, 0, 0.8); }
.eyebrow { background: transparent; }
.eyebrow .dot { background: #fff; box-shadow: none; }
.eyebrow .dot i { background: conic-gradient(#000 0 50%, transparent 50% 100%); box-shadow: inset 0 0 0 1.5px #000; }
.badge { border-color: var(--line-strong); color: #fff; }
.pulse { background: #fff; }
@keyframes breathe { 50% { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.12); } }
.panel, .glass, .stub, .statement, .meter { background: #050505; }
.meter-reg .d.lead { color: #262626; }
.gauge-fill { background: #fff; }
.bars span { background: #262626; box-shadow: none; }
.bars span:last-child { background: #fff; }
.node.in i, .node i { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12); }
code { color: #fff; background: rgba(255, 255, 255, 0.08); }
::selection { background: #fff; color: #000; }
