/* guides.y3klab.com — "A3K reskin" (approved 2026-07-18). The Y3K Lab
   surface-hub family look — dark synthwave field, floor grid, CRT scanlines,
   ramp wordmark, power-on motion — bound to the guides site's own components.
   Canonical A3K web-surface palette used verbatim (IDENTITY.md §2) — including
   the accent, which is ANSI 39 and NOT the ramp's cyan 45 (corrected 2026-07-19;
   the two are both cyan but play different roles). All-mono,
   zero external dependencies. Adapted from the direction mockup to the real
   Jekyll class names emitted by _layouts/* and _includes/toc.html. */

:root {
  --magenta: #ff5fff;  /* 201 — warm end / box-rail start */
  --pink:    #d75fd7;  /* 171 */
  --purple:  #af5fff;  /* 135 */
  --indigo:  #875fff;  /*  99 */
  --blue:    #5fafff;  /*  75 */
  --cyan:    #00d7ff;  /*  45 — ramp stop / box-rail end (NOT the accent) */
  --brtblue: #00afff;  /*  39 — the brand accent proper (IDENTITY "Accents & ends") */
  --brtcyan: #00ffff;  /*  51 — cool end */
  --accent:  var(--brtblue);  /* 39 — the single "live" cue: glyphs, rules, brackets.
                                 Was 45 (#00d7ff) until 2026-07-19: that's the ramp's
                                 cyan stop / box-rail end, a different role. 8.05:1 on
                                 --bg (AAA). Canonical: IDENTITY.md "Accents & ends"
                                 + Phos4 y3k.sh PHOS4_C_ACCENT=39. */

  --ramp: linear-gradient(100deg,
    var(--magenta), var(--pink), var(--purple), var(--indigo),
    var(--blue), var(--cyan), var(--brtcyan));

  --bg:    #0a0a12;   /* page ground — near-black, faint purple */
  --panel: #12121f;   /* raised panel / card */
  --ink:   #e8e8f4;   /* primary text (~16:1 on --bg) */
  --dim:   #8a8aa6;   /* muted / secondary text (~5.8:1 on --bg) */
  --rail:  #2a2a3e;   /* borders, rules, hairlines */
  --black: #060608;   /* clinical black — code wells, insets */

  --ok:   #7ddc7d;    /* success · complete · verified */
  --warn: #ffcf6a;    /* caution · in-progress */
  --err:  #ff5f5f;    /* error · blocked */

  /* Role bindings (temperature map §3): WARM = interactive, COOL = decorative live cue */
  --link:  var(--magenta);   /* interactive text — links, affordances (7.7:1 on --bg) */
  --deco:  var(--cyan);      /* decorative chrome — H3 tick, focus rings, TOC nodes, code chrome */

  --mono: ui-monospace, "JetBrains Mono", "IBM Plex Mono", "SF Mono",
    "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  background:
    radial-gradient(900px 520px at 6% -6%, color-mix(in srgb, var(--magenta) 15%, transparent), transparent 55%),
    radial-gradient(1000px 560px at 100% 4%, color-mix(in srgb, var(--cyan) 11%, transparent), transparent 55%),
    radial-gradient(1200px 640px at 50% -10%, #180f2c 0%, transparent 62%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.75 var(--mono);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* Faint synthwave floor grid — fixed, faded before it reaches the content. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(to right,  color-mix(in srgb, var(--cyan) 7%, transparent) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to bottom, color-mix(in srgb, var(--magenta) 5%, transparent) 0 1px, transparent 1px 64px);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%);
  opacity: .55;
}
/* Faint CRT scanlines — over all content, subtractive, hairline cyan tint. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.15) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(to bottom, color-mix(in srgb, var(--cyan) 8%, transparent) 0 1px, transparent 1px 4px);
  background-size: 100% 4px;
}
@media (min-resolution: 2dppx) {
  body::after {
    background:
      repeating-linear-gradient(to bottom, rgba(0,0,0,.18) 0 1.5px, transparent 1.5px 5px),
      repeating-linear-gradient(to bottom, color-mix(in srgb, var(--cyan) 8%, transparent) 0 1.5px, transparent 1.5px 5px);
    background-size: 100% 5px;
  }
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* keyboard focus — the decorative live cue (cyan), visible on every surface */
:focus-visible { outline: 2px solid var(--deco); outline-offset: 3px; border-radius: 3px; }

/* ═══════════════════════ HEADER BREADCRUMB ══════════════════════════════ */
/* The Y3K family surface-header: magenta "Y3K" + cyan "LAB" (together the
   return-to-hub link → y3klab.com), a dim "/" separator, then the surface
   name "GUIDES" in dim letter-spaced caps — a link back to the guides home
   on guide/collection pages, a plain span on the home page (current surface). */
.brandrow { display: block; }
.crumb {
  margin: 0; display: inline-block;
  font-size: clamp(16px, 2.2vw, 20px); font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; line-height: 1;
  white-space: nowrap;
}
.crumb .hub { text-decoration: none; }
.crumb .y3k { color: var(--magenta); text-shadow: 0 0 18px color-mix(in srgb, var(--magenta) 45%, transparent); }
.crumb .lab { color: var(--cyan);    text-shadow: 0 0 18px color-mix(in srgb, var(--cyan)    45%, transparent); }
.crumb .hub:hover .y3k, .crumb .hub:hover .lab,
.crumb .hub:focus-visible .y3k, .crumb .hub:focus-visible .lab {
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.crumb .sep { color: var(--dim); font-weight: 400; margin: 0 .45em; opacity: .75; }
.crumb .surface { color: var(--dim); }               /* surface name — dim caps */
a.surface { text-decoration: none; transition: color .18s, text-shadow .18s; }
a.surface:hover, a.surface:focus-visible { color: var(--cyan); text-decoration: none; text-shadow: 0 0 16px color-mix(in srgb, var(--cyan) 40%, transparent); }

/* ═══════════════════════════ HOME HERO ══════════════════════════════════ */
.hero { padding: 6vh 0 0; }
.hero-in { max-width: 1100px; margin: 0 auto; padding: 8px 32px 4px; }
.tagline {
  margin: 22px 0 0; color: color-mix(in srgb, var(--ink) 66%, var(--dim));
  letter-spacing: .26em; text-transform: uppercase; font-size: 11px;
}
.tagline::before { content: "[ "; color: var(--accent); }
.tagline::after  { content: " ]"; color: var(--accent); }
/* The grand wordmark — the site name "Y3K Lab Guides" as ONE continuous ramp
   display lockup (ramp fill + phosphor bloom + chromatic fringe; the global CRT
   scanlines pass over it). The box is sized to the text so the full magenta→cyan
   ramp lands across the ENTIRE phrase. clamp() holds one line on desktop. */
.hero h1.hero-mark {
  width: fit-content; max-width: 100%;
  margin: 44px 0 0; padding: 0;
  font-family: var(--mono);
  font-size: clamp(30px, calc((100vw - 64px) / 9.6), 104px);
  font-weight: 800; letter-spacing: -.01em; line-height: .95;
  background: var(--ramp); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter:
    drop-shadow(-2px 0 0 color-mix(in srgb, var(--magenta) 60%, transparent))
    drop-shadow( 2px 0 0 color-mix(in srgb, var(--cyan)    60%, transparent))
    drop-shadow(0 0 24px color-mix(in srgb, var(--purple) 38%, transparent));
}
.hero .lede { margin: 22px 0 0; max-width: 60ch; color: var(--dim); font-size: 17px; line-height: 1.6; }
.hero .lede b { color: var(--ink); font-weight: 700; }

/* Gradient ramp band — the A3K lit-glass accent: the canonical ramp as a
   self-labelled specimen in clinical black. */
.ramp-band {
  position: relative; overflow: hidden;
  margin: 30px 0 0; border-radius: 12px; padding: 13px 22px;
  background: var(--ramp);
  box-shadow: 0 0 60px -30px var(--purple), inset 0 0 0 1px rgba(255,255,255,.07);
  display: flex; align-items: center;
}
.ramp-band::after {   /* soft top sheen — reads as lit glass */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.20), transparent 44%);
}
.ramp-tag {
  position: relative; z-index: 2; color: var(--bg); font-weight: 800;
  font-size: clamp(12px, 2.2vw, 16px); letter-spacing: .18em; text-transform: uppercase;
}

