/* Malfoid - emerald, silver and ivory on midnight.
   Layout: editorial sections with numbered kickers, hairlines over boxes,
   one accent colour, generous whitespace. */

:root {
  color-scheme: dark;
  --bg: #050c09;
  --bg-raise: #08130e;
  --surface: rgba(255, 255, 255, 0.022);
  --surface-2: rgba(255, 255, 255, 0.045);
  --hair: rgba(214, 222, 228, 0.1);
  --hair-strong: rgba(214, 222, 228, 0.2);
  --ink: #eef2ef;
  --ink-2: #b6c2bc;
  --ink-3: #85948d;
  --emerald: #2fd38a;
  --emerald-2: #1c9e64;
  --emerald-ink: #a4f1cc;
  --emerald-wash: rgba(47, 211, 138, 0.1);
  --silver: #cfd6dd;
  --silver-hi: #f6f8fa;
  --platinum: #f3ead7;
  --gold: #ffd166;
  --danger: #ff8a7a;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.85), 0 10px 30px -20px rgba(0, 0, 0, 0.6);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --wrap: 1200px;
  --gutter: 28px;
  --header: 72px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 760px at 78% -8%, rgba(23, 100, 74, 0.38), transparent 62%),
    radial-gradient(900px 700px at -10% 30%, rgba(18, 64, 42, 0.3), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 400 16.5px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* film grain */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--silver-hi); text-decoration-color: rgba(207, 214, 221, 0.35); text-underline-offset: 3px; transition: color 0.2s; }
a:hover { color: var(--emerald-ink); text-decoration-color: currentColor; }
p { margin: 0; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: 0.86em; background: rgba(207, 214, 221, 0.08); padding: 0.1em 0.4em; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(47, 211, 138, 0.35); color: #fff; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; position: relative; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--emerald); color: #04110a; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================================================================ header */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--header);
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(5, 12, 9, 0.72);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--hair);
}
.nav { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--silver-hi); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font: 600 italic 1.6rem/1 var(--serif); letter-spacing: 0.01em; }
.nav-links { display: flex; gap: 2px; list-style: none; padding: 0; margin: 0 0 0 auto; }
.nav-links a {
  position: relative; display: block; padding: 8px 13px; color: var(--ink-3); text-decoration: none;
  font-size: 0.88rem; font-weight: 500; letter-spacing: 0.01em; border-radius: 999px;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--silver-hi); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px var(--emerald);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--hair-strong); color: var(--silver); background: transparent; text-decoration: none; cursor: pointer;
}
.icon-btn:hover { color: var(--silver-hi); border-color: var(--silver); }
.icon-btn svg { width: 19px; height: 19px; }
.menu-btn { display: none; }
.mobile-menu {
  position: fixed; inset: var(--header) 0 auto 0; z-index: 59; padding: 12px var(--gutter) 24px;
  background: rgba(5, 12, 9, 0.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hair);
}
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: grid; }
.mobile-menu a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--hair); color: var(--ink); text-decoration: none; font: 500 italic 1.5rem/1.2 var(--serif); }

/* ================================================================ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--hair-strong); background: rgba(255, 255, 255, 0.02);
  color: var(--silver-hi); font: 600 0.92rem/1 var(--sans); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: transform 0.18s var(--ease), border-color 0.2s, background 0.2s, box-shadow 0.25s, color 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: var(--silver); color: var(--silver-hi); background: rgba(255, 255, 255, 0.05); }
.btn:active { transform: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary {
  color: #06100b; border-color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, #e4e9ed 55%, #b9c3cc 100%);
  box-shadow: inset 0 1px 0 #fff, 0 12px 32px -14px rgba(207, 214, 221, 0.7);
}
.btn-primary:hover { color: #06100b; background: linear-gradient(180deg, #ffffff, #eef2f4 55%, #c7d0d8); box-shadow: inset 0 1px 0 #fff, 0 16px 40px -14px rgba(47, 211, 138, 0.6); }
.btn-emerald { color: var(--emerald-ink); border-color: rgba(47, 211, 138, 0.45); background: var(--emerald-wash); }
.btn-emerald:hover { color: #d6fbe9; border-color: var(--emerald); background: rgba(47, 211, 138, 0.16); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 0.84rem; }
.btn-xs { height: 30px; padding: 0 12px; font-size: 0.78rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; font-size: 0.92rem; text-decoration: none; }
.link-arrow:hover { color: var(--emerald-ink); }

/* ================================================================ type */

