/* Smarter Prompting — application styles */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 620; line-height: 1.14; text-wrap: balance; margin: 0; letter-spacing: -.018em; }
h1 { font-size: var(--t-3xl); letter-spacing: -.03em; }
h2 { font-size: var(--t-2xl); letter-spacing: -.024em; }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); letter-spacing: -.01em; }
p  { margin: 0; }
a  { color: var(--accent); text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
a:hover { color: var(--accent-hot); text-decoration-color: currentColor; }
code, kbd, samp, pre { font-family: var(--font-mono); font-size: .875em; }
:focus-visible { outline: 2px solid var(--accent-hot); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
img, svg { max-width: 100%; }

.skip {
  position: absolute; left: -9999px; top: var(--s2);
  background: var(--accent); color: var(--on-accent);
  padding: var(--s2) var(--s4); border-radius: var(--r-md);
  font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600; z-index: 200;
}
.skip:focus { left: var(--s4); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────────── Shell ───────────── */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }

.rail {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column; gap: var(--s5);
  padding: var(--s5) var(--s4);
  background: var(--surface); border-right: 1px solid var(--border);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { flex: 0 0 auto; width: 34px; height: 34px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-md); letter-spacing: -.028em; line-height: 1.05; }
.brand-sub { font-family: var(--font-ui); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-group { font-family: var(--font-ui); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); padding: var(--s4) var(--s3) var(--s2); }
.nav a {
  display: flex; align-items: center; gap: var(--s3);
  font-family: var(--font-ui); font-size: var(--t-base); font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
  padding: var(--s2) var(--s3); border-radius: var(--r-md);
  border-left: 2px solid transparent;
}
.nav a:hover { background: var(--surface-sunk); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--border); }

/* ───────────── Controls ───────────── */
.seg { display: inline-flex; background: var(--surface-sunk); border: 1px solid var(--border); border-radius: var(--r-md); padding: 2px; gap: 2px; }
.seg button {
  font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 600; letter-spacing: .02em;
  color: var(--ink-muted); background: none; border: 0; cursor: pointer;
  padding: var(--s1) var(--s3); border-radius: 3px; line-height: 1.7;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-label { font-family: var(--font-ui); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: var(--s1); }

.btn {
  font-family: var(--font-ui); font-size: var(--t-base); font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  padding: .55rem 1rem; border-radius: var(--r-md); cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface-raised); color: var(--ink);
  text-decoration: none; line-height: 1.4; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { background: var(--surface-sunk); color: var(--ink); border-color: var(--ink-faint); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hot); border-color: var(--accent-hot); color: var(--on-accent); }
.btn-ghost { border-color: transparent; background: none; }
.btn-ghost:hover { background: var(--surface-sunk); border-color: transparent; }
.btn-sm { font-size: var(--t-sm); padding: .3rem .625rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

input[type="text"], input[type="search"], textarea, select {
  font-family: var(--font-ui); font-size: var(--t-base); color: var(--ink);
  background: var(--surface-raised); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); padding: .5rem .625rem; width: 100%; line-height: 1.55;
}
textarea { font-family: var(--font-body); font-size: var(--t-md); resize: vertical; min-height: 4.5rem; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
select { cursor: pointer; }
label { font-family: var(--font-ui); }

/* ───────────── Page frame ───────────── */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s3) var(--s6);
  background: var(--ground);
  border-bottom: 1px solid var(--border);
}
.crumb { font-family: var(--font-ui); font-size: var(--t-sm); color: var(--ink-muted); display: flex; gap: var(--s2); align-items: center; min-width: 0; }
.crumb a { color: var(--ink-muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: var(--s3); }
.menu-btn { display: none; }

.page { padding: var(--s7) var(--s6) var(--s9); }
.wrap { max-width: 1080px; margin: 0 auto; }
.read { max-width: var(--measure); }
.stack-2 > * + * { margin-top: var(--s2); }
.stack-3 > * + * { margin-top: var(--s3); }
.stack-4 > * + * { margin-top: var(--s4); }
.stack-5 > * + * { margin-top: var(--s5); }
.stack-6 > * + * { margin-top: var(--s6); }
.stack-7 > * + * { margin-top: var(--s7); }

.eyebrow { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.lede { font-size: var(--t-lg); line-height: 1.5; color: var(--ink-soft); max-width: var(--measure); }
.muted { color: var(--ink-muted); }
.small { font-size: var(--t-sm); }
.ui { font-family: var(--font-ui); }

.sec-head { display: flex; align-items: baseline; gap: var(--s4); flex-wrap: wrap; padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.sec-head h2 { flex: 1 1 auto; }

/* ───────────── Prose ───────────── */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--s4); }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s5); }
.prose ul, .prose ol { padding-left: 1.25rem; margin-block: 0; display: flex; flex-direction: column; gap: var(--s2); }
.prose li::marker { color: var(--ink-faint); }
.prose strong { font-weight: 650; color: var(--ink); }

