/*
 * Scoville Ladder — site styles.
 *
 * The identity is the app's: a warm-black lab chassis, one colour per rung of
 * the heat ramp, numerals set like a gauge readout. The one rule that keeps it
 * from becoming a generic dark landing page is that colour is *data* here —
 * every accent on a row, a rung or a dot is that thing's real heat, taken from
 * the app's HEAT_RAMP. Nothing is tinted for decoration.
 *
 * The heat colours are per-element custom properties (--c), set inline by the
 * generator from the real figure. CSS never picks one.
 */

:root {
  /* Chassis. Warm-tinted black, not neutral grey — matches the app exactly. */
  --ink: #0B0809;
  --ink-2: #100B0D;
  --surface: #161113;
  --raise: #1F181B;
  --rule: #2C2226;
  --rule-soft: #221a1d;

  --text: #F6EFF0;
  --dim: #A2969A;
  --faint: #6A5D62;

  --ember: #F4802B;
  --ember-dim: #7A3D12;

  --sans: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: 'Newsreader', ui-serif, Georgia, 'Times New Roman', serif;

  --rail-w: 92px;
  --gutter: clamp(20px, 5vw, 56px);
  --measure: 34rem;

  --dur: 240ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

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

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ember); color: #180B02; padding: 10px 16px; font-weight: 700;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Masthead ---------------------------------------------------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: clamp(12px, 3vw, 32px);
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}

.wordmark {
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em;
  text-decoration: none; white-space: nowrap;
}
.wordmark span { color: var(--ember); }
.wordmark span::before { content: ' '; }

.masthead nav {
  display: flex; gap: clamp(10px, 2vw, 24px);
  margin-right: auto; overflow-x: auto; scrollbar-width: none;
}
.masthead nav::-webkit-scrollbar { display: none; }
.masthead nav a {
  color: var(--dim); text-decoration: none; font-size: 0.9rem; white-space: nowrap;
  padding: 4px 0; border-bottom: 1px solid transparent;
}
.masthead nav a:hover { color: var(--text); }
.masthead nav a[aria-current='page'] { color: var(--text); border-bottom-color: var(--ember); }

/* ---------- Buttons ----------------------------------------------------- */