h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.04; letter-spacing: -0.012em; color: var(--silver-hi); }
h2 { font-size: clamp(2.5rem, 4.8vw, 4rem); }
h3 { font-size: 1.55rem; font-weight: 600; }
h2 em, .silver {
  font-style: italic; font-weight: 500;
  background: linear-gradient(180deg, #ffffff 10%, #cdd5dc 55%, #8b97a3 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.06em;
}
.lede { color: var(--ink-2); font-size: 1.1rem; line-height: 1.7; max-width: 60ch; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); }

.kicker { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font: 600 0.72rem/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; }
.kicker .num { font: 500 italic 1.15rem/1 var(--serif); letter-spacing: 0; color: var(--emerald); text-transform: none; }
.kicker::after { content: ""; flex: 0 0 48px; height: 1px; background: linear-gradient(90deg, var(--hair-strong), transparent); }

.section { position: relative; padding: clamp(96px, 12vw, 150px) 0; }
.sec-head { display: grid; gap: 22px; max-width: 780px; margin-bottom: clamp(44px, 6vw, 72px); }
.sec-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.sec-head.center .kicker::before { content: ""; flex: 0 0 48px; height: 1px; background: linear-gradient(270deg, var(--hair-strong), transparent); }

.ornament { display: flex; align-items: center; justify-content: center; gap: 16px; color: var(--ink-3); }
.ornament::before, .ornament::after { content: ""; height: 1px; width: min(28vw, 320px); background: linear-gradient(90deg, transparent, var(--hair-strong), transparent); }
.ornament svg { width: 14px; height: 14px; color: var(--emerald); }

.ornament + .section { padding-top: clamp(64px, 8vw, 104px); }
.section:has(+ .ornament) { padding-bottom: clamp(64px, 8vw, 104px); }

/* ================================================================ surfaces */

.panel {
  position: relative; border-radius: var(--r-lg); border: 1px solid var(--hair);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.panel-pad { padding: clamp(22px, 3vw, 34px); }
.corners { position: relative; }
.corners::before, .corners::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: 1px solid rgba(47, 211, 138, 0.55); pointer-events: none; z-index: 2;
}
.corners::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.corners::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }

/* ================================================================ hero */

.hero { position: relative; min-height: min(100svh, 980px); display: flex; align-items: center; padding: calc(var(--header) + 40px) 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px;
  border: 1px solid var(--hair-strong); background: rgba(255, 255, 255, 0.03); color: var(--ink-2); font-size: 0.8rem; font-weight: 500;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 0 rgba(47, 211, 138, 0.6); animation: pulse 2.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 211, 138, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(47, 211, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 211, 138, 0); } }