/* ───────────── Badges ───────────── */
.pill {
  display: inline-flex; align-items: center; gap: var(--s1);
  font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 650; letter-spacing: .02em;
  padding: .15rem .5rem; border-radius: 100px; border: 1px solid var(--border-strong); color: var(--ink-muted);
  white-space: nowrap;
}
.pill-official { background: var(--second-soft); border-color: var(--second-line); color: var(--second); }
.pill-community { background: var(--surface-sunk); }
.pill-academic { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.pill-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.pill-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.pill-crit { background: var(--crit-soft); border-color: transparent; color: var(--crit); }
.pill-row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

.verified { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* ───────────── Cards ───────────── */
.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  display: flex; flex-direction: column; gap: var(--s3);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s5); text-decoration: none; color: inherit;
}
a.card { transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease; }
a.card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); transform: translateY(-1px); color: inherit; }
.card h3 { font-size: var(--t-md); }
.card p { font-size: var(--t-base); color: var(--ink-muted); line-height: 1.55; }
.card-foot { margin-top: auto; padding-top: var(--s2); display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }

/* Acronym chips — the recurring structural device */
.chips { display: flex; gap: 3px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-mono); font-weight: 500; font-size: var(--t-sm);
  width: 1.7em; height: 1.7em; display: grid; place-items: center;
  background: var(--surface-sunk); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--ink-soft);
}
a.card:hover .chip { border-color: var(--accent-line); color: var(--accent); }
.chip-lg { font-size: var(--t-lg); width: 1.55em; height: 1.55em; }

/* ───────────── Letter spine (framework detail) ───────────── */
.spine-row { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: var(--s5); align-items: start; }
.spine-mark {
  font-family: var(--font-display); font-size: var(--t-3xl); font-weight: 700; line-height: .9;
  color: var(--accent); letter-spacing: -.04em;
  border-top: 2px solid var(--accent); padding-top: var(--s3);
  position: sticky; top: 5rem;
}
.spine-row + .spine-row { margin-top: var(--s6); }
.spine-body h3 { margin-bottom: var(--s2); }
.spine-body .ask { font-family: var(--font-ui); font-size: var(--t-base); color: var(--second); font-weight: 550; }

/* ───────────── Callouts & sources ───────────── */
.note {
  border: 1px solid var(--border); border-left: 3px solid var(--ink-faint);
  background: var(--surface); border-radius: var(--r-md);
  padding: var(--s4) var(--s5); font-size: var(--t-base);
}
.note > * + * { margin-top: var(--s3); }
.note-title { font-family: var(--font-ui); font-weight: 700; font-size: var(--t-sm); letter-spacing: .06em; text-transform: uppercase; }
.note-good { border-left-color: var(--ok); } .note-good .note-title { color: var(--ok); }
.note-warn { border-left-color: var(--warn); } .note-warn .note-title { color: var(--warn); }
.note-crit { border-left-color: var(--crit); } .note-crit .note-title { color: var(--crit); }
.note-info { border-left-color: var(--second); } .note-info .note-title { color: var(--second); }