.btn {
  display: inline-block; font-family: var(--sans); font-weight: 500; font-size: 0.95rem;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn-primary { background: var(--ember); color: #180B02; font-weight: 700; }
.btn-primary:hover { background: #ff9040; }
.btn-ghost { border-color: var(--rule); color: var(--text); }
.btn-ghost:hover { border-color: var(--ember); }
.btn-small { padding: 8px 15px; font-size: 0.85rem; background: var(--raise); color: var(--text); }
.btn-small:hover { background: var(--rule); }

/*
 * The primary action is meant to be the brightest thing on the screen. On a
 * warm-black page an ember fill already is, so the size does the rest — the
 * previous buttons were the same weight as a nav link.
 */
.btn-lg { padding: 16px 30px; font-size: 1.02rem; }
.btn-primary {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset,
              0 10px 30px -12px rgba(244, 128, 43, 0.85);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover { transform: none; }
}

/* ---------- The scale rail ---------------------------------------------- */
/*
 * The site's one piece of bravado, and it earns it: a true logarithmic axis
 * pinned to the left edge, with a marker that rides to the heat of whatever
 * section is on screen. Below 1180px there is no room for it and it goes away
 * entirely rather than shrinking into an ornament.
 */

.rail { display: none; }

@media (min-width: 1180px) {
  body.has-rail { padding-left: var(--rail-w); }
  .rail {
    display: block; position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w);
    padding: 96px 0 48px; z-index: 40; pointer-events: none;
    border-right: 1px solid var(--rule-soft);
    background: linear-gradient(90deg, var(--ink-2), var(--ink));
  }
  .rail-axis { position: relative; height: 100%; margin-left: 46px; width: 3px; }
  /* The ramp itself: one band per rung, stacked bottom-up. */
  .rail-band {
    position: absolute; left: 0; width: 3px; bottom: 0; height: var(--pos);
    background: var(--c); border-radius: 2px; opacity: 0.5;
  }
  .rail-tick {
    position: absolute; left: 10px; bottom: var(--pos); transform: translateY(50%);
    font-size: 0.62rem; letter-spacing: 0.09em; color: var(--faint);
    font-variant-numeric: tabular-nums;
  }
  .rail-tick::before {
    content: ''; position: absolute; left: -10px; top: 50%; width: 6px; height: 1px;
    background: var(--rule);
  }
  .rail-marker {
    position: absolute; left: -5px; bottom: 0; width: 13px; height: 13px;
    border-radius: 50%; background: var(--ember);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ember) 22%, transparent);
    transition: bottom 600ms var(--ease), background 600ms var(--ease);
  }
  .rail-readout {
    position: absolute; left: 0; right: 0; bottom: 22px; margin: 0;
    text-align: center; font-size: 0.78rem; font-weight: 500;
    font-variant-numeric: tabular-nums; color: var(--text);
  }
  .rail-unit {
    position: absolute; left: 0; right: 0; bottom: 6px; margin: 0;
    text-align: center; font-size: 0.6rem; letter-spacing: 0.16em; color: var(--faint);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rail-marker { transition: none; }
}

/* ---------- Layout ------------------------------------------------------ */

main { display: block; }

/* The masthead is sticky, so an anchor target must clear it or it lands hidden. */
:target, [id] { scroll-margin-top: 84px; }

.hero, .band, .page-head, .cta, .guide, .neighbours, .more-guides {
  padding-inline: var(--gutter);
}

.page-head { padding-block: clamp(48px, 8vw, 88px) clamp(24px, 4vw, 40px); max-width: 62rem; }
.band { padding-block: clamp(44px, 7vw, 80px); }
.band-contrast { background: var(--ink-2); border-block: 1px solid var(--rule-soft); }

.prose { max-width: var(--measure); }

/*
 * Heading in its own column beside the body. Below 1000px there is not room for
 * two columns and it stacks back to a heading above its text, which is the
 * correct reading order either way.
 */
.split { display: grid; gap: 14px; max-width: var(--measure); }
.split + .split { margin-top: clamp(32px, 4vw, 52px); }
.split-head h2 { margin: 0; }
.split-body > :first-child { margin-top: 0; }
.split-body > :last-child { margin-bottom: 0; }
.split-body p {
  font-family: var(--serif); font-size: 1.08rem; line-height: 1.68;
  color: var(--dim); margin: 0 0 1em;
}
.split-body p:last-child { margin-bottom: 0; }
.split-body strong { color: var(--text); font-weight: 500; }
.split-body a { color: var(--text); }

@media (min-width: 1000px) {
  .split {
    grid-template-columns: minmax(0, 15rem) minmax(0, 33rem);
    gap: clamp(28px, 4vw, 64px);
    max-width: 64rem;
    align-items: start;
  }
  .split-head h2 { font-size: 1.45rem; text-wrap: balance; }
}

.section-head { max-width: var(--measure); margin-bottom: 4px; }
.section-head h2 { margin: 0; }
.prose-long {
  max-width: 38rem;
  margin-inline: auto;
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.72;
  padding-block: clamp(32px, 5vw, 56px);
}
.prose-long p { margin: 0 0 1.2em; }
.prose-long ul, .prose-long ol { margin: 0 0 1.4em; padding-left: 1.2em; }
.prose-long li { margin-bottom: 0.5em; }
.prose-long strong { font-weight: 500; color: #fff; }
.prose-long em { font-style: italic; }
.aside { color: var(--dim); font-size: 0.95rem; margin-top: 28px; }

/*
 * On a page whose body is one centred reading column, the heading has to sit in
 * the same column or the article looks like two unrelated blocks. Both are
 * centred on the same axis, so matching the measure is enough to align them.
 */
.page-head:has(+ .prose-long) { max-width: 38rem; margin-inline: auto; }

/* ---------- Typography -------------------------------------------------- */

h1 {
  font-size: clamp(2rem, 5.2vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 700;
  margin: 0 0 0.5em;
  max-width: 20ch;
  text-wrap: balance;
}
.page-head h1 { max-width: 24ch; }

h2 {
  font-family: var(--sans);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.16; letter-spacing: -0.022em; font-weight: 700;
  margin: 0 0 0.6em; max-width: 26ch; text-wrap: balance;
}
.prose-long h2 { margin-top: 1.8em; }
.prose-long h2:first-child { margin-top: 0; }

h3 {
  font-family: var(--sans);
  font-size: 1.06rem; font-weight: 500; letter-spacing: -0.01em;
  margin: 0 0 0.45em;
}
.prose-long h3 { margin-top: 1.7em; font-size: 1.12rem; }

.lede {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.1vw, 1.32rem);
  line-height: 1.6; color: var(--dim); max-width: 40rem; margin: 0 0 1.2em;
}
.lede strong { color: var(--text); font-weight: 500; }
.prose-long .lede { font-size: 1.28rem; color: var(--text); margin-bottom: 1.6em; }

.stamp { font-size: 0.8rem; color: var(--faint); letter-spacing: 0.04em; margin: 0; }

/* ---------- Hero -------------------------------------------------------- */

.hero {
  padding-block: clamp(56px, 9vw, 108px) clamp(40px, 6vw, 72px);
  display: grid; gap: clamp(40px, 6vw, 72px);
}
.hero-text { max-width: 46rem; }
.hero h1 { max-width: 17ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }

/* ---------- The migration figure ---------------------------------------- */
/*
 * Fifty-three real entries on one axis. `--lin` and `--log` are each dot's true
 * position under the two scales; the animation moves between them once, which
 * is the only unprompted motion on the site. `data-state` on the figure decides
 * which position is live, so with no JS the log state renders and stays.
 */

.migration { margin: 0; max-width: 68rem; }
.migration-track {
  position: relative; height: 108px;
  border: 1px solid var(--rule); border-radius: 14px;
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  padding: 0 18px;
}
.migration-rail {
  position: absolute; left: 18px; right: 18px; top: 44px; height: 2px;
  background: linear-gradient(90deg, #6FCF6B, #F2D243, #F79020, #D92B2B, #7E0F3C, #FFE3E8);
  opacity: 0.35; border-radius: 2px;
}
.migration-dots { position: absolute; left: 18px; right: 18px; top: 45px; height: 0; }

.dot {
  position: absolute; top: 0; left: var(--log);
  width: 9px; height: 9px; margin: -4px 0 0 -4.5px;
  border-radius: 50%; background: var(--c);
  box-shadow: 0 0 8px color-mix(in srgb, var(--c) 55%, transparent);
  transition: left 1600ms var(--ease);
}
.dot-named { width: 13px; height: 13px; margin: -6px 0 0 -6.5px; border: 2px solid var(--ink); }
[data-state='linear'] .dot { left: var(--lin); }

.dot-tip {
  position: absolute; bottom: 150%; left: 50%; transform: translateX(-50%);
  background: var(--raise); border: 1px solid var(--rule); border-radius: 8px;
  padding: 5px 9px; font-size: 0.72rem; white-space: nowrap; color: var(--text);
  opacity: 0; pointer-events: none; transition: opacity 120ms; z-index: 5;
  font-variant-numeric: tabular-nums;
}
.dot:hover .dot-tip, .dot:focus-within .dot-tip { opacity: 1; }

.migration-ticks { position: absolute; left: 18px; right: 18px; top: 62px; height: 0; }
.tick {
  position: absolute; left: var(--log); transform: translateX(-50%);
  font-size: 0.64rem; letter-spacing: 0.08em; color: var(--faint);
  font-variant-numeric: tabular-nums; transition: left 1600ms var(--ease), opacity 400ms;
}
.tick::before {
  content: ''; position: absolute; left: 50%; top: -9px; width: 1px; height: 6px;
  background: var(--rule);
}
[data-state='linear'] .tick { left: var(--lin); opacity: 0.35; }

.migration figcaption {
  margin-top: 18px; color: var(--dim); font-family: var(--serif);
  font-size: 1rem; line-height: 1.6; max-width: 46rem; min-height: 3.2em;
}
.migration-replay {
  margin-top: 10px; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--faint); font-family: var(--sans); font-size: 0.82rem;
  text-decoration: underline; text-underline-offset: 3px;
}
.migration-replay:hover { color: var(--ember); }

@media (prefers-reduced-motion: reduce) {
  .dot, .tick { transition: none; }
}

/* ---------- Steps ------------------------------------------------------- */
/*
 * Numbered because this genuinely is a sequence — you cannot pick a goal before
 * you have calibrated. Nothing else on the site is numbered.
 */

.steps {
  list-style: none; counter-reset: step; margin: 40px 0 0; padding: 0;
  display: grid; gap: 1px; background: var(--rule-soft);
  border: 1px solid var(--rule-soft); border-radius: 16px; overflow: hidden;
}
@media (min-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.steps li {
  counter-increment: step; background: var(--ink); padding: 28px clamp(20px, 3vw, 34px) 30px;
}
.band-contrast .steps li { background: var(--ink-2); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--ember); margin-bottom: 14px; font-variant-numeric: tabular-nums;
}
.steps p { margin: 0; color: var(--dim); font-size: 0.97rem; }

/* ---------- Tables ------------------------------------------------------ */

.table-scroll { overflow-x: auto; margin-top: 32px; -webkit-overflow-scrolling: touch; }

table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 0.94rem; }
caption {
  text-align: left; color: var(--faint); font-size: 0.85rem;
  padding-bottom: 14px; caption-side: top;
}
thead th {
  text-align: left; font-weight: 500; font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint);
  padding: 0 14px 10px 0; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
thead th button {
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
}
thead th button:hover { color: var(--ember); }
thead th[aria-sort] button::after {
  content: '↓'; margin-left: 5px; color: var(--ember);
}
thead th[aria-sort='descending'] button::after { content: '↑'; }

tbody th, tbody td {
  padding: 11px 14px 11px 0; border-bottom: 1px solid var(--rule-soft);
  vertical-align: baseline; text-align: left;
}
tbody th {
  font-weight: 500; position: relative; padding-left: 16px;
}
/* The row's heat colour, as a real 3px band — the only thing that marks it. */
tbody th::before {
  content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  background: var(--c); border-radius: 2px;
}
tbody th a { text-decoration: none; }
tbody th a:hover { text-decoration: underline; text-decoration-color: var(--c); }
tbody tr:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }

.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.range, .origin { color: var(--dim); }
.origin { font-size: 0.88rem; }

.ladder-table .rung-no {
  display: inline-block; min-width: 1.6em; color: var(--c);
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.ladder-table .milestone { color: var(--text); }
.ladder-table .anchors { color: var(--dim); font-size: 0.88rem; }

/* ---------- Filters ----------------------------------------------------- */

.filters {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  justify-content: space-between;
}
.filters fieldset { border: 0; margin: 0; padding: 0; display: flex; gap: 8px; }
.filters button {
  background: var(--surface); border: 1px solid var(--rule); color: var(--dim);
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font: 500 0.86rem var(--sans);
}
.filters button[aria-pressed='true'] {
  background: var(--ember); border-color: var(--ember); color: #180B02; font-weight: 700;
}
.search input {
  background: var(--surface); border: 1px solid var(--rule); color: var(--text);
  padding: 9px 15px; border-radius: 999px; font: 400 0.9rem var(--sans);
  min-width: 15rem;
}
.search input::placeholder { color: var(--faint); }
.empty { color: var(--dim); padding: 24px 0; }

/* ---------- Item page --------------------------------------------------- */

/*
 * The rule at the top is the entry's own heat colour, so a page announces what
 * it is about before the name is read. It spans the content width rather than
 * the text measure — a 3px line stopping two thirds across looks like a bug.
 */
.item-head {
  max-width: none;
  border-top: 3px solid var(--c);
  padding-top: clamp(30px, 4vw, 44px);
  padding-bottom: 0;
}
.item-head > * { max-width: 46rem; }
.band-tight { padding-block: clamp(28px, 4vw, 44px) clamp(44px, 7vw, 80px); }
.item-kind { color: var(--faint); font-size: 0.86rem; margin: 0 0 12px; }
.item-head h1 { margin-bottom: 0.24em; }
.item-figure { margin: 0 0 24px; display: flex; align-items: baseline; gap: 10px; }
.item-figure strong {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 700; color: var(--c);
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1;
}
.item-figure span { color: var(--faint); font-size: 0.86rem; letter-spacing: 0.04em; }

.meter { margin: 0; max-width: 54rem; }
.meter-track {
  position: relative; height: 26px; border-radius: 6px; overflow: hidden;
  background: var(--surface);
}
.meter-band {
  position: absolute; top: 0; bottom: 0; left: var(--from); width: calc(var(--to) - var(--from));
  background: var(--c); opacity: 0.22;
}
.meter-range {
  position: absolute; top: 0; bottom: 0; left: var(--from); width: calc(var(--to) - var(--from));
  background: rgba(255,255,255,0.1); border-inline: 1px solid rgba(255,255,255,0.28);
}
.meter-pin {
  position: absolute; top: -3px; bottom: -3px; left: var(--pos); width: 3px;
  margin-left: -1.5px; background: var(--c); border-radius: 2px;
  box-shadow: 0 0 12px var(--c);
}
.meter-scale { position: relative; height: 20px; margin-top: 6px; }
.meter-scale span {
  position: absolute; left: var(--pos); transform: translateX(-50%);
  font-size: 0.66rem; color: var(--faint); font-variant-numeric: tabular-nums;
}
.meter figcaption { margin-top: 18px; color: var(--dim); font-size: 0.93rem; }

.milestone-line { color: var(--dim); }
.milestone-line strong { color: var(--ember); font-weight: 500; }

.peers { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.peers li {
  border: 1px solid var(--rule); border-left: 3px solid var(--c); border-radius: 8px;
  padding: 9px 14px; display: flex; gap: 12px; align-items: baseline;
}
.peers a { text-decoration: none; font-weight: 500; }
.peers a:hover { text-decoration: underline; }
.peers span { color: var(--faint); font-size: 0.82rem; font-variant-numeric: tabular-nums; }

.neighbours {
  display: grid; gap: 1px; background: var(--rule-soft);
  border-block: 1px solid var(--rule-soft); margin-top: 8px;
  padding-inline: 0;
}
@media (min-width: 760px) { .neighbours { grid-template-columns: 1fr 1fr; } }
.neighbour {
  background: var(--ink); padding: 26px var(--gutter); text-decoration: none;
  display: grid; gap: 4px; border-top: 2px solid var(--c);
  transition: background var(--dur) var(--ease);
}
.neighbour:hover { background: var(--surface); }
.neighbour-dir { color: var(--faint); font-size: 0.78rem; letter-spacing: 0.07em; }
.neighbour-name { font-size: 1.2rem; font-weight: 500; }
.neighbour-shu { color: var(--dim); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

/* ---------- Notes, FAQ, guides ------------------------------------------ */

.notes {
  display: grid; gap: 24px; margin-top: 36px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  max-width: 76rem;
}
.note { border-top: 1px solid var(--rule); padding-top: 18px; }
.note h3 { color: var(--text); }
.note p { margin: 0; color: var(--dim); font-family: var(--serif); font-size: 1rem; line-height: 1.62; }

.faq { max-width: 46rem; margin-top: 24px; border-top: 1px solid var(--rule-soft); }
.faq-item { border-bottom: 1px solid var(--rule-soft); }
.faq-item summary {
  cursor: pointer; padding: 18px 0; font-weight: 500; font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; gap: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--ember); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p {
  margin: 0 0 22px; color: var(--dim); font-family: var(--serif);
  font-size: 1.04rem; line-height: 1.68; max-width: 40rem;
}

.guide-list { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.guide-list li { border-top: 1px solid var(--rule); padding: 26px 0; }
.guide-list h2 { margin-bottom: 0.35em; max-width: none; }
.guide-list h2 a { text-decoration: none; }
.guide-list h2 a:hover { color: var(--ember); }
.guide-list p { margin: 0; color: var(--dim); font-family: var(--serif); }

.guide .page-head { padding-bottom: 0; }
.guide h1 { max-width: 22ch; }

.timeline { list-style: none; margin: 2em 0; padding: 0; }
.timeline li {
  border-left: 2px solid var(--rule); padding: 0 0 1.6em 22px; position: relative;
  margin-bottom: 0;
}
.timeline li::before {
  content: ''; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--ember);
}
.t-year {
  display: block; font-family: var(--sans); font-size: 0.76rem; letter-spacing: 0.1em;
  color: var(--faint); font-variant-numeric: tabular-nums;
}
.t-name { font-family: var(--sans); font-weight: 700; font-size: 1.1rem; }
.t-shu {
  font-family: var(--sans); color: var(--ember); font-size: 0.86rem; margin-left: 10px;
  font-variant-numeric: tabular-nums;
}
.timeline p { margin: 0.4em 0 0; font-size: 1.02rem; }

.more-guides { padding-block: clamp(40px, 6vw, 64px); border-top: 1px solid var(--rule-soft); }
.more-guides h2 { font-size: 1rem; color: var(--faint); font-weight: 500; letter-spacing: 0.04em; }
.more-guides ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 46rem; }
.more-guides a { font-size: 1.05rem; text-decoration: none; }
.more-guides a:hover { color: var(--ember); }

/* ---------- Breadcrumbs ------------------------------------------------- */

.crumbs { padding: 18px var(--gutter) 0; }
body.has-rail .crumbs { padding-left: var(--gutter); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; }
.crumbs li { color: var(--faint); }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--rule); }
.crumbs a { color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: var(--ember); }

