[hidden] { display: none !important; }
/* Anime Card Collection Calculator - "Nebula Foil" (dark).
   Colours: only the 13 hex tokens + 3 rgba below (precomputed hex, no colour mixing functions). Other transparency = opacity.

   PUBLIC CLASSES FOR TOOL AUTHORS (tool.html / tool.css can use these directly)
   -------------------------------------------------------------------------------
   .panel                  dark card: --bg-2 + 1px --line + pink L-marks on the 4 corners (uses ::before; ::after is free)
   .label                  small uppercase caption above a number or control ("CASH / SEC")
   .big / .big-pink / .big-gold
                           big Chakra Petch number, tabular-nums. time = .big-pink, Cash = .big-gold, multipliers = .big
   .tier-base .tier-gold .tier-emerald .tier-void .tier-diamond .tier-rainbow
                           pack-tier chip (span or button). Every .tier-* also sets --tc = that tier colour,
                           so your own CSS can do  border-color: var(--tc).  .tier-rainbow = spinning foil border.
   .grade-f .grade-e .grade-d .grade-c .grade-b .grade-a .grade-s .grade-s-plus .grade-ss .grade-sr .grade-ur
                           grade badge (small rounded square). F-C muted, B diamond, A emerald, S/S+ gold,
                           SS/SR void, UR = gold plate with foil edge (like the game icon).
   .seg > button           segmented control. Selected = [aria-pressed="true"] or .is-on. Buttons are >= 44px.
                           Put .tier-* on a seg button to colour it by tier (rainbow keeps its foil edge).
   .chip                   small pill (span) or toggle (button, >= 44px). Selected = [aria-pressed="true"] / .is-on.
   .badge + .badge-emerald / -diamond / -gold / -pink / -void / -danger / -muted
                           status pill, solid colour + dark text ("READY NOW", "LIVE", "LONG GRIND").
   .btn / .btn-ghost       main pink button / outline button, >= 44px.
   .foil                   background: spinning rainbow foil (for rings, card faces). Spins only on elements with
                           .foil / .foil-border / .tier-rainbow / .grade-ur (they re-declare --foil); stops on reduced motion.
   .foil-border            2px spinning rainbow edge. Inner fill = --foil-fill (default --bg-2).
   .scroll-x > table.data  data table in its own horizontal scroller; td.num / th.num right-aligned numbers.
   .callout                note box with gold left rule.   ol.steps  numbered steps.
   inputs                  input[type=number|text|search], select, textarea are dark; input[type=range] is pink.
   Grids that hold tables or long content: use minmax(0, 1fr) columns or give children min-width: 0.
*/
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
:root {
  --bg: #130a1d;
  --bg-2: #1c1029;
  --bg-3: #27173a;
  --line: #3d2a55;
  --text: #f7f0fb;
  --muted: #b9a8cc;
  --pink: #ff4fa3;
  --pink-dk: #c2267a;
  --gold: #f5c518;
  --emerald: #2ee59d;
  --diamond: #38bdf8;
  --void: #a855f7;
  --danger: #ff3b5c;
  --glow-pink: rgba(255, 79, 163, .35);
  --glow-gold: rgba(245, 197, 24, .35);
  --shade: rgba(0, 0, 0, .5);
  --radius: 14px;
  --head: "Chakra Petch", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  color-scheme: dark;
}
/* the one memorable effect: rainbow foil, re-declared where it should spin */
:root, .foil, .foil-border, .tier-rainbow, .grade-ur {
  --foil: conic-gradient(from var(--angle), #ff4fa3, #f5c518, #2ee59d, #38bdf8, #a855f7, #ff4fa3);
}
.foil, .foil-border, .tier-rainbow, .grade-ur { animation: foil-spin 12s linear infinite; }
@keyframes foil-spin { to { --angle: 360deg; } }
.foil { background: var(--foil); }
.foil-border { border: 2px solid transparent; background: linear-gradient(var(--foil-fill, var(--bg-2)), var(--foil-fill, var(--bg-2))) padding-box, var(--foil) border-box; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 16px/1.6 var(--body);
  background: radial-gradient(ellipse at 0 0, var(--bg-3), var(--bg) 60%) fixed, var(--bg);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .25;
  background-image: radial-gradient(circle, var(--text) 1px, transparent 1.5px), radial-gradient(circle, var(--text) 1px, transparent 1.5px);
  background-size: 160px 160px, 230px 230px;
  background-position: 24px 40px, 110px 150px;
}
img { max-width: 100%; height: auto; }
a { color: var(--pink); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 48px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
p { margin: 0 0 16px; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; color: var(--text); font: 700 18px/1.2 var(--head); }
.brand:hover { color: var(--text); }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand em { font-style: normal; color: var(--gold); }
.nav { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.nav a:hover { border-color: var(--pink); color: var(--pink); }

/* footer */
.foot { margin-top: 64px; background: var(--bg-2); border-top: 1px solid var(--line); }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 48px 24px 32px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 32px; }
.foot-cols nav { display: flex; flex-direction: column; gap: 4px; }
.foot-cols p { margin: 0 0 8px; font: 700 14px/1.2 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--pink); }
.foot-cols a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 4px 0; }
.foot-cols a:hover { color: var(--text); text-decoration: underline; }
.foot-note, .foot-copy { font-size: 14px; color: var(--muted); max-width: 70ch; }