.badge b { color: var(--silver-hi); font-weight: 600; }
.hero h1 {
  margin: 26px 0 6px; font-size: clamp(5rem, 11.5vw, 10.5rem); font-style: italic; font-weight: 500; line-height: 0.86; letter-spacing: -0.03em;
  background: linear-gradient(100deg, #8b97a3 0%, #ffffff 26%, #d3dae0 48%, #ffffff 70%, #8b97a3 100%);
  background-size: 230% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 10s ease-in-out infinite; padding: 0 0.08em 0.06em 0; margin-left: -0.04em;
}
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.tagline { font: 500 italic clamp(1.45rem, 2.4vw, 2rem)/1.25 var(--serif); color: var(--platinum); margin-bottom: 22px; }
.hero .lede { margin-bottom: 36px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 52px; border-top: 1px solid var(--hair); max-width: 600px; }
.specs div { padding: 16px 16px 0 0; }
.specs div + div { padding-left: 16px; border-left: 1px solid var(--hair); }
.specs dt { font: 500 0.68rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.specs dd { margin: 0; font: 500 1.65rem/1 var(--serif); color: var(--silver-hi); white-space: nowrap; }
.specs dd small { font: 500 0.8rem var(--sans); color: var(--ink-3); }

.hero-art { position: relative; aspect-ratio: 5 / 6; width: 100%; max-width: 560px; justify-self: center; }
.hero-art::before { /* spotlight */
  content: ""; position: absolute; inset: -12% -16%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(47, 211, 138, 0.22), rgba(47, 211, 138, 0.06) 55%, transparent 75%);
  filter: blur(6px);
}
.hero-art .layer { position: absolute; inset: 0; transition: transform 0.6s var(--ease); will-change: transform; }
.hero-art .cameo { position: absolute; inset: 4% 9% 4% 9%; width: 82%; height: 92%; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.65)); }
.hero-art .wand { width: 100%; height: 100%; }
.hero-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-caption {
  position: absolute; right: -4px; bottom: 6%; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--hair-strong); background: rgba(5, 12, 9, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 0.74rem; color: var(--ink-3); line-height: 1.4;
}
.hero-caption b { display: block; font: 600 italic 1.05rem/1.2 var(--serif); color: var(--platinum); }

.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 22px; height: 36px; border-radius: 12px; border: 1px solid var(--hair-strong); }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--silver); animation: cue 2.2s infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ================================================================ marquee */

.marquee { border-block: 1px solid var(--hair); overflow: hidden; background: rgba(255, 255, 255, 0.012); }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee ul { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 18px 17px; }
.marquee li { display: flex; align-items: center; gap: 34px; font: 500 0.78rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.marquee li::after { content: "◆"; font-size: 0.55rem; color: var(--emerald); opacity: 0.8; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================================================================ I. meet */

.meet { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.statement { font: 500 clamp(2rem, 3.6vw, 3rem)/1.16 var(--serif); color: var(--silver-hi); letter-spacing: -0.01em; }
.statement em { color: var(--platinum); }
.meet .lede { margin-top: 28px; }
.metrics { display: grid; border-top: 1px solid var(--hair); }
.metric { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--hair); }
.metric b { font: 500 2.5rem/1 var(--serif); color: var(--silver-hi); white-space: nowrap; }
.metric b small { font: 500 1rem var(--serif); color: var(--ink-3); }
.metric span { color: var(--ink-2); font-size: 0.94rem; line-height: 1.55; }
.metric span strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.caps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(56px, 7vw, 88px); border-top: 1px solid var(--hair); }
.cap { padding: 30px 26px 4px 0; }
.cap + .cap { padding-left: 26px; border-left: 1px solid var(--hair); }
.cap .ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--emerald); background: var(--emerald-wash); border: 1px solid rgba(47, 211, 138, 0.22); margin-bottom: 20px; }
.cap .ic svg { width: 21px; height: 21px; }
.cap h3 { font-size: 1.45rem; margin-bottom: 10px; }
.cap p { color: var(--ink-2); font-size: 0.93rem; line-height: 1.62; }

/* ================================================================ II. spellbook */