/* ---------- Call to action ---------------------------------------------- */

.cta {
  padding-block: clamp(56px, 9vw, 96px);
  border-top: 1px solid var(--rule-soft);
  background:
    radial-gradient(120% 130% at 12% 0%, rgba(244,128,43,0.10), transparent 62%),
    var(--ink-2);
}
.cta h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); max-width: 20ch; }
.cta > p { color: var(--dim); max-width: 40rem; font-family: var(--serif); font-size: 1.08rem; }
.cta-flag {
  color: var(--ember); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.06em;
  margin: 0 0 14px; display: flex; align-items: center; gap: 9px;
}
.cta-flag::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ember);
  box-shadow: 0 0 0 4px rgba(244,128,43,0.2);
}

.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

/* ---------- Footer ------------------------------------------------------ */

.colophon {
  padding: clamp(44px, 6vw, 68px) var(--gutter) 40px;
  border-top: 1px solid var(--rule-soft); background: var(--ink);
}
.colophon-grid {
  display: grid; gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  max-width: 76rem;
}
.colophon-grid > div:first-child { grid-column: 1 / -1; max-width: 28rem; }
@media (min-width: 900px) { .colophon-grid > div:first-child { grid-column: auto; } }
.foot-mark { font-weight: 700; margin: 0 0 10px; }
.colophon p { color: var(--dim); font-size: 0.9rem; margin: 0; }
.colophon h2 { font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin-bottom: 12px; }
.colophon ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.colophon li a { color: var(--dim); text-decoration: none; font-size: 0.9rem; }
.colophon li a:hover { color: var(--text); }
.fine {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--rule-soft);
  color: var(--faint) !important; font-size: 0.8rem !important; max-width: 52rem;
}