/* page frame */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); padding-top: 24px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--pink); }
.hero { padding: 32px 0 24px; max-width: 820px; }
.hero h1 { margin-bottom: 12px; }
.hero-home { text-align: center; margin: 0 auto; }
.hero-home h1 { color: var(--gold); }
.hero-home .lede { margin-left: auto; margin-right: auto; }
.lede { font-size: 18px; color: var(--muted); max-width: 70ch; }
.eyebrow { font: 700 12px/1.4 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--pink); margin: 0 0 8px; }
.checked { font-size: 14px; color: var(--muted); margin: 0; }
.checked::before { content: "\2713  "; color: var(--emerald); font-weight: 700; }

/* panel: the base surface (pink L-marks on four corners) */
.panel, .stage { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.panel { padding: 24px; }
.panel::before, .stage::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none; border-radius: var(--radius);
  background:
    linear-gradient(var(--pink), var(--pink)) left top / 16px 2px no-repeat,
    linear-gradient(var(--pink), var(--pink)) left top / 2px 16px no-repeat,
    linear-gradient(var(--pink), var(--pink)) right top / 16px 2px no-repeat,
    linear-gradient(var(--pink), var(--pink)) right top / 2px 16px no-repeat,
    linear-gradient(var(--pink), var(--pink)) left bottom / 16px 2px no-repeat,
    linear-gradient(var(--pink), var(--pink)) left bottom / 2px 16px no-repeat,
    linear-gradient(var(--pink), var(--pink)) right bottom / 16px 2px no-repeat,
    linear-gradient(var(--pink), var(--pink)) right bottom / 2px 16px no-repeat;
}

/* tool stage */
.stage { margin-bottom: 48px; box-shadow: 0 0 48px -16px var(--glow-pink); }
.stage-bar { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); font: 700 14px/1.2 var(--head); letter-spacing: .16em; text-transform: uppercase; }
.stage-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--pink); box-shadow: 0 0 12px var(--glow-pink); }
.stage-live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--emerald); font-size: 12px; }
.stage-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.stage-body { padding: 24px; }
.stage-body > * { min-width: 0; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 16px 24px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: 600 14px var(--body); cursor: pointer; }
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pill:hover { border-color: var(--pink); }
.pill[aria-pressed="true"] { border-color: var(--pink); color: var(--pink); }
.pill[aria-pressed="true"] svg { fill: currentColor; }
.pill-msg { font-size: 14px; color: var(--emerald); }

/* home: six calculator slots */
.binder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 64px; }
.slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 12px; text-align: center; text-decoration: none; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .15s, border-color .15s; }
.slot::after { content: ""; position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-top: 2px solid var(--gold); border-right: 2px solid var(--gold); }
.slot:hover { transform: translateY(-2px); border-color: var(--pink); color: var(--text); }
.slot h2 { font-size: 18px; margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.slot span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.slot .slot-tag { --tc: var(--diamond); padding: 2px 12px; border: 1px solid var(--tc); border-radius: 999px; background: var(--bg); color: var(--tc); font: 700 12px/1.6 var(--head); letter-spacing: .1em; text-transform: uppercase; }
.slot:nth-child(2) .slot-tag { --tc: var(--emerald); }
.slot:nth-child(3) .slot-tag { --tc: var(--void); }
.slot:nth-child(4) .slot-tag { --tc: var(--diamond); }
.slot:nth-child(5) .slot-tag { --tc: var(--pink); }
.slot:nth-child(6) .slot-tag { --tc: var(--gold); }

/* long-form text */
.prose { max-width: 70ch; margin-bottom: 48px; }
.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 32px; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose .wide { max-width: 1072px; }
.callout { border-left: 4px solid var(--gold); background: var(--bg-2); padding: 16px 24px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 24px; }
.callout > :last-child { margin-bottom: 0; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-left: 48px; margin-bottom: 16px; min-height: 32px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--pink); color: var(--bg); font: 700 14px/32px var(--head); text-align: center; }