.demo { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
.draw-card { padding: 12px; }
.draw-surface {
  position: relative; aspect-ratio: 1 / 0.8; border-radius: 14px; overflow: hidden; touch-action: none; cursor: crosshair;
  background:
    radial-gradient(circle at 50% 44%, rgba(47, 211, 138, 0.09), transparent 62%),
    radial-gradient(rgba(207, 214, 221, 0.13) 1px, transparent 1.4px) 0 0 / 28px 28px,
    #030806;
  border: 1px solid var(--hair);
}
.draw-surface canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.draw-hint { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; pointer-events: none; transition: opacity 0.3s; }
.draw-hint span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(5, 12, 9, 0.75); border: 1px solid var(--hair-strong); font-size: 0.82rem; color: var(--ink-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.draw-hint b { color: var(--silver-hi); font-weight: 600; }
.attract-label { position: absolute; left: 18px; top: 16px; pointer-events: none; transition: opacity 0.4s; }
.attract-label small { display: block; font: 600 0.64rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--emerald); margin-bottom: 6px; }
.attract-label b { font: 500 italic 1.7rem/1 var(--serif); color: var(--silver-hi); }
.attract-label span { display: block; margin-top: 4px; font-size: 0.8rem; color: var(--ink-3); }
.draw-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 6px 2px; font-size: 0.82rem; color: var(--ink-3); flex-wrap: wrap; }