/* ---------- Hero additions ---------------------------------------------- */

.hero-kicker {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 20px; padding: 6px 14px 6px 11px;
  border: 1px solid var(--ember-dim); border-radius: 999px;
  color: var(--ember); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.02em;
}
.hero-kicker::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ember);
  box-shadow: 0 0 0 4px rgba(244, 128, 43, 0.2);
}
.hero h1 { max-width: 15ch; }
.hero-fine { margin: 18px 0 0; color: var(--faint); font-size: 0.86rem; }

.section-head { max-width: 44rem; margin-bottom: 4px; }
.section-sub {
  margin: 10px 0 0; color: var(--dim); font-family: var(--serif); font-size: 1.06rem;
  max-width: 34rem;
}

/* ---------- The rung finder ---------------------------------------------- */
/*
 * The one interactive thing on the site. It is a band rather than a card because
 * it is the page's second most important moment after the headline, and a card
 * would read as an aside.
 */

.finder {
  padding: clamp(44px, 7vw, 76px) var(--gutter);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(244, 128, 43, 0.09), transparent 60%),
    var(--ink-2);
  border-block: 1px solid var(--rule-soft);
}
.finder-ask { max-width: 42rem; }
.finder-ask h2 { max-width: 20ch; }
.finder-ask p { color: var(--dim); font-family: var(--serif); font-size: 1.06rem; margin: 0; }

