/* Ébauche. Palette from the bench: mat green, drafting paper, ink, blued steel, brass, ruby.
   Type: DIN-style lettering (as on engineering drawings) for structure, a reading serif for prose. */
:root {
  --mat: #e6ece2; --paper: #fbfcf8; --ink: #1b2530; --ink2: #4b5764; --rule: #c3ccc0; --rule2: #dde3d9;
  --blued: #23408e; --blued-d: #182d66; --blued-l: #e4e9f6;
  --brass: #a07a25; --brass-l: #ead9a8; --brass-m: #d6ba6c;
  --steel: #71808c; --steel-l: #c3ccd4; --ruby: #a8243f; --ruby-l: #f6e1e6;
  --ok: #1d6b52; --ok-l: #dff0e8; --warn: #855600; --warn-l: #f7ecd2;
  --din: Bahnschrift, "DIN Alternate", "DIN Next", "Barlow Semi Condensed", "Segoe UI", system-ui, sans-serif;
  --serif: "Sitka Text", "Iowan Old Style", Charter, "Bitstream Charter", Georgia, serif;
  --math: "Cambria Math", "STIX Two Math", "Latin Modern Math", Cambria, Georgia, serif;
  --measure: 44rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--mat); color: var(--ink); font: 1.0625rem/1.62 var(--serif); }
h1, h2, h3, h4, .din, button, input, select, textarea, label, th, summary, .top, .rail, figcaption, .tb, table { font-family: var(--din); }
h1 { font-size: 2.35rem; line-height: 1.1; font-weight: 600; letter-spacing: -0.01em; margin: 0; font-stretch: 92%; }
h2 { font-size: 1.42rem; line-height: 1.2; font-weight: 600; margin: 2.6rem 0 0.6rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 1.6rem 0 0.3rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.3rem; }
a { color: var(--blued); text-underline-offset: 0.15em; }
a:hover { color: var(--blued-d); }
:focus-visible { outline: 3px solid var(--blued); outline-offset: 2px; border-radius: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 50; }
.skip:focus { left: 0; }
dfn { font-style: italic; }
code { font-family: var(--din); font-size: 0.95em; background: var(--rule2); padding: 0 0.25em; border-radius: 2px; }