.verdict { padding: clamp(24px, 3vw, 34px); display: flex; flex-direction: column; gap: 20px; }
.verdict .label { font: 600 0.68rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }
.verdict-top { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.verdict-name { margin-top: 12px; font: 500 italic clamp(2.8rem, 4.6vw, 3.9rem)/0.95 var(--serif); color: var(--silver-hi); min-height: 0.95em; transition: color 0.3s; }
.verdict-name.fail { color: var(--danger); }
.verdict-glyph { width: 76px; height: 76px; border-radius: 16px; border: 1px solid var(--hair-strong); background: #030806; display: grid; place-items: center; }
.verdict-glyph svg { width: 60px; height: 60px; }
.verdict-effect { color: var(--ink-2); min-height: 1.7em; }
.meter { position: relative; height: 8px; border-radius: 999px; background: rgba(207, 214, 221, 0.08); overflow: visible; }
.meter i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #146b45, var(--emerald), #d4fae8); box-shadow: 0 0 16px rgba(47, 211, 138, 0.45); transition: width 0.55s var(--ease); }
.meter::after { content: ""; position: absolute; top: -5px; bottom: -5px; left: var(--threshold, 55%); width: 2px; border-radius: 2px; background: var(--silver); opacity: 0.7; }
.meter-row { display: flex; justify-content: space-between; margin-top: 10px; font: 500 0.76rem/1 var(--mono); color: var(--ink-3); }
.sass { margin: 0; padding: 18px 20px; border-radius: var(--r-md); border: 1px solid rgba(47, 211, 138, 0.22); background: linear-gradient(135deg, rgba(47, 211, 138, 0.09), rgba(47, 211, 138, 0.02)); font: 500 italic 1.38rem/1.35 var(--serif); color: var(--platinum); position: relative; }
.sass::before { content: "\201C"; position: absolute; right: 16px; top: -6px; font: 600 4rem/1 var(--serif); color: rgba(47, 211, 138, 0.25); }
.sass cite { display: block; margin-top: 8px; font: 600 normal 0.68rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.runner { font-size: 0.86rem; color: var(--ink-3); min-height: 1.4em; }
.verdict .note { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--hair); font-size: 0.8rem; color: var(--ink-3); line-height: 1.55; }

.deck { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.card {
  --spell: var(--emerald);
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px 16px;
  border-radius: 16px; border: 1px solid var(--hair); background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  color: inherit; font: inherit; text-align: center; cursor: pointer; transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.card::before { content: ""; position: absolute; inset: 5px; border-radius: 12px; border: 1px solid rgba(207, 214, 221, 0.06); pointer-events: none; }
.card:hover, .card.active { transform: translateY(-4px); border-color: var(--spell); box-shadow: 0 18px 40px -22px var(--spell); }
.card .numeral { font: 500 italic 0.95rem/1 var(--serif); color: var(--ink-3); }
.card svg { width: 64px; height: 64px; }
.card b { font: 600 italic 1.18rem/1 var(--serif); color: var(--silver-hi); }
.card span { font-size: 0.7rem; color: var(--ink-3); line-height: 1.35; min-height: 2.7em; }

/* ================================================================ III. anatomy */

.anatomy { padding: clamp(18px, 3vw, 30px); }
.anatomy-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.anatomy-bar p { font-size: 0.86rem; color: var(--ink-3); }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 0.86rem; color: var(--ink-2); user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 46px; height: 26px; border-radius: 999px; background: rgba(207, 214, 221, 0.12); border: 1px solid var(--hair-strong); transition: background 0.25s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--silver); transition: transform 0.3s var(--ease), background 0.25s; }
.switch input:checked + .track { background: rgba(47, 211, 138, 0.3); border-color: rgba(47, 211, 138, 0.6); }
.switch input:checked + .track::after { transform: translateX(20px); background: var(--emerald-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--emerald); outline-offset: 3px; }
.wand-figure { overflow-x: auto; }
.swipe-hint { display: none; font-size: 0.78rem; color: var(--ink-3); margin: 4px 0 6px; }
.wand-figure svg { width: 100%; min-width: 760px; height: auto; }
.wand-figure .shell { transition: opacity 0.6s var(--ease); }
.wand-figure .xray { opacity: 0; transition: opacity 0.6s var(--ease); }
.anatomy.xray-on .shell { opacity: 0.16; }
.anatomy.xray-on .xray { opacity: 1; }
.wand-figure .marker circle { fill: #0a1510; stroke: rgba(47, 211, 138, 0.7); transition: fill 0.2s, stroke 0.2s; }
.wand-figure .marker text { fill: var(--silver-hi); font: 600 12px var(--sans); }
.wand-figure .marker line { stroke: rgba(207, 214, 221, 0.28); }
.wand-figure .marker.hot circle { fill: var(--emerald); stroke: var(--emerald); }
.wand-figure .marker.hot text { fill: #04110a; }
.legend { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--hair); }
.legend li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 18px 14px 4px 0; cursor: default; }
.legend li .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 0.72rem/1 var(--sans); border: 1px solid rgba(47, 211, 138, 0.6); color: var(--silver-hi); transition: background 0.2s, color 0.2s; }
.legend li.hot .n { background: var(--emerald); color: #04110a; }
.legend b { display: block; font-weight: 600; font-size: 0.92rem; color: var(--ink); margin-bottom: 2px; }
.legend span { font-size: 0.82rem; color: var(--ink-3); line-height: 1.5; }

/* ================================================================ IV. under the hood */

.hood { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.stepper { list-style: none; margin: 0; padding: 0; position: relative; }
.stepper::before { content: ""; position: absolute; left: 19px; top: 12px; bottom: 12px; width: 1px; background: linear-gradient(180deg, var(--emerald), var(--hair-strong) 30%, var(--hair-strong) 70%, var(--emerald)); }
.stepper li { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 20px; padding: 0 0 30px; }
.stepper li:last-child { padding-bottom: 0; }
.stepper .node { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid rgba(47, 211, 138, 0.55); font: 500 italic 1.05rem/1 var(--serif); color: var(--emerald-ink); }
.stepper h3 { font-size: 1.4rem; margin: 6px 0 6px; }
.stepper p { color: var(--ink-2); font-size: 0.93rem; }
.stepper .spec { display: inline-block; margin-top: 8px; font: 500 0.74rem/1.4 var(--mono); color: var(--silver); background: rgba(207, 214, 221, 0.06); border: 1px solid var(--hair); padding: 3px 9px; border-radius: 999px; }
.code-card { position: sticky; top: calc(var(--header) + 24px); overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--hair); overflow-x: auto; }
.tabs button {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; background: transparent;
  color: var(--ink-3); font: 500 0.84rem/1 var(--sans); cursor: pointer; transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--silver-hi); background: rgba(255, 255, 255, 0.06); border-color: var(--hair-strong); }
.tabpanel[hidden] { display: none; }
.code { margin: 0; padding: 22px 24px 26px; overflow-x: auto; font: 400 0.82rem/1.75 var(--mono); color: var(--ink-2); white-space: pre; tab-size: 2; }
.code .c { color: #64756d; font-style: italic; }
.code .k { color: var(--emerald-ink); }
.code .s { color: var(--platinum); }
.code .n { color: #9ccfff; }
.code .p { color: var(--ink-3); }
.code-foot { padding: 14px 24px; border-top: 1px solid var(--hair); font-size: 0.8rem; color: var(--ink-3); }

/* ================================================================ V. build */

.compare { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.compare th, .compare td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.compare thead th { padding-top: 22px; padding-bottom: 20px; vertical-align: bottom; }
.compare thead th small { display: block; font: 600 0.66rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--emerald); margin-bottom: 8px; }
.compare thead th b { font: 600 italic 1.6rem/1.1 var(--serif); color: var(--silver-hi); }
.compare tbody th { color: var(--ink-3); font-weight: 500; width: 20%; }
.compare td { color: var(--ink); }
.compare td code { white-space: nowrap; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare .rec { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 999px; background: var(--emerald-wash); border: 1px solid rgba(47, 211, 138, 0.35); color: var(--emerald-ink); font: 600 0.62rem/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; vertical-align: middle; }
.table-wrap { overflow-x: auto; }
.build-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 20px; margin-top: 20px; }
.diagram svg { width: 100%; height: auto; }
.docs-list { display: grid; gap: 4px; padding: clamp(20px, 3vw, 28px); align-content: start; }
.docs-list h3 { font-size: 1.35rem; margin-bottom: 10px; }
.docs-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--hair); text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.92rem; }
.docs-list a:last-child { border-bottom: 0; }
.docs-list a span { color: var(--ink-3); font-weight: 400; font-size: 0.8rem; display: block; margin-top: 2px; }
.docs-list a svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; transition: transform 0.2s, color 0.2s; }
.docs-list a:hover svg { transform: translate(2px, -2px); color: var(--emerald); }