.picks {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px; max-width: 68rem;
}
.pick {
  display: flex; align-items: baseline; gap: 10px;
  background: var(--surface); border: 1px solid var(--rule);
  border-left: 3px solid var(--c);
  color: var(--text); font: 500 0.95rem var(--sans);
  padding: 12px 18px; border-radius: 10px; cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.pick:hover { background: var(--raise); border-color: var(--c); }
.pick[aria-pressed='true'] {
  background: var(--raise); border-color: var(--c);
  box-shadow: 0 0 0 1px var(--c);
}
.pick-shu {
  color: var(--faint); font-size: 0.78rem; font-variant-numeric: tabular-nums;
}
/* Without JavaScript the buttons do nothing, so the links carry the value. */
.pick-fallback { display: block; font-size: 0.9rem; }
[data-finder] .pick { display: none; }
[data-finder].ready .pick { display: flex; }
[data-finder].ready .pick-fallback { display: none; }

.finder-result {
  margin-top: 32px; max-width: 46rem;
  border-top: 2px solid var(--c, var(--ember)); padding-top: 24px;
}
.result-eyebrow { margin: 0 0 6px; color: var(--faint); font-size: 0.84rem; }
.result-rung {
  margin: 0 0 6px; font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 700;
  letter-spacing: -0.02em; color: var(--c, var(--ember));
}
.result-can {
  margin: 0 0 22px; font-family: var(--serif); font-size: 1.1rem; color: var(--dim);
}
.result-can strong { color: var(--text); font-weight: 500; }
.result-next {
  margin: 0; padding: 18px 20px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--rule);
  font-family: var(--serif); font-size: 1.1rem; line-height: 1.5;
}
.result-next span { display: block; font-family: var(--sans); font-size: 0.8rem;
  color: var(--faint); margin-bottom: 6px; }