/* ---------- frame */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.2rem; padding: 0.55rem 1.4rem; background: var(--ink); color: #eef1ec; }
.brand { display: flex; align-items: baseline; gap: 0.6rem; color: inherit; text-decoration: none; white-space: nowrap; }
.brand-name { font-size: 1.45rem; font-weight: 600; letter-spacing: 0.01em; }
.brand-sub { font-size: 0.9rem; color: #aeb9c2; }
.search { flex: 1; max-width: 24rem; }
.search input { width: 100%; padding: 0.4rem 0.7rem; border: 1px solid #55626e; border-radius: 3px; background: #26323e; color: #fff; font-size: 0.95rem; }
.search input::placeholder { color: #9aa6b1; }
.top-nav { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; font-size: 0.97rem; }
.top-nav a { color: #dfe5ea; text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.top-nav a:hover, .top-nav a[aria-current] { border-bottom-color: var(--brass-m); color: #fff; }
.top-nav .resume { background: var(--brass-m); color: var(--ink); padding: 0.35rem 0.8rem; border-radius: 3px; font-weight: 600; border: 0; }
.top-nav .resume:hover { background: var(--brass-l); color: var(--ink); }
.count[hidden] { display: none; }
.count { display: inline-block; margin-left: 0.35rem; min-width: 1.3em; padding: 0 0.3em; border-radius: 1em; background: var(--ruby); color: #fff; font-size: 0.78rem; text-align: center; }
.frame { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); align-items: start; }
.rail { position: sticky; top: 3.1rem; max-height: calc(100vh - 3.1rem); overflow: auto; padding: 1rem 0.6rem 3rem 1rem; font-size: 0.93rem; border-right: 1px solid var(--rule); }
.rail details { margin-bottom: 0.15rem; }
.rail summary { cursor: pointer; padding: 0.3rem 0.4rem; border-radius: 3px; font-weight: 600; display: flex; gap: 0.5rem; align-items: baseline; list-style: none; }
.rail summary::-webkit-details-marker { display: none; }
.rail summary:hover { background: var(--rule2); }
.rail .sn { color: var(--ink2); font-weight: 400; min-width: 1.4em; font-variant-numeric: tabular-nums; }
.rail .lock { margin-left: auto; font-weight: 400; font-size: 0.78rem; color: var(--ink2); }
.rail ol { list-style: none; margin: 0.1rem 0 0.5rem; padding: 0 0 0 1.5rem; }
.rail li { margin: 0; }
.rail li a { display: flex; gap: 0.45rem; align-items: baseline; padding: 0.2rem 0.4rem; border-radius: 3px; color: var(--ink); text-decoration: none; line-height: 1.3; }
.rail li a:hover { background: var(--rule2); }
.rail li a[aria-current] { background: var(--ink); color: #fff; }
.dot { flex: none; width: 0.62rem; height: 0.62rem; border-radius: 50%; border: 1.5px solid var(--steel); transform: translateY(0.02rem); }
.dot.done { background: var(--brass); border-color: var(--brass); }
.dot.open { border-color: var(--blued); background: var(--blued-l); }
.dot.locked { border-style: dashed; }
main { padding: 2rem 2.5rem 6rem; min-width: 0; outline: none; }
.page { max-width: 62rem; margin: 0 auto; }
.col { max-width: var(--measure); }
.paper { background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; padding: 2.2rem 2.6rem 2.6rem; }

/* ---------- title block (drawing-sheet style: every cell is information) */
.tb { display: grid; grid-template-columns: 1fr auto auto auto; border: 1.5px solid var(--ink); margin-bottom: 1.8rem; background: var(--paper); }
.tb > div { padding: 0.45rem 0.8rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-size: 0.9rem; }
.tb > div:nth-child(4n) { border-right: 0; }
.tb .tb-title { grid-column: 1 / -1; border-right: 0; padding: 1rem 0.9rem 1.1rem; }
.tb .tb-obj { grid-column: 1 / -1; border-right: 0; border-bottom: 0; font-size: 1rem; padding: 0.7rem 0.9rem; }
.tb small { display: block; color: var(--ink2); font-size: 0.74rem; }
.tb .state-done { color: var(--ok); font-weight: 600; } .tb .state-preview { color: var(--ruby); font-weight: 600; }
.banner { border-left: 5px solid var(--ruby); background: var(--ruby-l); padding: 0.8rem 1rem; margin-bottom: 1.5rem; font-family: var(--din); }
.banner.info { border-color: var(--blued); background: var(--blued-l); }
.banner.warn { border-color: var(--warn); background: var(--warn-l); }
.question { font-size: 1.28rem; line-height: 1.4; font-style: italic; border-left: 3px solid var(--brass); padding-left: 1rem; margin: 0 0 1.6rem; }
.lesson .paper > * { max-width: var(--measure); }
.lesson .paper > .wide, .lesson .paper > .next { max-width: none; }
.lesson h2 { border-top: 1px solid var(--rule); padding-top: 1.4rem; }
.lesson h2:first-of-type { border-top: 0; padding-top: 0; }

/* ---------- maths */
.eq { font-family: var(--math); font-size: 1.22rem; margin: 1rem 0 1.2rem 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35em; }
.eq i, .m i { font-style: italic; }
.m { font-family: var(--math); white-space: nowrap; }
.frac { display: inline-flex; flex-direction: column; text-align: center; vertical-align: middle; margin: 0 0.12em; line-height: 1.25; }
.frac > span:first-child { border-bottom: 1px solid currentColor; padding: 0 0.25em; }
.frac > span:last-child { padding: 0 0.25em; }
.sqrt { display: inline-flex; align-items: stretch; }
.sqrt > span { border-top: 1px solid currentColor; padding: 0.05em 0.2em 0; margin-left: 0.05em; }
.eq .note { font-family: var(--din); font-size: 0.85rem; color: var(--ink2); margin-left: 1rem; }

/* ---------- figures and diagrams */
figure { margin: 1.5rem 0; }
figure svg { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--rule); border-radius: 3px; }
figcaption { font-size: 0.88rem; color: var(--ink2); margin-top: 0.45rem; line-height: 1.4; }
svg text { font-family: var(--din); fill: var(--ink); }
svg .brass { fill: #e2cc8c; stroke: #7d611a; } svg .steel { fill: #c9d2d9; stroke: #4b5764; } svg .ruby { fill: #c9486a; stroke: #7d1830; }
svg .plate { fill: #e9ece7; stroke: #71808c; } svg .spring { fill: none; stroke: #23408e; } svg .blued { fill: #23408e; stroke: #182d66; }
svg .lead { stroke: #1b2530; stroke-width: 0.8; fill: none; } svg .dim { stroke: #71808c; stroke-width: 0.8; fill: none; stroke-dasharray: 4 3; }
svg .flow { stroke: #a8243f; stroke-width: 2.2; fill: none; } svg .hot { cursor: pointer; }
svg .hot:hover > *, svg .hot:focus > *, svg .hot.sel > * { stroke: #a8243f; stroke-width: 2.4; } svg .hot:focus { outline: none; }
svg [data-live], svg [data-live] > g > circle:first-child { stroke: #a8243f; stroke-width: 3; }
svg .ghost { opacity: 0.28; } svg .bad { stroke: #a8243f !important; stroke-width: 2.2 !important; }
svg .lbl { font-size: 13px; } svg .lbl-s { font-size: 11px; fill: #4b5764; } svg .lbl-b { font-size: 14px; font-weight: 600; }

/* ---------- controls */
button, .btn { font-size: 0.97rem; padding: 0.42rem 0.95rem; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 3px; cursor: pointer; text-decoration: none; display: inline-block; line-height: 1.3; }
button:hover:not(:disabled), .btn:hover { background: var(--rule2); color: var(--ink); }
button.primary, .btn.primary { background: var(--blued); border-color: var(--blued); color: #fff; }
button.primary:hover:not(:disabled), .btn.primary:hover { background: var(--blued-d); color: #fff; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.quiet { border-color: transparent; background: none; color: var(--blued); padding-left: 0.3rem; padding-right: 0.3rem; text-decoration: underline; }
button[aria-pressed="true"] { background: var(--ink); color: #fff; }
input[type="text"], input[type="number"], input[type="search"], select, textarea { font-size: 0.97rem; padding: 0.36rem 0.5rem; border: 1px solid var(--steel); border-radius: 3px; background: #fff; color: var(--ink); }
textarea { width: 100%; min-height: 5.5rem; line-height: 1.45; font-family: var(--serif); font-size: 1rem; }
input[type="range"] { accent-color: var(--blued); width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.ctl { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr 6.2rem; gap: 0.7rem; align-items: center; margin-bottom: 0.45rem; font-family: var(--din); font-size: 0.95rem; }
.ctl input[type="number"] { width: 100%; }
.ctl .unit { color: var(--ink2); font-size: 0.85rem; margin-left: 0.2rem; }
.ctl2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 0.5rem 1rem; margin-bottom: 0.8rem; font-family: var(--din); font-size: 0.93rem; }
.ctl2 label { display: flex; flex-direction: column; gap: 0.15rem; }
.ctl2 input, .ctl2 select { width: 100%; }

/* ---------- experiment / widgets */
.widget { border: 1.5px solid var(--ink); background: #fff; border-radius: 3px; padding: 1rem 1.1rem 1.1rem; margin: 1rem 0 1.4rem; font-family: var(--din); }
.widget[inert] { opacity: 0.45; }
.widget svg { width: 100%; height: auto; display: block; }
.widget .stage3d { width: 100%; aspect-ratio: 16 / 9; background: #f2f4f0; border: 1px solid var(--rule); border-radius: 3px; position: relative; }
.widget .stage3d canvas { width: 100% !important; height: 100% !important; display: block; }
.readout { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0; border: 1px solid var(--rule); margin: 0.8rem 0; }
.readout > div { padding: 0.45rem 0.7rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 0 -1px -1px 0; }
.readout small { display: block; color: var(--ink2); font-size: 0.78rem; line-height: 1.2; }
.readout b { font-size: 1.12rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.findings { list-style: none; padding: 0; margin: 0.6rem 0 0; font-size: 0.95rem; }
.findings li { padding: 0.35rem 0.6rem 0.35rem 2rem; position: relative; border-top: 1px solid var(--rule2); line-height: 1.4; margin: 0; }
.findings li::before { position: absolute; left: 0.5rem; font-weight: 700; }
.findings .ok::before { content: "✓"; color: var(--ok); } .findings .fail::before { content: "✕"; color: var(--ruby); }
.findings .caution::before { content: "!"; color: var(--warn); } .findings .info::before { content: "i"; color: var(--blued); }
.findings .fail { background: var(--ruby-l); } .findings .caution { background: var(--warn-l); }
.method { margin-top: 0.8rem; font-size: 0.9rem; border-top: 1px solid var(--rule); padding-top: 0.5rem; }
.method summary { cursor: pointer; color: var(--blued); }
.method dl { display: grid; grid-template-columns: 9rem 1fr; gap: 0.25rem 0.8rem; margin: 0.6rem 0 0; }
.method dt { color: var(--ink2); } .method dd { margin: 0; font-family: var(--serif); line-height: 1.45; }
.predict { background: var(--blued-l); border-left: 5px solid var(--blued); padding: 0.8rem 1rem; margin: 1rem 0; font-family: var(--din); }
.steps { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.6rem 0; }
.steps button { padding: 0.3rem 0.6rem; font-size: 0.88rem; }
.phase { font-size: 1.05rem; font-weight: 600; margin: 0.4rem 0 0.1rem; } .phase-text { font-family: var(--serif); font-size: 1rem; margin: 0 0 0.6rem; max-width: var(--measure); }

/* ---------- questions */
.item { border: 1px solid var(--rule); border-left: 4px solid var(--steel); background: #fff; padding: 0.9rem 1.1rem 1rem; margin: 0.9rem 0; border-radius: 0 3px 3px 0; }
.item.right { border-left-color: var(--ok); } .item.wrong { border-left-color: var(--ruby); }
.item fieldset { border: 0; margin: 0; padding: 0; }
.item legend, .item .q { font-family: var(--serif); font-size: 1.05rem; padding: 0; margin-bottom: 0.6rem; line-height: 1.5; }
.item label.opt { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.32rem 0.5rem; border-radius: 3px; font-family: var(--serif); font-size: 1rem; cursor: pointer; }
.item label.opt:hover { background: var(--mat); }
.item .numrow { display: flex; gap: 0.5rem; align-items: center; font-family: var(--din); }
.item .numrow input { width: 9rem; }
.fb { margin-top: 0.7rem; padding: 0.6rem 0.8rem; font-family: var(--serif); font-size: 0.98rem; line-height: 1.5; border-radius: 3px; }
.fb.ok { background: var(--ok-l); } .fb.bad { background: var(--ruby-l); } .fb.hint { background: var(--warn-l); }
.fb b { font-family: var(--din); }
.item .acts { margin-top: 0.7rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.tag { font-family: var(--din); font-size: 0.78rem; color: var(--ink2); border: 1px solid var(--rule); border-radius: 2px; padding: 0 0.35rem; margin-left: 0.4rem; white-space: nowrap; }
.order { list-style: none; padding: 0; margin: 0; counter-reset: o; }
.order li { counter-increment: o; display: flex; gap: 0.5rem; align-items: center; padding: 0.3rem 0.4rem; border: 1px solid var(--rule); margin-bottom: 0.25rem; border-radius: 3px; font-family: var(--serif); background: var(--paper); }
.order li::before { content: counter(o); font-family: var(--din); color: var(--ink2); min-width: 1.2rem; }
.order li span { flex: 1; } .order button { padding: 0.1rem 0.5rem; }
.rubric { width: 100%; border-collapse: collapse; margin: 0.6rem 0; font-size: 0.93rem; }
.rubric th, .rubric td { border: 1px solid var(--rule); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
.rubric td:first-child { font-family: var(--serif); font-size: 0.98rem; }

/* ---------- lesson furniture */
details.deeper { border: 1px solid var(--rule); border-radius: 3px; margin: 0.5rem 0; background: #fff; }
details.deeper > summary { cursor: pointer; padding: 0.6rem 0.9rem; font-weight: 600; }
details.deeper > summary small { font-weight: 400; color: var(--ink2); margin-left: 0.5rem; }
details.deeper > div { padding: 0.2rem 1.1rem 0.8rem; }
.worked { background: #fff; border: 1px solid var(--rule); border-top: 3px solid var(--brass); padding: 1rem 1.3rem 0.6rem; margin: 0.8rem 0 1rem; }
.worked .assume { font-family: var(--din); font-size: 0.9rem; color: var(--ink2); }
.nbk { background: #fff; border: 1.5px solid var(--brass); padding: 1rem 1.3rem 1.2rem; margin: 0.8rem 0; border-radius: 3px; }
.nbk .fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.6rem 1rem; margin: 0.8rem 0; font-family: var(--din); font-size: 0.92rem; }
.nbk .fgrid label { display: flex; flex-direction: column; gap: 0.15rem; }
.nbk .fgrid label.wide { grid-column: 1 / -1; }
.nbk .fgrid input, .nbk .fgrid select { width: 100%; }
.badge { font-family: var(--din); font-size: 0.74rem; padding: 0.02rem 0.4rem; border-radius: 2px; border: 1px solid var(--rule); color: var(--ink2); white-space: nowrap; }
.badge.ex { border-style: dashed; } .badge.rec { border-color: var(--brass); color: #6d5210; background: #f8f1dc; } .badge.stale { border-color: var(--ruby); color: var(--ruby); background: var(--ruby-l); }
.todo { list-style: none; padding: 0; margin: 0.6rem 0 1rem; font-family: var(--din); }
.todo li { padding: 0.25rem 0 0.25rem 1.7rem; position: relative; }
.todo li::before { content: ""; position: absolute; left: 0.15rem; top: 0.55rem; width: 0.75rem; height: 0.75rem; border: 1.5px solid var(--steel); border-radius: 50%; }
.todo li.done::before { background: var(--brass); border-color: var(--brass); }
.next { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1.5px solid var(--ink); flex-wrap: wrap; }
.srcs { font-size: 0.93rem; padding-left: 1.2rem; } .srcs li { margin-bottom: 0.45rem; line-height: 1.45; }
.term { all: unset; cursor: help; border-bottom: 1.5px dotted var(--brass); }
.term:focus-visible { outline: 3px solid var(--blued); outline-offset: 2px; }
.term-pop { position: absolute; z-index: 30; max-width: 24rem; background: var(--ink); color: #f1f4ef; padding: 0.75rem 0.95rem; border-radius: 3px; font-size: 0.95rem; line-height: 1.45; box-shadow: 0 6px 18px rgba(27, 37, 48, 0.3); }
.term-pop b { font-family: var(--din); display: block; margin-bottom: 0.2rem; color: var(--brass-l); }
.term-pop a { color: #c6d3ff; font-family: var(--din); font-size: 0.85rem; }
.toast { position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 0.6rem 1.1rem; border-radius: 3px; font-family: var(--din); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 40; max-width: 80vw; }
.toast.on { opacity: 1; }

/* ---------- home */
.hero { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 2rem; align-items: center; margin-bottom: 1.5rem; }
.hero p.lede { font-size: 1.15rem; margin: 1rem 0 1.3rem; }
.map { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 3px; }
.map a { text-decoration: none; } .map a:focus-visible { outline: none; } .map a:focus-visible .ring { stroke: var(--ruby); stroke-width: 3; }
.map .gear { fill: #f3f5f0; stroke: var(--steel); stroke-width: 1.2; } .map .open .gear { fill: #fff; stroke: var(--blued); stroke-width: 1.6; }
.map .done .gear { fill: var(--brass-l); stroke: #7d611a; } .map .locked .gear { stroke-dasharray: 3 3; }
.map .arc { fill: none; stroke: var(--brass); stroke-width: 5; } .map .link { stroke: var(--steel); stroke-width: 1.4; fill: none; } .map .link.live { stroke: var(--brass); stroke-width: 2.4; }
.map text { text-anchor: middle; } .map .num { font-size: 17px; font-weight: 600; } .map .cap { font-size: 12.5px; } .map .locked text { fill: var(--ink2); }
.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); border-left: 1px solid var(--rule); margin-top: 1rem; }
.stages > a { display: block; padding: 0.9rem 1.1rem 1rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper); color: var(--ink); text-decoration: none; }
.stages > a:hover { background: #fff; }
.stages h3 { margin: 0 0 0.25rem; font-size: 1.05rem; } .stages p { margin: 0; font-size: 0.95rem; color: var(--ink2); line-height: 1.45; }
.stages .meta { font-family: var(--din); font-size: 0.82rem; color: var(--ink2); margin-top: 0.45rem; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 1.5rem 0; }
.how h3 { margin-top: 0; }
.bar { height: 0.5rem; background: var(--rule2); border-radius: 1rem; overflow: hidden; margin: 0.4rem 0 0.2rem; }
.bar > i { display: block; height: 100%; background: var(--brass); }

/* ---------- notebook, tables, report */
table.data { border-collapse: collapse; width: 100%; font-size: 0.93rem; margin: 0.6rem 0 1.2rem; }
table.data th, table.data td { border-bottom: 1px solid var(--rule); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
table.data th { font-weight: 600; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
table.data td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.long { font-family: var(--serif); white-space: pre-wrap; font-size: 0.98rem; }
.stalebox { border: 1.5px solid var(--ruby); background: var(--ruby-l); padding: 0.8rem 1rem; margin: 0.6rem 0; border-radius: 3px; font-family: var(--din); font-size: 0.95rem; }
.stalebox p { margin: 0.2rem 0 0.5rem; font-family: var(--serif); }
.tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; margin: 1rem 0; }
.report { background: #fff; padding: 2.5rem 3rem; border: 1px solid var(--rule); max-width: 54rem; }
.report h2 { border-bottom: 1.5px solid var(--ink); padding-bottom: 0.2rem; }
.kv { display: grid; grid-template-columns: 15rem 1fr; gap: 0.2rem 1rem; font-size: 0.97rem; margin: 0.4rem 0 1rem; }
.kv dt { font-family: var(--din); color: var(--ink2); } .kv dd { margin: 0; white-space: pre-wrap; }
.gl dt { font-family: var(--din); font-weight: 600; font-size: 1.05rem; margin-top: 1rem; } .gl dd { margin: 0.1rem 0 0; }
.gl dd small { font-family: var(--din); color: var(--ink2); }

@media (max-width: 1180px) {
  .frame { grid-template-columns: 14.5rem minmax(0, 1fr); } main { padding: 1.5rem 1.5rem 5rem; } .paper { padding: 1.6rem 1.6rem 2rem; }
  .brand-sub { display: none; } .hero { grid-template-columns: 1fr; } .how { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .frame { grid-template-columns: 1fr; } .rail { position: static; max-height: 14rem; border-right: 0; border-bottom: 1px solid var(--rule); }
  .top { flex-wrap: wrap; row-gap: 0.4rem; } .search { order: 3; flex: 1 1 100%; max-width: none; } .top-nav { margin-left: auto; gap: 0.8rem; } .ctl { grid-template-columns: 1fr 5.5rem; } .ctl > span:first-child { grid-column: 1 / -1; }
  .tb { grid-template-columns: 1fr 1fr; } .tb > div:nth-child(2n) { border-right: 0; } .kv { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .toast { transition: none; } }
@media print {
  .top, .rail, .toast, .noprint { display: none !important; } body { background: #fff; font-size: 11pt; } .frame { display: block; }
  main { padding: 0; } .report { border: 0; padding: 0; max-width: none; } h2 { break-after: avoid; } table, .kv { break-inside: avoid; }
}