/* ================================================================ VI. console */

.app { overflow: hidden; }
.app-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
.app-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.app-id .avatar { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--hair-strong); background: #030806 center / 70% no-repeat url("../assets/favicon.svg"); flex: none; }
.app-id b { display: block; font: 600 italic 1.25rem/1.1 var(--serif); color: var(--silver-hi); }
.app-id span { display: block; font-size: 0.78rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.app-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--hair); font: 500 0.74rem/1 var(--sans); color: var(--ink-3); background: rgba(255, 255, 255, 0.02); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3e4a44; }
.chip.on { color: var(--ink); border-color: rgba(47, 211, 138, 0.35); }
.chip.on::before { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.chip.warn::before { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.app .tabs { padding: 10px 14px; }
.app-body { padding: 18px; }
.live { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.sky { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; border: 1px solid var(--hair); background: #020605; }
.sky canvas { width: 100%; height: 100%; }
.sky-readout { position: absolute; left: 14px; top: 12px; font: 500 0.74rem/1.6 var(--mono); color: var(--ink-3); white-space: pre; pointer-events: none; }
.sky-cast { position: absolute; right: 14px; top: 12px; text-align: right; pointer-events: none; }
.sky-cast b { display: block; font: 500 italic 1.6rem/1 var(--serif); color: var(--silver-hi); }
.sky-cast span { font: 500 0.72rem/1.5 var(--mono); color: var(--ink-3); }
.log { margin: 0; min-height: 240px; overflow: auto; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--hair); background: #020605; font: 400 0.72rem/1.65 var(--mono); color: var(--ink-3); white-space: pre-wrap; word-break: break-word; }
.live .log { contain: size; }
.log .in { color: var(--silver); }
.log .err { color: var(--danger); }
.log:empty::before { content: "Console output appears here."; color: #4c5a53; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.field { display: grid; gap: 7px; font: 500 0.74rem/1.2 var(--sans); letter-spacing: 0.04em; color: var(--ink-3); }
.field input, .field select {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--hair-strong);
  background: #030806; color: var(--ink); font: 400 0.92rem/1 var(--sans); transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: #55635c; }
.field input:focus, .field select:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 4px rgba(47, 211, 138, 0.14); }
.fieldset-title { grid-column: 1 / -1; margin-top: 8px; font: 600 0.66rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--emerald); }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.hint { font-size: 0.8rem; color: var(--ink-3); }
.spells-tab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.spells-tab h3 { font-size: 1.35rem; margin-bottom: 6px; }
.spells-tab .hint { margin-bottom: 16px; }
.inline-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.inline-form .field { flex: 1; min-width: 170px; }
.custom-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.custom-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--hair); font-size: 0.88rem; }
.custom-list li.empty { justify-content: center; color: var(--ink-3); border-style: dashed; }
.unsupported { padding: 14px 16px; border-radius: 12px; border: 1px dashed rgba(255, 209, 102, 0.4); background: rgba(255, 209, 102, 0.06); color: var(--gold); font-size: 0.88rem; margin-bottom: 16px; }
.offline [data-needs-device] { opacity: 0.45; pointer-events: none; filter: saturate(0.6); }
[data-needs-device] { transition: opacity 0.25s, filter 0.25s; }

/* ================================================================ VII. flash */

.flash-steps { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.flash-steps li { position: relative; padding: 0 24px 0 0; }
.flash-steps li::before {
  counter-increment: s; content: counter(s, upper-roman);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; margin-bottom: 18px;
  border: 1px solid rgba(47, 211, 138, 0.55); background: var(--bg); color: var(--emerald-ink); font: 500 italic 1.1rem/1 var(--serif); position: relative; z-index: 1;
}
.flash-steps li::after { content: ""; position: absolute; top: 22px; left: 44px; right: 0; height: 1px; background: linear-gradient(90deg, rgba(47, 211, 138, 0.5), var(--hair)); }
.flash-steps li:last-child::after { display: none; }
.flash-steps b { display: block; font: 600 1.3rem/1.2 var(--serif); color: var(--silver-hi); margin-bottom: 6px; }
.flash-steps span { font-size: 0.9rem; color: var(--ink-2); }
.installer { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(22px, 3vw, 30px); }
.installer-left { display: grid; gap: 14px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--hair-strong); background: #030806; width: max-content; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 9px 16px; border-radius: 999px; font-size: 0.84rem; color: var(--ink-2); cursor: pointer; transition: background 0.2s, color 0.2s; }
.seg input:checked + span { background: var(--silver); color: #06100b; font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--emerald); outline-offset: 2px; }
.fw-note { font-size: 0.84rem; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.fw-note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3e4a44; flex: none; }
.fw-note.ready::before { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }

/* ================================================================ VIII. patronage */

.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tier { padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; }
.tier .gem { width: 36px; height: 36px; margin-bottom: 8px; }
.tier small { font: 600 0.66rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }
.tier h3 { font-size: 1.75rem; font-style: italic; }
.tier .price { font: 500 2.6rem/1 var(--serif); color: var(--silver-hi); }
.tier .price span { font: 500 0.85rem var(--sans); color: var(--ink-3); }
.tier p { color: var(--ink-2); font-size: 0.9rem; line-height: 1.55; }
.tier.featured { border-color: rgba(47, 211, 138, 0.55); background: linear-gradient(180deg, rgba(47, 211, 138, 0.1), rgba(47, 211, 138, 0.02)); }
.tier.featured::before { content: "Her favourite"; position: absolute; top: -11px; left: 24px; padding: 4px 10px; border-radius: 999px; background: var(--emerald); color: #04110a; font: 700 0.62rem/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.patron-cta { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--hair); }
.uses div { padding: 24px 24px 0 0; }
.uses div + div { padding-left: 24px; border-left: 1px solid var(--hair); }
.uses b { display: block; font: 600 1.3rem/1.2 var(--serif); color: var(--silver-hi); margin-bottom: 6px; }
.uses span { color: var(--ink-2); font-size: 0.9rem; }

/* ================================================================ credits */

.credits { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.credit-art { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: center; }
.credit-art img { width: 120px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6)); }
.credit-art p { color: var(--ink-2); font-size: 0.92rem; }
.credit-art p + p { margin-top: 10px; }
.credit-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--hair); }
.credit-list div { padding: 20px 20px 18px 0; border-bottom: 1px solid var(--hair); }
.credit-list div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--hair); }
.credit-list dt { font: 600 0.66rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--emerald); margin-bottom: 10px; }
.credit-list dd { margin: 0; font-size: 0.88rem; color: var(--ink-2); line-height: 1.6; }
.credit-list dd a { color: var(--ink); }