.sources { background: var(--surface-sunk); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s4) var(--s5); }
.sources h4 { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--s3); }
.sources ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.sources li { display: flex; gap: var(--s3); font-size: var(--t-base); line-height: 1.45; }
.src-n { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-faint); padding-top: .2rem; font-variant-numeric: tabular-nums; }
.src-pub { display: block; font-family: var(--font-ui); font-size: var(--t-xs); color: var(--ink-muted); }
.ext::after { content: " \2197"; font-size: .85em; color: var(--ink-faint); }

/* ───────────── Tables ───────────── */
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-family: var(--font-ui); font-size: var(--t-base); }
th, td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { font-size: var(--t-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); background: var(--surface-sunk); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-sunk); }
td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ───────────── Builder ───────────── */
.build { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.pane-form { min-width: 0; display: flex; flex-direction: column; gap: var(--s5); }
.pane-out { position: sticky; top: 4.75rem; min-width: 0; display: flex; flex-direction: column; gap: var(--s4); }

.fieldset { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); }
.fs-head { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }

.field { display: flex; flex-direction: column; gap: var(--s2); }
.field-head { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.field-letter { font-family: var(--font-mono); font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r-sm); width: 1.6em; height: 1.6em; display: grid; place-items: center; font-size: var(--t-sm); flex: 0 0 auto; }
.field-name { font-family: var(--font-ui); font-weight: 650; font-size: var(--t-base); }
.field-req { font-family: var(--font-ui); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.field-help { font-family: var(--font-ui); font-size: var(--t-sm); color: var(--ink-muted); line-height: 1.5; }
.field-eg { font-family: var(--font-ui); font-size: var(--t-sm); color: var(--ink-faint); }
.field-eg button { font: inherit; color: var(--second); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--second-line); text-underline-offset: 2px; }
.field-eg button:hover { color: var(--second-hot); }

.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s4); }
.opt { display: flex; flex-direction: column; gap: var(--s2); }
.opt > span { font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600; color: var(--ink-soft); }
.check { display: flex; gap: var(--s3); align-items: flex-start; font-family: var(--font-ui); font-size: var(--t-base); cursor: pointer; }
.check input { width: auto; margin-top: .3rem; accent-color: var(--accent); }

/* Output */
.out {
  background: var(--surface-sunk); border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.out-head {
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); background: var(--surface);
}
.out-title { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.out-tools { margin-left: auto; display: flex; gap: var(--s2); }
.out-body {
  margin: 0; padding: var(--s4) var(--s5); max-height: 52vh; overflow: auto;
  font-family: var(--font-mono); font-size: var(--t-sm); line-height: 1.68;
  white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-soft); tab-size: 2;
}
.out-body .tg { color: var(--second); }
.out-body .hd { color: var(--accent); font-weight: 600; }
.out-foot { display: flex; gap: var(--s4); padding: var(--s2) var(--s4); border-top: 1px solid var(--border); background: var(--surface); font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-faint); font-variant-numeric: tabular-nums; flex-wrap: wrap; }

/* Quality meter */
.meter { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.meter-top { display: flex; align-items: baseline; gap: var(--s2); }
.meter-score { font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.meter-of { font-family: var(--font-mono); font-size: var(--t-sm); color: var(--ink-faint); }
.meter-label { margin-left: auto; font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600; }
.meter-bar { height: 6px; border-radius: 100px; background: var(--surface-sunk); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 100px; background: var(--second); transition: width .25s ease; }
.meter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); font-family: var(--font-ui); font-size: var(--t-sm); }
.meter-list li { display: flex; gap: var(--s3); align-items: flex-start; line-height: 1.45; }
.meter-list .mk { font-family: var(--font-mono); flex: 0 0 auto; width: 1em; }
.meter-list .pass .mk { color: var(--ok); }
.meter-list .fail { color: var(--ink-muted); }
.meter-list .fail .mk { color: var(--ink-faint); }