/* section label — a whispered, letter-spaced caption with a ramp hairline */
.sec-label {
  margin: 44px 0 20px; display: flex; align-items: center; gap: 14px;
  color: var(--dim); font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
}
.sec-label .glyph { color: var(--accent); }
.sec-label::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--magenta), color-mix(in srgb, var(--cyan) 55%, transparent), transparent);
  opacity: .55;
}

/* ═══════════════════════════ HOME MAIN + CARDS ══════════════════════════ */
.home-main { max-width: 1100px; margin: 0 auto; padding: 0 32px 90px; position: relative; }

/* Guide cards — panel with a ramp-stepping left spine (surface-hub idiom).
   Each card carries `--stop` inline (a ramp hue keyed to its index). */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(320px,100%), 1fr)); padding-bottom: 4px; }
.card {
  position: relative; display: flex; flex-direction: column; min-height: 172px;
  text-decoration: none; color: inherit;
  background: linear-gradient(150deg, color-mix(in srgb, var(--stop, var(--accent)) 7%, transparent), transparent 44%), var(--panel);
  border: 1px solid var(--rail); border-radius: 12px;
  padding: 20px 22px 18px 24px; overflow: hidden;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--stop, var(--accent)); opacity: .9;
}
.card:hover { transform: translateY(-3px); border-color: var(--stop, var(--accent)); box-shadow: 0 14px 34px -20px var(--stop, var(--accent)); text-decoration: none; }
.card:hover::before { opacity: 1; width: 4px; }
.card:focus-visible { outline: none; transform: translateY(-3px); border-color: var(--stop, var(--accent));
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--stop, var(--accent)), 0 14px 34px -20px var(--stop, var(--accent)); }
.card h2 {
  margin: 0 0 10px; font-family: var(--mono);
  font-size: 18px; font-weight: 700; line-height: 1.32; letter-spacing: -.005em; color: var(--ink);
}
.card .readmore { margin-top: auto; display: flex; align-items: center; gap: 8px; color: var(--link); font-weight: 700; font-size: 13.5px; }
/* A3K section-number chip — the card's index, tinted to its ramp stop. Doubles
   as the surface's keyboard shortcut (aria-keyshortcuts on the anchor). */