/* ================================================================ footer */

.site-footer { border-top: 1px solid var(--hair); padding: 64px 0 40px; color: var(--ink-3); font-size: 0.86rem; position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.footer-brand p { margin-top: 14px; max-width: 38ch; line-height: 1.6; }
.footer-col h4 { font: 600 0.68rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--ink-3); text-decoration: none; }
.footer-col a:hover { color: var(--emerald-ink); }
.footer-base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hair); font-size: 0.78rem; }
.footer-base p { max-width: 80ch; }

/* ================================================================ reveal */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ================================================================ responsive */

@media (max-width: 1180px) {
  .deck { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-grid; }
  .nav-actions { margin-left: auto; }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap:nth-child(3) { padding-left: 0; border-left: 0; }
  .cap:nth-child(n + 3) { border-top: 1px solid var(--hair); margin-top: 26px; }
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --gutter: 22px; }
  .hero-grid, .meet, .demo, .hood, .build-row, .live, .spells-tab, .credits { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 0; padding-top: calc(var(--header) + 28px); }
  .hero-art { max-width: 440px; order: -1; margin-bottom: -12px; }
  .hero-caption { display: none; }
  .scroll-cue { display: none; }
  .code-card { position: static; }
  .flash-steps { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .flash-steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 18px; padding: 0; }
  .flash-steps li::before { grid-row: span 2; margin: 0; }
  .flash-steps li::after { display: none; }
  .uses { grid-template-columns: minmax(0, 1fr); }
  .uses div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--hair); margin-top: 24px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --header: 64px; }
  body { font-size: 16px; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs div:nth-child(3) { padding-left: 0; border-left: 0; }
  .specs div:nth-child(n + 3) { border-top: 1px solid var(--hair); margin-top: 16px; }
  .caps, .tiers, .fields, .legend, .credit-list { grid-template-columns: minmax(0, 1fr); }
  .cap, .cap + .cap { padding-left: 0; border-left: 0; }
  .cap + .cap { border-top: 1px solid var(--hair); margin-top: 26px; }
  .credit-list div:nth-child(even) { padding-left: 0; border-left: 0; }
  .deck { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .deck .card { flex: 0 0 138px; scroll-snap-align: start; }
  .metric { grid-template-columns: 1fr; gap: 6px; }
  .brand span { font-size: 1.4rem; }
  .nav-actions .btn-label { display: none; }
  .nav-actions .btn { width: 40px; padding: 0; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .credit-art { grid-template-columns: 88px 1fr; }
  .credit-art img { width: 88px; }
  .app-id span { max-width: 26ch; }
  .swipe-hint { display: block; }
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { padding: 16px 18px; border-bottom: 1px solid var(--hair); }
  .compare tr:last-child { border-bottom: 0; }
  .compare tbody th { width: auto; padding: 0 0 10px; border: 0; color: var(--emerald); font: 600 0.66rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; }
  .compare td { display: grid; grid-template-columns: 62px 1fr; gap: 10px; padding: 5px 0; border: 0; font-size: 0.9rem; }
  .compare td::before { content: attr(data-label); color: var(--ink-3); font-size: 0.76rem; padding-top: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1, .marquee-track, .badge .dot, .scroll-cue::after { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-art .layer { transition: none; }
}
