/* Maxplanations · Portal 1999. Phone first. System fonts only. */
:root {
  --ink: #000; --ink-2: #333; --ink-3: #666;
  --paper: #fff; --bg: #fff;
  --face: #c0c0c0; --face-2: #d4d0c8; --hi: #fff; --lo: #404040; --mid: #808080;
  --line: #999; --line-2: #000;
  --blue: #1c7fc4; --navy: #000080; --accent: #1c7fc4; --accent-soft: #e2f1fc;
  --link: #0000cc; --note: #ffffe1; --hl: #ffff99; --red: #c00000; --good: #007700; --bad: #c00000;
  --esc: #8a5a1c; --esc-soft: #f3e6d2;
  --wq: #1650b4;  --wq-soft: #dde8fb;
  --rr: #1e7b3a;  --rr-soft: #dcf1e2;
  --nni: #6a2fb0; --nni-soft: #ece1fa;
  --vv: #0b7285;  --vv-soft: #d9f0f4;
  --sans: Verdana, Tahoma, Geneva, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --black: "Arial Black", "Arial Bold", Arial, sans-serif;
  --ui: Tahoma, Verdana, sans-serif;
  --mono: "Courier New", Courier, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body { margin: 0; font: 16px/1.55 var(--sans); color: var(--ink);
  background: #3a6ea5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='%233a6ea5'/%3E%3Ccircle cx='20' cy='20' r='1.4' fill='%2386b4e0'/%3E%3C/svg%3E"); }
a { color: var(--link); }
img, svg { max-width: 100%; }

.page { max-width: 1060px; margin: 22px auto; background: var(--paper); border: 2px solid #000; box-shadow: 6px 6px 0 #1b3a5c; }
.mast { background: linear-gradient(#5fb4e8, #1c7fc4 55%, #0d5c9c); border-bottom: 3px solid #000; padding: 12px 16px; display: flex; align-items: center; gap: 14px; text-decoration: none; }
.blob { width: 54px; height: 54px; border-radius: 50%; flex: none; border: 2px solid #003355;
  background: radial-gradient(circle at 30% 28%, #fff 0 8%, #9fe3ff 9%, #1aa0d8 45%, #0a5f95 100%); }
.mast.banner { padding: 0; background: #05001a; display: block; }
.mast.banner img { display: block; width: 100%; height: auto; }
.chrome { font: 900 clamp(28px, 6.5vw, 44px)/1 var(--black); letter-spacing: -1px;
  background: linear-gradient(#fff 0%, #dfe8f0 45%, #7f97ad 50%, #e9f1f7 80%, #fff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(2px 2px 0 #003355); }

.b95, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 7px 14px; font: 14px var(--ui); color: #000; text-decoration: none; cursor: pointer;
  background: var(--face); border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); box-shadow: inset -1px -1px var(--mid), inset 1px 1px #dfdfdf; }
.b95:active, .btn:active, .b95.on, .btn[aria-pressed="true"] { border-color: var(--lo) var(--hi) var(--hi) var(--lo); box-shadow: inset 1px 1px var(--mid); background: var(--face-2); }
.btn.primary { font-weight: bold; }
.btn.small { min-height: 34px; padding: 5px 10px; font-size: 13px; }

.navbar { display: flex; gap: 4px; padding: 6px 8px; background: var(--face); border-bottom: 2px solid #000; overflow-x: auto; -webkit-overflow-scrolling: touch; align-items: center; }
.navbar .b95 { flex: none; }
.navbar .grow { flex: 1; }
.prog95 { flex: none; display: flex; align-items: center; gap: 6px; font: 13px var(--ui); }
.prog95 .well { width: 120px; height: 20px; padding: 2px; border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); background: #fff; }
.prog95 .well i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--navy) 0 8px, transparent 8px 10px); }
.menu-btn { display: none !important; }

.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
nav.side { background: #e8eef5; border-right: 2px solid #000; padding: 14px 12px 30px; font-size: 14px; }
nav.side h4 { margin: 14px 0 6px; font: bold 14px var(--sans); }
nav.side ol { margin: 0; padding-left: 22px; }
nav.side li { margin: 4px 0; }
nav.side li a.on { font-weight: bold; color: #000; text-decoration: none; }
nav.side li a.complete::after { content: " ✓"; color: var(--good); }
#sitesearch { width: 100%; font: 15px var(--sans); padding: 6px; }
#searchres { margin-top: 6px; background: #fff; border: 1px solid #000; max-height: 50vh; overflow-y: auto; }
#searchres a { display: block; padding: 10px 8px; overflow-wrap: anywhere; border-bottom: 1px solid #ccc; font-size: 13px; }
#searchres a span { display: block; color: var(--ink-3); font-size: 12px; }
#searchres a b, .findres a b { display: block; }
#searchres mark, .findres mark { background: var(--hl); color: #000; padding: 0 1px; }
/* find box in the page */
.find { margin: 12px 0 16px; position: relative; }
.find input { width: 100%; font: 16px var(--sans); padding: 8px; }
.findres { border: 2px solid #000; background: #fff; max-height: 60vh; overflow-y: auto; box-shadow: 3px 3px 0 #000; margin-top: 4px; }
.findres a { display: block; padding: 10px; border-bottom: 1px solid #ccc; color: #000; text-decoration: none; overflow-wrap: anywhere; }
.findres a:hover, .findres a:focus-visible { background: var(--navy); color: #fff; }
.findres a b { font-size: 14px; } .findres a span { display: block; font-size: 13px; color: var(--ink-2); }
.findres a:hover span { color: #ddd; }
main { padding: 18px 26px 30px; min-width: 0; }
.page-sec { display: none; }
.page-sec.on { display: block; }

h1 { font: bold clamp(26px, 6vw, 34px)/1.15 var(--serif); margin: 2px 0 14px; }
h2 { font: bold 22px/1.25 var(--serif); margin: 28px 0 10px; padding-bottom: 3px; border-bottom: 2px dotted #888; }
h3 { font: bold 17px/1.3 var(--sans); margin: 18px 0 6px; }
p { margin: 8px 0; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
small, .meta { font-size: 13px; color: var(--ink-3); }
table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 10px 0; }
th, td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
th { background: var(--face); font: bold 14px var(--ui); }
.tablewrap { overflow-x: auto; }

.box { border: 2px solid #000; background: #fff; padding: 12px 14px; margin: 14px 0; }
.box > :first-child { margin-top: 0; } .box > :last-child { margin-bottom: 0; }
.note { border: 1px solid #000; background: var(--note); padding: 10px 12px; margin: 14px 0; }
.note > :first-child { margin-top: 0; } .note > :last-child { margin-bottom: 0; }
.q { border: 3px double var(--red); background: #fff4f4; padding: 10px 12px; margin: 14px 0; }
.q b.l { color: var(--red); }
.two > *, .three > * { min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
figure { margin: 14px 0; }
.fig { border: 2px solid #000; background: #fffff0; padding: 10px; }
.fig svg { display: block; width: 100%; height: auto; }
figcaption { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
svg text { font-family: var(--sans); }
svg text:not([fill]) { fill: #000; }
svg .muted { fill: #444; }

.req { display: inline-block; font: bold 13px/1 var(--sans); padding: 4px 6px; border: 1px solid #000; text-decoration: none; white-space: nowrap; vertical-align: 1px; color: #fff; }
.req.esc { background: var(--esc); } .req.wq { background: var(--wq); } .req.rr { background: var(--rr); }
.req.nni { background: var(--nni); } .req.vv { background: var(--vv); }
.req.off { background: #fff; color: #999; border-color: #bbb; text-decoration: line-through; }
.result-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.result-chips .req { font-size: 15px; padding: 7px 9px; }
.reqcard { border: 2px solid #000; margin: 12px 0; }
.reqcard > .hd { color: #fff; font: bold 17px var(--sans); padding: 8px 12px; }
.reqcard.esc > .hd { background: var(--esc); } .reqcard.wq > .hd { background: var(--wq); } .reqcard.rr > .hd { background: var(--rr); }
.reqcard.nni > .hd { background: var(--nni); } .reqcard.vv > .hd { background: var(--vv); }
.reqcard table { margin: 0; }
.reqcard td:first-child { width: 120px; font-weight: bold; background: #f4f4f4; }

.cite { display: inline-block; font: bold 12px/1.4 var(--sans); background: var(--hl); color: #000; border: 1px solid #000; padding: 0 4px; margin-left: 3px; cursor: pointer; white-space: nowrap; vertical-align: 2px; }
.cite:hover, .cite:focus-visible { background: #000; color: var(--hl); outline: none; }
.claim.hl, body.showsrc .claim { background: var(--hl); }
.t { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }

.pop { position: absolute; z-index: 50; width: min(440px, calc(100vw - 20px)); background: var(--face); border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); box-shadow: 3px 3px 0 #000; font-size: 15px; }
.pop .tb { display: flex; align-items: center; gap: 8px; background: linear-gradient(90deg, var(--navy), #1084d0); color: #fff; font: bold 14px var(--ui); padding: 4px 4px 4px 8px; }
.pop .tb span { flex: 1; }
.pop .x { min-height: 0; width: 28px; height: 24px; padding: 0; font: bold 14px var(--ui); }
.pop .bd { background: #fff; margin: 4px; padding: 10px 12px; border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); max-height: 60vh; overflow-y: auto; }
.pop blockquote, .quotes blockquote, .detail blockquote, .cdetail blockquote { margin: 6px 0; padding: 8px 10px; background: var(--hl); border: 1px solid #000; font: italic 15px/1.5 var(--serif); }
.pop .cp + .cp { border-top: 1px dashed #999; margin-top: 10px; padding-top: 10px; }

.steps { border: 2px solid #000; background: #fffff0; padding: 16px 12px; margin: 14px 0; }
.track { display: flex; align-items: flex-start; }
.beam { flex: 1; border-top: 4px dashed #000; margin-top: 30px; min-width: 6px; }
.node { flex: none; width: 104px; background: none; border: 0; padding: 0; font: inherit; color: #000; cursor: pointer; text-align: center; }
.node .num { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 6px; border-radius: 50%; border: 3px solid #000; font: 900 25px var(--black); color: #fff;
  background: radial-gradient(circle at 32% 30%, #fff 0 6%, #6fd0ff 8%, #1580c5 70%); transition: transform .12s; }
.node[aria-expanded="true"] .num { background: radial-gradient(circle at 32% 30%, #fff 0 6%, #ffe680 8%, #e0a000 70%); transform: scale(1.07); }
.node .nt { display: block; font-weight: bold; font-size: 14px; line-height: 1.25; }
.node .ns { display: block; font-size: 13px; color: var(--ink-2); }
.detail { margin-top: 14px; border: 2px solid #000; background: #fff; padding: 12px 14px; box-shadow: 4px 4px 0 #000; }
.detail .dt { font: bold 17px var(--sans); }
.detail p { margin: 6px 0; }
.detail cite, .cdetail cite { display: block; font: bold 12px var(--sans); font-style: normal; margin-top: 3px; }
.detail .row { margin-top: 10px; }

input[type=number], input[type=search], select { font: 16px var(--sans); padding: 6px 8px; width: 100%; color: #000; background: #fff;
  border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); box-shadow: inset 1px 1px var(--mid); border-radius: 0; }
label.f { display: block; font: bold 14px var(--sans); margin: 10px 0 4px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.eq { font: bold clamp(20px, 5vw, 28px)/1.5 var(--serif); text-align: center; padding: 14px 8px; border: 2px solid #000; background: #fff; margin: 12px 0 4px; }
.eq .term { display: inline-block; padding: 0 5px; cursor: pointer; border-bottom: 4px solid currentColor; }
.eq .term.hl { background: var(--hl); }
.eq .op { color: #555; padding: 0 3px; font-weight: normal; }
.eq .frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.2; }
.eq .frac > span:first-child { border-bottom: 2px solid #000; padding: 0 4px 2px; }
.c1 { color: #1650b4; } .c2 { color: #c2410c; } .c3 { color: #1e7b3a; } .c4 { color: #6a2fb0; } .c5 { color: #b0186a; }
.terms td:first-child { width: 96px; text-align: center; font: bold 18px var(--serif); }
.terms tr.hl td { background: var(--hl); }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; }
.calc > div { min-width: 0; }
.steps-out ol { padding-left: 20px; }
.num, .steps-out .n { font-family: var(--mono); font-weight: bold; }
.answer { font: 900 24px var(--black); margin: 8px 0 2px; color: var(--blue); }
.answer.tick { animation: tick .3s ease; }
@keyframes tick { from { opacity: .3; } to { opacity: 1; } }
.feel { font-size: 14px; color: var(--ink-2); }

#wizard { border: 2px solid #000; background: #fff; padding: 14px; margin: 12px 0; box-shadow: 4px 4px 0 #000; }
.wiz-q { font: bold 18px/1.3 var(--sans); margin: 0 0 8px; }
.wiz-help { font-size: 14px; color: var(--ink-2); margin: 0 0 12px; }
.wiz-trail { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.wiz-trail span + span::before { content: " › "; }
#wizard .row .b95 { text-align: left; justify-content: flex-start; }
.checklist { list-style: none; padding: 0; margin: 8px 0; border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); max-height: 340px; overflow-y: auto; background: #fff; }
.checklist li { margin: 0; border-bottom: 1px solid #ddd; }
.checklist button { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 10px; cursor: pointer; font: 15px var(--sans); }
.checklist button:hover, .checklist button:focus { background: var(--navy); color: #fff; }

.gloss dt { font-weight: bold; margin-top: 12px; }
.gloss dd { margin: 2px 0 0; }
.qcard { border: 2px solid #000; padding: 12px; margin: 12px 0; background: #fff; }
.qcard .opts { display: grid; gap: 6px; margin-top: 8px; }
.qcard .opt { text-align: left; justify-content: flex-start; }
.qcard .opt.right { background: #c8f0c8; } .qcard .opt.wrong { background: #f6c8c8; }
.qcard .why { margin-top: 8px; font-size: 15px; }
.flash { border: 2px solid #000; background: #fffff0; min-height: 190px; display: grid; place-items: center; text-align: center; padding: 18px; cursor: pointer; box-shadow: 4px 4px 0 #000; margin: 12px 0; }
.flash .front { font: bold 22px var(--serif); }
.flash .hint { display: block; font-size: 12px; color: var(--ink-3); margin-top: 8px; font-family: var(--sans); font-weight: normal; }
.score { font-weight: bold; }

.pager { display: flex; justify-content: space-between; gap: 8px; margin-top: 30px; padding-top: 14px; border-top: 2px dotted #888; }
.complete-row { margin-top: 24px; display: flex; align-items: center; gap: 10px; font-size: 15px; }
.complete-row input { width: 20px; height: 20px; }
.quotes { padding-left: 20px; font-size: 14px; } .quotes li { margin: 10px 0; }
details summary { cursor: pointer; color: var(--link); text-decoration: underline; }

.foot { border-top: 2px solid #000; background: var(--face); padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 13px var(--ui); }
.badge { width: 88px; height: 31px; border: 1px solid #000; font: bold 9px/1.1 var(--sans); display: grid; place-items: center; text-align: center; }
.counter { font: 22px var(--mono); background: #000; color: #3f3; padding: 1px 6px; letter-spacing: 2px; }
.ring { margin-left: auto; }

@media (max-width: 760px) {
  body { background: #fff; }
  .page { margin: 0; border: 0; box-shadow: none; }
  .mast { padding: 10px 12px; } .blob { width: 40px; height: 40px; }
  .layout { grid-template-columns: 1fr; }
  nav.side { display: none; border-right: 0; border-bottom: 2px solid #000; }
  body.navopen nav.side { display: block; }
  .menu-btn { display: inline-flex !important; }
  .prog95 .well { width: 60px; }
  .prog95 .txt { display: none; }
  main { padding: 14px 14px 24px; }
  .two, .three, .calc { grid-template-columns: 1fr; }
  .track { flex-direction: column; align-items: stretch; }
  .beam { border-top: 0; border-left: 4px dashed #000; margin: 0 0 0 29px; min-height: 12px; flex: none; }
  .node { width: 100%; display: grid; grid-template-columns: 62px 1fr; column-gap: 12px; text-align: left; align-items: center; min-height: 62px; }
  .node .num { grid-row: 1 / 3; margin: 0; }
  .node .nt { font-size: 17px; align-self: end; } .node .ns { align-self: start; }
  .detail { margin: 8px 0 10px; }
  .ring { margin-left: 0; width: 100%; }
  .reqcard td:first-child { width: 96px; }
  .num { white-space: normal; overflow-wrap: anywhere; }
}
@media print {
  body { background: #fff; } .page { border: 0; box-shadow: none; margin: 0; max-width: none; }
  .navbar, nav.side, .pager, .complete-row, .foot { display: none !important; }
  .layout { display: block; } .page-sec { display: block !important; page-break-after: always; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- retro kit ---------- */
.px { image-rendering: pixelated; display: inline-block; vertical-align: middle; flex: none; }
.ticker { overflow: hidden; white-space: nowrap; background: #000; color: #3f3; font: bold 15px var(--mono); border-bottom: 2px solid #000; padding: 5px 0; }
.tick-in { display: inline-block; padding-left: 100%; animation: tick-scroll 38s linear infinite; }
.ticker:hover .tick-in, .ticker.held .tick-in { animation-play-state: paused; }
.ticker a { color: #3f3; text-decoration: underline dotted; text-underline-offset: 3px; }
.ticker a:hover, .ticker a:focus { color: #ff0; }
.ticker .cite { font: bold 12px var(--sans); vertical-align: 1px; }
.ticker i { font-style: normal; color: #ff0; padding: 0 14px; }
@keyframes tick-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .tick-in { animation: none; padding-left: 10px; white-space: normal; } }

.hicon { display: flex; align-items: center; gap: 12px; }
.hicon h1 { margin: 0; }
.page-sec > .hicon { margin: 2px 0 14px; }

.win { border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); background: var(--face); box-shadow: 3px 3px 0 #000; margin: 12px 0; }
.win > .tb { display: flex; align-items: center; gap: 8px; background: linear-gradient(90deg, var(--navy), #1084d0); color: #fff; font: bold 14px var(--ui); padding: 4px 6px; }
.win > .tb .px { width: 18px; height: 18px; }
.win > .bd { background: #fff; margin: 4px; padding: 12px; border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); }
.win #wizard { border: 0; box-shadow: none; margin: 0; padding: 0; }
.result-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }

.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .blink { animation: none; } }
.newtag { display: inline-block; background: #ff0; color: #c00; font: bold 11px var(--sans); border: 1px solid #000; padding: 0 4px; vertical-align: 2px; }

.desk { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 14px 0; }
.dicon { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; text-decoration: none; color: #000; padding: 12px 6px; border: 2px dotted transparent; }
.dicon:hover, .dicon:focus-visible { border-color: #000; background: var(--hl); outline: none; }
.dicon .px { width: 64px; height: 64px; }
.dicon b { font: bold 15px var(--sans); }
.dicon small { font-size: 13px; color: var(--ink-2); }
.dicon.soon { opacity: .9; }
.construction { display: block; width: 100%; height: 14px; background: repeating-linear-gradient(-45deg, #ffcc00 0 10px, #000 10px 20px); border: 1px solid #000; }
.lcd { font: 22px var(--mono); background: #000; color: #3f3; padding: 1px 6px; letter-spacing: 2px; }
.ring a { color: var(--link); }
.sitemap td:first-child { width: 44px; text-align: center; }

/* explainers home */
.home-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.whatsnew { border: 2px solid #000; background: #fffff0; }
.whatsnew h3 { margin: 0; background: #000; color: #ff0; font: bold 15px var(--sans); padding: 6px 10px; }
.whatsnew ul { margin: 8px 0; }

/* ---------- buttons that feel good ---------- */
.b95, .btn { position: relative; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background .06s; }
@media (hover: hover) { .b95:hover:not(.on) { background: #cfcfcf; } }
.b95:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.b95.pressed, .b95:active { border-color: var(--lo) var(--hi) var(--hi) var(--lo); box-shadow: inset 1px 1px var(--mid), inset 2px 2px #a0a0a0; background: #b8b8b8; padding: 8px 13px 6px 15px; }
.b95.small.pressed, .b95.small:active { padding: 6px 9px 4px 11px; }
.node { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.node.pressed .num { animation: squish .32s cubic-bezier(.3,1.7,.5,1); }
@keyframes squish { 0% { transform: scale(1); } 30% { transform: scale(.82, .9); } 100% { transform: scale(1.07); } }
.dicon { -webkit-tap-highlight-color: transparent; }
.dicon.pressed .px { animation: hop .35s ease; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-8px); } }
.spark { position: fixed; z-index: 99; pointer-events: none; width: 6px; height: 6px; image-rendering: pixelated; animation: spark .6s ease-out forwards; }
@keyframes spark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
.soundbtn[aria-pressed="false"] { color: #555; }
@media (prefers-reduced-motion: reduce) { .spark { display: none; } .node.pressed .num, .dicon.pressed .px { animation: none; } }

/* penalty chart */
.pbar { margin: 10px 0; }
.pbar .pk { font-weight: bold; font-size: 15px; }
.pbar .pw { display: flex; align-items: center; gap: 8px; }
.pbar .pw i { display: block; height: 22px; background: repeating-linear-gradient(90deg, #c00 0 10px, #e33 10px 12px); border: 2px solid #000; }
.pbar .pw b { font: bold 15px var(--mono); }
.factgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 12px 0; }
.fact { border: 2px solid #000; background: #fff; padding: 10px; display: flex; gap: 10px; align-items: flex-start; box-shadow: 3px 3px 0 #000; }
.fact b { display: block; font: 900 20px var(--black); }
.fact span { font-size: 14px; }

/* ---------- taskbar + Start menu ---------- */
body.has-taskbar { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
.taskbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: 4px; padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  background: var(--face); border-top: 2px solid var(--hi); box-shadow: 0 -1px 0 var(--mid); }
.taskbar .b95 { min-height: 44px; padding: 4px 10px; flex: none; }
.taskbar .start { gap: 6px; font-size: 15px; }
.taskbar .start .px { width: 18px; height: 18px; }
.taskbar .task { flex: 1 1 auto; min-width: 0; justify-content: flex-start; gap: 6px; }
.taskbar .task .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: bold; }
.b95.on, .taskbar .task.on { background: repeating-conic-gradient(#d8d8d8 0 25%, #fff 0 50%) 0 0 / 2px 2px; border-color: var(--lo) var(--hi) var(--hi) var(--lo); box-shadow: inset 1px 1px #000, inset 2px 2px var(--mid); }
.b95.on > * { position: relative; top: 1px; left: 1px; }
.taskbar .tnav { width: 44px; padding: 0; }
.taskbar .tnav:disabled { color: #999; text-shadow: 1px 1px #fff; cursor: default; }
.taskbar .tray { flex: none; min-height: 44px; display: flex; align-items: center; padding: 0 10px; font: 13px var(--ui); border: 2px solid; border-color: var(--mid) var(--hi) var(--hi) var(--mid); }
.startmenu { position: fixed; z-index: 61; left: 4px; bottom: calc(54px + env(safe-area-inset-bottom)); width: min(340px, calc(100vw - 8px)); max-height: calc(100vh - 80px - env(safe-area-inset-bottom));
  display: flex; background: var(--face); border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); box-shadow: 3px 3px 0 #000; }
.startmenu[hidden] { display: none; }
.sm-banner { flex: none; width: 30px; background: linear-gradient(0deg, var(--navy), #1084d0); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; }
.sm-banner span { writing-mode: vertical-rl; transform: rotate(180deg); color: #c0c0c0; font: 18px var(--black); letter-spacing: 1px; white-space: nowrap; }
.sm-banner b { color: #fff; }
.sm-body { flex: 1; overflow-y: auto; padding: 4px 0; -webkit-overflow-scrolling: touch; }
.sm-h { font: bold 12px var(--ui); color: #444; padding: 8px 10px 2px; }
.sm-list { list-style: none; margin: 0; padding: 0; }
.sm-list li { margin: 0; }
.sm-list a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 10px; color: #000; text-decoration: none; font: 15px var(--ui); }
.sm-list a:hover, .sm-list a:focus-visible, .sm-list a.cur { background: var(--navy); color: #fff; outline: none; }
.sm-list a span { flex: 1; }
.sm-list a i { font-style: normal; } .sm-list a i.ok { color: var(--good); } .sm-list a.cur i.ok, .sm-list a:hover i.ok { color: #9f9; }
.sm-search { padding: 6px 10px; }
.sm-search #searchres { position: static; }
.sm-extras { border-top: 1px solid var(--mid); box-shadow: 0 1px 0 var(--hi) inset; margin-top: 6px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* bigger targets on touch: citation tags keep their look but get a 44px hit area */
.cite { position: relative; }
.cite::after { content: ""; position: absolute; inset: -12px -6px; }
input[type=number], input[type=search], select { min-height: 44px; }
@media print { .taskbar, .startmenu { display: none !important; } body.has-taskbar { padding-bottom: 0; } }
.arr { display: inline-block; width: .55em; height: .7em; fill: currentColor; vertical-align: -.02em; flex: none; }
.taskbar .tnav .arr { width: 10px; height: 13px; }
.taskbar .tnav:disabled .arr { fill: #999; filter: drop-shadow(1px 1px 0 #fff); }
/* phone tables: nothing hidden sideways */
@media (max-width: 760px) {
  th, td { padding: 6px 6px; font-size: 14.5px; overflow-wrap: break-word; }
  td .cite, td .req { white-space: normal; }
  td a { overflow-wrap: anywhere; }
  .terms td:first-child { width: 72px; font-size: 16px; }
}
.detail p, .detail a, .detail blockquote { overflow-wrap: anywhere; }
.pbar .pw { flex-wrap: wrap; }
@media (max-width: 360px) { th, td { font-size: 13.5px; padding: 5px 4px; } main { padding-left: 10px; padding-right: 10px; } }
.sm-help { flex-basis: 100%; margin: 4px 0 0; font: 13px var(--ui); color: #222; }
.zoomhint { display: none; margin-top: 8px; }
@media (max-width: 760px) { .fig.zoomable .zoomhint { display: inline-flex; } .fig.zoomable svg { cursor: zoom-in; } }
.viewer { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 40, .55); display: flex; align-items: center; justify-content: center; padding: 10px; }
.viewer .win { width: 100%; max-height: 100%; display: flex; flex-direction: column; margin: 0; }
.viewer .tb span { flex: 1; }
.viewer .x { min-height: 0; width: 32px; height: 28px; padding: 0; }
.viewer .vbody { overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; }
.viewer .vbody svg { width: 760px; max-width: none; height: auto; display: block; }
body.viewing { overflow: hidden; }
.sm-extras .prog95 .txt { display: inline !important; } .sm-extras .prog95 .well { width: 90px; }
/* games */
.game { border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); background: var(--face); box-shadow: 3px 3px 0 #000; margin: 14px 0; }
.game > .tb { display: flex; gap: 8px; align-items: center; background: linear-gradient(90deg, #800080, #d040a0); color: #fff; font: bold 14px var(--ui); padding: 4px 6px; }
.game > .bd { background: #fff; margin: 4px; padding: 12px; border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); }
.g-top { display: flex; justify-content: space-between; align-items: center; font: bold 14px var(--ui); margin-bottom: 8px; }
.g-p { font: bold 19px/1.35 var(--serif); margin: 6px 0 12px; }
.g-btns { display: grid; gap: 6px; }
.g-btns .b95 { justify-content: flex-start; font-size: 15px; }
.g-btns .right { background: #c8f0c8; } .g-btns .wrong { background: #f6c8c8; }
.g-why { margin-top: 10px; font-size: 15px; }
.g-end { text-align: center; padding: 10px; }
.lcd.big { display: inline-block; font-size: 44px; padding: 6px 14px; margin: 6px; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.wcard { display: flex; gap: 10px; border: 2px solid #000; background: #fff; padding: 10px; box-shadow: 3px 3px 0 #000; }
.wcard b { display: block; } .wcard small { display: block; color: var(--ink-3); }
.wp { margin: 6px 0 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.spotsvg { display: block; width: 100%; height: auto; border: 2px solid #000; touch-action: manipulation; }
.spotsvg .hot { cursor: pointer; }
.spotlist { padding-left: 24px; font-size: 15px; } .spotlist li { margin: 8px 0; } .spotlist li.done { list-style: none; margin-left: -24px; color: var(--good); }
/* chain-of-authority diagram */
.chain { border: 2px solid #000; background: #fffff0; padding: 14px; margin: 14px 0; display: flex; flex-direction: column; align-items: stretch; max-width: 520px; }
.cnode { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; background: #fff; border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); box-shadow: 2px 2px 0 #000; font: inherit; color: #000; cursor: pointer; min-height: 60px; }
.cnode b { display: block; font: bold 17px var(--sans); } .cnode small { display: block; font-size: 13.5px; color: var(--ink-2); }
.cnode.on { background: var(--hl); border-color: var(--lo) var(--hi) var(--hi) var(--lo); box-shadow: inset 1px 1px #000; }
.cdetail { border: 2px solid #000; border-top: 0; background: #fff; padding: 8px 12px; margin: 0 6px; font-size: 15px; }
.cdetail p { margin: 4px 0 8px; }
.clink { display: flex; align-items: center; gap: 8px; padding: 6px 0 6px 26px; font: italic bold 14px var(--serif); color: var(--ink-2); }
.clink .arr.down { width: 12px; height: 10px; }

/* failures gallery (asphalt) */
.failgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 12px 0; }
.fcard { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; min-height: 44px; font: bold 13px/1.25 var(--sans); color: #000; text-align: center; cursor: pointer;
  background: var(--face); border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); box-shadow: inset -1px -1px var(--mid), inset 1px 1px #dfdfdf; }
.fcard svg, .fcard img { border: 1px solid #000; width: 96px; height: 72px; object-fit: cover; display: block; }
.fhead img, .fhead svg { display: block; width: 100%; max-width: 480px; height: auto; border: 2px solid #000; }
.fhead .meta { margin-top: 4px; }
.photo { margin: 12px 0; }
.photo img { display: block; width: 100%; max-width: 640px; height: auto; border: 2px solid #000; }
.fcard:active, .fcard[aria-pressed="true"] { border-color: var(--lo) var(--hi) var(--hi) var(--lo); box-shadow: inset 1px 1px var(--mid); background: var(--navy); color: #fff; }
.fhead { margin-bottom: 8px; }

/* asphalt profile */
.pfsvg .pl { cursor: pointer; }
.pfsvg .pl .sel { display: none; }
.pfsvg .pl.on .sel { display: inline; }
.pfsvg .pl:focus { outline: none; }
/* section tiles */
.sectiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; margin: 10px 0; }
.sectiles .tile { padding: 10px 4px; border: 2px dotted transparent; }
.sectiles .tile .px { width: 40px; height: 40px; }
.sectiles .tile b { font-size: 13px; line-height: 1.25; }
.sectiles .tile.done b::after { content: " ✓"; color: var(--good); }
/* pager count */
.pgn { align-self: center; font: bold 12px var(--ui); color: var(--ink-3); white-space: nowrap; }
/* phone: slide between sections, one-time swipe hint */
@keyframes slide-l { from { transform: translateX(28px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes slide-r { from { transform: translateX(-28px); opacity: .3; } to { transform: none; opacity: 1; } }
.page-sec.slide-l { animation: slide-l .22s ease-out; }
.page-sec.slide-r { animation: slide-r .22s ease-out; }
.swipehint { position: fixed; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 60; background: #ffffe1; border: 2px solid #000; box-shadow: 3px 3px 0 #000; padding: 8px 12px; font: bold 14px var(--ui); white-space: nowrap; transition: opacity .5s; }
.swipehint.gone { opacity: 0; }

/* ---------- Start menu v2: short top level, submenus, switches; tray with sound and clock ---------- */
.sm-top, .sm-sub { display: flex; flex-direction: column; }
.sm-top[hidden], .sm-sub[hidden], .sm-search[hidden] { display: none; }
.sm-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 4px 10px; border: 0; background: none; color: #000; text-align: left; text-decoration: none; font: 15px var(--ui); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sm-item > span { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sm-item .px { width: 22px; height: 22px; }
.sm-item:hover, .sm-item:focus-visible, .sm-item.open, .sm-item.pressed { background: var(--navy); color: #fff; outline: none; }
.sm-item:hover .arr, .sm-item.open .arr { fill: #fff; }
.sm-item .arr { width: 8px; height: 10px; flex: none; }
.sm-item .prog95 { font-size: 11px; }
.sm-item .prog95 .txt { display: inline !important; }
.sm-item .prog95 { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.sm-item .prog95 .well { width: 56px; height: 7px; padding: 0; border: 1px solid currentColor; background: transparent; box-shadow: none; }
.sm-item .prog95 .well i { height: 100%; background: var(--good); }
.sm-toggle .box { width: 16px; height: 16px; flex: none; margin: 0 3px; background: #fff; border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); box-shadow: inset 1px 1px var(--mid); position: relative; }
.sm-toggle[aria-pressed="true"] .box::after { content: ""; position: absolute; left: 3px; top: 0; width: 5px; height: 9px; border: solid #000; border-width: 0 2.5px 2.5px 0; transform: rotate(40deg); }
.sm-sep { height: 2px; margin: 4px 6px; border-top: 1px solid var(--mid); border-bottom: 1px solid var(--hi); }
.sm-back { font-weight: bold; border-bottom: 1px solid var(--mid); }
.sm-back .arr { order: -1; }
.sm-list .n { font: bold 11px var(--ui); min-width: 16px; text-align: right; color: #555; }
.sm-list a.cur .n, .sm-list a:hover .n { color: #ccf; }
.sm-list .soon { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px; color: #777; font: 15px var(--ui); }
.sm-list .soon small { margin-left: auto; font-size: 11px; }
.sm-list .soon .px { opacity: .55; }
.sm-sub.cascade { position: fixed; z-index: 62; width: 300px; max-height: calc(100vh - 80px); overflow-y: auto; background: var(--face); border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); box-shadow: 2px 2px 0 #000; padding: 4px 0; }
.taskbar .ql { width: 44px; padding: 0; }
.taskbar .ql .px { width: 18px; height: 18px; }
.taskbar .task .tn { margin-left: auto; padding-left: 6px; font: bold 12px var(--ui); color: #444; flex: none; }
.taskbar .tray { gap: 6px; padding: 0 6px; }
.taskbar .tray button { border: 0; background: none; padding: 4px; min-height: 36px; min-width: 32px; font: 13px var(--ui); color: #000; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.taskbar .tray button:active { transform: translateY(1px); }
.balloon { position: fixed; right: 8px; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 63; background: #ffffe1; border: 1px solid #000; padding: 8px 12px; font: 14px var(--ui); box-shadow: 2px 2px 0 rgba(0,0,0,.4); }
.balloon::after { content: ""; position: absolute; right: 26px; bottom: -9px; border: 8px solid transparent; border-top-color: #ffffe1; border-bottom: 0; }
.dlgwrap { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dlgwrap .dlg { width: min(420px, 100%); margin: 0; }
.dlgwrap .dlg .bd p { font: 15px/1.45 var(--sans); }
.safeoff { position: fixed; inset: 0; z-index: 80; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px; text-align: center; cursor: pointer; }
.safeoff p { color: #ff8c1a; font: 900 clamp(22px, 6vw, 38px)/1.2 var(--black); margin: 0; }
@media (max-width: 759px) { .taskbar .ql, .taskbar .task .tn, .taskbar .tray .clk { display: none; } .taskbar .tray { padding: 0 2px; } }

/* icon grid: one rule per card */
.icongrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.icongrid .ig { border: 2px solid #000; background: #fff; box-shadow: 3px 3px 0 #000; padding: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.icongrid .ig p { margin: 0; font-size: 14px; line-height: 1.4; }
/* parkland diagram */
#vennsvg .vdot { cursor: pointer; }
.vchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.icongrid .ig .cite { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.icongrid .ig { min-width: 0; }

/* ---------- shared refresh: address bar, sticky side list, chrome rule, grid horizon ---------- */
.addr { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font: 13px var(--ui); }
.addr .al { color: #333; flex: none; }
.addr .af { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; background: #fff; padding: 3px 8px; border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); box-shadow: inset 1px 1px var(--mid); white-space: nowrap; overflow: hidden; }
.addr .af a { color: var(--link); }
.addr .af b { overflow: hidden; text-overflow: ellipsis; }
.addr .af i { font-style: normal; color: #777; }
.addr .af .px { width: 14px; height: 14px; flex: none; }
nav.side { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; }
body.has-taskbar nav.side { max-height: calc(100vh - 54px); }
nav.side ol { list-style: none; padding-left: 0; counter-reset: sec; }
nav.side li { margin: 1px 0; counter-increment: sec; }
nav.side li a { display: flex; align-items: center; gap: 7px; padding: 4px 6px; color: #000; text-decoration: none; border: 1px solid transparent; }
nav.side li a::before { content: counter(sec); font: bold 11px var(--ui); color: #666; min-width: 14px; text-align: right; }
nav.side li a .px { width: 16px; height: 16px; flex: none; }
nav.side li a:hover { border: 1px dotted #000; background: #fff; }
nav.side li a.on { background: var(--navy); color: #fff; font-weight: bold; }
nav.side li a.on::before { color: #ccf; }
nav.side li a.complete::after { margin-left: auto; }
.page-sec > h1, .page-sec > .hicon { padding-bottom: 8px; background: linear-gradient(90deg, #7fd0ff, #fff 30%, #9aa7b4 55%, #ff7ad9 85%, #ffd400) bottom left / 100% 3px no-repeat; }
.badge.y2k { background: linear-gradient(#e8f6ff, #9fd2f2); color: #003355; }
@media (min-width: 1100px) {
  body::after { content: ""; position: fixed; left: -20%; right: -20%; bottom: 0; height: 34vh; z-index: -1; pointer-events: none; opacity: .45;
    background: repeating-linear-gradient(90deg, rgba(160,220,255,.9) 0 1px, transparent 1px 60px), repeating-linear-gradient(0deg, rgba(255,120,220,.8) 0 1px, transparent 1px 34px);
    transform: perspective(300px) rotateX(58deg); transform-origin: bottom; }
}
.turbo .page { animation: turbo .12s linear infinite; }
@keyframes turbo { 0% { transform: translate(0,0); } 50% { transform: translate(1px,-1px) skewX(-.6deg); } 100% { transform: translate(0,0); } }
.turbotoast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 90; background: #000; color: #3f3; font: bold 16px var(--mono); padding: 8px 14px; border: 2px solid #3f3; }
@media (prefers-reduced-motion: reduce) { .turbo .page { animation: none; } }

/* long source tags wrap instead of pushing the page sideways; the section slide never widens the page */
.cite { max-width: 100%; }
@media (max-width: 480px) { .cite { white-space: normal; overflow-wrap: anywhere; } }
main { overflow-x: clip; }

.stats .lcd.sm { font-size: 14px; padding: 2px 8px; letter-spacing: 1px; white-space: normal; display: inline-block; }

/* long step tracks wrap on wide screens; diagrams don't blow up past readable size on desktop */
@media (min-width: 761px) {
  .track { flex-wrap: wrap; row-gap: 14px; }
  .fig:not(.wide):not(.dual) > svg { max-width: 560px; margin-left: auto; margin-right: auto; }
  .fig:not(.wide):not(.dual) > svg[viewBox^="0 0 7"] { max-width: none; }
}

/* result moved under the tapped choice on phones (core.js) */
.near-tap { grid-column: 1 / -1; flex-basis: 100%; width: 100%; box-sizing: border-box; margin-top: 8px; margin-bottom: 10px; }
.near-nav { margin: 12px 0 4px; gap: 8px; } .near-nav .b95 { flex: 1 1 0; min-width: 0; }

/* Phone controls retain the beveled desktop look. */
.b95:focus-visible, button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #00f; outline-offset: 3px; }
.approval { margin: 8px 0; }
.approval > .b95 { width: 100%; justify-content: flex-start; min-height: 44px; }
.approval-detail .zcard { margin-top: 0; }
.fig.dual svg.ph { display: none; }
.fig[data-t]::before { content: attr(data-t); display: block; background: #000080; color: #fff; font: bold 14px var(--ui); padding: 5px 8px; margin-bottom: 8px; }
@media (max-width: 760px) {
 .fig.dual svg.dk { display: none; }
 .fig.dual svg.ph { display: block; }
 .b95, button.b95, select { min-height: 44px; }
 .swipehint { position: static; transform: none; margin: 10px 0; width: auto; text-align: center; }
 .near-tap { grid-column: 1 / -1; flex: 1 0 100%; min-width: 0; }
}

#desk .dicon[hidden] { display: none; }

.taskbar .section-caret { width: 10px; height: 8px; flex: none; margin-left: auto; }
@media (max-width: 760px) {
 .pop .x { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
}

/* Museum reading: quiet evidence, breathing room, optional progress. */
.cite { font: 12px/1.4 var(--ui); color: #404650; background: #f7f7f2; border: 0; border-bottom: 2px solid #d3bc58; padding: 1px 4px; margin-left: 4px; vertical-align: 1px; }
.cite-name { display: none; }
body.showsrc .cite-name { display: inline; }
body.showsrc .cite-short { display: none; }
.cite:hover, .cite:focus-visible { background: #fff3b7; color: #000; outline: 2px solid #000080; outline-offset: 2px; }
.page-sec > p, .page-sec > ul, .page-sec > ol { max-width: 66ch; line-height: 1.7; }
.page-sec > p { margin: 14px 0; }
.page-sec > ul > li, .page-sec > ol > li { margin: 9px 0; }
.page-sec > h2 { margin-top: 32px; }
.detail p, .cdetail p { line-height: 1.65; margin: 10px 0; }
.pop blockquote, .quotes blockquote, .detail blockquote, .cdetail blockquote, .source-quotes blockquote, .squote blockquote { background: #f6f6f0; border: 0; border-left: 3px solid #cfbc69; padding: 10px 12px; font-style: normal; }
.source-quotes { margin: 12px 0; border-top: 1px solid #ddd; font-size: 14px; }
.source-quotes summary { min-height: 44px; padding: 10px 2px; color: #434953; cursor: pointer; font: 14px/24px var(--ui); }
.source-quotes summary:focus-visible { outline: 2px solid var(--navy); }
.steps { overflow-anchor: none; }
body:not(.reading-tracker) .complete-row, body:not(.reading-tracker) .prog95 { display: none !important; }
body:not(.reading-tracker) nav.side li a.complete::after { content: none; }
@media print { .cite-short { display: none; } .cite-name { display: inline; } .source-quotes > * { display: block; } }

/* ---------- learning ladder: level chips, pips, grouped tiles, level-up toast ---------- */
.lvl { display: inline-flex; align-items: center; gap: 5px; font: 12px var(--ui); color: #fff; padding: 2px 7px; border: 2px solid #000; box-shadow: 2px 2px 0 #000; white-space: nowrap; vertical-align: middle; }
.lvl b { font: bold 11px var(--mono); letter-spacing: 1px; }
.lvl1 { background: #2a9d3a; } .lvl2 { background: #1c7fc4; } .lvl3 { background: #b0207a; } .lvl0 { background: #555; }
.hicon .lvl { margin-left: auto; align-self: center; flex: none; }
.lvlpip { font: bold 10px var(--mono); font-style: normal; color: #fff; width: 15px; height: 15px; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; flex: none; border: 1px solid #000; }
nav.side li a.complete::after { margin-left: 4px; }
.tilegroup { margin: 6px 0 10px; }
.tilehead { margin: 6px 0 4px; }
.tilerow { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; }
.sectiles:has(.tilegroup) { display: block; }
.levelup { position: fixed; top: 40%; left: 50%; transform: translate(-50%, -50%); z-index: 95; background: #000; color: #ff0; font: 900 22px var(--black); padding: 14px 20px; border: 3px solid #ff0; box-shadow: 4px 4px 0 #ff2bd6; display: flex; gap: 10px; align-items: center; animation: lvlpop .35s ease-out; pointer-events: none; }
@keyframes lvlpop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .levelup { animation: none; } }

/* the level-up note sits at the top and leaves quickly, so it never covers a drawing */
.levelup { top: 8px; transform: translateX(-50%); font-size: 16px; padding: 7px 12px; animation: lvldrop .25s ease-out; }
@keyframes lvldrop { from { transform: translate(-50%, -12px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

/* group headings in the section list are not sections; keep numbering 1, 2, 3 */
nav.side li.navgroup { counter-increment: none; }

/* ---------- calmer sources, clearer navigation (October 15) ---------- */
/* sources: a small grey section sign after the sentence; no yellow */
.cite { background: none; border: 0; padding: 0 2px; margin-left: 1px; color: #6a7380; font: bold 12px/1 var(--ui); vertical-align: super; box-shadow: none; }
.cite:hover, .cite:focus-visible { background: none; color: #000080; outline: 2px solid #000080; outline-offset: 1px; }
.claim.hl { background: none; text-decoration: underline 2px #9db8d8; text-underline-offset: 3px; }
body.showsrc .claim { background: none; text-decoration: underline dotted 2px #6a8fb8; text-underline-offset: 3px; }
body.showsrc .cite { color: #000080; }
.ticker .cite { color: #9f9; vertical-align: 1px; }
/* drawings and step boxes sit on white; yellow stays for real notes */
.fig, .steps, .chain, .flash { background: #fff; }
/* the sources of a section, at its end */
.secsrc { margin: 26px 0 0; border-top: 1px solid #ccc; padding-top: 8px; font-size: 14px; }
.secsrc summary { cursor: pointer; color: #404650; font: bold 13px var(--ui); min-height: 32px; display: flex; align-items: center; }
.secsrc ol { padding-left: 22px; margin: 8px 0; }
.secsrc li { margin: 0 0 12px; }
.secsrc blockquote { margin: 4px 0; padding: 4px 10px; border-left: 3px solid #c8ccd2; color: #333; font: italic 14px/1.45 var(--serif); }
/* one way forward: a big Next button; Back is small */
.pager { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 26px; }
.pager .nextbig { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; padding: 8px 14px; text-align: left; text-decoration: none; }
.pager .nextbig span { display: flex; flex-direction: column; }
.pager .nextbig small { font: 12px var(--ui); color: #333; }
.pager .nextbig b { font: bold 17px var(--sans); }
.pager .nextbig .arr { width: 12px; height: 15px; flex: none; }
.pager .backlink { align-self: flex-start; font: 14px var(--ui); color: var(--link); display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.pager .backlink .arr { width: 7px; height: 9px; fill: currentColor; }
.pager .pgn { display: none; }
/* course map: three levels, a dot per section */
.rail { margin: -4px 0 14px; }
.rail .rrow { display: flex; gap: 6px; }
.rail .rlvl { flex: 1 1 0; min-width: 0; border: 2px solid #000; background: #f2f2f2; padding: 4px 6px 6px; opacity: .78; }
.rail .rlvl.now { opacity: 1; background: #fff; box-shadow: 2px 2px 0 #000; }
.rail .rname { display: block; font: 11px var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; }
.rail .rname b { display: inline-flex; width: 15px; height: 15px; align-items: center; justify-content: center; color: #fff; font: bold 10px var(--mono); border: 1px solid #000; }
.rail .lvl1 .rname b, .rail .lvl1 .rdot.here { background: #2a9d3a; }
.rail .lvl2 .rname b, .rail .lvl2 .rdot.here { background: #1c7fc4; }
.rail .lvl3 .rname b, .rail .lvl3 .rdot.here { background: #b0207a; }
.rail .rdots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.rail .rdot { width: 14px; height: 14px; border: 2px solid #000; background: #fff; position: relative; }
.rail .rdot::after { content: ""; position: absolute; inset: -8px -3px; }
.rail .rdot.done { background: #c8c8c8; }
.rail .rdot.here { transform: scale(1.25); box-shadow: 0 0 0 2px #ffd400; }
.rail .rwhere { margin: 6px 0 0; font: bold 13px var(--ui); color: #222; }
.hicon .lvl { display: none; }

/* ---------- Menu panel (replaces the Start menu with submenus) ---------- */
.startmenu.mm { display: flex; flex-direction: column; width: min(400px, calc(100vw - 8px)); max-height: calc(100vh - 70px - env(safe-area-inset-bottom)); padding: 0; }
.startmenu.mm[hidden] { display: none; }
.mm-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 12px; background: linear-gradient(90deg, #05001a, #2a0057 55%, #ff2bd6); }
.mm-head b { font: 900 18px var(--black); letter-spacing: 1px; background: linear-gradient(#fff, #cfe3f2 45%, #7f97ad 52%, #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mm-x { min-width: 40px; min-height: 36px; font-size: 20px; line-height: 1; }
.mm-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 0 10px; }
.mm-h { font: bold 13px var(--ui); color: #222; padding: 12px 12px 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mm-h .prog95 { font-weight: normal; }
.mm-h .prog95 .txt { display: inline !important; font-size: 11px; }
.mm-h .prog95 .well { width: 60px; height: 8px; padding: 0; }
.mm-lvl { margin: 8px 10px 2px; font: bold 12px var(--ui); color: #333; display: flex; align-items: center; gap: 6px; }
.mm-lvl b { display: inline-flex; width: 17px; height: 17px; align-items: center; justify-content: center; color: #fff; font: bold 11px var(--mono); border: 1px solid #000; }
.mm-lvl.lvl1 b { background: #2a9d3a; } .mm-lvl.lvl2 b { background: #1c7fc4; } .mm-lvl.lvl3 b { background: #b0207a; }
.mm-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px; color: #000; text-decoration: none; font: 15px var(--ui); }
.mm-row span { flex: 1; min-width: 0; }
.mm-row .px { width: 20px; height: 20px; flex: none; }
.mm-row .ok { font-style: normal; color: var(--good); }
.mm-row em { font: bold 11px var(--ui); font-style: normal; background: #ffd400; color: #000; border: 1px solid #000; padding: 0 5px; }
.mm-row:hover, .mm-row:focus-visible { background: #e8eef8; outline: none; }
.mm-row.cur { background: var(--navy); color: #fff; }
.mm-row.cur .ok { color: #9f9; }
.mm-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 4px; padding: 2px 8px; }
.mm-g { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; text-align: center; text-decoration: none; color: #000; font: bold 12px/1.25 var(--ui); border: 2px dotted transparent; }
.mm-g .px { width: 28px; height: 28px; }
.mm-g:hover, .mm-g:focus-visible { border-color: #000; background: var(--hl); outline: none; }
.mm-g.cur { background: #e8eef8; border-color: #000080; }
.mm-foot { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 8px 0; margin-top: 8px; border-top: 1px solid var(--mid); }
.mm-sw { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 8px; border: 0; background: none; font: 13px var(--ui); color: #000; cursor: pointer; }
.mm-sw .px { width: 18px; height: 18px; }
.mm-sw:hover { background: #e8eef8; }
.taskbar .start svg { flex: none; }
.mm-lvl.lvl0, .mm-lvl.lvl1, .mm-lvl.lvl2, .mm-lvl.lvl3 { background: none; }

/* step bubbles: flat retro discs, no gloss; pressed = sinks, no bounce */
.node .num { background: #1c7fc4; box-shadow: 2px 2px 0 #000; text-shadow: none; }
.node[aria-expanded="true"] .num { background: #ffd400; color: #000; transform: none; }
.node.pressed .num { animation: none; transform: translate(2px, 2px); box-shadow: none; }
