/* ============================================================ tokens */
:root {
  --bg: #0c0a08;
  --bg-2: #13100c;
  --surface: #191510;
  --surface-2: #211b15;
  --line: #2f271f;
  --line-2: #43382c;
  --text: #ece2d4;
  --muted: #a8998a;
  --faint: #6f6356;
  --amber: #ff8a2b;
  --amber-hot: #ffc27a;
  --amber-dim: #7a3d12;
  --red: #ff5a4a;

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-nixie: "Nixie One", var(--font-mono);

  --wrap: 1080px;
  --radius: 6px;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--amber-hot); text-decoration-color: var(--amber-dim); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: var(--amber); }

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

code, kbd, pre { font-family: var(--font-mono); font-size: 0.88em; }
:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: var(--amber-hot);
  word-break: break-word;
}

pre {
  background: #090705;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.55;
  color: #e6d6c2;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; letter-spacing: 0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(2rem, 5vw, 3.2rem); text-transform: uppercase; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.prose { max-width: 70ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.9em;
}

/* ============================================================ header / footer */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(12, 10, 8, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand {
  font-family: var(--font-display); font-weight: 800; font-size: 1.35rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--amber-hot); text-decoration: none;
  padding: 10px 0; /* comfortable tap target */
}
.brand:hover { color: #fff; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 4px;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--amber-hot); }

@media (max-width: 520px) {
  /* Wordmark + four menu items on one row down to ~340px wide */
  .site-header .wrap { gap: 10px; }
  .brand { font-size: 1.1rem; letter-spacing: 0.02em; }
  .nav { gap: 0; flex-wrap: nowrap; }
  .nav a { padding: 6px 5px; font-size: 0.72rem; letter-spacing: 0.04em; }
}
@media (max-width: 350px) {
  .brand { font-size: 0.98rem; }
  .nav a { padding: 6px 3px; font-size: 0.66rem; letter-spacing: 0.02em; }
}

.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 36px 0 48px; color: var(--faint); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.site-footer a { color: var(--muted); }
.site-footer .mono { font-size: 0.82rem; }

/* ============================================================ sections */
section.block { padding: 88px 0 0; }
.block-head { margin-bottom: 36px; }
.block-head p:not(.kicker) { color: var(--muted); max-width: 62ch; font-size: 1.08rem; }

.page-head { padding: 64px 0 32px; }
.page-head h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); text-transform: uppercase; }
.page-head p:not(.kicker) { color: var(--muted); max-width: 62ch; font-size: 1.08rem; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
}
.card h3 { font-size: 1.35rem; margin-bottom: 0.4em; }
.card p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.card .tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 10px;
}

.callout {
  border-left: 3px solid var(--amber);
  background: linear-gradient(90deg, rgba(255, 138, 43, 0.08), transparent 70%);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}
