/* Local web fonts. Source and licence details are under /fonts/. */
@font-face {
  font-family: Fraunces;
  src: url('/fonts/fraunces.744c0358de.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('/fonts/inter.82d63b08c4.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono.deab2d3c16.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* Match the body and title advances and line metrics while the web fonts load. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('ArialMT'), local('Liberation Sans');
  font-weight: 400 500;
  size-adjust: 105%;
  ascent-override: 92.26%;
  descent-override: 22.97%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold');
  font-weight: 600 700;
  size-adjust: 101.94%;
  ascent-override: 95.03%;
  descent-override: 23.66%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Fraunces Fallback';
  src: local('Georgia'), local('Georgia-Regular');
  font-weight: 400;
  size-adjust: 104.66%;
  ascent-override: 93.44%;
  descent-override: 24.36%;
  line-gap-override: 0%;
  unicode-range: U+0000-024F, U+2000-206F;
}
@font-face {
  font-family: 'Fraunces Fallback';
  src: local('Georgia Bold'), local('Georgia-Bold');
  font-weight: 600;
  size-adjust: 92.49%;
  ascent-override: 105.74%;
  descent-override: 27.57%;
  line-gap-override: 0%;
  unicode-range: U+0000-024F, U+2000-206F;
}

:root {
  --bg0: #050815; --bg1: #0b1230;
  --glass: rgba(13, 19, 44, .72); --glass2: rgba(22, 30, 64, .6);
  --line: rgba(160, 180, 255, .12); --line2: rgba(160, 180, 255, .22);
  --fg: #e9edff; --fg2: #c3cbef; --mute: #8b96c2; --dim: #5d6896;
  --accent: #8ea2ff; --accent2: #b4c1ff;
  --gold: #f5c46b; --uses: #c48cff; --by: #50dcc8;
  --ok: #6fe0a0; --warn: #ffcf70; --bad: #ff8a8a;
  --r: 14px; --panel: 460px;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --sans: Inter, 'Inter Fallback', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Fraunces, 'Fraunces Fallback', Georgia, serif;
  --system-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --mono: var(--system-mono);
  color-scheme: dark;
}
body.lean, body[data-view='reader'] { --mono: 'JetBrains Mono', var(--system-mono); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--bg0); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent2); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }
button { font: inherit; color: inherit; }
::selection { background: rgba(142, 162, 255, .35); }
::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background: rgba(160,180,255,.15); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

#sky, #map-graph { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#sky:active, #map-graph:active { cursor: grabbing; }
body.hovering #sky { cursor: pointer; }

/* ---------- glass ---------- */
.topbar, #panel, .fbar, .mapctl button, #results, #tip, #page .sheet {
  background: var(--glass); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--line);
}