.card-num {
  align-self: flex-start; margin: 0 0 13px;
  font-size: 12px; font-weight: 700; letter-spacing: .16em; line-height: 1;
  color: color-mix(in srgb, var(--stop, var(--accent)) 80%, var(--ink));
  border: 1px solid color-mix(in srgb, var(--stop, var(--accent)) 42%, var(--rail));
  border-radius: 6px; padding: 4px 9px;
  background: color-mix(in srgb, var(--stop, var(--accent)) 8%, transparent);
}
.card .arr { display: inline-block; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.card:hover .arr, .card:focus-visible .arr { transform: translateX(4px); }

/* ═══════════════════════════ GUIDE BAND ═════════════════════════════════ */
.band { position: relative; padding: 30px 0 34px; overflow: hidden;
  background:
    radial-gradient(700px 300px at 92% 0%, color-mix(in srgb, var(--cyan) 10%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 70%, transparent), transparent);
  border-bottom: 1px solid var(--rail);
}
.band-in { position: relative; max-width: 1100px; margin: 0 auto; padding: 0 32px; }
.band .brandrow { margin-bottom: 26px; }
.band h1 { margin: 0; max-width: 22ch; font-family: var(--mono);
  font-size: clamp(28px, 4.6vw, 40px); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; color: var(--ink); }
.bandmeta { margin: 16px 0 0; font-size: 13px; color: var(--dim); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.verified { display: inline-flex; align-items: center; gap: 7px; }
.verified .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 9px var(--ok); }
.verified b { color: color-mix(in srgb, var(--ok) 72%, var(--ink)); font-weight: 700; }
.bandmeta .sep { color: var(--rail); }
.band .mdlink { color: var(--link); text-decoration: none; display: inline-block; }
.band .mdlink:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ═══════════════════════════ GUIDE LAYOUT ═══════════════════════════════ */
.layout { max-width: 1100px; margin: 0 auto; padding: 46px 32px 40px;
  display: grid; grid-template-columns: minmax(0, 680px) 232px; gap: 56px; }

article { font-size: 15.5px; }
/* The guide markdown carries its own H1; the band already shows the title. */
article > h1:first-child { display: none; }
article p, article ul, article ol, article table, article figure { margin: 0 0 18px; }
article p { color: var(--ink); }
article > p.intro { color: color-mix(in srgb, var(--ink) 80%, var(--dim)); font-size: 16.5px; }
article a { color: var(--link); font-weight: 600; }
article hr { border: 0; border-top: 1px solid var(--rail); margin: 40px 0; }

article h2 {
  margin: 40px 0 16px; font-family: var(--mono);
  font-size: 22px; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; color: var(--ink);
  scroll-margin-top: 26px;
}
article h2:first-of-type { margin-top: 0; }
/* the H2 underline = a short magenta→cyan ramp crown (the guides' signature rule) */
article h2::after {
  content: ""; display: block; width: 54px; height: 3px; margin-top: 10px; border-radius: 2px;
  background: var(--ramp);
  box-shadow: 0 0 14px -2px color-mix(in srgb, var(--cyan) 60%, transparent);
}
article h3 {
  margin: 32px 0 12px; display: flex; align-items: baseline; gap: 12px;
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink);
  scroll-margin-top: 26px;
}
/* the H3 tick = the cool "live" cue (cyan), the single-color decorative accent */
article h3::before {
  content: ""; flex: none; align-self: stretch; width: 3px; margin: .18em 0; border-radius: 2px;
  background: var(--cyan); box-shadow: 0 0 8px color-mix(in srgb, var(--cyan) 55%, transparent);
}
article ul, article ol { padding-left: 22px; }
article li { margin-bottom: 8px; }
article li::marker { color: var(--cyan); }
article strong { color: var(--ink); font-weight: 700; }