/* tables */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font: 700 12px/1.4 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg-3); padding: 12px; white-space: nowrap; }
table.data td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tbody tr:hover td { background: var(--bg-3); }

/* small caption + big numbers */
.label { display: block; font: 700 12px/1.4 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.big { font: 700 36px/1.1 var(--head); font-variant-numeric: tabular-nums; color: var(--text); }
.big-pink { color: var(--pink); }
.big-gold { color: var(--gold); }

/* pack-tier chips (--tc = tier colour) */
.tier-base { --tc: var(--muted); }
.tier-gold { --tc: var(--gold); }
.tier-emerald { --tc: var(--emerald); }
.tier-void { --tc: var(--void); }
.tier-diamond { --tc: var(--diamond); }
.tier-rainbow { --tc: var(--text); }
.tier-base, .tier-gold, .tier-emerald, .tier-void, .tier-diamond, .tier-rainbow {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 2px 12px;
  border: 1px solid var(--tc); border-radius: 999px; background: var(--bg); color: var(--tc);
  font: 700 12px/1.6 var(--head); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.tier-rainbow { border-color: transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--foil) border-box; }

/* grade badges (game-style rounded squares) */
.grade-f, .grade-e, .grade-d, .grade-c, .grade-b, .grade-a, .grade-s, .grade-s-plus, .grade-ss, .grade-sr, .grade-ur {
  --tc: var(--muted); display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 28px; padding: 0 6px;
  border: 2px solid var(--tc); border-radius: 6px; background: var(--bg); color: var(--tc); font: 700 14px/1 var(--head); white-space: nowrap;
}
.grade-b { --tc: var(--diamond); }
.grade-a { --tc: var(--emerald); }
.grade-s, .grade-s-plus { --tc: var(--gold); }
.grade-ss, .grade-sr { --tc: var(--void); }
.grade-ur { --tc: var(--gold); border-color: transparent; background: linear-gradient(var(--gold), var(--gold)) padding-box, var(--foil) border-box; background-color: var(--gold); color: var(--bg); box-shadow: 0 0 12px var(--glow-gold); }

/* segmented control */
.seg { display: inline-flex; width: fit-content; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-3); border-radius: 12px; max-width: 100%; }
.seg > button { min-height: 44px; padding: 8px 16px; border: 1px solid transparent; border-radius: 10px; background: var(--bg); color: var(--tc, var(--muted)); font: 700 14px/1.2 var(--head); letter-spacing: .04em; text-transform: none; cursor: pointer; }
.seg > button:hover { color: var(--tc, var(--text)); border-color: var(--line); }
.seg > button[aria-pressed="true"], .seg > button.is-on { border-color: var(--tc, var(--pink)); color: var(--tc, var(--pink)); box-shadow: 0 0 12px var(--glow-pink); }
.seg > button.tier-rainbow { border-color: transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--foil) border-box; color: var(--text); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: 600 14px/1.4 var(--body); white-space: nowrap; }
button.chip { min-height: 44px; padding: 8px 16px; cursor: pointer; }
button.chip:hover { border-color: var(--pink); }
.chip[aria-pressed="true"], .chip.is-on { border-color: var(--pink); color: var(--pink); box-shadow: 0 0 12px var(--glow-pink); }

/* status badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 12px; border-radius: 999px; background: var(--muted); color: var(--bg); font: 700 12px/1.6 var(--head); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.badge-emerald { background: var(--emerald); }
.badge-diamond { background: var(--diamond); }
.badge-gold { background: var(--gold); }
.badge-pink { background: var(--pink); }
.badge-void { background: var(--void); }
.badge-danger { background: var(--danger); }
.badge-muted { background: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 24px; border: 1px solid var(--pink); border-radius: 12px; background: var(--pink); color: var(--bg); font: 700 16px var(--head); letter-spacing: .04em; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--pink-dk); border-color: var(--pink-dk); color: var(--text); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: transparent; border-color: var(--pink); color: var(--pink); }
.link-b { display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; padding: 0; color: var(--pink); font: 600 14px var(--body); cursor: pointer; }

/* form controls */
input:not([type]), input[type="number"], input[type="text"], input[type="search"], select, textarea {
  min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: 600 16px var(--body); max-width: 100%;
}
input[type="number"] { font-variant-numeric: tabular-nums; }
input:focus, select:focus, textarea:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 3px var(--glow-pink); }
select option { background: var(--bg-2); color: var(--text); }
input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--pink); }

