/* ==========================================================================
   Idle Cycles — main stylesheet
   Palette: deep indigo "system pane" + amber tape accent + violet + mint
   Type: Bricolage Grotesque (display) / Public Sans (body) / JetBrains Mono (data)
   ========================================================================== */

:root {
  --ink-900: #070a14;
  --ink-850: #0b1120;
  --ink-800: #0e1424;
  --ink-700: #141c30;
  --ink-600: #1b2440;
  --line: rgba(150, 170, 220, 0.14);
  --line-strong: rgba(150, 170, 220, 0.28);
  --text: #e6ebf7;
  --muted: #96a2c0;
  --amber: #ffb020;
  --amber-soft: rgba(255, 176, 32, 0.14);
  --violet: #8b7bff;
  --violet-soft: rgba(139, 123, 255, 0.14);
  --mint: #4fd1a5;
  --rose: #ff7a7a;
  --shadow-lg: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

html[data-theme="light"] {
  --ink-900: #eef1f8;
  --ink-850: #f4f6fb;
  --ink-800: #ffffff;
  --ink-700: #f7f9fd;
  --ink-600: #eaeefa;
  --line: rgba(20, 32, 70, 0.12);
  --line-strong: rgba(20, 32, 70, 0.24);
  --text: #101628;
  --muted: #55618a;
  --amber: #b9741a;
  --amber-soft: rgba(185, 116, 26, 0.12);
  --violet: #5b46d6;
  --violet-soft: rgba(91, 70, 214, 0.1);
  --mint: #1c8f68;
  --shadow-lg: 0 24px 60px -40px rgba(20, 32, 70, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.005em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background: faint registry grid + two drifting glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.42;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  clip-path: inset(0);
  z-index: -3;
  background:
    radial-gradient(46vw 46vw at 18% 12%, rgba(255, 176, 32, 0.15), transparent 62%),
    radial-gradient(50vw 50vw at 84% 30%, rgba(139, 123, 255, 0.17), transparent 64%);
  background-repeat: no-repeat;
  background-size: 150% 150%, 150% 150%;
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from { background-position: 0% 0%, 100% 0%; }
  to   { background-position: 14% 22%, 82% 46%; }
}

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

::selection { background: var(--amber); color: #0b1120; }

/* --------------------------------------------------------- layout helpers */
.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.section { padding: 92px 0; position: relative; }
.section-tight { padding: 58px 0; }
.center { text-align: center; }
.stack > * + * { margin-top: 18px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.2; }
p { margin: 0 0 1.1em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.24rem); color: var(--muted); max-width: 62ch; }

.mono { font-family: var(--font-mono); }

/* --------------------------------------------------------------- buttons */
.btn {
  --btn-bg: var(--amber);
  --btn-fg: #0b1120;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 100px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -16px var(--amber); }
.btn:active { transform: translateY(0); }
.btn span { position: relative; z-index: 1; }
.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line-strong);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: var(--ink-700); box-shadow: none; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

.arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow, .link-more:hover .arrow { transform: translateX(4px); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--amber);
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--ink-900) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
  margin-right: auto;
}
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark .spin { transform-origin: 24px 24px; animation: markspin 9s linear infinite; }
@keyframes markspin { to { transform: rotate(360deg); } }
.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 13px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--ink-700); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--amber-soft); }

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--ink-800);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s;
}
.icon-btn:hover { border-color: var(--amber); transform: translateY(-1px); }
.nav-toggle { display: none; }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0 22px;
  border-top: 1px solid var(--line);
}
.mobile-menu a {
  padding: 12px 6px;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.mobile-menu.open { display: flex; }

/* reading progress */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--amber), var(--violet));
  z-index: 80;
}

/* ------------------------------------------------------------------ hero */
.hero { padding: 74px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.04fr;
  gap: 54px;
  align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--amber), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-meta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.hero-meta b { color: var(--text); font-weight: 600; }

/* ----------------------------------------------- signature: tweak console */
.console {
  min-width: 0;
  background: linear-gradient(180deg, var(--ink-800), var(--ink-850));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--ink-700);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.dot:first-child { background: var(--amber); }