/* inline code */
article :not(pre) > code {
  font-family: var(--mono); font-size: .92em;
  background: var(--black); border: 1px solid var(--rail); border-radius: 5px; padding: 1px 6px;
  color: color-mix(in srgb, var(--cyan) 30%, var(--ink));
}

article table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
article th, article td { border: 1px solid var(--rail); padding: 9px 14px; text-align: left; }
article th { background: color-mix(in srgb, var(--panel) 70%, var(--black)); color: var(--ink); }
article img { max-width: 100%; border-radius: 12px; box-shadow: 0 14px 40px -18px #000; border: 1px solid var(--rail); }

/* ── Callout (kramdown blockquote) ── dark panel, cyan rail, an accent glyph ── */
article blockquote {
  position: relative; margin: 0 0 20px; padding: 16px 18px 16px 46px;
  background: color-mix(in srgb, var(--cyan) 6%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--cyan) 24%, var(--rail));
  border-left: 3px solid var(--cyan); border-radius: 10px;
  color: color-mix(in srgb, var(--ink) 86%, var(--dim)); font-size: 14.5px;
}
article blockquote::before {
  content: "◆"; position: absolute; left: 16px; top: 15px; color: var(--cyan);
  font-size: 13px; text-shadow: 0 0 10px var(--cyan);
}
article blockquote p { margin: 0 0 10px; color: inherit; }
article blockquote p:last-child { margin: 0; }
article blockquote strong { color: var(--cyan); font-weight: 700; letter-spacing: .04em; }
article blockquote a { color: var(--link); }

/* ── Fenced code block (kramdown/rouge: div.highlighter-rouge > .highlight > pre) ──
   Clinical-black well + a synthesized cyan/magenta chrome bar. The copy button is
   injected by assets/js/copy-code.js and lands inside the reserved chrome strip. */