/* related tiles */
.related { margin-bottom: 48px; }
.related-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.tile:hover { border-color: var(--pink); color: var(--text); }
.tile b { font-family: var(--head); }
.tile span { font-size: 14px; color: var(--muted); }

/* FAQ */
.faq { max-width: 760px; margin-bottom: 48px; }
.qa { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
.qa[open] { border-color: var(--pink-dk); }
.qa summary { cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 12px 16px; font-weight: 600; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; margin-left: auto; color: var(--pink); font: 700 22px/1 var(--head); }
.qa[open] summary::after { content: "\2013"; }
.qa p { padding: 0 16px 16px; margin: 0; color: var(--muted); }

/* card template (kept for card pages) */
.card-page { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 48px; align-items: start; padding: 24px 0 48px; }
.tcg { --tc: var(--muted); margin: 0; padding: 16px; background: var(--bg-2); border: 4px solid var(--tc); border-radius: 16px; }
.tcg.r-rare { --tc: var(--diamond); }
.tcg.r-epic { --tc: var(--void); }
.tcg.r-legendary { --tc: var(--gold); }
.tcg.r-mythical { --tc: var(--pink); }
.tcg.r-secret { --tc: var(--emerald); }
.tcg-top { display: flex; justify-content: space-between; gap: 8px; font: 700 12px var(--head); letter-spacing: .08em; text-transform: uppercase; }
.tcg-rarity { color: var(--tc); }
.tcg-pack { color: var(--muted); }
.tcg-art { aspect-ratio: 4 / 3; margin: 12px 0; border-radius: 8px; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, var(--void), var(--bg-2) 70%); border: 1px solid var(--line); }
.tcg-art span { font: 700 48px/1 var(--head); color: var(--text); }
.tcg-name { font-size: 28px; margin: 0; }
.tcg-sub { color: var(--muted); margin: 0 0 12px; }
.tcg-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.tcg-stats div { background: var(--bg); border-radius: 8px; padding: 8px 12px; }
.tcg-stats dt { font-size: 12px; color: var(--muted); }
.tcg-stats dd { margin: 0; font: 700 16px var(--head); font-variant-numeric: tabular-nums; }
.tcg-verdict { margin: 0; text-align: center; padding: 8px; border-radius: 8px; border: 1px solid var(--line); font: 700 14px var(--head); letter-spacing: .08em; }
.card-page > * { min-width: 0; }

/* comments */
.talk { max-width: 760px; margin-bottom: 48px; }
.c-form { display: grid; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.c-form label { font-size: 14px; font-weight: 600; color: var(--muted); }
.c-form textarea { min-height: 96px; font-weight: 400; }
.c-form .btn { justify-self: start; }
.c-reply-line { display: none; margin: 0; font-size: 14px; }
.c-form[data-gf-replying] .c-reply-line { display: block; }
.c-msg { font-size: 14px; color: var(--emerald); }
.c-item { border-top: 1px solid var(--line); padding: 16px 0; }
.c-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; margin: 0 0 4px; font-size: 14px; }
.c-head time { color: var(--muted); }
.c-owner { display: none; background: var(--gold); color: var(--bg); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; }
[data-gf-owner] > .c-head .c-owner { display: inline-block; }
.c-text { margin: 0 0 8px; white-space: pre-wrap; }
.c-replies { margin-left: 24px; }
[data-gf-comments][data-gf-empty]::before { content: "No notes yet. Be the first to share a pull or a timing."; color: var(--muted); }

/* 404 */
.lost { padding-bottom: 64px; }
.lost-links { display: flex; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 960px) {
  .binder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-page { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tcg { max-width: 360px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { margin-left: 0; }
}
@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }
  .wrap, .top-in, .foot-in { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 24px 0 16px; }
  .lede { font-size: 16px; }
  .big { font-size: 28px; }
  .stage-bar { padding: 12px 16px; font-size: 12px; letter-spacing: .1em; }
  .stage-body, .panel { padding: 16px; }
  .actions { padding: 12px 16px; }
  .binder { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .slot { padding: 16px 8px; }
  .slot h2 { font-size: 16px; }
  .nav a { padding: 0 12px; }
  .lost-links .btn { width: 100%; }
}

/* Next-decision link under every tool (3D rule 3) */
.tool-next { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; min-height: 44px; margin-top: 0; font: 700 14px var(--head); letter-spacing: .08em; text-transform: uppercase; text-align: center; text-decoration: none; }
.tool-next:hover { text-decoration: underline; }