.console-body { display: grid; grid-template-columns: minmax(0, 1fr) 208px; }
.console-list { padding: 8px; min-width: 0; border-right: 1px solid var(--line); }
.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}
.switch-row:hover { background: var(--ink-700); }
.switch-row .label { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; font-weight: 600; }
.switch-row .key {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.switch {
  width: 42px;
  height: 24px;
  border-radius: 100px;
  background: var(--ink-600);
  border: 1px solid var(--line-strong);
  position: relative;
  flex: none;
  transition: background 0.3s var(--ease), border-color 0.3s;
}
.switch i {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.34s var(--ease), background 0.3s;
}
.switch-row[aria-pressed="true"] .switch { background: var(--amber-soft); border-color: var(--amber); }
.switch-row[aria-pressed="true"] .switch i { transform: translateX(18px); background: var(--amber); }

.console-readout { min-width: 0; padding: 18px 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.gauge { display: block; margin: 0 auto; }
.gauge-track { stroke: var(--ink-600); }
.gauge-value { stroke: url(#gaugeGrad); stroke-linecap: round; transition: stroke-dashoffset 0.7s var(--ease); }
.gauge-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  fill: var(--text);
}
.gauge-cap { font-family: var(--font-mono); font-size: 9px; fill: var(--muted); letter-spacing: 0.16em; }
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
  font-size: 13px;
}
.stat-row span { color: var(--muted); font-size: 12.5px; }
.stat-row b { font-family: var(--font-mono); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.delta { color: var(--mint); }
.console-note {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin: 0;
}

/* ----------------------------------------------------------------- cards */
.grid { display: grid; gap: 22px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: linear-gradient(180deg, var(--ink-800), var(--ink-850));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(340px 180px at var(--mx, 50%) var(--my, 0%), rgba(255, 176, 32, 0.11), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.card:hover::after { opacity: 1; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; margin-bottom: 0; }

.card-icon { width: 46px; height: 46px; margin-bottom: 16px; }
.js .card-icon .draw {
  stroke-dasharray: 1.02;
  stroke-dashoffset: 1.02;
  transition: stroke-dashoffset 1.2s var(--ease);
}
.is-visible .card-icon .draw, .card:hover .card-icon .draw { stroke-dashoffset: 0; }

/* article cards */
.post-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
}
.post-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.post-cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-700); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease); }
.post-card:hover .post-cover img { transform: scale(1.05); }
.post-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.post-body h3 { font-size: 1.22rem; margin: 0; }
.post-body p { color: var(--muted); font-size: 14.5px; margin: 0; }
.post-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 6px;
}
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  color: var(--violet);
  background: var(--violet-soft);
}

.filter-bar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 15px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--ink-800);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { background: var(--amber); border-color: var(--amber); color: #0b1120; font-weight: 700; }

/* ------------------------------------------------------------- numbering */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-800);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--amber);
  border-right: 1px solid var(--line);
  padding-right: 16px;
  line-height: 1;
  padding-top: 4px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------------ prose */
.article-head { padding: 54px 0 26px; }
.article-head h1 { max-width: 20ch; }
.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  flex-wrap: wrap;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(140deg, var(--amber), var(--violet));
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 13px; color: #0b1120;
}
.article-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin: 0 0 44px; }
.article-cover img { display: block; width: 100%; height: clamp(200px, 30vw, 340px); object-fit: cover; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; padding-bottom: 90px; }
.toc {
  position: sticky;
  top: 96px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
  font-size: 14px;
}
.toc strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}
.toc a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}
.toc a:hover, .toc a.active { color: var(--text); transform: translateX(3px); }

.prose { max-width: 70ch; font-size: 17.5px; }
.prose h2 { margin: 2em 0 0.6em; font-size: clamp(1.5rem, 2.6vw, 2rem); scroll-margin-top: 100px; }
.prose h3 { margin: 1.7em 0 0.5em; scroll-margin-top: 100px; }
.prose a { color: var(--amber); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1.2em; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--amber);
  font-family: var(--font-display);
  font-size: 1.2em;
  line-height: 1.4;
  color: var(--text);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--ink-700);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
}
.prose pre {
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); }
.prose td.mono { font-family: var(--font-mono); font-size: 13px; }
.prose figure { margin: 2em 0; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; font-family: var(--font-mono); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.callout {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--violet);
  background: var(--violet-soft);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 1.8em 0;
  font-size: 15.5px;
}
.callout strong { display: block; margin-bottom: 4px; font-family: var(--font-display); }
.callout-warn { border-left-color: var(--amber); background: var(--amber-soft); }