/* ───────────── Steps ───────────── */
.steps { display: flex; gap: var(--s3); flex-wrap: wrap; font-family: var(--font-ui); font-size: var(--t-sm); align-items: center; }
.step { display: flex; align-items: center; gap: var(--s2); color: var(--ink-faint); }
.step-n { font-family: var(--font-mono); font-size: var(--t-xs); width: 1.5em; height: 1.5em; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 100px; }
.step.done { color: var(--ink-muted); } .step.done .step-n { border-color: var(--ok); color: var(--ok); }
.step.now { color: var(--ink); font-weight: 650; } .step.now .step-n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ───────────── Pickers ───────────── */
.picks { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.pick {
  text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2);
}
.pick:hover { border-color: var(--accent-line); }
.pick[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.pick-name { font-family: var(--font-ui); font-weight: 650; font-size: var(--t-base); }
.pick-desc { font-family: var(--font-ui); font-size: var(--t-sm); color: var(--ink-muted); line-height: 1.45; }

/* ───────────── Accordion ───────────── */
details.acc { border-bottom: 1px solid var(--border); }
details.acc summary {
  cursor: pointer; list-style: none; padding: var(--s4) 0;
  font-family: var(--font-ui); font-weight: 600; font-size: var(--t-md);
  display: flex; gap: var(--s4); align-items: baseline;
}
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; margin-left: auto; font-family: var(--font-mono); color: var(--ink-faint); font-size: var(--t-lg); line-height: 1; }
details.acc[open] summary::after { content: "\2212"; color: var(--accent); }
details.acc summary:hover { color: var(--accent); }
details.acc .acc-body { padding: 0 0 var(--s5); max-width: var(--measure); }
details.acc .acc-body > * + * { margin-top: var(--s3); }

/* ───────────── Hero ───────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s7); align-items: center; padding-block: var(--s5) var(--s7); }
.hero h1 { font-size: var(--t-4xl); }
.hero-accent { color: var(--accent); }
.dial { width: 100%; height: auto; }

.doors { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.door { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); text-decoration: none; color: inherit; }
.door:hover { border-color: var(--accent); color: inherit; }
.door h3 { font-size: var(--t-lg); }
.door p { font-size: var(--t-base); color: var(--ink-muted); }
.door-go { font-family: var(--font-ui); font-size: var(--t-base); font-weight: 650; color: var(--accent); margin-top: auto; }

/* ───────────── Footer ───────────── */
.foot { border-top: 1px solid var(--border); background: var(--surface); padding: var(--s6); margin-top: auto; }
.foot-in { max-width: 1080px; margin: 0 auto; display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.foot h4 { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--s3); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.foot a { font-family: var(--font-ui); font-size: var(--t-base); color: var(--ink-muted); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot-legal { max-width: 1080px; margin: var(--s6) auto 0; padding-top: var(--s4); border-top: 1px solid var(--border); font-family: var(--font-ui); font-size: var(--t-sm); color: var(--ink-faint); line-height: 1.6; }
.foot-legal > * + * { margin-top: var(--s2); }

.toast {
  position: fixed; left: 50%; bottom: var(--s5); transform: translateX(-50%);
  background: var(--ink); color: var(--ground); font-family: var(--font-ui); font-size: var(--t-base); font-weight: 600;
  padding: var(--s3) var(--s5); border-radius: 100px; box-shadow: var(--shadow-lg); z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ───────────── Responsive ───────────── */
@media (max-width: 1080px) { .build { grid-template-columns: minmax(0, 1fr); } .pane-out { position: static; } }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); } .hero-art { display: none; } }
@media (max-width: 840px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100vh; z-index: 100;
    transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg);
  }
  .rail.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90; border: 0; }
  .page { padding: var(--s5) var(--s4) var(--s8); }
  .topbar { padding: var(--s3) var(--s4); }
  h1 { font-size: var(--t-2xl); } .hero h1 { font-size: var(--t-3xl); }
  .spine-row { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .spine-mark { position: static; font-size: var(--t-2xl); display: inline-block; }
  .foot { padding: var(--s5) var(--s4); }
}

@media print {
  .rail, .topbar, .foot, .out-tools, .btn, .scrim { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .card, .note, .sources, .out { break-inside: avoid; }
}