div.highlighter-rouge {
  position: relative; margin: 0 0 22px;
  border: 1px solid var(--rail); border-radius: 12px; overflow: hidden;
  background: var(--black); box-shadow: inset 0 0 60px -40px var(--cyan);
}
/* chrome bar — the two power lamps (magenta + cyan), drawn as glowing dots */
div.highlighter-rouge::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 42px; z-index: 1;
  background:
    radial-gradient(circle at 16px 21px, var(--magenta) 0 3.6px, color-mix(in srgb, var(--magenta) 45%, transparent) 4.4px 6.4px, transparent 7px),
    radial-gradient(circle at 32px 21px, var(--cyan)    0 3.6px, color-mix(in srgb, var(--cyan)    45%, transparent) 4.4px 6.4px, transparent 7px),
    color-mix(in srgb, var(--panel) 80%, var(--black));
  border-bottom: 1px solid var(--rail);
  pointer-events: none;
}
/* chrome bar — the language label (rouge sets .language-<x> on the wrapper) */
div.highlighter-rouge::after {
  position: absolute; top: 0; left: 48px; height: 42px; z-index: 1;
  display: flex; align-items: center;
  color: var(--dim); font-size: 11.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; pointer-events: none;
}
div.language-bash::after, div.language-sh::after, div.language-shell::after, div.language-console::after, div.language-zsh::after { content: "bash"; }
div.language-yaml::after, div.language-yml::after { content: "yaml"; }
div.language-json::after { content: "json"; }
div.language-toml::after { content: "toml"; }
div.language-ini::after  { content: "ini"; }
div.language-nginx::after { content: "nginx"; }
div.language-conf::after, div.language-apache::after { content: "conf"; }
div.language-dockerfile::after, div.language-docker::after { content: "dockerfile"; }
div.language-html::after { content: "html"; }
div.language-css::after  { content: "css"; }
div.language-js::after, div.language-javascript::after { content: "js"; }
div.language-python::after, div.language-py::after { content: "python"; }
div.language-text::after, div.language-plaintext::after { content: "text"; }
div.highlighter-rouge .highlight { margin: 0; background: none; }
div.highlighter-rouge pre { margin: 0; padding: 54px 18px 16px; overflow-x: auto; background: none; }
div.highlighter-rouge code {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
  background: none; padding: 0; color: var(--ink);
}
/* syntax — drawn from the ramp, all AA on the black well */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cd { color: var(--dim); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sh, .highlight .se, .highlight .sb, .highlight .sx { color: var(--blue); }
.highlight .nb, .highlight .nv, .highlight .nf, .highlight .nx, .highlight .vg { color: color-mix(in srgb, var(--cyan) 42%, var(--ink)); font-weight: 700; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kc { color: var(--cyan); }
.highlight .o, .highlight .p, .highlight .ow { color: color-mix(in srgb, var(--purple) 55%, var(--ink)); }
.highlight .mi, .highlight .mf, .highlight .m { color: color-mix(in srgb, var(--purple) 55%, var(--ink)); }
.highlight .gp { color: var(--magenta); }  /* shell prompt glyph */

button.copy {
  position: absolute; top: 8px; right: 10px; z-index: 2; cursor: pointer;
  background: color-mix(in srgb, var(--magenta) 14%, transparent);
  color: color-mix(in srgb, var(--magenta) 82%, var(--ink));
  border: 1px solid color-mix(in srgb, var(--magenta) 42%, var(--rail)); border-radius: 7px;
  font: 700 12px/1 var(--mono); padding: 7px 12px; letter-spacing: .08em;
  transition: border-color .16s, box-shadow .16s, color .16s, background .16s;
}
button.copy:hover { border-color: var(--magenta); box-shadow: 0 0 18px -8px var(--magenta); }
button.copy.copied { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 55%, var(--rail));
  background: color-mix(in srgb, var(--ok) 12%, transparent); }

/* ═══════════════════════════ TOC RAIL ═══════════════════════════════════ */
aside { font-size: 13.5px; }
.toc { position: sticky; top: 28px; background: var(--panel); border: 1px solid var(--rail);
  border-radius: 12px; padding: 18px 20px; max-height: calc(100vh - 56px); overflow: auto; }
.toc .label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.toc-count { color: var(--cyan); font-variant-numeric: tabular-nums; letter-spacing: .06em; }

.trail { position: relative; }
.trail .rail, .trail .rail-fill { position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; border-radius: 1px; pointer-events: none; }
.trail .rail { background: var(--rail); }
.trail .rail-fill { bottom: auto; height: 0;
  background: linear-gradient(180deg, var(--magenta), var(--purple), var(--cyan));
  box-shadow: 0 0 10px color-mix(in srgb, var(--cyan) 55%, transparent);
  transition: height .18s ease-out; }

.toc-item { position: relative; display: flex; align-items: center; gap: 13px; padding: 7px 0;
  color: var(--dim); text-decoration: none; transition: color .2s;
  animation: toc-in .45s ease backwards; }
.toc-item:nth-child(3)  { animation-delay: .05s; }
.toc-item:nth-child(4)  { animation-delay: .10s; }
.toc-item:nth-child(5)  { animation-delay: .15s; }
.toc-item:nth-child(6)  { animation-delay: .20s; }
.toc-item:nth-child(7)  { animation-delay: .25s; }
.toc-item:nth-child(8)  { animation-delay: .30s; }
.toc-item:nth-child(9)  { animation-delay: .35s; }
.toc-item:nth-child(10) { animation-delay: .40s; }
.toc-item:nth-child(11) { animation-delay: .45s; }
.toc-item:nth-child(12) { animation-delay: .50s; }
@keyframes toc-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.toc-item:hover { color: var(--ink); }
.toc-item .node { flex: none; width: 13px; height: 13px; border-radius: 50%; background: var(--panel);
  border: 2px solid var(--rail); position: relative; z-index: 1;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .2s; }
.toc-item .t { transition: color .2s, transform .2s; min-width: 0; }
/* reserve each label's BOLD width up front (invisible bold twin) so the
   active state's font-weight change never rewraps the line */
.toc-item .t::after { content: attr(data-t); display: block; height: 0; visibility: hidden; overflow: hidden; font-weight: 700; }
.toc-item:hover .node { transform: scale(1.18); border-color: var(--cyan); }

/* done: filled node + check */
.toc-item.done { color: color-mix(in srgb, var(--ink) 62%, var(--dim)); }
.toc-item.done .node { background: color-mix(in srgb, var(--cyan) 60%, var(--panel)); border-color: var(--cyan); }
.toc-item.done .node::after { content: ""; position: absolute; left: 3px; top: .5px; width: 3px; height: 6px;
  border: solid var(--black); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }

/* active: cyan ring + pulse + bold label */
.toc-item.active { color: var(--ink); }
.toc-item.active .t { font-weight: 700; transform: translateX(2px); }
.toc-item.active .node { background: var(--panel); border-color: var(--cyan);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 22%, transparent); animation: toc-pulse 2.2s ease-in-out infinite; }
.toc-item.active .node::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
@keyframes toc-pulse { 0%,100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 22%, transparent); }
                       50%     { box-shadow: 0 0 0 7px color-mix(in srgb, var(--cyan) 9%, transparent); } }