.callout p:last-child { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 0.9rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 12px 18px; border-radius: 4px; border: 1px solid var(--amber);
  background: var(--amber); color: #1a0d03; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--amber-hot); color: #1a0d03; }
.btn.ghost { background: transparent; color: var(--amber-hot); }
.btn.ghost:hover { background: rgba(255, 138, 43, 0.12); color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ============================================================ hero + nixie clock */
.hero {
  position: relative;
  padding: 72px 0 56px;
  text-align: center;
  /* One shared ambient glow behind both the title and the clock. Many eased stops keep
     the falloff smooth; a linear two-stop fade shows hard rings on dark backgrounds. */
  background:
    radial-gradient(ellipse 50% 46% at 50% 56%,
      rgba(255, 110, 20, 0.22) 0%,
      rgba(255, 110, 20, 0.195) 12%,
      rgba(255, 110, 20, 0.155) 24%,
      rgba(255, 110, 20, 0.11) 38%,
      rgba(255, 110, 20, 0.07) 52%,
      rgba(255, 110, 20, 0.038) 66%,
      rgba(255, 110, 20, 0.015) 82%,
      rgba(255, 110, 20, 0) 100%),
    linear-gradient(var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
/* Faint film grain over the glow. Chrome doesn't dither gradients (Safari does),
   so without it the falloff shows visible steps on dark screens. */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  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.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.045;
}
.hero > .wrap { position: relative; } /* keep the content above the grain */
.hero h1 {
  font-size: clamp(3rem, 11vw, 7rem);
  text-transform: uppercase;
  margin-bottom: 30px;
  letter-spacing: 0.02em;
}
/* The title is a light switch: plain peach when off, nixie glow when on */
.title-switch {
  all: unset;
  cursor: pointer;
  color: var(--amber-hot);
  border-radius: 4px;
  -webkit-tap-highlight-color: transparent;
  transition: color 160ms, text-shadow 160ms;
}
.title-switch:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; }
.title-switch:hover { text-shadow: 0 0 18px rgba(255, 120, 20, 0.25); } /* hint that it does something */
.title-switch.on {
  color: #ffd3a0;
  text-shadow:
    0 0 1px #fff1df,
    0 0 6px rgba(255, 154, 60, 0.85),
    0 0 16px rgba(255, 106, 0, 0.45);
}
.title-switch.igniting { animation: title-ignite 650ms steps(1, end) 1; }
.title-switch.on.sputter { animation: title-sputter 420ms steps(1, end) 1; }

/* Neon tubes catch with a few stutters before holding steady */
@keyframes title-ignite {
  0%   { color: var(--amber-hot); text-shadow: none; }
  12%  { color: #ffd3a0; text-shadow: 0 0 6px rgba(255, 154, 60, 0.6); }
  20%  { color: var(--amber-hot); text-shadow: none; }
  38%  { color: #ffd3a0; text-shadow: 0 0 10px rgba(255, 154, 60, 0.7); }
  46%  { color: var(--amber-hot); text-shadow: none; }
  60%  { color: #ffd3a0; }
}
/* An occasional dip in the glow once it's on */
@keyframes title-sputter {
  0%   { opacity: 1; }
  10%  { opacity: 0.55; text-shadow: none; }
  22%  { opacity: 1; }
  48%  { opacity: 0.8; text-shadow: 0 0 4px rgba(255, 154, 60, 0.5); }
  58%  { opacity: 1; }
}

.hero .sub { color: var(--muted); font-size: 1.1rem; max-width: 46ch; margin: 0 auto 40px; }

.clock {
  --tube-w: clamp(30px, 6.4vw, 66px);
  --tube-h: calc(var(--tube-w) * 1.72);
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 18px clamp(4px, 1.4vw, 14px);
  padding: clamp(14px, 3vw, 28px) clamp(14px, 3vw, 32px) clamp(12px, 2vw, 20px);
  border-radius: 10px;
  background:
    linear-gradient(180deg, #2a1d12 0%, #1a120b 100%);
  border: 1px solid #3d2b1b;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.08),
    inset 0 -14px 30px rgba(0, 0, 0, 0.45),
    /* Soft grounding shadow, mostly below the panel. A big dark shadow here reads as a
       dark ring cutting into the ambient glow around the box. */
    0 26px 48px -30px rgba(0, 0, 0, 0.55);
  max-width: 100%;
}

.clock-group { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.clock-group .tubes { display: flex; gap: clamp(2px, 0.6vw, 6px); }
.clock-group .label {
  font-family: var(--font-mono); font-size: clamp(0.6rem, 1.6vw, 0.74rem); letter-spacing: 0.24em;
  color: #c5a789; text-transform: uppercase;
  padding: 2px 8px; border-radius: 2px;
  background: linear-gradient(#d9c2a0, #b49673); color: #2b1c0f; font-weight: 600;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.tube {
  position: relative;
  width: var(--tube-w);
  height: var(--tube-h);
  border-radius: calc(var(--tube-w) * 0.5) calc(var(--tube-w) * 0.5) calc(var(--tube-w) * 0.14) calc(var(--tube-w) * 0.14);
  background:
    radial-gradient(ellipse 70% 45% at 50% 52%, rgba(255, 100, 20, 0.16), transparent 70%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.0) 30%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.05)),
    #120c08;
  border: 1px solid rgba(255, 225, 190, 0.14);
  box-shadow:
    inset 0 0 calc(var(--tube-w) * 0.25) rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
/* honeycomb anode mesh */
.tube::before {
  content: "";
  position: absolute; inset: 10% 8% 16%;
  background-image:
    radial-gradient(circle at 50% 50%, transparent 1.3px, rgba(150, 120, 90, 0.18) 1.6px, transparent 2.1px);
  background-size: 5px 5px;
  border-radius: 30% 30% 6% 6%;
  pointer-events: none;
  z-index: 3;
}
/* glass highlight */
.tube::after {
  content: "";
  position: absolute; top: 4%; left: 14%; width: 16%; height: 60%;
  border-radius: 50%;
  background: linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
  filter: blur(1px);
  pointer-events: none;
  z-index: 4;
}
.tube .base {
  position: absolute; left: 0; right: 0; bottom: 0; height: 13%;
  background: linear-gradient(#3a2c20, #17110c);
  border-top: 1px solid rgba(255, 220, 180, 0.1);
  z-index: 5;
}
.tube .digit {
  position: absolute; inset: 0 0 8%;
  display: grid; place-items: center;
  font-family: var(--font-nixie);
  font-size: calc(var(--tube-w) * 1.18);
  line-height: 1;
  z-index: 1;
  color: rgba(255, 170, 110, 0.06);  /* unlit cathodes stay faintly visible */
  -webkit-text-stroke: 0.6px rgba(160, 120, 90, 0.18);
  transition: color 120ms, text-shadow 120ms;
}
.tube .digit.on {
  color: #ffd3a0;
  -webkit-text-stroke: 0.6px #ff9a3c;
  text-shadow:
    0 0 2px #fff1df,
    0 0 6px #ff9a3c,
    0 0 14px #ff6a00,
    0 0 28px rgba(255, 90, 0, 0.75),
    0 0 48px rgba(255, 70, 0, 0.45);
  z-index: 2;
}
.tube.flicker .digit.on { animation: flicker 140ms steps(2) 1; }
@keyframes flicker { 0% { opacity: 0.55; } 100% { opacity: 1; } }

/* IN-3 style neon separator bulbs */
.sep { display: flex; flex-direction: column; justify-content: center; gap: calc(var(--tube-w) * 0.38); height: var(--tube-h); padding: 0 1px; margin-bottom: calc(10px + 1.6em); }
.sep i {
  width: calc(var(--tube-w) * 0.15); height: calc(var(--tube-w) * 0.15); min-width: 5px; min-height: 5px;
  border-radius: 50%;
  background: #ffb26b;
  box-shadow: 0 0 4px #ff8a2b, 0 0 10px #ff6a00, 0 0 18px rgba(255, 90, 0, 0.6);
  transition: opacity 200ms;
}
.clock.tick .sep i { opacity: 0.25; }

@media (max-width: 560px) {
  .clock { --tube-w: clamp(24px, 10vw, 56px); column-gap: 4px; }
  .clock .sep.after-days { display: none; }
  .clock-group.days { flex-basis: 100%; }
}

/* iOS (every browser there is WebKit): it paints the stacked unlit digits nearly as
   bright as the lit one, whatever their color/opacity, so they're hidden outright.
   Tested on-device: no single effect (glow, blur, clipping, animation) was the cause. */
@supports (-webkit-touch-callout: none) {
  .tube .digit:not(.on) { visibility: hidden; }
  .tube .digit.on { -webkit-text-stroke: 0; }
  @media (max-width: 560px) {
    .tube .digit.on {
      text-shadow:
        0 0 2px #fff1df,
        0 0 5px #ff9a3c,
        0 0 12px #ff6a00,
        0 0 22px rgba(255, 90, 0, 0.6);
    }
  }
}

.target-line { margin: 30px auto 0; font-family: var(--font-mono); font-size: 0.92rem; color: var(--muted); line-height: 1.8; }
.target-line strong { color: var(--text); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .tube.flicker .digit.on { animation: none; }
  .tube .digit, .sep i { transition: none; }
  .title-switch.igniting, .title-switch.on.sputter { animation: none; }
}

/* ============================================================ 32-bit register */
.register {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px clamp(14px, 3vw, 28px);
}
.register-readouts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-bottom: 22px; }
.readout .k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.readout .v { font-family: var(--font-mono); font-size: clamp(1.1rem, 3.4vw, 1.6rem); color: var(--amber-hot); font-variant-numeric: tabular-nums; }

.bits { display: grid; grid-template-columns: repeat(32, 1fr); gap: 3px; }
.bit {
  aspect-ratio: 1 / 1.5;
  border-radius: 3px;
  background: #20180f;
  border: 1px solid #2f241a;
  position: relative;
}
.bit.on { background: #ff9a3c; border-color: #ffc27a; box-shadow: 0 0 8px rgba(255, 120, 20, 0.7); }
.bit.sign { outline: 1px dashed var(--red); outline-offset: 2px; }
.bit.sign.on { background: var(--red); box-shadow: 0 0 10px var(--red); }
.bits-legend { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.72rem; color: var(--faint); margin-top: 10px; gap: 12px; }
.bits-legend .sign-note { color: var(--red); }
@media (max-width: 560px) {
  .bits { grid-template-columns: repeat(16, 1fr); }
}

.progress { margin-top: 22px; }
.progress .bar { height: 8px; background: #20180f; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.progress .fill { height: 100%; background: linear-gradient(90deg, var(--amber-dim), var(--amber)); box-shadow: 0 0 10px rgba(255, 120, 20, 0.6); }
.progress .row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-top: 8px; gap: 12px; }

/* ============================================================ wraparound diagram */
.wrapdemo { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; margin: 28px 0; }
.wrapdemo .side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; font-family: var(--font-mono); font-size: 0.86rem; min-width: 0; }
.wrapdemo .side .k { color: var(--faint); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.wrapdemo .side .n { color: var(--amber-hot); font-size: 1.15rem; margin: 6px 0 2px; word-break: break-all; }
.wrapdemo .side .b { color: var(--muted); word-break: break-all; font-size: 0.78rem; }
.wrapdemo .side .d { color: var(--text); margin-top: 8px; }
.wrapdemo .side.bad { border-color: rgba(255, 90, 74, 0.45); }
.wrapdemo .side.bad .n, .wrapdemo .side.bad .d { color: var(--red); }
.wrapdemo .arrow { display: grid; place-items: center; font-family: var(--font-mono); color: var(--faint); font-size: 0.8rem; text-align: center; }
@media (max-width: 720px) {
  .wrapdemo { grid-template-columns: 1fr; }
  .wrapdemo .arrow { transform: rotate(90deg); padding: 4px 0; }
}

/* ============================================================ timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-2); }
.timeline li { position: relative; padding: 0 0 26px 26px; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 9px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 8px var(--amber);
}
.timeline li.future::before { background: var(--red); box-shadow: 0 0 8px var(--red); }
.timeline .when { font-family: var(--font-mono); font-size: 0.82rem; color: var(--amber); letter-spacing: 0.04em; }
.timeline li.future .when { color: var(--red); }
.timeline .what { color: var(--muted); }
.timeline .what strong { color: var(--text); font-weight: 600; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; gap: 8px; } }

.compare { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.compare td:first-child { color: var(--muted); white-space: nowrap; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 14px 46px; position: relative; color: var(--muted); }
.checklist li::before { content: "[ ]"; position: absolute; left: 14px; top: 14px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--amber); }
.checklist li strong { color: var(--text); font-weight: 600; }

/* ============================================================ forms (forum, api playground) */
label { display: block; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
input[type="text"], textarea, select {
  width: 100%;
  font: 400 0.98rem/1.5 var(--font-body);
  color: var(--text);
  background: #0e0b08;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 10px 12px;
}
input[type="text"]:focus, textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 138, 43, 0.18); }
textarea { min-height: 120px; resize: vertical; }
.field { margin-bottom: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-msg { font-family: var(--font-mono); font-size: 0.85rem; margin-left: 12px; }
.form-msg.err { color: var(--red); }
.form-msg.ok { color: var(--amber-hot); }

/* "Try it in your browser console" callouts */
.callout.try { max-width: 70ch; }
.callout.try p { margin: 0 0 8px; font-size: 0.95rem; }
.callout.try pre { margin: 0; padding: 12px 14px; font-size: 0.82rem; }
.callout.try .c { color: var(--faint); }

/* ============================================================ citations */
/* Footnote numbers stay quiet so they don't break up the reading; amber only on hover */
sup.cite { --cite: #8c7e70; font-family: var(--font-mono); font-size: 0.6em; line-height: 0; margin-left: 1px; color: var(--cite); }
sup.cite a {
  color: var(--cite);
  text-decoration: none;
  padding: 0.4em 0.2em; /* bigger tap target without shifting the line */
  border-radius: 3px;
  scroll-margin-top: 40vh; /* returning from /sources lands mid-screen, not under the header */
}
sup.cite a:hover, sup.cite a:focus-visible { color: var(--amber-hot); background: rgba(255, 138, 43, 0.14); }
/* Flash the footnote you came back to from the sources page */
sup.cite a:target { animation: cite-flash 2.4s ease-out 1 forwards; }
@keyframes cite-flash {
  0%, 35% { color: #1a0d03; background: var(--amber-hot); }
  100%    { color: var(--cite); background: transparent; }
}
.backrefs { font-family: var(--font-mono); font-size: 0.78rem; margin-left: 4px; color: var(--faint); white-space: nowrap; }
.backrefs a { color: var(--faint); }
.backrefs a:hover { color: var(--amber-hot); }

ol.sources {
  margin: 0; padding: 0 0 0 2.6em;
  font-size: 0.9rem; line-height: 1.55; color: var(--muted);
  max-width: 80ch;
}
ol.sources li { padding: 6px 10px; margin: 0 0 4px -10px; border-radius: 4px; overflow-wrap: anywhere; scroll-margin-top: 90px; }
ol.sources li::marker { font-family: var(--font-mono); color: var(--amber); }
/* Flash the source you jumped to, then fade, so it doesn't stay boxed */
ol.sources li:target { animation: source-flash 2.4s ease-out 1 forwards; }
@keyframes source-flash {
  0%, 35% { background: rgba(255, 138, 43, 0.16); color: var(--text); }
  100%    { background: transparent; }
}
ol.sources em { color: var(--text); font-style: italic; }
.sources-note { font-family: var(--font-mono); font-size: 0.78rem; color: var(--faint); margin-top: 16px; }
.sources-pointer { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); margin: 0; }