/* ------------------------------------------------------------------- faq */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 4px;
  background: none;
  border: 0;
  color: inherit;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  letter-spacing: -0.01em;
}
.faq-q .plus { margin-left: auto; flex: none; transition: transform 0.4s var(--ease); color: var(--amber); }
.faq-item.open .plus { transform: rotate(135deg); }
.faq-a { overflow: hidden; transition: max-height 0.5s var(--ease); }
.js .faq-a { max-height: 0; }
.faq-a p { padding: 0 4px 22px; margin: 0; color: var(--muted); max-width: 74ch; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); background: var(--ink-850); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 34px; }
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-grid a { color: var(--muted); text-decoration: none; font-size: 14.5px; transition: color 0.2s; }
.footer-grid a:hover { color: var(--text); }
.footer-note { color: var(--muted); font-size: 14px; max-width: 40ch; }
.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.footer-bottom a { color: var(--muted); }
.disclosure {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 26px;
  line-height: 1.6;
}


/* publisher identity block (footer + contact) */
.imprint {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--muted);
}
.imprint b { color: var(--text); font-weight: 600; }
.imprint a { color: var(--muted); text-decoration: none; }
.imprint a:hover { color: var(--amber); }
.imprint-note {
  font-size: 11.5px;
  color: var(--muted);
  opacity: 0.75;
  margin-top: 10px;
  line-height: 1.5;
}

/* --------------------------------------------------------- cookie banner */
.cookie {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  z-index: 90;
  max-width: 720px;
  margin-inline: auto;
  background: var(--ink-800);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 22px 24px;
  transform: translateY(140%);
  transition: transform 0.6s var(--ease);
}
.cookie.show { transform: translateY(0); }
.cookie h4 { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 6px; }
.cookie p { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cookie-prefs { display: none; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.cookie-prefs.show { display: block; }
.pref-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 14px; }
.pref-row .switch { margin-left: auto; }
.pref-row.locked { opacity: 0.65; }
.pref-row small { display: block; color: var(--muted); font-size: 12.5px; }

/* ------------------------------------------------------------------ misc */
.notice-bar {
  background: var(--ink-700);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 8px 0;
  text-align: center;
}
.notice-bar b { color: var(--amber); }

.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 16px 0; }
.marquee-track {
  display: flex;
  gap: 46px;
  width: max-content;
  animation: slide 34s linear infinite;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

.stat-block { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat-cell { background: var(--ink-800); padding: 26px 22px; }
.stat-cell b { display: block; font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.03em; }
.stat-cell span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.form-field { display: grid; gap: 7px; margin-bottom: 18px; }
.form-field label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.form-field input, .form-field textarea, .form-field select {
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}
.form-status { font-size: 14px; color: var(--mint); min-height: 22px; }

.breadcrumb { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 26px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--amber); }

.next-prev { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 56px; }
.np-card { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--ink-800); transition: border-color 0.3s, transform 0.3s; }
.np-card:hover { border-color: var(--amber); transform: translateY(-3px); }
.np-card small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.np-card b { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-top: 6px; }

.cta-band {
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 54px 44px;
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(255, 176, 32, 0.14), transparent 60%),
    radial-gradient(120% 140% at 90% 100%, rgba(139, 123, 255, 0.16), transparent 60%),
    var(--ink-800);
  text-align: center;
}

.sitemap-tree { list-style: none; padding-left: 0; }
.sitemap-tree ul { list-style: none; padding-left: 22px; border-left: 1px solid var(--line); margin: 8px 0 8px 6px; }
.sitemap-tree li { padding: 5px 0; }
.sitemap-tree a { text-decoration: none; font-weight: 600; }
.sitemap-tree a:hover { color: var(--amber); }
.sitemap-tree small { color: var(--muted); font-weight: 400; margin-left: 8px; font-size: 13px; }

/* ------------------------------------------------------------ animations */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.09s; }
.reveal-d2 { transition-delay: 0.18s; }
.reveal-d3 { transition-delay: 0.27s; }
.reveal-d4 { transition-delay: 0.36s; }

/* NB: this animation must never touch `transform`. An animated transform on
   <body> turns it into the containing block for every position:fixed child,
   which pins the cookie banner and the reading progress bar to the document
   instead of the viewport. Opacity only. */
body { animation: pagein 0.5s var(--ease) both; }
@keyframes pagein { from { opacity: 0; } }
/* No scripted navigation: nothing fades the page out on link click. */

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--amber); color: #0b1120; padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* --------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .toc { position: static; border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-block { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .console-body { grid-template-columns: minmax(0, 1fr); }
  .console-readout { padding: 20px; }
  .console-list { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .next-prev { grid-template-columns: 1fr; }
  .cta-band { padding: 38px 22px; }
  .step { grid-template-columns: 1fr; gap: 10px; }
  .step::before { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .cookie, .toc, .progress { display: none; }
  body { background: #fff; color: #000; }
}