.result-next strong { color: var(--text); font-weight: 500; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }

/* ---------- Milestone ladder --------------------------------------------- */
/*
 * Numbered because it genuinely is a sequence — you cannot reach rung nine
 * without passing rung eight. The milestone is the headline and the Scoville
 * range is the footnote, which is the right order: nobody has ever wanted
 * twenty thousand Scoville units.
 */

.milestones {
  list-style: none; margin: 36px 0 0; padding: 0; max-width: 58rem;
  border-top: 1px solid var(--rule-soft);
}
.milestones li {
  display: flex; gap: clamp(14px, 3vw, 28px); align-items: baseline;
  padding: 18px 4px; border-bottom: 1px solid var(--rule-soft);
  position: relative;
}
.milestones li::before {
  content: ''; position: absolute; left: -4px; top: 20px; bottom: 20px; width: 3px;
  background: var(--c); border-radius: 2px;
}
.rung-mark {
  flex: 0 0 auto; width: 2.2em; color: var(--c);
  font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.rung-body { flex: 1 1 auto; }
.rung-milestone {
  margin: 0; font-size: clamp(1.02rem, 2vw, 1.22rem); font-weight: 500;
  letter-spacing: -0.012em; color: var(--text);
}
.rung-meta { margin: 4px 0 0; color: var(--faint); font-size: 0.84rem; }

/* ---------- Item page unlock line ---------------------------------------- */

.item-unlock {
  margin: 20px 0 0; padding-left: 15px; border-left: 2px solid var(--c);
}
.item-unlock span {
  display: block; font-size: 0.8rem; color: var(--faint); margin-bottom: 4px;
}
.item-unlock strong {
  font-family: var(--serif); font-size: 1.14rem; font-weight: 500; color: var(--text);
}
.result-goal { margin-top: 12px; }

/* ---------- CTA ----------------------------------------------------------- */

.cta-inner { max-width: 44rem; }
.cta h2 { max-width: 22ch; }
.cta-fine { margin: 18px 0 0; color: var(--faint); font-size: 0.84rem; }