.toc-appendix { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rail); }
.toc-appendix a { display: block; padding: 4px 0; color: var(--dim); font-size: 12.5px; text-decoration: none; transition: color .2s; }
.toc-appendix a:hover { color: var(--cyan); }

.toc-bar { display: none; } /* mobile-only strip; styled in the media query */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toc-item, .toc-item.active .node { animation: none; }
  .trail .rail-fill { transition: none; }
  .card, .ramp-band, .tagline { animation: none !important; opacity: 1 !important; }
  .card .arr { transition: none; }
}

/* ═══════════════════ END-OF-GUIDE: more guides band ═════════════════════ */
.more { border-top: 1px solid var(--rail);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 55%, transparent), transparent); }
.more-in { max-width: 1100px; margin: 0 auto; padding: 38px 32px 56px; }
.more-head { margin-bottom: 18px; }
.allguides { color: var(--link); font-weight: 700; font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.allguides:hover { text-decoration: underline; text-underline-offset: 3px; }
.more-cards { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.more .card { min-height: 0; padding: 18px 22px 20px 24px; }
.more .card h2 { font-size: 16px; margin-bottom: 12px; }

/* ═══════════════════════════ COLLECTIONS ════════════════════════════════ */
.collection-group { margin-top: 44px; }
.collection-head { margin-bottom: 22px; }
.collection-head h2 { font-family: var(--mono); font-weight: 800; letter-spacing: -.01em; font-size: 24px; line-height: 1.2; }
.collection-head h2 a { color: var(--ink); text-decoration: none; }
.collection-head h2 a:hover { color: var(--link); }
.collection-head h2 .arr { color: var(--cyan); margin-left: 8px; display: inline-block; transition: transform .2s; }
.collection-head h2 a:hover .arr { transform: translateX(4px); }
.collection-tagline { color: var(--dim); font-size: 14px; margin-top: 6px; max-width: 620px; }
.collection-intro { color: var(--dim); font-size: 16px; line-height: 1.6; max-width: 620px; margin: 0 0 30px; }
@media (prefers-reduced-motion: reduce) { .collection-head h2 .arr { transition: none; } }

/* ═══════════════════════════ FOOTER ═════════════════════════════════════ */
.site-footer { margin-top: 40px; border-top: 1px solid var(--rail); }
.footer-in { max-width: 1100px; margin: 0 auto; padding: 30px 32px 44px; text-align: center; }
.footer-in .motto { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  background: var(--ramp); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-in .colophon { margin: 0; color: var(--dim); font-size: 12px; line-height: 1.7; }
.footer-in .colophon a { color: var(--link); text-decoration: none; }
.footer-in .colophon a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-in .dither { color: var(--purple); letter-spacing: .1em; }

/* ═══════════════════════════ POWER-ON LOAD ══════════════════════════════ */
@media (prefers-reduced-motion: no-preference) {
  .card { opacity: 0; animation: poweron .5s ease forwards; }
  .card:nth-child(1){animation-delay:.05s} .card:nth-child(2){animation-delay:.12s} .card:nth-child(3){animation-delay:.19s}
  .card:nth-child(4){animation-delay:.26s} .card:nth-child(5){animation-delay:.33s} .card:nth-child(6){animation-delay:.40s}
  @keyframes poweron { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform:none; } }
  body::after { animation: crtflicker 6s steps(60) infinite; }
  @keyframes crtflicker { 0%,96%,100%{opacity:1} 97%{opacity:.94} 98%{opacity:.995} }
  .tagline.boot { animation: neon 1.2s ease .15s both; }
  @keyframes neon { 0%{opacity:0} 8%{opacity:1} 10%{opacity:.25} 14%{opacity:1} 17%{opacity:.45} 20%{opacity:1} 24%{opacity:.7} 27%{opacity:1} 100%{opacity:1} }
  .ramp-band { opacity: 0; animation: poweron .5s ease .22s forwards; }
}
@media (hover: none) { .card:hover { transform: none; } }

/* ═══════════════════════════ RESPONSIVE ═════════════════════════════════ */
@media (max-width: 940px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 36px 22px 70px; }
  .hero-in, .band-in, .home-main, .footer-in, .more-in { padding-left: 22px; padding-right: 22px; }
  article table { display: block; overflow-x: auto; max-width: 100%; font-size: 14px; }
  article th, article td { padding: 8px 10px; }
  div.highlighter-rouge pre { padding: 54px 16px 16px; }
  .card { padding: 20px 22px 22px 24px; }

  /* ----- mobile progress strip: the same TOC nav, re-presented (JS toggles
           aside.visible + .toc.open + fills .bar-fill) ----- */
  aside {
    display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 60;
    transform: translateY(-100%); visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  aside.visible { transform: none; visibility: visible; transition: transform .25s ease; }
  .toc {
    position: static; padding: 0; border: 0; border-radius: 0 0 14px 14px;
    max-height: none; overflow: visible;
    background: var(--panel); border-bottom: 1px solid var(--rail);
    box-shadow: 0 10px 28px rgba(0,0,0,.5), 0 0 0 1px var(--rail);
  }
  .toc .label, .trail, .toc-appendix { display: none; }
  .toc.open .trail {
    display: block; margin: 0 18px; padding: 6px 0 14px;
    max-height: 55vh; max-height: 55dvh; overflow: auto;
  }
  .toc.open .toc-appendix { display: block; margin: 0 18px 14px; }
  .toc-bar {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 13px 16px 15px; position: relative;
    background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink);
  }
  .bar-now {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; font-family: var(--mono); font-weight: 700;
    font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  }
  .bar-count { font-family: var(--mono); font-weight: 700; font-size: 12px;
    color: var(--cyan); font-variant-numeric: tabular-nums; }
  .bar-caret { width: 8px; height: 8px; flex: none; margin-top: -4px;
    border: solid var(--dim); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
  .toc.open .bar-caret { transform: rotate(225deg); margin-top: 4px; }
  .bar-fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, var(--magenta), var(--cyan));
    box-shadow: 0 0 8px color-mix(in srgb, var(--cyan) 55%, transparent); transition: width .18s ease-out; }
  .toc.open .toc-item { padding: 11px 0; }
  .toc.open .toc-appendix a { padding: 9px 0; }
  article h2 { scroll-margin-top: 64px; }
  @media (prefers-reduced-motion: reduce) { aside, .bar-fill, .bar-caret { transition: none; } }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
}