/* ---------- top bar ---------- */
.topbar { position: fixed; top: 12px; left: 12px; right: 12px; height: 56px; z-index: 20; border-radius: 16px; display: flex; align-items: center; gap: 18px; padding: 0 12px 0 14px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); white-space: nowrap; }
.logo { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--gold); border: 1.5px solid rgba(245,196,107,.6); box-shadow: 0 0 18px rgba(245,196,107,.35), inset 0 0 10px rgba(245,196,107,.15); }
.brand-text { font-size: 15px; letter-spacing: .01em; color: var(--fg2); } .brand-text b { color: var(--fg); }
nav { display: flex; gap: 2px; }
nav a { color: var(--mute); font-size: 14px; padding: 7px 11px; border-radius: 9px; transition: background .2s, color .2s; }
nav a:hover { color: var(--fg); background: rgba(255,255,255,.05); }
nav a.on { color: var(--fg); background: rgba(142,162,255,.14); }
.search { position: relative; flex: 1; max-width: 520px; margin-left: auto; }
.search .ico { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--mute); stroke-width: 2; pointer-events: none; }
#q { width: 100%; height: 38px; padding: 0 36px 0 34px; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; color: var(--fg); font-size: 14px; outline: none; transition: border-color .2s, background .2s, box-shadow .2s; }
#q::placeholder { color: var(--dim); }
#q:focus { border-color: rgba(142,162,255,.55); background: rgba(255,255,255,.08); box-shadow: 0 0 0 4px rgba(142,162,255,.12); }
#q::-webkit-search-cancel-button { display: none; }
.search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 500 11px var(--mono); color: var(--mute); border: 1px solid var(--line2); border-radius: 5px; padding: 1px 6px; pointer-events: none; }
#q:focus ~ kbd { opacity: 0; }
#results { position: absolute; top: 46px; left: 0; right: 0; max-height: min(70vh, 560px); max-height: min(70dvh, 560px); overflow: auto; border-radius: 14px; padding: 6px; box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: pop .18s var(--ease); background: rgba(13,19,44,.94); }
#results .h { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 10px 10px 4px; }
#results a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; color: var(--fg); font-size: 14px; }
#results a .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; background: currentColor; }
#results a .dot.hollow { background: none; border: 1.5px solid currentColor; }
#results a .t { flex: 1; min-width: 0; }
#results a small { display: block; color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#results a.act, #results a:hover { background: rgba(142,162,255,.14); }
#results mark { background: none; color: var(--gold); }
#results .empty { padding: 16px 10px; color: var(--mute); font-size: 13px; }
.seg { position: relative; display: flex; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { position: relative; z-index: 1; border: none; background: none; padding: 6px 11px; font-size: 13px; color: var(--mute); cursor: pointer; border-radius: 7px; transition: color .25s; }
.seg .thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 7px; background: rgba(142,162,255,.22); box-shadow: inset 0 0 0 1px rgba(142,162,255,.35); transition: transform .35s var(--ease); }
.seg[data-mode=formal] .thumb { transform: translateX(100%); }
.seg[data-mode=concept] button[data-mode=concept], .seg[data-mode=formal] button[data-mode=formal] { color: var(--fg); }
.status-chip { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg2); padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(255,207,112,.3); background: rgba(255,207,112,.08); white-space: nowrap; }
.status-chip b { color: var(--warn); font-weight: 600; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 0 rgba(255,207,112,.6); animation: beacon 2.4s infinite; }
.status-chip.ok { border-color: rgba(110,231,160,.35); background: rgba(110,231,160,.08); }
.status-chip.ok b { color: #6ee7a0; }
.status-chip.ok i { background: #6ee7a0; animation: none; }

/* ---------- panel ---------- */
#panel { position: fixed; z-index: 15; top: 80px; right: 12px; bottom: 12px; width: var(--panel); border-radius: 18px; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.45); transition: transform .5s var(--ease), opacity .4s; overscroll-behavior: contain; }
body.paged #panel { transform: translateX(30px); opacity: 0; pointer-events: none; }
#grip { display: none; }
#content { padding: 22px 24px 40px; transition: opacity .16s, transform .16s var(--ease); }
#content.out, #pagebody.out { opacity: 0; transform: translateY(6px); }
#content.in > *, #pagebody.in > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 38ms); }

.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.eyebrow .sw { width: 10px; height: 10px; border-radius: 3px; box-shadow: 0 0 10px currentColor; }
h1 { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -.01em; }
h1.hero { font-size: 34px; }
h1.hero em { font-style: italic; color: var(--gold); font-weight: 400; }
h2 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); font-weight: 600; margin: 28px 0 10px; display: flex; align-items: center; gap: 8px; }
h2 .n { color: var(--dim); font-weight: 500; letter-spacing: 0; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
h3 { font-size: 14px; font-weight: 600; margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
p { line-height: 1.65; font-size: 15px; color: var(--fg2); margin: 0 0 12px; }
.lede { font-size: 15.5px; }
.meta { font-size: 12.5px; color: var(--mute); line-height: 1.5; }
.edition-switch { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0 0 9px; font-size: 12.5px; }
.edition-switch a { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; }
.edition-switch a[aria-current] { color: var(--gold); border-color: rgba(245,196,107,.35); background: rgba(245,196,107,.08); }
.edition-switch[hidden] { display: none; }
#panel > .edition-switch {
  position: sticky; top: 0; z-index: 6; gap: 5px; margin: 0; padding: 13px 24px 7px;
  background: linear-gradient(rgba(13,19,44,.98) 75%, rgba(13,19,44,0));
}
#panel > .edition-switch:not([hidden]) ~ #content { padding-top: 7px; }
#panel > .edition-switch:not([hidden]) ~ #content :is(.sticky, .lv-ctl) { top: 48px; }

.crumbs { font-size: 12.5px; color: var(--mute); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--mute); } .crumbs a:hover { color: var(--fg); }
.crumbs .sep { color: var(--dim); }
code, .mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
code { background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 5px; color: var(--fg2); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--fg2); background: rgba(255,255,255,.03); }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.high { color: var(--ok); border-color: rgba(111,224,160,.35); }
.badge.medium { color: var(--warn); border-color: rgba(255,207,112,.35); }
.badge.low { color: var(--bad); border-color: rgba(255,138,138,.35); }
.badge.gold { color: var(--gold); border-color: rgba(245,196,107,.45); background: rgba(245,196,107,.08); }
.badge.plain { color: var(--mute); }
/* checked against the code (core clusters): a link on static pages, a button in the panel that opens the evidence */
.badge.checked { color: var(--ok); border-color: rgba(111,224,160,.35); background: rgba(111,224,160,.06); font: inherit; font-size: 12px; text-decoration: none; cursor: pointer; }
.badge.checked::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badgelink { display: inline-flex; align-items: center; font-size: 12px; padding: 4px 4px; color: var(--fg2); text-decoration: none; }
.badgelink:hover, .badgelink:focus-visible { color: var(--fg); text-decoration: underline; }
.badge.checked:hover, .badge.checked:focus-visible { border-color: rgba(111,224,160,.7); }
ul.evidence { margin: 0 0 14px; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--fg2); }
ul.evidence li { margin: 6px 0; overflow-wrap: anywhere; }
ul.evidence code { font-size: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; padding: 5px 11px; border-radius: 999px; background: rgba(142,162,255,.1); border: 1px solid rgba(142,162,255,.22); color: var(--accent2); transition: transform .2s var(--ease), background .2s; }
a.chip:hover { background: rgba(142,162,255,.2); color: #fff; transform: translateY(-1px); }
.chip.new { background: rgba(255,255,255,.04); border-color: var(--line2); color: var(--fg2); border-style: dashed; }
.chip.word { background: none; color: var(--mute); border-color: var(--line); font-family: var(--mono); font-size: 11.5px; }

.card { border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
.soon { position: relative; overflow: hidden; border: 1px dashed var(--line2); border-radius: 12px; padding: 14px 16px; color: var(--mute); font-size: 14px; line-height: 1.55; }
.soon::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(142,162,255,.08) 50%, transparent 70%); animation: shimmer 2.8s infinite; }
.soon b { color: var(--fg2); font-weight: 600; }
.ref { border-left: 2px solid var(--accent); padding: 8px 12px; margin: 8px 0; background: linear-gradient(90deg, rgba(142,162,255,.08), transparent); border-radius: 0 10px 10px 0; font-size: 14px; color: var(--fg); line-height: 1.5; }
.ref small { display: block; color: var(--mute); font-size: 12px; margin-top: 3px; }
.ref.note { border-color: var(--gold); background: linear-gradient(90deg, rgba(245,196,107,.08), transparent); }
/* 35b: checked references (spine clusters): locator on its own line, a small precision pill */
.ref.chk { border-color: var(--by); background: linear-gradient(90deg, rgba(80,220,200,.07), transparent); }
.ref.chk a { overflow-wrap: anywhere; color: var(--accent2); text-decoration: underline; text-decoration-color: rgba(180,193,255,.35); text-underline-offset: 2px; }
.ref .loc { display: inline; color: var(--fg2); }
.ref.gc { border-color: var(--line2); background: none; }   /* N3: cited by a guide, automatic, not checked */
.ref.gc a { overflow-wrap: anywhere; color: var(--fg); text-decoration: underline; text-decoration-color: rgba(180,193,255,.3); text-underline-offset: 2px; }
.ref.gc small a { color: var(--mute); }
.gcmore > summary { cursor: pointer; color: var(--accent2); font-size: 14px; margin: 8px 0; }
details.gcite .gcbody { padding-bottom: 6px; }
.prec { display: inline-block; vertical-align: 1px; margin-left: 4px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line2); font-size: 11px; line-height: 17px; letter-spacing: .04em; color: var(--mute); white-space: nowrap; cursor: help; }
.prec.exact { color: var(--by); border-color: rgba(80,220,200,.55); }
.prec.section { color: var(--accent2); border-color: rgba(142,162,255,.5); }
.refnote { margin: 4px 0 10px; }
h3.refbg { margin: 18px 0 4px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

/* lists */
.rows { list-style: none; padding: 0; margin: 0; }
.rows li > a, .rows li > .row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; color: var(--fg); font-size: 14px; transition: background .2s, transform .2s var(--ease); }
.rows li > a:hover { background: rgba(142,162,255,.1); transform: translateX(2px); }
.rows .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; background: currentColor; }
.rows .dot.hollow { background: none; border: 1.5px solid currentColor; box-shadow: none; }
.rows .t { flex: 1; min-width: 0; line-height: 1.35; }
.rows .t small { display: block; color: var(--mute); font-size: 12px; margin-top: 1px; }
.rows .end { font-size: 12px; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rows .mono .dir { color: var(--dim); }
.more { margin-top: 6px; font-size: 13px; cursor: pointer; color: var(--accent2); background: rgba(142,162,255,.08); border: 1px solid rgba(142,162,255,.2); padding: 6px 12px; border-radius: 8px; transition: background .2s; }
.more:hover { background: rgba(142,162,255,.18); }
.tabs { display: flex; gap: 4px; margin: 0 0 6px; }
.tabs button { flex: 1; border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 9px; padding: 8px; cursor: pointer; font-size: 13px; color: var(--mute); display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .2s; }
.tabs button.on { color: var(--fg); border-color: var(--line2); background: rgba(255,255,255,.07); }
.tabs .sw { width: 14px; height: 3px; border-radius: 2px; }

/* route stepper */
.route { position: relative; margin: 6px 0 4px; padding-left: 18px; }
.route::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(var(--gold), rgba(245,196,107,.15)); border-radius: 2px; }
.route a, .route span.here { position: relative; display: block; padding: 5px 0; font-size: 13.5px; color: var(--fg2); line-height: 1.35; }
.route a::before, .route span.here::before { content: ""; position: absolute; left: -18px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg1); border: 2px solid var(--gold); }
.route span.here { color: #fff; font-weight: 600; }
.route span.here::before { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.route a:hover { color: #fff; }
.route .skip { font-size: 12px; color: var(--dim); padding: 2px 0; }

/* home */
/* Four release figures and the community proof-size link. */
.glance { margin: 18px 0 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 12px; padding: 12px 14px 10px; }
.stat-row { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 4px 10px; margin: 0; }
.stat-row > div { display: flex; flex-direction: column-reverse; min-width: 0; }
.stat-row dd { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.stat-row dt { font-size: 12px; color: var(--mute); white-space: nowrap; }
.proof-size-link { display: flex; align-items: center; gap: 8px; color: var(--accent2); font-size: 13px; }
.proof-size-link:hover { color: var(--fg); }
.proof-size-link span { font-size: 17px; line-height: 1; }
.glance .proof-size-link { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.cta { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 6px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 11px; font-size: 14px; font-weight: 500; border: 1px solid var(--line2); color: var(--fg); background: rgba(255,255,255,.05); cursor: pointer; transition: transform .2s var(--ease), background .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.09); color: #fff; }
.btn.primary { background: linear-gradient(135deg, #f5c46b, #e89b4a); color: #1a1205; border: none; box-shadow: 0 8px 26px rgba(245,196,107,.3); }
.btn.primary:hover { box-shadow: 0 10px 34px rgba(245,196,107,.45); color: #1a1205; }
.btn .arr { transition: transform .2s var(--ease); } .btn:hover .arr { transform: translateX(3px); }
.howto { display: grid; gap: 8px; margin-top: 4px; }
.howto div { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--fg2); line-height: 1.5; }
.howto .k { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--accent2); background: rgba(142,162,255,.12); }
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.themes a { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--fg); font-size: 13px; line-height: 1.3; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.themes a:hover { border-color: var(--c); background: rgba(255,255,255,.06); transform: translateY(-1px); }
.themes a small { color: var(--mute); font-size: 11.5px; }
.themes a .rg { margin-top: auto; padding-top: 5px; }
.themes a [data-theme-glyph] { align-self: flex-start; }
.themes a [data-theme-glyph] svg { color: var(--c); }
.themes a [data-theme-glyph]:empty { display: none; }
.key-uses { color: var(--uses); } .key-by { color: var(--by); } .key-route { color: var(--gold); }

/* route glyph (routeGlyph() in app.js, route_glyph() in build_site.py) */
.rg { display: inline-flex; align-items: center; vertical-align: middle; line-height: 0; }
.rg svg { display: block; overflow: visible; }
.rg.none { line-height: 1.3; font-size: 12px; color: var(--dim); font-family: var(--sans); font-weight: 400; }
.rows .end .rg { opacity: .9; }
a.rglink { display: inline-flex; align-items: center; gap: 8px; }

/* Article body for the proof-size reference and verification explainer. */
/* Keep the 68ch Inter measure while the fallback face is active. */
.evidence-article { width: min(100%, 42.9em); }
.evidence-article .article-lead { color: var(--fg); font-size: 17px; line-height: 1.6; margin-bottom: 12px; }
.evidence-article .article-date { margin-top: 4px; }
#pagebody .article-byline { margin: 4px 0 16px; }
#pagebody #author { scroll-margin-top: 104px; }
#pagebody #author + p { float: left; margin: 0 16px 8px 0; }
#pagebody #author + p img { display: block; width: 80px; aspect-ratio: 1; border-radius: 12px; }
.evidence-article h2 {
  display: block; margin: 32px 0 12px; padding-top: 15px; border-top: 1px solid var(--line);
  font: 600 24px/1.25 var(--serif); letter-spacing: 0; text-transform: none; color: var(--fg);
}
.evidence-article h2::after { content: none; }
.evidence-article h3 { margin: 23px 0 8px; font-size: 16px; color: var(--fg); }
.evidence-article p, .evidence-article li { line-height: 1.7; }
.evidence-article h2, .evidence-article h3, .article-detail { scroll-margin-top: 104px; }
.evidence-article #community-proof-size { color: var(--gold); }
.article-detail { margin: 12px 0 18px; border: 1px solid var(--line2); border-radius: 10px; background: rgba(142,162,255,.045); }
.article-detail > summary { cursor: pointer; padding: 11px 13px; min-height: 44px; color: var(--fg); font-size: 14px; font-weight: 600; }
.article-detail > summary::marker { color: var(--accent); }
.article-detail > summary:hover { color: var(--accent2); }
.article-detail > div { padding: 0 13px 6px; }
.evidence-article .tablewrap table { font-variant-numeric: tabular-nums; }
:is(#pagebody, #content) .evidence-article pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 540px) {
  .evidence-article .article-lead { font-size: 16px; }
  .evidence-article h2 { margin-top: 28px; font-size: 21px; }
  .evidence-article .tablewrap th, .evidence-article .tablewrap td { padding: 7px 6px; }
}
@media (max-width: 360px) {
  .article-detail > div { padding-inline: 8px; }
  .evidence-article .tablewrap th, .evidence-article .tablewrap td { padding-inline: 4px; }
}

/* ---------- page overlay (learn / about / concept) ---------- */
#page { position: fixed; inset: 0; z-index: 30; overflow: auto; padding: 84px 16px 60px; background: rgba(5,8,21,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility .45s; }
body.paged #page { opacity: 1; visibility: visible; }
body.paged .topbar { z-index: 31; }   /* the bar stays usable over a page, with its section highlighted (owner, 24 Nov) */
#pagebody { max-width: 860px; margin: 0 auto; background: rgba(11,16,38,.86); border: 1px solid var(--line); border-radius: 22px; padding: 38px 44px 50px; box-shadow: 0 30px 80px rgba(0,0,0,.5); transform: translateY(24px); transition: transform .6s var(--ease), opacity .16s; }
body.paged #pagebody { transform: none; }
#pagebody h1 { font-size: 36px; }
#page :is(#controversies, #nielsen-criticism, #masullo-gaps, #nov-25, #nov-27, #real-riemann-hypothesis) { scroll-margin-top: 104px; }
#close { position: fixed; z-index: 31; top: 84px; right: max(16px, calc(50vw - 470px)); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line2); background: var(--glass); cursor: pointer; display: grid; place-items: center; transition: transform .25s var(--ease), background .2s; }
#close:hover { transform: rotate(90deg); background: rgba(255,255,255,.1); }
#close svg { width: 18px; height: 18px; stroke: var(--fg); stroke-width: 2; fill: none; }

/* Learning path uses the generated disclosure tree at every entry. */
.learning-tree, .learning-tree ul { list-style: none; padding-inline-start: 0; }
.learning-tree ul { margin-inline-start: 12px; padding-inline-start: 12px; border-left: 1px solid var(--line); }
.learning-node, .learning-repeat { margin-top: 8px; }
.learning-node { scroll-margin-top: 104px; }
.learning-node > summary, .learning-repeat > a {
  display: list-item; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); color: var(--fg); cursor: pointer; overflow-wrap: anywhere;
}
.learning-node > summary:hover, .learning-repeat > a:hover { background: rgba(255,255,255,.06); border-color: var(--line2); }
.learning-node > summary::marker { color: var(--accent); }
.learning-node > summary .kind, .learning-repeat .kind { margin-inline-end: 4px; }
.learning-body { padding: 10px 14px 4px; color: var(--fg2); }
.learning-body .meta { margin-top: 6px; }
.learning-repeat { padding-inline-start: 14px; }
.learning-repeat > a { display: block; color: var(--fg2); }
.kind { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: 3px 7px; border-radius: 6px; flex: none; }
.kind.theorem { color: #1a1205; background: var(--gold); }
.kind.step { color: #dfe4ff; background: rgba(142,162,255,.3); }
.kind.concept { color: #c8fff4; background: rgba(80,220,200,.22); }
.kind.leaf { color: var(--fg2); background: rgba(255,255,255,.1); }

/* ---------- map chrome ---------- */
.mapctl { position: fixed; z-index: 14; left: 16px; top: 84px; display: flex; flex-direction: column; gap: 6px; transition: opacity .3s; }
.mapctl button { width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 18px; color: var(--fg2); display: grid; place-items: center; transition: background .2s, transform .2s var(--ease); }
.mapctl button:enabled:hover { background: rgba(255,255,255,.1); transform: scale(1.06); }
.mapctl button:disabled { cursor: default; opacity: .55; }
.mapctl svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.mapctl .zbtn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--fg2); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); transition: background .2s, transform .2s var(--ease); }
.mapctl .zbtn:hover { background: rgba(255,255,255,.1); transform: scale(1.06); color: var(--fg); }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.lg.named { background: #b4c1ff; box-shadow: 0 0 8px #8ea2ff; }
.lg.main { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.lg.uses, .lg.by, .lg.route { width: 16px; height: 3px; border-radius: 2px; }
.lg.uses { background: var(--uses); } .lg.by { background: var(--by); } .lg.route { background: var(--gold); }
body.paged .mapctl, body.paged .fbar, body.paged .fmob { opacity: 0; pointer-events: none; visibility: hidden; }

#tip { position: fixed; z-index: 40; left: 0; top: 0; pointer-events: none; padding: 9px 12px; border-radius: 11px; font-size: 13px; max-width: 300px; opacity: 0; transform: translate3d(var(--tx, -400px), var(--ty, 0), 0); transition: opacity .15s; contain: layout paint; box-shadow: 0 12px 30px rgba(0,0,0,.45); background: rgba(13,19,44,.92); }
#tip.on { opacity: 1; }
#tip b { display: block; font-weight: 600; color: #fff; line-height: 1.35; }
#tip span { display: block; color: var(--mute); font-size: 12px; margin-top: 3px; }
#tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

#loader { position: fixed; inset: 80px calc(var(--panel) + 12px) 12px 0; z-index: 2; display: grid; place-content: center; padding: 12px; text-align: center; pointer-events: none; }
#loader.done { visibility: hidden; }
#loader:not(.done) button { pointer-events: auto; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 rgba(255,207,112,.6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(255,207,112,0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.status-chip .cshort { display: none; font-size: 12px; font-weight: 600; color: #6ee7a0; }
@media (max-width: 1100px) { .brand-text, .status-chip span { display: none; } .status-chip { padding: 8px 10px; } .status-chip .cshort { display: inline; } }
.sbtn, .mpeek { display: none; }
@media (max-width: 820px) {
  /* phones: one row of top bar, clear of the notch and the X in-app browser's bars (safe-area insets) */
  .topbar { top: max(6px, env(safe-area-inset-top)); left: max(6px, env(safe-area-inset-left)); right: max(6px, env(safe-area-inset-right)); height: 56px; gap: 2px; padding: 0 4px; border-radius: 15px; }
  .brand { flex: none; width: 44px; height: 44px; justify-content: center; }
  nav { flex: 1; min-width: 0; justify-content: space-around; gap: 0; }
  nav a { display: flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 7px; font-size: 14px; white-space: nowrap; }
  .topbar .status-chip { flex: none; height: 44px; padding: 0 6px; gap: 5px; justify-content: center; border-color: transparent; background: none; }
  .sbtn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: none; border-radius: 11px; background: rgba(255,255,255,.05); cursor: pointer; }
  .sbtn svg { width: 19px; height: 19px; fill: none; stroke: var(--fg2); stroke-width: 2; }
  .sbtn[aria-expanded=true] { background: rgba(142,162,255,.2); }
  .search { display: none; position: absolute; left: 6px; right: 54px; top: 6px; max-width: none; margin: 0; }
  .topbar.searching .search { display: block; }
  .topbar.searching > .brand, .topbar.searching > nav, .topbar.searching > .status-chip { visibility: hidden; }
  .search kbd { display: none; }
  #q { height: 44px; font-size: 16px; }                 /* 16px: iOS does not zoom the page on focus */
  #results { background: rgb(13,19,44); top: 52px; max-height: min(60vh, 520px); max-height: min(60dvh, 520px); }
  #results a { min-height: 44px; }
  /* zoom buttons: top right, 44 px */
  .mapctl { left: auto; right: max(8px, env(safe-area-inset-right)); top: calc(max(6px, env(safe-area-inset-top)) + 64px); gap: 8px; }
  .mapctl button { width: 44px; height: 44px; border-radius: 12px; background: rgba(13,19,44,.6); }
  .mapctl .zbtn { width: 44px; height: 44px; border-radius: 12px; background: rgba(13,19,44,.6); }
  #loader { inset: calc(max(6px, env(safe-area-inset-top)) + 112px) 58px auto; }
  .topbar .status-chip { display: none; }   /* phones: Status is in the bar; the logo, 4 items and the search button fit at 360 px */
  /* the sheet: --full (its height) and --vis (the part on screen) come from the shared shell; these are the fallbacks */
  #panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: calc(100vh - 76px); height: var(--full, calc(100dvh - 76px));
    border-radius: 20px 20px 0 0; border-bottom: none; padding-bottom: var(--hid, 0px);
    transform: translate3d(0, calc(100% - var(--vis, 50vh)), 0); transition: transform .42s var(--ease); touch-action: none;
    background: rgba(12,18,42,.95); backdrop-filter: none; -webkit-backdrop-filter: none; }   /* no blur over a moving map: cheaper frames */
  #panel[data-sheet=peek] { --vis: calc(150px + env(safe-area-inset-bottom, 0px)); }
  #panel[data-sheet=full] { touch-action: pan-y; }
  #panel:not([data-sheet-layout=ready]), #panel.dragging { transition: none; }
  @media (scripting: enabled) {
    /* Size the first peek from the same content the sheet measures after startup. */
    #panel[data-sheet=peek]:not([data-sheet-layout]):has(.mpeek) {
      height: auto; max-height: calc(100dvh - max(6px, env(safe-area-inset-top)) - 64px); transform: translate3d(0, 0, 0);
    }
    #panel[data-sheet=peek]:not([data-sheet-layout]):has(.mpeek) #content { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
    #panel[data-sheet=peek]:not([data-sheet-layout]) .mpeek { margin-bottom: 0; }
    #panel[data-sheet=peek]:not([data-sheet-layout]) :is(.mpeek ~ *, #content:has(.mpeek) ~ #sitefoot) { display: none; }
  }
  body.paged #panel { transform: translate3d(0, 100%, 0); }
  #grip { display: flex; justify-content: center; align-items: flex-start; position: sticky; top: 0; z-index: 5; width: 100%; height: 44px; margin-bottom: -14px; padding: 12px 0 0; border: none;
    background: linear-gradient(rgba(12,18,42,.98) 55%, rgba(12,18,42,0)); cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; }
  #panel > .edition-switch {
    top: 29px; z-index: 4; justify-content: flex-start; padding: 0 18px 6px;
    background: rgba(12,18,42,.98);
  }
  .edition-switch a { min-height: 44px; }
  #panel > .edition-switch:not([hidden]) ~ #content { padding-top: 3px; }
  #panel > .edition-switch:not([hidden]) ~ #content :is(.sticky, .lv-ctl) { top: 77px; }
  #grip span { width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.3); }
  #grip:focus-visible { outline: none; } #grip:focus-visible span { background: var(--accent); box-shadow: 0 0 0 3px rgba(142,162,255,.35); }
  #content { padding: 0 max(18px, env(safe-area-inset-right)) 40px max(18px, env(safe-area-inset-left)); }
  h1 { font-size: 24px; } h1.hero { font-size: 27px; }
  .themes { grid-template-columns: 1fr; }
  #page { padding: calc(max(6px, env(safe-area-inset-top)) + 64px) 0 0; }
  #pagebody { border-radius: 20px 20px 0 0; padding: 26px 20px calc(60px + env(safe-area-inset-bottom)); }
  #pagebody h1 { font-size: 28px; }
  #close { top: calc(max(6px, env(safe-area-inset-top)) + 72px); right: 14px; width: 44px; height: 44px; }
  /* home: the peek is the headline, one action and the short status */
  .mpeek { display: flow-root; padding-top: 2px; }
  #content .dk { display: none; }
  .mpeek h1.hero { font-size: 22px; line-height: 1.2; margin: 0 0 10px; }
  .mpeek .cta { flex-wrap: nowrap; margin: 0; gap: 8px; }
  .mpeek .btn { min-height: 44px; padding: 0 14px; justify-content: center; white-space: nowrap; }
  .mpeek .btn.primary { flex: 1; }
  .mpeek .cta .btn { padding-inline: clamp(8px, 3vw, 14px); }
  @media (max-width: 340px) {
    .mpeek .cta .btn { white-space: normal; text-align: center; }
  }
  .mstatus { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; font-size: 13px; color: var(--fg2); }
  .mstatus i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #6ee7a0; box-shadow: 0 0 8px rgba(110,231,160,.6); }
  .mstatus span { color: var(--mute); }
  .mpeek { margin-bottom: 20px; }                      /* the peek ends in empty space, not half a line of the next text */
  .crumbs .cid, .crumbs .sep:has(+ .cid) { display: none; }   /* the id is in the eyebrow just below */
  h1.ttl { display: block; -webkit-line-clamp: unset; overflow: visible; }   /* phones: the whole title, never cut */
}
@media (max-width: 820px) {   /* learning tree: deep nesting must not push past the screen edge */
  .learning-tree ul { margin-inline-start: 3px; padding-inline-start: 5px; }
  #panel { overflow-x: hidden; } #content ul ul { padding-left: 14px; } #content li { overflow-wrap: anywhere; }   /* prerendered nested lists */
  .learning-body { overflow-wrap: anywhere; padding: 10px 6px 4px; }
}
@media (max-width: 369px) { .topbar .status-chip { display: none; } nav a { padding: 0 5px; } }
/* tap targets: at least 44 x 44 px on touch screens and phones */
@media (max-width: 820px), (pointer: coarse) {
  .rows li > a, .rows li > .row { min-height: 44px; }
  .chip, .tchip, .chip.morechips { min-height: 44px; display: inline-flex; align-items: center; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 0; line-height: 1.3; }
  .crumbs { margin-bottom: 4px; flex-wrap: nowrap; gap: 2px 8px; } .crumbs a:first-child { flex: none; min-width: 44px; }
  .link, .more, .btn, .vbtn, .rnode, .rroot { min-height: 44px; }
  .badge.checked { min-height: 44px; padding: 0 14px; }
  .link { display: inline-flex; align-items: center; }
  .srcbtn { display: grid; place-items: center; min-width: 44px; min-height: 44px; margin-right: -10px; }
  .sticky .back { width: 44px; height: 44px; }
  details.refs summary { min-height: 44px; align-items: center; }
  .report a { display: inline-flex; align-items: center; min-height: 44px; }
  .proof-size-link { min-height: 44px; }
  .mpeek .proof-size-link { margin-top: -6px; }
  .glance .proof-size-link { display: none; }
  .sitefoot nav a, .sitefoot p a { display: inline-flex; align-items: center; min-height: 44px; }
  .lv-sort span { display: flex; align-items: center; justify-content: center; min-height: 44px; }
  #lv-q { height: 44px; font-size: 16px; }
  .uproute .morestep button.row { min-height: 44px; }
  .mapctl button { width: 44px; height: 44px; }
  .rows li > a:hover { transform: none; }
}

/* the one quiet report link in a cluster panel (feedback itself lives in the site footer) */
.report { margin: 26px 0 0; font-size: 12px; }
.report a { color: var(--dim); } .report a:hover, .report a:focus-visible { color: var(--fg2); }

/* ---------- panel redesign: theme glow, sticky title, summary, stat tiles ---------- */
#panel { --c: var(--accent); }
#panel::before { content: ""; position: sticky; top: 0; display: block; height: 0; z-index: 3; box-shadow: 0 0 60px 26px color-mix(in srgb, var(--c) 22%, transparent); pointer-events: none; }
#panel::after { content: ""; position: absolute; top: 0; left: 18px; right: 18px; height: 1px; background: linear-gradient(90deg, transparent, var(--c), transparent); opacity: .8; pointer-events: none; }
.sticky { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 8px; margin: -22px -24px -48px; padding: 0 16px; height: 48px; overflow: hidden; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px);
  background: rgba(11,16,38,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; font-size: 14px; font-weight: 600; color: var(--fg); transition: opacity .2s, transform .25s var(--ease), visibility .2s, border-color .2s; }
.sticky.on { opacity: 1; visibility: visible; pointer-events: auto; transform: none; border-color: var(--line); }
.sticky + .crumbs { margin-top: 22px; }
.sticky span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky .back { flex: none; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; display: grid; place-items: center; }
.sticky .back:hover { background: rgba(255,255,255,.1); }
.sticky .back svg { width: 16px; height: 16px; fill: none; stroke: var(--fg2); stroke-width: 2; }
.eyebrow .core { margin-left: auto; font-size: 10px; letter-spacing: .1em; color: var(--gold); border: 1px solid rgba(245,196,107,.4); border-radius: 999px; padding: 2px 8px; }
h1.ttl { font-size: 24px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tldr { font-size: 16.5px; line-height: 1.55; color: var(--fg); margin: 2px 0 8px; }
.clamp p { margin: 0; font-size: 14.5px; }
.clamp { position: relative; max-height: 4.9em; overflow: hidden; transition: max-height .45s var(--ease); }
.clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.2em; background: linear-gradient(transparent, rgba(13,19,44,.95)); transition: opacity .3s; }
.clamp.open { max-height: 80em; } .clamp.open::after { opacity: 0; }
.link { background: none; border: none; padding: 4px 0; margin: 2px 0 0; color: var(--accent2); font-size: 13px; cursor: pointer; }
.link:hover { color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; margin: 16px 0 4px; }
.tile { text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 12px; padding: 10px 11px 9px; font: inherit; color: inherit; transition: border-color .2s, background .2s, transform .2s var(--ease); }
button.tile { cursor: pointer; } button.tile:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); background: rgba(255,255,255,.06); transform: translateY(-1px); }
.tile b { display: flex; align-items: center; min-height: 26px; font-family: var(--serif); font-size: 21px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; }
.tile > span { display: block; font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile em { font-style: normal; }
.tile .dotsep { font-style: normal; color: var(--dim); margin: 0 6px; font-weight: 400; }
.tiles:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hiddenchips { display: contents; } .hiddenchips:not(.open) > * { display: none; }
.chip.morechips { cursor: pointer; background: none; border-style: dashed; color: var(--mute); }
.chip.morechips:hover { color: var(--fg); }
details.refs { margin-top: 24px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: rgba(255,255,255,.02); }
details.refs summary { list-style: none; cursor: pointer; padding: 12px 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
details.refs summary::-webkit-details-marker { display: none; }
details.refs summary::before { content: "›"; font-size: 15px; transition: transform .2s; display: inline-block; }
details.refs[open] summary::before { transform: rotate(90deg); }
details.refs summary small { flex-basis: 100%; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; color: var(--dim); }
details.refs .ref:last-child { margin-bottom: 14px; }
.route a, .route span.here { padding: 6px 0 6px 4px; }
.route a::before { transition: background .2s, box-shadow .2s; }
.route a:hover::before { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
@media (max-width: 820px) { .sticky { margin: 0 -18px -48px; top: 30px; } .sticky + .crumbs { margin-top: 4px; } h1.ttl { font-size: 22px; } }

/* site footer: one element, moved by app.js between the panel and the full-page view */
.sitefoot { padding: 14px 24px 22px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mute); }
.sitefoot nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; order: 0; }
.sitefoot a, .sitefoot nav a { color: var(--mute); text-decoration: none; padding: 0; font-size: 12px; border-radius: 0; background: none; }
.sitefoot a:hover, .sitefoot nav a:hover { color: var(--fg); background: none; }
.sitefoot p { margin: 0; font-size: 12px; color: var(--mute); }
.sitefoot p a { color: var(--accent2); }
#page > .sitefoot { max-width: 860px; margin: 14px auto 0; border-top: none; padding: 0 44px; }
@media (max-width: 820px) { .sitefoot { padding: 12px 18px calc(22px + env(safe-area-inset-bottom)); } #page > .sitefoot { padding: 0 20px 30px; } }

/* ---------- list mode ---------- */
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skiplink { position: fixed; z-index: 60; left: 12px; top: -60px; padding: 10px 14px; border-radius: 10px; background: var(--bg1); border: 1px solid var(--line2); color: var(--fg); font-size: 14px; }
.skiplink:focus { top: 12px; }
.mapctl #zlist { margin-top: 6px; }
#lv-h:focus { outline: none; }
.lv-ctl { position: sticky; top: 0; z-index: 5; margin: 14px -24px 0; padding: 12px 24px 10px; background: rgba(13,19,44,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
#lv-q { width: 100%; height: 38px; padding: 0 12px; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; color: var(--fg); font-size: 15px; outline: none; transition: border-color .2s, background .2s, box-shadow .2s; }
#lv-q::placeholder { color: var(--dim); }
#lv-q:focus { border-color: rgba(142,162,255,.55); background: rgba(255,255,255,.08); box-shadow: 0 0 0 4px rgba(142,162,255,.12); }
.lv-sort { display: flex; gap: 4px; border: none; padding: 0; margin: 8px 0 0; }
.lv-sort label { flex: 1; position: relative; }
.lv-sort input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lv-sort span { display: block; text-align: center; border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 9px; padding: 7px 6px; font-size: 12.5px; color: var(--mute); transition: color .2s, background .2s, border-color .2s; pointer-events: none; }
.lv-sort label:hover span { color: var(--fg); }
.lv-sort input:checked + span { color: var(--fg); border-color: var(--line2); background: rgba(142,162,255,.16); }
.lv-sort input:focus-visible + span { box-shadow: 0 0 0 3px rgba(142,162,255,.45); }
.lv-n { margin: 10px 0 0; }
.lv-g h3 { position: sticky; top: var(--lvtop, 99px); z-index: 1; margin: 18px -24px 4px; padding: 6px 24px; background: rgb(13,19,44); font-size: 13.5px; line-height: 1.35; }
.lv-g h3 a { color: var(--fg); } .lv-g h3 a:hover { color: #fff; }
.lv-g h3 .sw { flex: none; width: 9px; height: 9px; border-radius: 3px; }
.lv-g h3 .n { color: var(--dim); font-weight: 500; font-size: 12px; }
.lv-out .rows a:focus-visible, .lv-g h3 a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; background: rgba(142,162,255,.12); }
.lv-out mark { background: none; color: var(--gold); }
.lv-main { color: var(--gold); }
@media (max-width: 820px) {
  .lv-ctl { top: var(--lvgrip, 21px); margin: 12px -18px 0; padding: 10px 18px 8px; }
  .lv-g h3 { margin: 16px -18px 4px; padding: 6px 18px; }
  .lv-sort span { font-size: 12px; padding: 7px 4px; }
}
@media (prefers-reduced-motion: reduce) { .rows li > a:hover { transform: none; } }

/* ---------- Lean source viewer ---------- */
.src-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.src-act a.more { display: inline-block; }
.src-status { margin: 10px 0 6px; }
.tile .rg svg { height: 20px; width: auto; }
@media (max-width: 820px) {   /* one column of theme cards: the glyph sits at the end of the quiet line */
  .themes a { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: end; }
  .themes a .tn { grid-column: 1 / -1; }
  .themes a small { grid-column: 1; }
  .themes a :is(.rg, [data-theme-glyph]) { grid-column: 2; grid-row: 2; padding-top: 0; margin: 0; }
}

/* ---------- cluster panel: why it's in the proof, builds on / needed by ---------- */
.feeds { margin: 8px 0 0; }
.uproute { position: relative; margin: 4px 0 2px; }
.uproute::before { content: ""; position: absolute; left: 3px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(color-mix(in srgb, var(--c) 70%, transparent), rgba(245,196,107,.7)); border-radius: 2px; }
.uproute li > a, .uproute li > .row { position: relative; }
.uproute .dot { position: relative; z-index: 1; }
.uproute .here .t { color: #fff; font-weight: 600; }
.uproute .t small { margin: 0 0 1px; }
.uproute .here .t small, .uproute .main .t small { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; font-weight: 600; }
.uproute .main .t small { color: var(--gold); }
.uproute .star { position: relative; z-index: 1; width: 8px; flex: none; display: grid; place-items: center; color: var(--gold); font-size: 14px; text-shadow: 0 0 10px var(--gold); }
.uproute .morestep button.row { width: calc(100% + 20px); border: 1px dashed var(--line2); background: none; cursor: pointer; color: var(--mute); font-size: 13px; text-align: left; padding: 6px 10px 6px 28px; }
.uproute .morestep button.row:hover { color: var(--fg); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.tchips { margin-bottom: 6px; }
.tchip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; cursor: pointer; color: var(--fg2);
  background: color-mix(in srgb, var(--tc) 10%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); transition: background .2s, border-color .2s; }
.tchip i { width: 7px; height: 7px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 6px var(--tc); }
.tchip b { font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.tchip:hover, .tchip[aria-expanded=true] { background: color-mix(in srgb, var(--tc) 22%, transparent); border-color: var(--tc); color: #fff; }
.tpanel { margin: 4px 0 8px; padding: 4px 10px 6px; border-left: 2px solid var(--line2); }
.tpanel .rows li > a { margin: 0 -10px 0 -6px; }
.onroute { color: var(--gold); font-size: 12px; white-space: nowrap; }
.keyline { margin: 8px 0 2px; }
.keyline a { color: var(--fg2); } .keyline a:hover { color: #fff; }
details.fold summary { font-size: 11px; }
details.fold summary .chev { font-size: 14px; color: var(--dim); }
details.fold summary::before { content: none; }
details.fold[open] summary .chev { display: inline-block; transform: rotate(90deg); }
details.fold > :last-child { margin-bottom: 14px; }
/* file panel: imports grouped by cluster */
.fromain { margin: -6px 0 14px; }
.gimp .ghead { margin-top: 6px; }
.gimp .gfile a { padding: 4px 10px 4px 28px; font-size: 13px; }
.gimp .gfile.xtra { display: none; } .gimp.all .gfile.xtra { display: block; }
@media (max-width: 820px) { nav .wide { display: none; } }
#content.in > .tpanel, #content.in > .nball { animation-delay: 0s; animation-duration: .3s; }
/* QA12a: Explore is in the phone nav too (it was hidden, as the logo also goes home). Five 44 px items, the search
   button and the "Certified" chip do not fit next to the logo below about 440 px, so there the logo gives way to Explore */
/* the top bar (owner, 24 Nov): logo, Status · Guides · Timeline · Learn and the search button; compact on small phones */
@media (max-width: 440px) { nav a { padding: 0 4px; font-size: 13.5px; min-width: 0; } .topbar { gap: 2px; } }
@media (max-width: 374px) { nav a { padding: 0 3px; font-size: 13px; } }
.rows.steps { border-left: 2px solid var(--line2); padding-left: 16px; margin-left: 2px; }
.rows.steps li > span.t { display: block; padding: 8px 0; font-size: 14px; color: var(--fg); }

/* cluster panel file rows: the row opens the file, </> jumps straight to its source */
.rows li.frow { display: flex; align-items: center; gap: 4px; }
.rows li.frow > a:first-child { flex: 1; min-width: 0; margin-right: 0; }
.srcbtn { flex: none; font: 500 11px var(--mono); color: var(--accent2); padding: 5px 7px; margin-right: -6px; border-radius: 7px; border: 1px solid rgba(142,162,255,.22); background: rgba(142,162,255,.06); transition: background .2s, color .2s; }
.srcbtn:hover { background: rgba(142,162,255,.18); color: #fff; }
.srcbtn:focus-visible, .vbtn:focus-visible, .rnode:focus-visible, .rroot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Legacy button and heading styles still used by the readable reader. */
.vhead { position: sticky; top: 0; z-index: 3; margin: 0 -32px 14px; padding: 18px 32px 12px; background: rgba(11,16,38,.96); border-bottom: 1px solid var(--line); border-radius: 22px 22px 0 0; }
.vbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.vbar .eyebrow { margin: 0 auto 0 0; }
.vbtn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--fg2); font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.vbtn:hover { background: rgba(255,255,255,.1); color: #fff; }
.vbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.vbtn.icon { width: 34px; padding: 0; justify-content: center; }
#pagebody h1.vpath { font: 500 19px/1.35 var(--mono); margin: 0 0 6px; word-break: break-all; color: #fff; }
.vpath .dir { color: var(--dim); }
#pagebody h1.vmissing { font-size: 22px; margin: 4px 0 8px; overflow-wrap: anywhere; }
#pagebody h1.vmissing code { font-size: .85em; }
.vmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; }
.vmeta a { display: inline-flex; align-items: center; gap: 7px; color: var(--fg2); } .vmeta a:hover { color: #fff; }
.vmeta .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; flex: none; }
.vmeta .sep { color: var(--dim); }
.vnotes { margin: 0 0 12px; } .vnotes h3 { margin-top: 2px; } .vnotes p { font-size: 14px; margin-bottom: 6px; }
.vsrc .src-status { margin: 0 0 6px; }
.vfoot { margin: 10px 0 0; } .vfoot code { white-space: nowrap; word-break: normal; }
.vimps { margin-top: 16px; }
@media (max-width: 820px) {
  .vhead { top: 0; margin: 0 -14px 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; border-radius: 0; }
  #pagebody h1.vpath { font-size: 15px; }
  .vmeta > a[data-k] { flex-basis: 100%; } .vmeta > a[data-k] + .sep { display: none; }
  .vbtn { height: 32px; padding: 0 10px; font-size: 12.5px; }
}

/* ---------- /route/: rings around the main theorem ---------- */
.rfig { margin: 18px auto 6px; max-width: 540px; }
svg.rings { display: block; width: 100%; height: auto; overflow: visible; }
.rband { fill: rgba(142,162,255,.035); stroke: rgba(142,162,255,.08); stroke-width: 1; fill-rule: evenodd; transition: fill .2s, stroke .2s; animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.rband.on { fill: rgba(142,162,255,.13); stroke: rgba(200,210,255,.55); }
.rdots { animation: ringin .9s var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
.rhit { fill: transparent; fill-rule: evenodd; cursor: pointer; pointer-events: all; outline: none; }
.rhit:focus-visible { stroke: #fff; stroke-width: 1.5; stroke-dasharray: 4 4; }
.rstar { animation: starpulse 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.rnums text { font: 600 9.5px var(--sans); fill: var(--fg2); paint-order: stroke; stroke: rgba(5,8,21,.9); stroke-width: 3px; pointer-events: none; }
.rcap { text-align: center; font-size: 13.5px; color: var(--mute); min-height: 1.6em; margin-top: 8px; }
.rcap b { color: #fff; font-weight: 600; } .rcap a { margin-left: 6px; }
@keyframes ringin { from { opacity: 0; } to { opacity: 1; } }
@keyframes starpulse { 0%, 100% { opacity: 1; } 50% { opacity: .78; } }
.rtree { margin: 6px 0 0; }
.rroot { display: flex; align-items: center; gap: 10px; width: max-content; max-width: 100%; margin: 0 auto; padding: 9px 14px; border-radius: 12px; border: 1px solid rgba(245,196,107,.45); background: rgba(245,196,107,.07); color: var(--fg); font-size: 14px; font-weight: 600; }
.rroot .star { color: var(--gold); font-size: 17px; text-shadow: 0 0 10px var(--gold); }
.rroot small { display: block; font-weight: 400; font-size: 12px; color: var(--mute); }
.rroot:hover { background: rgba(245,196,107,.14); color: #fff; }
.rcols { list-style: none; margin: 0; padding: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; position: relative; }
.rcols::before { content: ""; position: absolute; top: 0; left: 50%; height: 18px; width: 1px; background: rgba(245,196,107,.5); }
.rcols > li { border-top: 1px solid rgba(245,196,107,.3); padding-top: 10px; }
.rcols ul { list-style: none; margin: 6px 0 0 8px; padding: 0 0 0 12px; border-left: 1px solid var(--line2); display: grid; gap: 2px; }
.rnode { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 9px; color: var(--fg); font-size: 13px; line-height: 1.3; transition: background .2s; }
.rnode:hover { background: rgba(142,162,255,.1); color: #fff; }
.rnode.d1 { font-weight: 600; font-size: 13.5px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.rnode.d2 { color: var(--fg2); }
.rnode .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: currentColor; box-shadow: 0 0 8px currentColor; }
.rstats { gap: 8px 14px; margin: 26px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); }
.rstats code { font-size: 11px; padding: 0 3px; }
@media (max-width: 600px) { .rstats { grid-template-columns: 1fr 1fr; } .rcols { grid-template-columns: 1fr; } .rcols::before { left: 18px; } }

@media (prefers-reduced-motion: reduce) { .rstar, .rband, .rdots { animation: none; } }

/* ---------- colour by field, and map filters (filters section in app.js) ---------- */
/* desktop: a slim bar along the bottom edge of the map: the field legend (each chip a filter), then small dropdowns */
.fbar { position: fixed; z-index: 14; left: 16px; bottom: 16px; max-width: calc(100vw - var(--panel) - 56px); display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 5px 7px; border-radius: 14px; font-size: 12px; color: var(--mute); box-shadow: 0 10px 34px rgba(0,0,0,.3); transition: opacity .3s, visibility .3s; }
.fbar:empty { display: none; }
.fchips { display: flex; flex-wrap: wrap; gap: 2px 3px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px 0 8px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--fg2); font-size: 12px; cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, color .2s, opacity .2s; }
.fchip i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--fc); box-shadow: 0 0 7px var(--fc); }
.fchip small { display: none; }
.fchip:hover { background: rgba(255,255,255,.07); color: #fff; }
.fchip[aria-pressed=true] { color: #fff; background: color-mix(in srgb, var(--fc) 17%, transparent); border-color: color-mix(in srgb, var(--fc) 60%, transparent); }
.fchips:has([aria-pressed=true]) .fchip[aria-pressed=false] { color: var(--mute); }
.fchips:has([aria-pressed=true]) .fchip[aria-pressed=false] i { opacity: .55; box-shadow: none; }
body:not([data-cmode=field]) .fchip i { background: none; box-shadow: none; border: 1.5px solid var(--dim); }   /* the map's colours are not fields now */
.fbar .fctl { display: contents; }                       /* the controls flow in one row */
.fddb b:empty { display: none; }
.fp-fields { display: grid; gap: 2px; min-width: 250px; }    /* the Fields dropdown: one chip per line, with its count */
.fp-fields .fchip { justify-content: flex-start; height: 30px; border-radius: 8px; font-size: 13px; }
.fp-fields .fchip span { flex: 1; text-align: left; }
.fp-fields .fchip small { display: inline; color: var(--dim); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.fdd { position: relative; }
.fddb, .fnew { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px 0 9px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--mute); font-size: 12px; cursor: pointer; white-space: nowrap; transition: color .2s, background .2s, border-color .2s; }
.fddb b { font-weight: 500; color: var(--fg2); }
.fddb svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .2s; }
.fddb[aria-expanded=true] svg { transform: rotate(180deg); }
.fddb:hover, .fnew:hover { color: var(--fg); background: rgba(255,255,255,.07); }
.fddb.on, .fnew[aria-pressed=true] { color: #fff; border-color: rgba(142,162,255,.45); background: rgba(142,162,255,.16); }
.fddb.on b { color: #fff; }
.fnew small { display: none; }
.fpop { position: absolute; left: -4px; bottom: calc(100% + 12px); z-index: 2; width: max-content; min-width: 220px; max-width: 340px; padding: 12px 14px 10px; border-radius: 12px; background: rgba(13,19,44,.97); border: 1px solid var(--line2); box-shadow: 0 18px 50px rgba(0,0,0,.55); animation: pop .16s var(--ease); }
.fsec { border: none; margin: 0; padding: 0; min-width: 0; }
.fsec legend { padding: 0; margin-bottom: 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.fsec legend small { display: block; margin-top: 2px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--dim); font-size: 11.5px; }
.fopts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fopt { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-size: 13px; color: var(--fg2); cursor: pointer; border-radius: 7px; }
.fopt:hover { color: #fff; }
.fopt input { flex: none; width: 15px; height: 15px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.fopt span { flex: 1; display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.fopt small { color: var(--dim); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.fdrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--fg2); }
.fdrow label { display: inline-flex; align-items: center; gap: 6px; }
.fdrow select, .fcm select { height: 30px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line2); background: rgb(20,27,58); color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; }
.fcm { display: inline-flex; align-items: center; gap: 6px; margin-left: 3px; padding-left: 9px; border-left: 1px solid var(--line); }
.fcm select { height: 26px; font-size: 12px; color: var(--fg2); background: rgba(20,27,58,.9); }
.framp { display: none; align-items: center; gap: 5px; font-size: 11px; color: var(--mute); }
.framp i { width: 64px; height: 6px; border-radius: 3px; }
.framp b { font-weight: 500; }
body[data-cmode=dist] .framp { display: inline-flex; }
.fkeys { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; margin-left: 1px; padding-left: 7px; border-left: 1px solid var(--line); font-size: 11px; }   /* (compact: the bar stays one row at 1440 px with the panel open) */
.fkeys span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.fkeys .lg { width: 10px; }
.fkeys { display: none; }
body.selected .fkeys { display: inline-flex; animation: rise .4s var(--ease); }
.fcount { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 0 auto; padding-left: 8px; font-size: 12px; color: var(--fg2); line-height: 1.3; white-space: nowrap; }
.fcount b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.fclr { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid var(--line2); background: rgba(255,255,255,.05); color: var(--fg2); font-size: 11px; line-height: 1; cursor: pointer; }
.fclr:hover { background: rgba(255,255,255,.15); color: #fff; }
.fclr[hidden] { display: none; }
.fchip:focus-visible, .fddb:focus-visible, .fnew:focus-visible, .fclr:focus-visible, .fbtn:focus-visible, .ftag:focus-visible, .lv-fbtn:focus-visible, .fs-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* the count, with its clear button: top left of the map, beside the zoom buttons (on phones, beside Filter) */
.fmob { position: fixed; z-index: 14; left: 64px; top: 84px; display: flex; align-items: center; gap: 6px; transition: opacity .3s, visibility .3s; }
.fbtn, .lv-fbtn { display: none; }
.fmob .fcount { display: none; }
.fmob.on .fcount { display: inline-flex; height: 36px; margin: 0; padding: 0 6px 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font-size: 12.5px; box-shadow: 0 8px 28px rgba(0,0,0,.3); animation: rise .3s var(--ease); }
.ph-only { display: none; }

/* cluster and theme panels: field · era · level, quiet; field and era apply that filter */
.ctags { display: flex; flex-wrap: wrap; align-items: center; gap: 0 7px; margin: -4px 0 12px; font-size: 12.5px; color: var(--mute); line-height: 1.4; }
.ctags .sep { color: var(--dim); }
.ctags .tagnote { margin-left: 4px; font-size: 11px; color: var(--mute); text-decoration: underline dotted; text-underline-offset: 2px; }
.ctags .tagnote:hover, .ctags .tagnote:focus-visible { color: var(--fg2); }
.badge[title] { cursor: help; }
.ftag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; border: none; background: none; color: var(--fg2); font-size: 12.5px; cursor: pointer; text-decoration: underline dotted rgba(180,193,255,.4); text-underline-offset: 3px; }
.ftag i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--fc); box-shadow: 0 0 6px var(--fc); }
.ftag:hover { color: #fff; text-decoration-color: currentColor; }
.ftag[aria-pressed=true] { color: #fff; text-decoration: underline solid var(--gold); }

/* the list follows the map's filters */
.lv-f { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin: 10px 0 0; font-size: 13px; color: var(--fg2); line-height: 1.45; }
.lv-f b { color: var(--mute); font-weight: 600; }
.lv-f .link { margin: 0; }

/* phones: a Filter button on the map (and in the list) opens a sheet with every control */
.fbadge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #1a1205; font-size: 11px; font-weight: 700; }
.fbadge[hidden] { display: none; }
dialog.fsheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 560px; max-height: min(86vh, 760px); max-height: min(86dvh, 760px); margin: 0 auto; padding: 0; border: 1px solid var(--line2); border-bottom: none; border-radius: 20px 20px 0 0; background: rgb(12,18,42); color: var(--fg); box-shadow: 0 -20px 60px rgba(0,0,0,.5); overflow: hidden; overscroll-behavior: contain; }
dialog.fsheet[open] { display: flex; flex-direction: column; animation: sheetup .3s var(--ease); }
dialog.fsheet::backdrop { background: rgba(3,5,14,.5); }
.fs-in { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.fs-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 8px 20px; border-bottom: 1px solid var(--line); }
.fs-head h2 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--fg); }
.fs-head h2::after { content: none; }
.fs-x { display: grid; place-items: center; width: 44px; height: 44px; border: none; border-radius: 12px; background: none; cursor: pointer; }
.fs-x svg { width: 18px; height: 18px; stroke: var(--fg2); stroke-width: 2; fill: none; }
.fs-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 22px; padding: 14px 18px 18px; }
.fs-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fs-fields .fchip { height: auto; min-height: 44px; padding: 6px 10px; border-radius: 11px; border-color: var(--line); background: rgba(255,255,255,.03); font-size: 13.5px; line-height: 1.25; white-space: normal; text-align: left; }
.fs-fields .fchip span { flex: 1; }
.fs-fields .fchip small { display: inline; color: var(--dim); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.fsheet .fopts { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 6px; }
.fsheet .fopt { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.03); font-size: 14px; }
.fsheet .fopt:has(input:checked) { color: #fff; border-color: rgba(142,162,255,.5); background: rgba(142,162,255,.14); }
.fsheet .fopt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.fsheet .fopt input { width: 18px; height: 18px; }
.fsheet .fopt span { flex-wrap: wrap; align-items: baseline; column-gap: 8px; min-width: 0; }   /* a long label pushes its count below, never outside */
.fsheet .fdrow { font-size: 15px; }
.fsheet .fdrow select { height: 44px; min-width: 96px; padding: 0 10px; font-size: 16px; }
.fnew.fs-new { justify-self: start; height: auto; min-height: 44px; margin-top: -12px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.fnew.fs-new small { display: inline; margin-left: 4px; color: var(--dim); }
.fnew.fs-new[aria-pressed=true] small { color: var(--fg2); }
.fseg { display: flex; gap: 4px; }
.fseg label { position: relative; flex: 1; }
.fseg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.fseg span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.03); font-size: 14px; color: var(--mute); pointer-events: none; }
.fseg input:checked + span { color: var(--fg); border-color: var(--line2); background: rgba(142,162,255,.16); }
.fseg input:focus-visible + span { box-shadow: 0 0 0 3px rgba(142,162,255,.45); }
.fs-cm .framp { margin-top: 10px; }
.fs-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) 18px; border-top: 1px solid var(--line); background: rgb(12,18,42); }
.fs-foot .fcount { flex: 1; min-width: 0; margin: 0; padding: 0; font-size: 13px; white-space: normal; }
.fs-foot .btn { min-height: 44px; padding: 0 16px; }
@keyframes sheetup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 820px) {
  .fbar { display: none; }
  .ph-only { display: inline; } .dk-only { display: none; }
  .fmob { left: max(8px, env(safe-area-inset-left)); top: calc(max(6px, env(safe-area-inset-top)) + 64px); max-width: calc(100vw - 126px); }
  .fbtn { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 13px 0 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(13,19,44,.62); color: var(--fg2); font-size: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .fbtn svg, .lv-fbtn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
  .fmob.on .fbtn { color: #fff; border-color: rgba(245,196,107,.45); }
  .fmob.on .fcount { height: 44px; padding: 0 0 0 12px; gap: 0; border-radius: 12px; background: rgba(13,19,44,.78); backdrop-filter: none; -webkit-backdrop-filter: none; font-size: 13px; box-shadow: none; }
  .fmob .fcs { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* "287 of 2,647": short on the map, whole for screen readers */
  .fmob .fclr { width: 40px; height: 44px; border: none; border-radius: 0 12px 12px 0; background: none; font-size: 13px; }
  .lv-ctl { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; }
  #lv-q { grid-column: 1; grid-row: 1; }
  .lv-fbtn { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--fg2); font-size: 14px; cursor: pointer; }
  .lv-sort { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 820px), (pointer: coarse) { .ftag { min-height: 44px; } .ctags { margin: -8px 0 4px; } }
@media (prefers-reduced-motion: reduce) { dialog.fsheet[open], .fpop { animation: none; } }
/* content pages built from Markdown (build_site.py: /status/, /faq/, /what-is-the-riemann-hypothesis/ …) */
/* Keep top-level prose lists at the loaded Inter line height during the swap. */
#pagebody > :is(ul, ol) { line-height: 1.25; }
.asof { margin-top: -4px; }
.tablewrap { overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 12px; }
.tablewrap table { border-collapse: collapse; width: 100%; font-size: 13.5px; line-height: 1.45; }
.tablewrap th, .tablewrap td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tablewrap th { color: var(--fg); font-weight: 600; background: rgba(255,255,255,.04); }
.tablewrap tr:last-child td { border-bottom: none; }
.callout { margin: 16px 0; padding: 14px 18px; border: 1px solid var(--line2); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: linear-gradient(90deg, rgba(142,162,255,.08), rgba(255,255,255,.02)); }
.callout p { margin: 8px 0; } .callout p:first-child { margin-top: 0; } .callout p:last-child { margin-bottom: 0; }
#pagebody pre, #content pre { overflow-x: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0,0,0,.25); font: 12.5px/1.55 var(--mono); }
#pagebody pre code, #content pre code { white-space: pre; word-break: normal; background: none; padding: 0; }
#pagebody p code, #pagebody li code, #content p code, #content li code { word-break: normal; overflow-wrap: anywhere; }   /* break only a code span that cannot fit a line */
.tablewrap code, .callout code { word-break: normal; overflow-wrap: break-word; }
#pagebody pre.wrap, #pagebody pre.wrap code { white-space: pre-wrap; overflow-wrap: anywhere; }   /* /api/: the index JSON wraps instead of scrolling sideways */
.ltabs { display: flex; gap: 4px; padding: 4px; margin: 18px 0 4px; border: 1px solid var(--line); border-radius: 12px; background: #151c3d; position: sticky; top: -85px; z-index: 2; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 14px rgba(5,8,21,.35); }
/* QA15: the tabs stick at the very top of the window (top = minus #page's top padding), not 84px down: stuck lower,
   the page scrolled on in the band above them, so the zeros figure showed above and below the bar. Anything scrolled
   into view inside the levels (the zeros figure, a section, a heading) stops below them (their height, about 50px) */
@media (max-width: 820px) { .ltabs { top: calc(env(safe-area-inset-top, 0px) - max(6px, env(safe-area-inset-top, 0px)) - 65px); } }
.levels .level, .levels h2, .levels h3, .levels .zfig { scroll-margin-top: 70px; }
.levels { scroll-margin-top: 84px; }   /* a jump to the levels (#student) shows the tabs with a little of the page above */
@media (max-width: 820px) { .levels { scroll-margin-top: 70px; } }
.ltabs a { flex: 1; text-align: center; padding: 9px 10px; min-height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--fg2); font-size: 14px; font-weight: 500; transition: background .2s, color .2s; }
.ltabs a:hover { color: var(--fg); background: rgba(255,255,255,.05); }
.ltabs a.on { color: var(--fg); background: rgba(142,162,255,.18); box-shadow: inset 0 0 0 1px var(--line2); }
.levels.tabbed .level > h2:first-child { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.level[hidden] { display: none; }
@media (max-width: 820px) { .ltabs a { min-height: 44px; } .tablewrap table { font-size: 12.5px; } }

/* ---------- Share and Cite ---------- */
.sharebar { margin: 0 0 14px; }
.sharebar:empty { display: none; }
.share-actions { display: inline-flex; align-items: center; gap: 6px; }
.share { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--fg2); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.share:hover { background: rgba(255,255,255,.09); color: #fff; }
.share:focus-visible, .share-menu :is(button, a, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.share svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-icon { flex: none; width: 36px; padding: 0; justify-content: center; border-radius: 10px; }
#zshare { position: fixed; z-index: 14; top: 84px; right: calc(var(--panel) + 24px); }
#zshare .share { background: rgba(13,19,44,.85); }
body:is(.paged, .lean, [data-embed], [data-view="cluster"], [data-view="theme"]) #zshare { display: none; }
.share-menu { position: fixed; inset: auto; margin: 0; width: min(190px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); padding: 0; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg1); color: var(--fg); box-shadow: 0 16px 44px rgba(0,0,0,.45); }
.share-menu::backdrop { background: transparent; }
.share-options, .embed-options { display: grid; gap: 2px; padding: 6px; }
.share-menu [hidden] { display: none; }
.share-head { display: flex; align-items: center; justify-content: space-between; padding-left: 8px; }
.share-head h2 { margin: 0; color: var(--mute); font-size: 13px; font-weight: 600; }
.share-menu :is(button, a):not([hidden]) { display: flex; align-items: center; min-height: 34px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--fg); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.share-menu :is(button, a):hover { background: var(--glass2); }
.share-menu [role="status"] { margin: 0; padding: 0 8px; color: var(--fg2); font-size: 13px; }
.share-menu [role="status"]:not(:empty) { padding-block: 5px; }
.share-download { display: flex; gap: 5px; margin: 3px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: 6px; }
.share-download legend { padding: 0 4px; color: var(--mute); font-size: 12px; }
.share-download button { flex: 1; justify-content: center; }
.share-menu[aria-labelledby="embed-heading"] { width: min(460px, calc(100vw - 16px)); }
.embed-options { gap: 8px; padding: 10px; }
.embed-options textarea { box-sizing: border-box; width: 100%; resize: vertical; min-height: 90px; padding: 8px; border: 1px solid var(--line2); border-radius: 6px; background: var(--bg0); color: var(--fg); font: 12px/1.5 var(--mono); }
.embed-options [data-embed-copy] { justify-self: start; }
.share-menu[aria-labelledby="cite-heading"] { width: min(460px, calc(100vw - 16px)); overflow-y: auto; }
.cite-options { display: grid; gap: 8px; padding: 10px; }
.cite-block { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.cite-block h3, .cite-block p { margin: 0; }
.cite-block h3 { font-size: 14px; }
.cite-block p, .cite-block pre { margin: 5px 0; font-size: 13px; overflow-wrap: anywhere; }
.cite-block pre { font-family: var(--mono); white-space: pre-wrap; }
.cite-block a:not([hidden]) { display: inline; padding: 0; color: var(--accent2); font: inherit; }
.cite-block [data-cite-scope] { color: var(--mute); }
@media (max-width: 820px), (pointer: coarse) {
  .share { min-height: 44px; padding: 0 18px 0 15px; font-size: 14px; }
  .share-icon { width: 44px; padding: 0; }
  .share-menu :is(button, a):not([hidden]) { min-height: 44px; }
}

@media (max-width: 820px) {
  #zshare { top: calc(max(6px, env(safe-area-inset-top)) + 64px); right: max(8px, env(safe-area-inset-right)); }
  body:not([data-embed]) .mapctl { top: calc(max(6px, env(safe-area-inset-top)) + 116px); }
}

body[data-embed] .topbar { top: 6px; left: 8px; right: 8px; height: 40px; justify-content: flex-end; padding: 0; border: 0; background: none; backdrop-filter: none; box-shadow: none; pointer-events: none; }
body[data-embed] .mapctl { left: 8px; right: auto; top: 54px; }
body[data-embed] :is(#panel, #fbar, #fmob) { display: none; }
#embed-open { pointer-events: auto; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 8px; background: var(--glass); color: var(--fg); font-size: 13px; }
#embed-open:hover, #embed-open:focus-visible { border-color: var(--accent); }
.embed-noscript { position: fixed; bottom: 8px; left: 8px; color: var(--fg2); font-size: 13px; }

/* ---------- figures in content pages: the zeros figure (inline SVG from the build) ---------- */
.zfig { margin: 22px auto 26px; max-width: 440px; }
.depth-figure { margin: 20px 0; }
.depth-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.depth-figure figcaption { margin-top: 10px; color: var(--fg2); font-size: 14px; }
.zfig svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; background: rgba(5,8,21,.45); }
.zfig figcaption { margin-top: 10px; font-size: 13px; line-height: 1.55; color: var(--mute); }
.zfig .z { cursor: default; outline: none; }
.zfig .z:hover circle, .zfig .z:focus circle { stroke: #fff; stroke-width: 2; }
.zfig .z:hover text, .zfig .z:focus text { fill: var(--gold); font-weight: 600; }

/* ---------- guides (build_site.py: /guides/, /guides/<slug>/, the cluster pages' list; app.js: the panel list, the
   tooltip photos, the guide bar of ?guide=) ---------- */
.gav { flex: none; display: block; width: var(--gs, 48px); height: var(--gs, 48px); border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.06); border: 1px solid var(--line2); }
img.gav[width="18"] { --gs: 18px; } img.gav[width="24"] { --gs: 24px; } img.gav[width="22"] { --gs: 22px; } img.gav[width="28"] { --gs: 28px; } img.gav[width="96"] { --gs: 96px; }
.gav.ini { display: inline-grid; place-items: center; background: hsl(var(--gh, 230) 40% 30%); color: #fff; font-size: calc(var(--gs, 48px) * .38); font-weight: 600; letter-spacing: .02em; line-height: 1; }
#page :is(#sernau-outside-guides, #sernau-compact-guides, #alpoge-original, .gentry[id]) { scroll-margin-top: 84px; }
.glistall { list-style: none; padding: 0; margin: 18px 0 24px; }
.gentry { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.gentry:last-child { border-bottom: 1px solid var(--line); }
.gbody { min-width: 0; flex: 1; }
.gauth { margin: 0 0 2px; font-size: 13.5px; color: var(--fg2); }
.gauth a { color: var(--fg2); text-decoration: underline; text-decoration-color: rgba(195,203,239,.35); text-underline-offset: 2px; }
.gtitle { display: block; font-size: 16.5px; font-weight: 600; line-height: 1.35; color: var(--fg); }
.gtitle:hover { color: #fff; text-decoration: underline; }
.gmeta { margin: 5px 0 0; font-size: 13px; line-height: 1.5; color: var(--mute); }
.gstl { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--fg2); }
.gstl q { font-style: italic; }
.gst { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-style: normal; font-weight: 600; border: 1px solid var(--line2); }
.gst.checked { color: var(--ok); border-color: rgba(111,224,160,.4); }
.gst.explains { color: var(--accent2); }
.ghead { display: flex; align-items: center; gap: 18px; margin: 4px 0 10px; }
.ghead h1 { margin: 2px 0 0; }
.ghead .gav { --gs: 96px; }
.gact { margin: 16px 0 14px; }
.gnodes td:nth-child(2) { white-space: nowrap; color: var(--fg2); }
.gnodes td:nth-child(3) a, .gpages a { white-space: nowrap; color: var(--accent2); text-decoration: underline; text-decoration-color: rgba(180,193,255,.35); text-underline-offset: 2px; }
.gcredit { margin-top: 18px; }
.glist li > a .gav { --gs: 24px; }
.gpages { margin: -4px 0 6px 34px; font-size: 12.5px; line-height: 1.6; color: var(--mute); }
/* the AI label (guides 2, 24 Nov): a tag on the hub, cluster pages, panel and Lean viewer; the full line on the guide page */
.gai, .gpages a.gai { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 11.5px; line-height: 1.6; font-weight: 600; font-style: normal;
  color: var(--warn); border: 1px solid rgba(255,207,112,.4); text-decoration: none; white-space: nowrap; vertical-align: 1px; }
a.gai:hover { background: rgba(255,207,112,.1); color: var(--warn); }
.gailine { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--fg2); }
.gailine p { margin: 0; }
.gailine q { font-style: italic; }
.gailine a { color: var(--accent2); }
.gaialso { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--mute); }
.gaialso q { font-style: italic; }
/* the guide page (/guides/<slug>/, formatting pass 28 Nov): all scoped to .gpage so the hub and other pages keep their styles */
#pagebody .gpage .ghead { align-items: flex-start; gap: 18px; margin: 4px 0 14px; }
#pagebody .gpage .ghtext { min-width: 0; flex: 1; padding-top: 6px; }
#pagebody .gpage .gauth { margin: 0 0 6px; font-size: 13.5px; line-height: 1.4; }
#pagebody .gpage .ghead h1 { margin: 0; overflow-wrap: break-word; }
#pagebody .gpage .gfacts { list-style: none; margin: 0 0 16px; padding: 2px 0 2px 12px; border-left: 2px solid var(--line2); }
#pagebody .gpage .gfacts li { margin: 0; padding: 1px 0; font-size: 13px; line-height: 1.5; color: var(--mute); }
#pagebody .gpage .gfacts a { color: var(--accent2); text-decoration: underline; text-decoration-color: rgba(180,193,255,.35); text-underline-offset: 2px; }
#pagebody .gpage .gquotes { display: grid; gap: 12px; margin: 0 0 4px; }
#pagebody .gpage .gqrow { display: flex; align-items: flex-start; gap: 12px; }
#pagebody .gpage .gqrow > :is(.gst, .gai) { flex: none; margin: 1px 0 0; padding: 1px 9px; font-size: 12px; line-height: 1.6; white-space: nowrap; vertical-align: 0; }
#pagebody .gpage #ai { scroll-margin-top: 84px; }
#pagebody .gpage .gqs { min-width: 0; }
#pagebody .gpage .gqs:empty { display: none; }
#pagebody .gpage .gqs p { margin: 0 0 6px; font-size: 14px; line-height: 1.55; color: var(--fg2); }
#pagebody .gpage .gqs p:last-child { margin-bottom: 0; }
#pagebody .gpage .gqs q { font-style: italic; }
#pagebody .gpage .gqs a { color: var(--accent2); }
#pagebody .gpage .gsrc { font-size: 12.5px; color: var(--mute); white-space: nowrap; }
#pagebody .gpage .gact { align-items: center; margin: 18px 0 14px; }
#pagebody .gpage .gshare:empty { display: none; }
#pagebody .gpage .gshare .share { min-height: 41px; border-radius: 11px; font-size: 14px; }
#pagebody .gpage p.gzero { margin: 22px 0 12px; padding: 10px 12px; border: 1px dashed var(--line2); border-radius: 10px; font-size: 13px; line-height: 1.55; color: var(--mute); }
#pagebody .gpage p.gzero a { color: var(--accent2); }
#pagebody .gpage .gnodes { min-width: 600px; }
#pagebody .gpage .gnodes .gcn { width: 40%; }
#pagebody .gpage .gnodes .gcd { width: 7.5rem; }
#pagebody .gpage .gnodes .gcb { width: 8.5rem; }
#pagebody .gpage .gnodes td:nth-child(4) { color: var(--fg2); }
#pagebody .gpage .rows li > a { color: var(--accent2); }
#pagebody .gpage .rows li > a::after { content: "→"; margin-left: auto; padding-left: 10px; color: var(--dim); transition: transform .2s var(--ease), color .2s; }
#pagebody .gpage .rows li > a:hover { color: #fff; }
#pagebody .gpage .rows li > a:hover::after { color: var(--accent); transform: translateX(2px); }
@media (max-width: 560px) {
  #pagebody .gpage .ghead { gap: 14px; }
  #pagebody .gpage .ghead .gav { --gs: 64px; }
  #pagebody .gpage .ghtext { padding-top: 0; }
  #pagebody .gpage .ghead h1 { font-size: 23px; }
  #pagebody .gpage .gqrow { flex-direction: column; gap: 6px; }
  #pagebody .gpage .gsrc { white-space: normal; }
}
@media (max-width: 480px) {
  #pagebody .gpage .gact { flex-direction: column; align-items: stretch; }
  #pagebody .gpage .gact .btn,
  #pagebody .gpage .gshare .share { min-height: 44px; justify-content: center; text-align: center; }
  #pagebody .gpage .gshare .share-actions { display: flex; }
  #pagebody .gpage .gshare .share { flex: 1; }
}
.lx-cgh .gai { font-size: 10.5px; padding: 0 6px; margin-left: 2px; }
/* tooltip: the guides citing the cluster */
#tip .tgs { display: flex; align-items: center; gap: 4px; margin-top: 7px; }
#tip .tgs .gav { --gs: 22px; }
#tip .tgs .gav.ini { display: inline-grid; margin: 0; color: #fff; }
#tip .tgs em { font-style: normal; font-size: 11.5px; color: var(--fg2); margin-left: 2px; }
#tip .tgs small { margin-left: 6px; font-size: 11.5px; color: var(--mute); }
/* ?guide=: the bar at the top of the map */
.gbar { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: min(620px, calc(100vw - var(--panel) - 400px)); height: 46px; padding: 0 6px 0 7px; border-radius: 12px; border: 1px solid var(--line2); background: var(--glass);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 8px 28px rgba(0,0,0,.3); animation: gfade .3s var(--ease); }
@keyframes gfade { from { opacity: 0; } to { opacity: 1; } }
.gbar[hidden] { display: none; }
.gbt { flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 1.3; color: var(--mute); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gbt small { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.gbt a { color: var(--fg); font-weight: 600; }
.gbtn { flex: none; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--fg2); font-size: 13px; cursor: pointer; }
.gbtn:hover { background: rgba(255,255,255,.09); color: #fff; }
.gbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 820px) {
  .fmob { flex-wrap: wrap; }
  .gbar { flex: 1 1 100%; max-width: none; height: auto; min-height: 52px; gap: 8px; padding: 3px 3px 3px 8px; }
  .gbtn { min-height: 44px; padding: 0 12px; }
  .ghead { flex-direction: column; align-items: flex-start; gap: 10px; } .ghead .gav { --gs: 64px; width: 64px; height: 64px; }
  .gact .btn { min-height: 44px; }
}
@media (max-width: 820px) { .gpages { margin-left: 0; } }
/* two organisations (the joint statement): both logos, small, side by side */
.gav2 { flex: none; display: inline-flex; align-items: center; gap: 4px; }
.gav2 > .gav.logo { width: var(--lg, 32px); height: var(--lg, 32px); border-radius: 7px; object-fit: contain; padding: 2px; background: #fff; }
/* audit notes (Adriazola's repository Markdown files): static pages list them compactly; the app's panel behind "show" */
.gnl { font-size: 12px; }
.gnl a { white-space: normal !important; }
.gnotes { display: inline; }
.gnotes summary { display: inline; cursor: pointer; list-style: none; }
.gnotes summary::-webkit-details-marker { display: none; }
.gnotes .gshow { color: var(--accent2); text-decoration: underline; text-underline-offset: 2px; }
.gnotes[open] .gshow { display: none; }
.gnotes[open] .gnl { display: block; margin-top: 2px; }

/* ---------- Lean viewer (/file/<module>, R4-A): covers the map but for a strip on the left; app.js "Lean viewer" ---------- */
#lx, #lxstrip { display: none; }
body.lean #lx { display: flex; flex-direction: column; position: fixed; z-index: 36; top: 0; right: 0; bottom: 0; left: 56px; background: #0a0f24; border-left: 1px solid var(--line2); box-shadow: -20px 0 60px rgba(0,0,0,.5); color: var(--fg); font-size: 14px; }
body.lean #lxstrip { display: flex; flex-direction: column; align-items: center; gap: 2px; position: fixed; z-index: 36; left: 6px; top: 14px; width: 44px; padding: 8px 0 7px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(13,19,44,.92); color: var(--fg); font: 600 12px var(--sans); cursor: pointer; }
#lxstrip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#lxstrip:hover, #lxstrip:focus-visible { border-color: var(--accent); color: #fff; }
body.lean .topbar, body.lean #panel, body.lean .mapctl, body.lean .fbar, body.lean .fmob { visibility: hidden; }
#lx svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#lx button { font: inherit; color: inherit; }
#lx a { color: var(--accent2); }
.lx-hd { flex: none; display: flex; align-items: center; gap: 18px; padding: 10px 14px 10px 24px; border-bottom: 1px solid var(--line); min-height: 58px; }
.lx-tt { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; row-gap: 2px; }
.lx-tt h1 { font: 600 19px/1.3 var(--serif); margin: 0; color: #fff; }
.lx-meta { color: var(--mute); font-size: 13px; }
.lx-search { position: relative; flex: 0 1 330px; display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 36px; border: 1px solid var(--line2); border-radius: 9px; background: rgba(5,8,21,.5); color: var(--mute); }
.lx-search:focus-within { border-color: var(--accent); }
.lx-search svg { flex: none; width: 15px !important; height: 15px !important; }
.lx-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--fg); font: 14px var(--sans); }
.lx-res { position: absolute; z-index: 5; top: calc(100% + 6px); right: 0; width: min(460px, 70vw); max-height: 60vh; overflow: auto; padding: 6px; border-radius: 10px; border: 1px solid var(--line2); background: #0e1530; box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.lx-res .h { padding: 6px 8px 2px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.lx-res a { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 7px; color: var(--fg) !important; }
.lx-res a:hover, .lx-res a:focus-visible { background: rgba(142,162,255,.12); outline: none; }
.lx-res small { color: var(--mute); font-size: 11.5px; overflow-wrap: anywhere; }
.lx-res .meta { padding: 8px; }
.lx-x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--mute) !important; }
.lx-x:hover, .lx-x:focus-visible { color: #fff !important; border-color: var(--line2); }
.lx-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.lx-body.noexp { grid-template-columns: 0 minmax(0, 1fr); }
.lx-body.noexp .lx-exp { visibility: hidden; }
.lx-exp { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: rgba(5,8,21,.35); overflow: hidden; }
.lx-eh { flex: none; display: flex; align-items: baseline; gap: 10px; padding: 12px 16px 8px; }
.lx-eh span { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.lx-eh small { color: var(--dim); font-size: 12px; }
.lx-tree { flex: 1 1 0; min-height: 60px; overflow: auto; padding-bottom: 8px; contain: paint; }
.lx-ti { display: flex; align-items: center; padding-left: calc(8px + var(--d) * 14px); border-left: 2px solid transparent; }
.lx-ti a { flex: 1; min-width: 0; padding: 5px 10px 5px 2px; color: var(--fg2) !important; font-size: 13.5px; }
.lx-ti .nm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-ti:hover { background: rgba(142,162,255,.06); }
.lx-ti.on { background: rgba(142,162,255,.14); border-left-color: var(--accent); }
.lx-ti.on a { color: #fff !important; }
.lx-ti.main a { color: var(--gold) !important; }
.lx-ti .chv { flex: none; width: 18px; height: 22px; display: grid; place-items: center; border: none; background: none; color: var(--dim); font-style: normal; font-size: 13px; cursor: pointer; transition: transform .15s; }
.lx-ti[aria-expanded="true"] > .chv { transform: rotate(90deg); }
.lx-none { padding: 6px 16px; }
.lx-pans { flex: none; position: relative; max-height: 52%; overflow: auto; border-top: 1px solid var(--line); background: #0a0f24; }
.lx-pan { border-bottom: 1px solid var(--line); }
.lx-pan summary { display: flex; align-items: center; gap: 6px; padding: 9px 16px; cursor: pointer; list-style: none; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.lx-pan summary::-webkit-details-marker { display: none; }
.lx-pan summary::before { content: "›"; transition: transform .15s; display: inline-block; }
.lx-pan[open] summary::before { transform: rotate(90deg); }
.lx-pan summary .n { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--dim); }
.lx-pb { padding: 0 16px 12px; font-size: 13px; }
.lx-pb ul { list-style: none; margin: 0; padding: 0; }
.lx-pb li { padding: 3px 0; overflow-wrap: anywhere; }
.lx-pb .kd { color: var(--uses); font: 11px var(--mono); margin-right: 6px; }
.lx-pb h4 { margin: 8px 0 4px; font-size: 12px; color: var(--fg2); font-weight: 600; } .lx-pb h4 .n { color: var(--dim); font-weight: 400; }
.lx-pb .mono { font-size: 12px; }
.lx-cg { margin: 6px 0 10px; }
.lx-cgh { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; } .lx-cgh b { font-weight: 600; font-size: 13px; }
.lx-cg ul { padding-left: 25px; } .lx-cg code { font-size: 11.5px; }
.lx-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.lx-tabs { flex: none; display: flex; align-items: stretch; border-bottom: 1px solid var(--line); background: rgba(5,8,21,.3); }
.lx-tog { flex: none; width: 42px; border: none; border-right: 1px solid var(--line); background: none; cursor: pointer; color: var(--mute) !important; display: grid; place-items: center; }
.lx-tog[aria-pressed="true"] { color: var(--accent2) !important; }
.lx-tl { flex: 1; min-width: 0; display: flex; overflow-x: auto; scrollbar-width: none; }
.lx-tab { flex: none; display: flex; align-items: center; border-right: 1px solid var(--line); border-top: 2px solid transparent; }
.lx-tab a { padding: 10px 6px 10px 14px; color: var(--mute) !important; font-size: 14px; white-space: nowrap; }
.lx-tab .lg { color: var(--by); margin-right: 8px; font-size: 12px; }
.lx-tab button { border: none; background: none; color: var(--dim) !important; cursor: pointer; padding: 0 10px 0 4px; font-size: 16px; }
.lx-tab.on { background: #0a0f24; border-top-color: var(--accent); } .lx-tab.on a { color: #fff !important; }
.lx-fold { flex: none; margin: 6px 10px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line2); background: rgba(142,162,255,.08); cursor: pointer; font-size: 13px !important; white-space: nowrap; }
.lx-crumb { flex: none; padding: 7px 24px; font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-crumb i { font-style: normal; margin: 0 7px; color: var(--dim); }
.lx-crumb .f, .lx-crumb .d { font-style: italic; color: var(--fg2); } .lx-crumb .d { font-family: var(--mono); font-size: 12.5px; }
.lx-code { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 0 40px; outline: none; }
[data-lean-pane]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lx-selection { padding: 8px 16px; border-block: 1px solid var(--line); overflow-wrap: anywhere; }
.lx-selection p { margin: 0 0 5px; }
.lx-selection ul { margin: 0; padding-inline-start: 20px; }
.lx-load { padding: 16px 24px; }
.lx-src, .lx-peek .pc { font: 13.5px/1.7 var(--mono); color: #dfe4ff; }
.lx-src .ln, .lx-peek .ln { display: flex; }
.lx-src .no, .lx-peek .no { flex: none; width: 4.2em; padding-right: 1.4em; text-align: right; color: #48527c; user-select: none; -webkit-user-select: none; }
/* long lines wrap with a hanging indent: --i is the line's own indentation (in characters), continuations 4 more */
#lx .lx-src .no a { display: inline-block; color: inherit; }
#lx .lx-src .no a:hover, #lx .lx-src .no a:focus-visible { color: var(--gold); }
.lx-src .selected-line { background: rgba(245,196,107,.10); box-shadow: inset 3px 0 var(--gold); }
.lx-src .lx-source-ref { text-decoration: underline; text-underline-offset: 3px; }
.lx-src .tx, .lx-peek .tx { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; padding-left: calc((var(--i) + 4) * 1ch); text-indent: -4ch; padding-right: 24px; }
.lx-src .lensl { margin-top: 10px; }
.lx-src .lens { flex: 1; min-width: 0; padding-left: calc(var(--i) * 1ch); padding-right: 24px; font: 12.5px/1.5 var(--sans); color: #6f7aa6; }
.lx-src .lens .en { color: #a6b0d8; }
.lx-src .lens .sep, .lx-peek .sep { margin: 0 7px; color: #3c466e; }
.lxd.hl { background: rgba(245,196,107,.07); box-shadow: inset 3px 0 0 var(--gold); }
.lx-src .k, .lx-peek .k, .lx-stmt .k { color: #c48cff; } .lx-src .dn, .lx-stmt .dn { color: var(--gold); } .lx-src .ty, .lx-peek .ty, .lx-stmt .ty { color: #9cc4ff; }
.lx-src .nu, .lx-peek .nu, .lx-stmt .nu { color: #ffb38a; } .lx-src .c { color: #59627f; font-style: italic; } .lx-src .s, .lx-peek .s { color: #a5e3b4; }
.lx-src .rf { cursor: pointer; border-radius: 3px; text-decoration: underline dotted rgba(180,193,255,.35); text-underline-offset: 3px; }
.lx-src .rf:hover, .lx-src .rf:focus-visible { background: rgba(142,162,255,.16); text-decoration-color: var(--accent2); outline: none; }
.lx-src .dn { cursor: default; }
.lx-src .pill { display: inline-block; text-indent: 0; margin-left: 4px; padding: 0 8px; line-height: 18px; border-radius: 5px; border: none; background: rgba(142,162,255,.14); color: var(--mute) !important; font: 12px/18px var(--mono) !important; cursor: pointer; vertical-align: 1px; }
.lx-src .pill:hover, .lx-src .pill:focus-visible { background: rgba(142,162,255,.28); color: #fff !important; }
.lx-peek { margin: 4px 24px 8px 4.2em; border: 1px solid rgba(142,162,255,.45); border-radius: 7px; background: #0e1530; overflow: hidden; text-indent: 0; }
.lx-peek .ph { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 7px 12px; background: rgba(142,162,255,.12); font: 12.5px var(--sans); color: var(--fg2); }
.lx-peek .ph .en { color: #fff; font-weight: 600; } .lx-peek .ph .nm { font-size: 12px; color: var(--mute); overflow-wrap: anywhere; } .lx-peek .ph .fm { color: var(--mute); } .lx-peek .ph .ls { color: var(--dim); }
.lx-peek .ph .r { margin-left: auto; display: flex; gap: 14px; align-items: baseline; }
.lx-peek .ph .r .link { padding: 0; color: var(--dim); }
.lx-peek .pc { padding: 6px 0 8px; } .lx-peek .pc .meta { padding: 0 14px; }
#lxcard { position: fixed; z-index: 45; left: 0; top: 0; max-width: min(460px, 90vw); padding: 10px 13px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(13,19,44,.97); box-shadow: 0 16px 40px rgba(0,0,0,.55); font-size: 12.5px; color: var(--fg2); display: none; }
#lxcard.on { display: block; }
#lxcard .hn { color: #fff; font-size: 12.5px; word-break: break-all; }
#lxcard .hm { margin-top: 3px; color: var(--mute); } #lxcard .he { margin-top: 5px; color: var(--fg); }
#lxcard .ha { display: flex; gap: 16px; margin-top: 7px; align-items: baseline; } #lxcard .ha .link { padding: 0; margin: 0; }
#lxcard .hs { margin-top: 6px; font-size: 11px; color: var(--dim); }
.lx-st { flex: none; display: flex; align-items: center; gap: 22px; padding: 5px 16px; min-height: 28px; border-top: 1px solid var(--line); background: rgba(5,8,21,.6); font-size: 12.5px; color: var(--mute); }
#lx [data-reader-edition] { flex: none; }
#lx .edition-switch { margin: 0; }
#lx .edition-switch a { color: var(--mute); }
#lx .edition-switch a[aria-current] { color: var(--gold); }
@media (max-width: 700px) {
  #lx .lx-ph { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 3px; }
  #lx [data-reader-edition] { grid-column: 2; }
}
.lx-st a { color: var(--fg2) !important; } .lx-st .gold { color: var(--gold); font-weight: 500; } .lx-st .r { margin-left: auto; color: var(--dim); }
.lx-source-menu { position: relative; margin-left: auto; }
.lx-source-menu summary { cursor: pointer; }
.lx-source-actions { position: absolute; z-index: 4; bottom: calc(100% + 8px); right: 0; display: grid; min-width: 170px;
  padding: 5px; border: 1px solid var(--line2); border-radius: 8px; background: #0e1530; box-shadow: 0 10px 32px #0008; }
#lx .lx-st .lx-source-actions > :is(a, button) { display: block; padding: 7px 10px; margin: 0; text-align: left; }
#lx .lx-st .lx-source-actions > :is(a, button):hover { background: rgba(142,162,255,.12); }
.lx-miss { padding: 40px 48px; max-width: 760px; } .lx-miss .lx-x { float: right; } .lx-miss h1 { font-size: 22px; }
/* map hover: the Lean line and "Open Lean" (the hover stays open ~300 ms after the pointer leaves) */
#tip.live .tlo { pointer-events: auto; }
#tip .tl { margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(160,180,255,.28); color: #c3cbef; font-size: 12px; line-height: 1.65; }
#tip .tl code { font-size: 11px; color: #b4c1ff; background: #323d7a; padding: 1px 5px; border-radius: 4px; word-break: normal; white-space: nowrap; }
#tip .tlo span { display: inline; margin: 0; color: inherit; font-size: inherit; }
#tip .tlo { display: inline-block; margin-top: 9px; padding: 4px 11px; border-radius: 7px; background: #4553a8; border: 1px solid #6b7bd6; font-size: 12.5px; font-weight: 600; color: #fff; }
#tip .tlo:hover, #tip .tlo:focus-visible { background: #5565c4; color: #fff; }
.leanbtn { margin-top: 2px; }
/* phones: a full-screen sheet, tree first, then declaration cards, then a statement */
@media (max-width: 700px) {
  body.lean #lx { left: 0; border-left: none; }
  body.lean #lxstrip { display: none; }
  .lx-ph { flex: none; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid var(--line); }
  .lx-back { flex: none; display: flex; align-items: center; gap: 2px; padding: 8px 12px 8px 8px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(13,19,44,.9); font-size: 15px !important; cursor: pointer; }
  .lx-pt { min-width: 0; display: flex; flex-direction: column; } .lx-pt b { color: #fff; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lx-pt small { color: var(--mute); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lx-pbody { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; outline: none; }
  .lx-readable-refs { padding: 0 12px; }
  .lx-mobile-source { min-height: 0; overflow: visible; }
  .lx-pnote { padding: 10px 16px; }
  .lx-pti { display: flex; flex-direction: column; padding: 10px 16px 10px calc(16px + var(--d) * 16px); border-bottom: 1px solid var(--line); color: var(--fg) !important; }
  .lx-pti small { color: var(--mute); font-size: 12px; } .lx-pti.on { background: rgba(142,162,255,.1); }
  .lx-card { border-bottom: 1px solid var(--line); } .lx-card.hl { background: rgba(245,196,107,.06); }
  .lx-ch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%; text-align: left; padding: 14px 16px; border: none; background: none; cursor: pointer; }
  .lx-ch b { flex: 1 1 100%; color: #fff; font-size: 16.5px; font-weight: 600; overflow-wrap: anywhere; }
  .lx-ch small { flex: 1; color: var(--mute); font-size: 13px; overflow-wrap: anywhere; } .lx-ch .mono { font-size: 12.5px; color: var(--fg2); }
  .cbadge { flex: none; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: rgba(80,220,200,.12); color: var(--by); }
  .lx-cb { display: none; padding: 0 16px 14px; } .lx-card.open .lx-cb { display: block; }
  .lx-stmt pre { margin: 0; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 9px; background: rgba(5,8,21,.6); font: 12.5px/1.6 var(--mono); color: #dfe4ff; white-space: pre-wrap; overflow-wrap: anywhere; }
  .lx-stmt .pl { display: block; padding-left: calc((var(--i) + 4) * 1ch); text-indent: -4ch; }
  .lx-ca { display: flex; align-items: baseline; gap: 20px; margin: 10px 0 4px; font-size: 14px; } .lx-ca .link { padding: 0; margin: 0; font-size: 14px; }
  .lx-st { gap: 4px 9px; flex-wrap: wrap; padding-bottom: calc(5px + env(safe-area-inset-bottom)); }
}

#lx .link, #lxcard .link { color: var(--accent2); }
.lx-pb li a { overflow-wrap: anywhere; }
.lx-pan summary { position: sticky; top: 0; z-index: 1; background: #0a0f24; }
.lx-pan[data-p="o"] li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* map hover, v2 (owner feedback 24 Nov): an opaque surface one step lighter than the panel cards, a visible border, a
   strong shadow and a soft dark halo, so it lifts off the map and nearby canvas labels do not read as part of it.
   Contrast on #242e62: title #fff 12.8:1, secondary #a9b3dd 6.2:1, Lean line #c3cbef 8.0:1, chips #b4c1ff on #323d7a
   5.8:1, button #fff on #4553a8 6.9:1; border #7d8bd6 4.0:1 against the surface */
#tip { background: #242e62; -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid #7d8bd6; max-width: 320px; padding: 11px 13px;
  box-shadow: 0 0 0 1px rgba(5,8,21,.6), 0 0 34px 22px rgba(5,8,21,.72), 0 22px 56px 6px rgba(0,0,0,.8); }
#tip b { color: #fff; }
#tip span { color: #a9b3dd; }
#tip .tgs small, #tip .tgs em { color: #c3cbef; }

/* ---------- #10: core Lean files in plain English (/cluster/<id>-<slug>/lean/, the cluster pages, the viewer) ---------- */
.lflink { margin: 12px 0 4px; }
.lhow { color: var(--fg2); }
.lparts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 18px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.lparts [aria-current] { color: #fff; font-weight: 600; } .lparts .meta { margin: 0 0 0 auto; }
#pagebody h3.ldep, #content h3.ldep { margin: 18px 0 6px; font-size: 14px; font-weight: 600; color: var(--fg2); }
.ldep .n, h2 .n { color: var(--mute); font-weight: 400; }
ul.lcon { list-style: none; margin: 0; padding: 0; font-size: 13.5px; line-height: 1.45; }
ul.lcon li { padding: 5px 0; border-bottom: 1px solid var(--line); }
ul.lcon li a { overflow-wrap: anywhere; } ul.lcon code { font-size: 12.5px; }
ul.lcon small { display: block; color: var(--mute); margin-top: 2px; }
section.lf { margin: 0; padding: 22px 0 18px; border-top: 1px solid var(--line2); scroll-margin-top: 90px; }
section.lf:target { box-shadow: inset 3px 0 0 var(--gold); padding-left: 14px; }
#pagebody section.lf h3, #content section.lf h3 { margin: 0 0 4px; font-size: 16px; overflow-wrap: anywhere; }
section.lf h3 code { font-size: 14.5px; }
section.lf .ck { color: var(--ok); }
section.lf .lfl { font-weight: 600; color: #fff; margin: 10px 0 6px; }
#pagebody section.lf h4, #content section.lf h4 { margin: 16px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--mute); text-transform: uppercase; }
.lkd { margin: 0 0 12px; } .lkd > p { margin: 0 0 6px; font-size: 14px; } .lkd > p code { font-size: 12.5px; }
#pagebody pre.lst, #content pre.lst { margin: 0; padding: 8px 12px 8px 0; font: 12.5px/1.55 var(--mono); color: var(--fg2); }
pre.lst .l { display: block; } pre.lst .l.more { color: var(--mute); font-style: italic; padding-left: 5.2em; }
pre.lst .n { position: sticky; left: 0; display: inline-block; width: 4.2em; padding-right: 10px; margin-right: 10px; text-align: right; color: var(--dim); background: rgb(9,13,32); border-right: 1px solid var(--line); user-select: none; -webkit-user-select: none; }
.lbp .src { color: var(--dim); }
.lfa { display: flex; gap: 18px; font-size: 14px; } .lfa .top { margin-left: auto; color: var(--mute); }
/* the viewer: reading above the code, and AI glosses in the CodeLens and on the phone cards */
.lx-rd { margin: 8px 24px 14px calc(4.2em + 1.4em); padding: 12px 16px; max-width: 900px; border: 1px solid var(--line); border-left: 3px solid rgba(111,224,160,.45); border-radius: 8px; background: rgba(111,224,160,.035); font: 14px/1.55 var(--sans); color: var(--fg2); }
.lx-rdh { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-size: 12px; }
.lx-ai { color: var(--ok); letter-spacing: .01em; } .lx-rdh a { margin-left: auto; }
.lx-rd p { margin: 6px 0 0; } .lx-rdl { color: #fff; font-weight: 600; }
.aitag { display: inline-block; margin-left: 6px; padding: 0 4px; border: 1px solid rgba(160,180,255,.28); border-radius: 4px; font: 600 9.5px/1.45 var(--sans); letter-spacing: .04em; color: #7f8ab5; vertical-align: 1px; cursor: help; }
.lx-src .lens .en.gl { color: #98a2cb; }
@media (max-width: 700px) {
  .lx-rd { margin: 10px 12px 6px; }
  .lx-ch b.gl { font-size: 15px; font-weight: 500; line-height: 1.4; }
}
section.lf p, ul.lcon small, .lx-rd p, .lx-src .lens .en.gl { overflow-wrap: break-word; }   /* readings can hold long formulas with no spaces */

@media (max-width: 820px) and (max-height: 700px) {
  .mpeek .proof-size-link { display: none; }
  .glance .proof-size-link { display: flex; }
}


/* Readable source groups in the shared map. */
#map-graph {
  user-select: none;
  background: radial-gradient(ellipse at 40% 51%, #141d3f 0%, #0b1129 45%, var(--bg0) 88%);
}
body.paged #map-graph, body[data-view="list"] #map-graph { pointer-events: none; }
.sr-graph-nodes .filtered { visibility: hidden; pointer-events: none; }
.sr-graph-nodes [data-id] { color: var(--node); }
.sr-graph-nodes a { outline: none; cursor: pointer; }
.sr-graph-nodes a.main { color: var(--gold); }
.sr-node-label {
  fill: var(--fg2); font: 600 11px var(--sans); text-anchor: middle;
  paint-order: stroke; stroke: var(--bg0); stroke-width: 3px; stroke-linejoin: round;
}
.sr-graph-nodes .main .sr-node-label { fill: var(--gold); }
.sr-graph-nodes .selected .sr-node-halo, .sr-graph-nodes a:focus-visible .sr-node-halo {
  opacity: 1; fill: none; stroke: white; stroke-width: 1.8; vector-effect: non-scaling-stroke;
}
.sr-graph-nodes a:focus-visible .sr-node-halo { stroke: var(--gold); stroke-width: 3; }
.sr-graph-nodes .selected .sr-node-label, .sr-graph-nodes .highlighted .sr-node-label { fill: white; }
.sr-map-selects { display: flex; flex-wrap: wrap; gap: 4px; }
.sr-map-selects label { display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.sr-map-selects select {
  min-height: 32px; max-width: 160px; padding: 0 6px; border: 1px solid var(--line2);
  border-radius: 8px; color: var(--fg); background: #151d39;
}
#map-count { margin: 0; padding: 0 6px; color: var(--mute); font-size: 12px; }
#map-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 5px 6px; }
#map-legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--mute); }
#map-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--node); }
.graph-imports li { border-top: 1px solid var(--line); margin: 0; padding: 7px 0; overflow-wrap: anywhere; }
.graph-imports li small { display: block; margin-top: 3px; color: var(--mute); }
@media (max-width: 820px) {
  #map-graph { background-position: 40% -50px; }
  .sr-map-selects { display: grid; gap: 10px; }
  .sr-map-selects label { justify-content: space-between; }
  .sr-map-selects select { width: min(52%, 240px); max-width: none; min-height: 44px; font-size: 16px; }
  #map-count { padding: 5px 8px; border-radius: 9px; background: rgba(13,19,44,.78); }
  #fsheet .fs-foot { justify-content: flex-end; }
}

/* ---------- phone top bar: one floating bar with the site menu and search (600 px and below, with scripts) ----------
   Without scripts the menu cannot open, so the full header above stays. */
.site-phone { display: none; }
@media (max-width: 600px) and (scripting: enabled) {
  body:has(#site-menu-button) {
    --map-left: env(safe-area-inset-left, 0px);
    --map-right: env(safe-area-inset-right, 0px);
    --map-top: env(safe-area-inset-top, 0px);
    --map-bottom: env(safe-area-inset-bottom, 0px);
    --map-sheet: #101830;
    --map-control: #17203b;
    --map-border: #35456a;
    --bar-bottom: calc(70px + var(--map-top));
  }

  body:has(#site-menu-button) :is(.topbar > nav, .topbar > .status-chip, .topbar > #sbtn, .search .ico, .search kbd) { display: none; }

  body:has(#site-menu-button) .topbar {
    inset: calc(14px + var(--map-top)) calc(14px + var(--map-right)) auto calc(14px + var(--map-left));
    gap: 7px;
    padding: 0 9px 0 5px;
    border-radius: 19px;
    border: 1px solid var(--map-border);
    background: var(--map-control);
    box-shadow: 0 6px 24px #0006;
  }

  #site-menu-button, #site-menu [data-site-menu-close] {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 13px;
    color: var(--fg);
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    touch-action: manipulation;
  }

  #site-menu-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

  body:has(#site-menu-button) .topbar > .brand { order: 1; visibility: visible; width: 35px; }
  body:has(#site-menu-button) .brand > .logo {
    width: 29px;
    height: 26px;
    padding-left: 7px;
    border: 0;
    border-left: 1px solid var(--map-border);
    border-radius: 0;
    box-shadow: none;
    font: italic 24px/1 Georgia, serif;
  }

  body:has(#site-menu-button) .topbar .search { display: block; position: static; min-width: 0; margin: 0; }
  body:has(#site-menu-button) #q { padding: 0 4px; border: 0; background: none; box-shadow: none; font-size: 16px; }
  body:has(#site-menu-button) #q::placeholder { color: #c5cfee; opacity: 1; }
  body:has(#site-menu-button) #results { top: 62px; background: var(--map-control); }

  /* reading pages and map sheets start below the bar */
  body:has(#site-menu-button) #page { padding-top: calc(var(--bar-bottom) + 8px); }
  /* solid band behind the floating bar so scrolled text never shows in the gap above it; thin fade at its lower edge (1 Dec).
     On body, not #page: #page has a backdrop-filter, which makes fixed children scroll with it. */
  body.paged:has(#site-menu-button)::before { content: ""; position: fixed; z-index: 31; top: 0; left: 0; right: 0; height: calc(var(--bar-bottom) + 6px); background: linear-gradient(#070b1c calc(100% - 6px), #070b1c00); pointer-events: none; }
  body.paged:has(#site-menu-button) .topbar { z-index: 32; }
  body:has(#site-menu-button) #close { top: calc(var(--bar-bottom) + 16px); }
  body:has(#site-menu-button) .mapctl { top: calc(var(--bar-bottom) + 8px); }
  body:has(#site-menu-button) #loader { top: calc(var(--bar-bottom) + 50px); }
  body:has(#site-menu-button) .ltabs { top: calc(-8px - var(--bar-bottom)); }

  #site-menu[open] {
    display: block;
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - var(--map-top) - 14px);
    padding: 0 calc(19px + var(--map-right)) calc(14px + var(--map-bottom)) calc(19px + var(--map-left));
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--map-border);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: var(--map-sheet);
    color: var(--fg);
    box-shadow: 0 -12px 34px #0005;
  }

  #site-menu::before { content: ""; display: block; width: 38px; height: 4px; margin: 7px auto 0; border-radius: 10px; background: #687594; }
  #site-menu::backdrop { background: #030615aa; }
  .site-menu-title { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
  .site-menu-title h2::after { content: none; }
  .site-menu-title h2 { flex: 1; margin: 0; color: var(--fg); font: 600 22px var(--serif); text-transform: none; letter-spacing: 0; }
  #site-menu .edition-switch { display: flex; width: 100%; margin-top: 6px; }
  #site-menu .edition-switch a { flex: 1; min-height: 44px; }
  #site-menu .meta { margin: 8px 0 12px; }
  #site-menu .site-menu-links { display: grid; grid-template-columns: 1fr; justify-content: stretch; gap: 2px; }
  #site-menu .site-menu-links a { display: flex; align-items: center; justify-self: stretch; width: auto; max-width: none; min-height: 44px; box-sizing: border-box;
    justify-content: flex-start; margin: 0; padding-inline: 12px; border-radius: 12px; color: var(--fg); }
  #site-menu .site-menu-links .site-menu-route { background: #27263b; color: var(--gold); }
  .site-menu-route span { margin-left: auto; }
  .site-menu-actions { display: flex; gap: 8px; margin-top: 10px; }
  .site-menu-actions button {
    flex: 1;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--map-border);
    border-radius: 14px;
    background: var(--map-control);
    color: #dbe4ff;
    font: 500 14px var(--sans);
    white-space: nowrap;
    cursor: pointer;
  }

  body:has(#site-menu-button) #share-menu {
    inset: auto calc(8px + var(--map-right)) calc(8px + var(--map-bottom)) calc(8px + var(--map-left)) !important;
    width: auto;
    max-height: calc(100dvh - var(--map-bottom) - var(--map-top) - 16px);
  }

  body:has(#site-menu-button) .skiplink:focus { top: calc(8px + var(--map-top)); left: calc(8px + var(--map-left)); }
}

/* ===== phone: guides ===== */
/* /guides/ and /guides/<slug>/ at 600 px and below, with scripts (explorer-shell.js adds body.mpg-hub or body.mpg-guide and the phone-only markup) */
.mpg-chips, .mpg-bar, .mpg-more { display: none; }
@media (max-width: 600px) and (scripting: enabled) {
  body:is(.mpg-guide, .mpg-hub) #page { padding: calc(var(--bar-bottom) + 4px) 0 calc(96px + var(--map-bottom)); background: #070b1c; backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.mpg-hub #page { padding-bottom: calc(24px + var(--map-bottom)); }
  body:is(.mpg-guide, .mpg-hub) #pagebody { border: 0; border-radius: 0; box-shadow: none; background: none; padding: 6px calc(16px + var(--map-right)) 24px calc(16px + var(--map-left)); }
  body:is(.mpg-guide, .mpg-hub) :is(#close, #pagebody .crumbs, #pagebody .eyebrow, #pagebody .sharebar, #pagebody [data-share-slot], #pagebody .share-slot) { display: none; }
  body:is(.mpg-guide, .mpg-hub) #pagebody :is(p, li) { font-size: 17px; line-height: 1.6; }
  body:is(.mpg-guide, .mpg-hub) #pagebody h1 { font-size: 28px; line-height: 1.15; margin: 0; }
  body:is(.mpg-guide, .mpg-hub) #pagebody h2 { scroll-margin-top: calc(var(--bar-bottom) + 64px); }

  /* section chips: one row, sticky under the bar, on a solid band */
  .mpg-chips { display: flex; gap: 8px; position: sticky; top: -4px; z-index: 5;   /* the scroller's top padding already clears the bar */ margin: 14px calc(-16px - var(--map-right)) 4px calc(-16px - var(--map-left));
    padding: 6px calc(16px + var(--map-right)) 8px calc(16px + var(--map-left)); overflow-x: auto; scrollbar-width: none; background: #070b1c; }
  .mpg-chips::-webkit-scrollbar { display: none; }
  .mpg-chips a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid var(--map-border); border-radius: 14px;
    background: var(--map-control); color: #dbe4ff; font: 500 15px var(--sans); white-space: nowrap; text-decoration: none; }
  .mpg-chips a small { color: #93a0c4; font-size: 14px; }
  .mpg-chips a[aria-current] { color: var(--gold); border-color: rgba(245,196,107,.6); background: #27263b; }

  /* guide page header: avatar inline with author and title, facts on one line */
  body.mpg-guide #pagebody .gpage .ghead { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; margin: 4px 0 8px; }
  body.mpg-guide #pagebody .gpage .ghead .gav { width: 44px; height: 44px; margin: 2px 0 0; }
  body.mpg-guide #pagebody .gpage .ghead .gauth { margin: 0 0 2px; font-size: 14px; line-height: 1.35; color: #a9b4d6; }
  body.mpg-guide #pagebody .gpage .ghead .gauth a { color: #a9b4d6; }
  body.mpg-guide #pagebody .gpage .gfacts { display: block; margin: 8px 0 10px; padding: 0; border: 0; }
  body.mpg-guide #pagebody .gpage .gfacts li { display: inline; font-size: 14px; line-height: 1.5; color: #a9b4d6; }
  body.mpg-guide #pagebody .gpage .gfacts li + li::before { content: " · "; }
  body.mpg-guide #pagebody .gpage .gquotes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
  body.mpg-guide #pagebody .gpage .gqrow { display: contents; }
  body.mpg-guide #pagebody .gpage .gqrow > :is(.gst, .gai) { display: inline-flex; align-items: center; min-height: 36px; margin: 0; padding: 0 7px; font-size: 13px; font-weight: 500; white-space: nowrap; }
  body.mpg-guide #pagebody .gpage .gqrow > button:is(.gst, .gai) { cursor: pointer; font-family: inherit; background: transparent; }
  body.mpg-guide #pagebody .gpage .gqrow .gqs:empty { display: none; }
  body.mpg-guide #pagebody .gpage .gqrow > button:is(.gst, .gai)::after { content: "▾"; font-size: 10px; margin-left: 2px; }
  body.mpg-guide #pagebody .gpage .gqrow > button[aria-expanded=true]::after { content: "▴"; }
  body.mpg-guide #pagebody .gpage .gqrow .gqs { flex-basis: 100%; order: 2; margin: 0; }
  body.mpg-guide #pagebody .gpage .gqrow .gqs[hidden] { display: none; }
  body.mpg-guide #pagebody .gpage .gquotes .gqs p { font-size: 15px; }

  /* actions: the two main ones move to the bottom bar; any others stay as a compact row */
  body.mpg-guide #pagebody .gpage .gact > .mpg-moved, body.mpg-guide #pagebody .gpage .gact > .gshare { display: none; }
  body.mpg-guide #pagebody .gpage .gact { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
  body.mpg-guide #pagebody .gpage .gact:not(:has(> .btn:not(.mpg-moved))) { display: none; }
  body.mpg-guide #pagebody .gpage .gact > .btn { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .mpg-bar { display: flex; gap: 8px; position: fixed; z-index: 32; left: calc(14px + var(--map-left)); right: calc(14px + var(--map-right)); bottom: calc(12px + var(--map-bottom));
    padding: 7px; border: 1px solid var(--map-border); border-radius: 19px; background: var(--map-control); box-shadow: 0 6px 24px #0008; }
  .mpg-bar .btn { flex: 1; justify-content: center; min-height: 48px; padding: 0 10px; border-radius: 14px; font-size: 16px; font-weight: 600; white-space: nowrap; box-shadow: none; }
  .mpg-bar .btn:not(.primary) { background: #101830; border: 1px solid var(--map-border); color: #dbe4ff; }
  body:not(.mpg-guide) .mpg-bar, body:has(#site-menu[open]) .mpg-bar, body:has(#share-menu[open]) .mpg-bar { display: none; }

  /* tables: one stacked row per entry, no side scroll */
  body.mpg-guide #pagebody .gpage .tablewrap { overflow: visible; border: 0; margin: 8px 0; }
  body.mpg-guide #pagebody .gpage table.gnodes { display: block; width: auto; min-width: 0; border: 0; white-space: normal; }
  body.mpg-guide #pagebody .gpage table.gnodes td { white-space: normal; width: auto; overflow-wrap: anywhere; }
  body.mpg-guide #pagebody .gpage table.gnodes thead { display: none; }
  body.mpg-guide #pagebody .gpage table.gnodes :is(tbody, tr) { display: block; }
  body.mpg-guide #pagebody .gpage table.gnodes tr { min-height: 56px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  body.mpg-guide #pagebody .gpage table.gnodes td { display: inline; padding: 0; border: 0; font-size: 14px; color: #a9b4d6; }
  body.mpg-guide #pagebody .gpage table.gnodes td:first-child { display: block; margin-bottom: 4px; font-size: 16px; line-height: 1.4; color: var(--fg); }
  body.mpg-guide #pagebody .gpage table.gnodes td:first-child a { display: inline-block; padding: 4px 0; }
  body.mpg-guide #pagebody .gpage table.gnodes td:first-child .meta { display: block; font-size: 13px; }
  body.mpg-guide #pagebody .gpage table.gnodes td:not(:first-child)::before { content: attr(data-label) ": "; color: #7f8bb0; }
  body.mpg-guide #pagebody .gpage table.gnodes td:not(:first-child):not(:last-child)::after { content: " · "; }
  body.mpg-guide #pagebody .gpage table.gnodes td a { min-height: 32px; }
  body.mpg-guide #pagebody .gpage details.refs > summary { min-height: 44px; display: flex; align-items: center; }

  /* hub */
  body.mpg-hub #pagebody .article-byline { font-size: 14px; margin: 6px 0 4px; }
  body.mpg-hub #pagebody .asof { margin: 0 0 4px; font-size: 14px; }
  body.mpg-hub #pagebody h2#sernau-readable { display: none; }
  body.mpg-hub #pagebody h2 small { margin-left: 6px; color: #93a0c4; font-size: .9em; }
  body.mpg-hub #pagebody details.article-detail > summary { min-height: 44px; display: flex; align-items: center; }
  body.mpg-hub .gentry { display: grid; grid-template-columns: 40px 1fr; gap: 0 12px; align-items: start; }
  body.mpg-hub .gentry > .gav { width: 40px; height: 40px; grid-row: 1 / 3; grid-column: 1; margin: 2px 0 0; }
  body.mpg-hub .gentry > .gbody { display: contents; }
  body.mpg-hub .gbody > :is(span[id], .gauth) { grid-column: 2; grid-row: 1; margin: 0; }
  body.mpg-hub .gbody > .gauth { font-size: 14px; }
  body.mpg-hub .gbody > .gtitle { grid-column: 2; grid-row: 2; margin: 4px 0 0; font-size: 18px; line-height: 1.3; padding: 0; }
  body.mpg-hub .gbody > .gauth { line-height: 1.35; }
  body.mpg-hub .gbody > .gtitle::after { content: " ›"; }
  body.mpg-hub .gbody > :not(span[id], .gauth, .gtitle) { grid-column: 1 / -1; }
  body.mpg-hub .gbody > .gstl { display: inline; }
  body.mpg-hub #pagebody .gbody > .gmeta { font-size: 14px; line-height: 1.5; }
}

/* ===== phone: reading pages (timeline, status, learn and other text pages; markup from build_site.py phone_reading_header) ===== */
@media (max-width: 600px) and (scripting: enabled) {
  body:has(#site-menu-button):has(.rp-head) #close,
  #pagebody:has(.rp-head) .crumbs { display: none; }
  #pagebody:has(.rp-head) [id] { scroll-margin-top: calc(var(--bar-bottom, 70px) + 12px); }
  .rp-head { display: flex; flex-direction: column; gap: 0; margin-bottom: 18px; }
  .rp-head > * { margin: 0; }
  .rp-head > :is(.eyebrow, .rp-eb) { order: 1; margin: 4px 0 6px; font-size: 13px; }
  .rp-head > .rp-eb[hidden] { display: block; color: var(--accent); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
  .rp-upd[hidden] { display: inline; }
  .rp-upd { color: var(--fg2); text-transform: none; letter-spacing: 0; font-weight: 500; }
  .rp-head > h1 { order: 2; margin: 0 0 8px; }
  .rp-head > .rp-what { order: 3; display: block; margin: 0 0 14px; color: var(--fg2); font-size: 17px; line-height: 1.45; }
  .rp-head > .rp-sum { order: 4; margin: 0 0 14px; font-size: 17px; line-height: 1.5; }
  .rp-head > .rp-latest, .rp-head > .rp-button, .rp-head > .rp-jump { order: 5; }
  .rp-head > .article-byline { order: 7; margin-top: 4px; font-size: 13px; }
  .rp-head > .asof { order: 8; margin-top: 4px; font-size: 13px; }
  .rp-head > .asof em { font-style: normal; }
  .rp-head > .sharebar { display: none; }   /* Share and Cite are in the site menu */
  .rp-bydate { display: none; }

  .rp-button[hidden] { display: inline-flex; }
  .rp-button {
    align-self: flex-start; align-items: center; min-height: 44px; box-sizing: border-box; padding: 0 16px; margin: 0 0 14px;
    border: 1px solid var(--map-border, #35456a); border-radius: 14px; background: var(--map-control, #17203b);
    font: 600 16px var(--sans); text-decoration: none;
  }
  .rp-ok { color: #7ee2a8; }
  .rp-gold { color: var(--gold); border-color: #8a6f3a; background: #2a2620; }

  .rp-latest[hidden] { display: block; }
  .rp-latest {
    margin: 0 0 12px; padding: 14px 16px; border: 1px solid #8a6f3a; border-radius: 18px;
    background: linear-gradient(#1c1f2e, #141b33); color: var(--fg); text-decoration: none;
  }
  .rp-when { display: block; margin-bottom: 6px; color: var(--gold); font: 700 13px var(--sans); letter-spacing: .06em; text-transform: uppercase; }
  .rp-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; font-size: 16px; line-height: 1.5; }
  #pagebody .rp-seestatus { display: none; }

  .rp-jump[hidden] { display: flex; }
  .rp-jump { flex-wrap: nowrap; justify-content: flex-start; gap: 8px; margin: 0 -20px 14px; padding: 26px 20px 2px; position: relative;
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .rp-jump::-webkit-scrollbar { display: none; }
  .rp-jump a { flex: none; }
  .rp-jump p { position: absolute; top: 0; left: 20px; margin: 0; color: var(--fg2); font: 700 13px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
  .rp-jump a {
    display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 0 14px;
    border: 1px solid var(--map-border, #35456a); border-radius: 14px; background: var(--map-control, #17203b);
    color: var(--fg); font: 500 15px var(--sans); text-decoration: none;
  }

  /* /status/: the page's own bold answer as the short-answer card, its two sources as chips */
  .rp-head > p.rp-sum:has(.rp-sa) {
    padding: 14px 16px; border: 1px solid #8a6f3a; border-radius: 18px; background: linear-gradient(#1c1f2e, #141b33);
  }
  .rp-sa[hidden] { display: block; }
  .rp-sa { margin-bottom: 6px; color: #7ee2a8; font: 700 13px var(--sans); letter-spacing: .06em; text-transform: uppercase; }
  .rp-sum strong { font-weight: 500; }
  .rp-srcs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 0; }
  .rp-srcs a {
    display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 0 14px;
    border: 1px solid var(--map-border, #35456a); border-radius: 14px; font: 600 15px var(--sans); color: var(--fg); text-decoration: none;
  }
  .rp-srcs a::after { content: " ↗"; color: var(--fg2); white-space: pre; }
  #pagebody .rp-lu { display: none; }   /* duplicates the byline date (.rp-bydate, "Updated 29 Nov 2026") */

  /* wide tables scroll inside the column instead of widening the page */
  #pagebody:has(.rp-head) table { display: block; max-width: 100%; overflow-x: auto; }
}

/* ===== phone: alpoge =====
   The Alpöge map and the cluster and theme pages on phones (600 px and below, with scripts): the shared top bar, field
   chips, the map edge to edge with only the fit button, and one short panel (app.js, phone: alpoge). Design:
   research/plans/mobile-pages/alpoge/ and cluster/. Without scripts, and above 600 px, nothing here applies. */
body[data-engine="alpoge"] .map-phone { display: none; }
@media (max-width: 600px) and (scripting: enabled) {
  body[data-engine="alpoge"]:has(#map-phone-panel):is([data-view="map"], [data-view="cluster"], [data-view="theme"]) {
    overscroll-behavior: none;
    --aph-sheet: #101830;
    --aph-border: #35456a;
    --aph-control: #17203b;
  }
  body[data-engine="alpoge"]:has(#map-phone-panel):is([data-view="map"], [data-view="cluster"], [data-view="theme"])
    :is(#panel, #fbar, #fmob, #zshare, #zin, #zout, #zlist, #zroute, [data-share-slot="toolbar"], .fcount) { display: none !important; }
  body[data-engine="alpoge"]:is([data-view="map"], [data-view="cluster"], [data-view="theme"]) :is(#map-chips, #map-phone-panel) { display: block; }

  body[data-engine="alpoge"] #map-chips {
    display: none;
    position: fixed;
    z-index: 19;
    inset: calc(80px + var(--map-top)) var(--map-right) auto var(--map-left);
    min-height: 47px;
    padding: 0 14px 3px;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }
  body[data-engine="alpoge"]:is([data-view="map"], [data-view="cluster"], [data-view="theme"]) #map-chips { display: flex; gap: 8px; }
  body[data-engine="alpoge"] #map-chips::-webkit-scrollbar { display: none; }
  body[data-engine="alpoge"] #map-chips button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--aph-border);
    border-radius: 14px;
    background: var(--aph-control);
    color: #dbe4ff;
    font: 500 13px var(--sans);
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
  }
  body[data-engine="alpoge"] #map-chips button i { width: 8px; height: 8px; border-radius: 50%; }
  body[data-engine="alpoge"] #map-chips [aria-pressed="true"] { border-color: #ba9b61; background: #302b2c; color: var(--gold); }

  body[data-engine="alpoge"]:has(#map-phone-panel):is([data-view="map"], [data-view="cluster"], [data-view="theme"]) .mapctl {
    top: auto;
    left: auto;
    right: calc(15px + var(--map-right));
    bottom: calc(76px + var(--map-bottom));
  }
  body[data-engine="alpoge"]:has(#map-phone-selection:not([hidden])) .mapctl { display: none; }
  body[data-engine="alpoge"]:has(#map-phone-panel) .mapctl #zreset { width: 44px; height: 44px; border-radius: 14px; background: #19243f; }

  body[data-engine="alpoge"] #map-phone-panel {
    position: fixed;
    z-index: 15;
    inset: auto 0 0;
    max-height: 70dvh;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0 var(--map-right) var(--map-bottom) var(--map-left);
    border: 1px solid var(--aph-border);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: var(--aph-sheet);
    color: var(--fg);
    box-shadow: 0 -12px 34px #0005;
  }
  body[data-engine="alpoge"] #map-phone-panel.aph-open { z-index: 21; max-height: calc(100dvh - 90px - var(--map-top)); }
  body[data-engine="alpoge"] #map-phone-panel:has(.map-phone-peek:not([hidden]))::before,
  body[data-engine="alpoge"] .map-phone-grab::before {
    content: "";
    display: block;
    width: 38px;
    height: 4px;
    margin: 7px auto 0;
    border-radius: 10px;
    background: #687594;
  }
  body[data-engine="alpoge"] .map-phone-peek {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    padding: 0 4px;
    white-space: nowrap;
    font-size: clamp(10px, 3vw, 12px);
    color: #c5cfee;
  }
  body[data-engine="alpoge"] .map-phone-peek a { display: flex; align-items: center; min-height: 44px; color: var(--gold); }
  body[data-engine="alpoge"] .map-phone-peek .map-phone-verified { color: #86e7ab; }
  body[data-engine="alpoge"] :is(#map-phone-selection, .map-phone-peek, .map-phone-extra)[hidden] { display: none; }
  /* the closed panel takes vertical drags as swipes (app.js aphPanelEvents), not as page or map pans */
  body[data-engine="alpoge"] #map-phone-selection:has(.map-phone-extra[hidden]) { touch-action: none; }
  body[data-engine="alpoge"] .map-phone-grab {
    display: block;
    width: 100%;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    touch-action: none;
  }
  body[data-engine="alpoge"] .map-phone-detail { padding: 4px 19px 14px; }
  body[data-engine="alpoge"] .map-phone-title { display: flex; align-items: flex-start; gap: 8px; }
  body[data-engine="alpoge"] .map-phone-title h1 {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: var(--fg);
    font: 600 24px/1.15 var(--serif);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  body[data-engine="alpoge"] #map-phone-panel.aph-open .map-phone-title h1 { -webkit-line-clamp: unset; }
  body[data-engine="alpoge"] .map-phone-close {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin: -6px -4px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle, #202c49 0 18px, transparent 18.5px);
    color: var(--fg);
    font-size: 24px;
    cursor: pointer;
    touch-action: manipulation;
  }
  body[data-engine="alpoge"] .aph-meta { margin: 6px 0 0; font-size: 13px; color: #aab6da; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body[data-engine="alpoge"] .aph-core { color: var(--gold); font-weight: 600; }
  body[data-engine="alpoge"] .aph-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; }
  body[data-engine="alpoge"] .aph-actions { display: flex; gap: 10px; margin-top: 12px; }
  body[data-engine="alpoge"] :is(.aph-primary, .aph-next) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    font: 600 16px var(--sans);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
  }
  body[data-engine="alpoge"] .aph-primary { flex: 1 1 auto; max-width: 100%; border: 1px solid var(--gold); background: var(--gold); color: #211909; }
  body[data-engine="alpoge"] button.aph-primary { flex: 0 1 auto; }
  body[data-engine="alpoge"] .aph-next { flex: none; border: 1px solid var(--aph-border); background: var(--aph-control); color: var(--gold); }
  body[data-engine="alpoge"] .map-phone-extra { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--aph-border); font-size: 16px; }
  body[data-engine="alpoge"] .map-phone-extra h2 { margin: 22px 0 6px; font-size: 13px; }
  body[data-engine="alpoge"] .aph-desc { margin: 0 0 8px; font-size: 17px; line-height: 1.55; color: var(--fg); }
  body[data-engine="alpoge"] .map-phone-extra .meta { font-size: 14px; }
  body[data-engine="alpoge"] .aph-route { list-style: none; margin: 0; padding: 0; }
  body[data-engine="alpoge"] .aph-route li > :is(a, span:only-child), body[data-engine="alpoge"] .aph-route li.here { display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--fg); }
  body[data-engine="alpoge"] .aph-route a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body[data-engine="alpoge"] .aph-route i {
    display: grid;
    place-items: center;
    flex: none;
    width: 26px;
    height: 26px;
    border: 1.5px solid #52658b;
    border-radius: 50%;
    font-size: 13px;
  }
  body[data-engine="alpoge"] .aph-route li.here i { border: 2px solid var(--gold); background: radial-gradient(circle, var(--gold) 0 6px, transparent 6.5px); }
  body[data-engine="alpoge"] .aph-route li:nth-child(2) a span { color: var(--gold); }
  body[data-engine="alpoge"] .aph-route b { color: #8796bd; font-weight: 400; }
  body[data-engine="alpoge"] .aph-conn li > :is(a, span) { min-height: 44px; display: flex; align-items: center; }
  body[data-engine="alpoge"] .aph-refs { padding-left: 18px; }
  body[data-engine="alpoge"] .aph-refs li { margin: 6px 0; }
  body[data-engine="alpoge"] .map-phone-extra a:not(.btn, .chip) { min-height: 44px; }
  body[data-engine="alpoge"] .aph-foot a { display: inline-flex; align-items: center; }
}

/* ===== phone: list views (Alpöge /list/ and Sernau list) ===== */
@media (max-width: 600px) and (scripting: enabled) {
  body[data-view="list"] :is(#pagebody, #content) :is(.meta, .lv-sort span, .lv-g h3 .n, small, .end) { font-size: 13px; }
}
/* ===== end phone: list views ===== */

/* ===== phone transforms at any width =====
   The phone scripts fold sections at 600 px and below; after a rotation past 600 px those folds stay, so their minimal
   styles live here, outside the phone query, scoped to classes only the scripts add. A page loaded wider is unchanged. */
/* Any width (phone-status.js; phone-status.css only loads at 600 px and below): the folds phone-status.js made stay usable if the screen widens past 600 px (a rotation). Only the
   script-added classes are styled here, so a page loaded above 600 px does not change. */
#pagebody details.mfold{margin:12px 0 16px;border:1px solid var(--line);border-radius:12px;padding:0 14px}
#pagebody details.mfold>summary{list-style:none;cursor:pointer;min-height:44px;display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;padding:10px 0}
#pagebody details.mfold>summary::-webkit-details-marker{display:none}
#pagebody details.mfold>summary::after{content:"›";margin-left:auto;font-size:18px;transition:transform .2s}
#pagebody details.mfold[open]>summary::after{transform:rotate(90deg)}
#pagebody details.m-sec>summary h2{margin:0;flex:1}
#pagebody details.m-sec>summary small{flex-basis:100%}
#pagebody details.mfold[open]{padding-bottom:12px}
/* Any width (phone-about.js; phone-about.css only loads at 600 px and below): the folds and the pointer phone-about.js made stay styled past 600 px (a rotation). Only its classes are
   styled here, so a page loaded above 600 px does not change. */
#pagebody details.pa-fold { margin: 0; border-top: 1px solid var(--line, rgba(127,127,127,.25)); }
#pagebody details.pa-fold:not(:has(+ details.pa-fold)) { border-bottom: 1px solid var(--line, rgba(127,127,127,.25)); margin-bottom: 20px; }
#pagebody details.pa-fold > summary { list-style: none; cursor: pointer; min-height: 44px; box-sizing: border-box; padding: 12px 28px 12px 0; position: relative;
  display: flex; flex-direction: column; justify-content: center; gap: 2px; }
#pagebody details.pa-fold > summary::-webkit-details-marker { display: none; }
#pagebody details.pa-fold > summary::after { content: "›"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 20px; opacity: .6; transition: transform .15s; }
#pagebody details.pa-fold[open] > summary::after { transform: translateY(-50%) rotate(90deg); }
#pagebody details.pa-fold > summary h2 { margin: 0; }
#pagebody details.pa-fold > summary h2::after { display: none; }
#pagebody .pa-gist { font-size: 14px; color: var(--fg2); line-height: 1.35; }
#pagebody details.pa-fold[open] { padding-bottom: 12px; }
.pa-asof { text-transform: none; letter-spacing: 0; }
.rp-latest .pa-full { display: block; margin-top: 6px; color: var(--accent); font: 600 14px var(--sans); }
/* Any width (phone-guide.js; phone-guide.css only loads at 600 px and below): the folds phone-guide.js made (.pg-fold) stay styled past 600 px (a rotation). A page loaded above
   600 px has no .pg-fold, so it does not change. */
#pagebody .gpage[data-pg] .pg-fold { margin: 20px 0 0; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 14px; }
#pagebody .gpage[data-pg] .pg-fold > summary { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 56px;
  padding: 10px 44px 10px 16px; cursor: pointer; list-style: none; }
#pagebody .gpage[data-pg] .pg-fold > summary::-webkit-details-marker { display: none; }
#pagebody .gpage[data-pg] .pg-fold > summary::after { content: "⌄"; position: absolute; right: 16px; top: 50%; transform: translateY(-60%); font-size: 20px; color: #9aa3b2; }
#pagebody .gpage[data-pg] .pg-fold[open] > summary::after { content: "⌃"; transform: translateY(-30%); }
#pagebody .gpage[data-pg] .pg-fl { font-size: 17px; font-weight: 600; line-height: 1.3; }
#pagebody .gpage[data-pg] .pg-gist { margin-top: 2px; font-size: 14px; line-height: 1.35; color: #9aa3b2; }
#pagebody .gpage[data-pg] .pg-fold > :not(summary) { margin-left: 16px; margin-right: 16px; }
#pagebody .gpage[data-pg] .pg-fold > :last-child { margin-bottom: 16px; }
/* ===== end phone transforms at any width ===== */
