/* hstry. Every value is a token from DESIGN.md. */
@font-face { font-family: 'Instrument Sans'; src: url('/s/fonts/instrument-sans.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/s/fonts/newsreader.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #eef0f2; --surface: #ffffff; --surface-2: #e3e6ea; --line: #d3d8de;
  --fg: #16191d; --fg-2: #48505a; --fg-3: #5f6873;
  --accent: #a63d22; --accent-soft: rgba(166, 61, 34, .09); --danger: #a3261b;
  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --t-xs: .8125rem; --t-s: .875rem; --t-m: 1rem; --t-l: 1.1875rem; --t-xl: 1.625rem;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-card: 12px; --r-embed: 8px;
  --dur: 140ms;
  --measure: 620px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1215; --surface: #171b20; --surface-2: #20262d; --line: #2c333b;
    --fg: #e4e7ea; --fg-2: #b0b7bf; --fg-3: #8d96a0;
    --accent: #e2896b; --accent-soft: rgba(226, 137, 107, .12); --danger: #f08a7c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--t-m)/1.55 var(--sans); -webkit-tap-highlight-color: transparent; overflow-wrap: break-word; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; transition: color var(--dur); }
@media (hover: hover) { a:hover { text-decoration-thickness: 2px; } }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s2); top: -100px; background: var(--surface); padding: var(--s2) var(--s3); border-radius: var(--r-embed); z-index: 10; }
.skip:focus { top: var(--s2); }
.ext { display: inline-block; margin-left: 3px; vertical-align: -1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* header */
.top { background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { max-width: var(--measure); margin: 0 auto; padding: 0 var(--s4); display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.wordmark { font: 600 1.5rem/1 var(--serif); color: var(--fg); text-decoration: none; letter-spacing: -.01em; padding: var(--s2) 0; }
.top-nav { display: flex; gap: var(--s1); }
.top-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s2); color: var(--fg-2); text-decoration: none; font-size: var(--t-s); font-weight: 500; }
@media (hover: hover) { .top-nav a:hover { color: var(--fg); } }

/* where/when: one map and one timeline. Sticky over the feed (.ww). */
.ww { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.mt { max-width: var(--measure); margin: 0 auto; padding: var(--s2) var(--s4) var(--s1); }
.mt-head { display: flex; align-items: center; gap: var(--s3); min-height: 44px; }
.mt-head .mt-text { flex: 1 1 auto; }
.mt-toggle { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s3); font: 650 var(--t-xs) var(--sans); color: var(--fg-2); background: var(--surface); border: 0; border-radius: var(--r-embed); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.mt-toggle::before { content: ''; position: absolute; inset: -2px 0; }
.mt-toggle[aria-expanded="true"] { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.mt-strip.is-closed .mt-body { display: none; }
.mt-strip.is-closed { padding-bottom: var(--s2); }
/* The map, wide, in a 2:1 frame; app.js slides it so the lit place shows. */
.mt-wide { position: relative; display: block; margin-top: var(--s2); aspect-ratio: 2 / 1; overflow: hidden; border-radius: var(--r-embed); box-shadow: inset 0 0 0 1px var(--line); }
.mt-wide .map { position: absolute; left: 0; right: 0; top: 0; transition: transform var(--dur) ease; }
.mt-explore { position: absolute; right: var(--s2); bottom: var(--s2); padding: 2px var(--s2); font: 650 var(--t-xs) var(--sans); color: var(--accent); background: var(--surface); border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.mt-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mt-now { display: flex; flex-wrap: wrap; column-gap: var(--s2); align-items: baseline; line-height: 1.3; }
.ww-year { font-weight: 650; font-size: var(--t-s); font-variant-numeric: tabular-nums; color: var(--accent); white-space: nowrap; }
.ww-place { font-size: var(--t-s); color: var(--fg-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-ago { font-size: var(--t-s); font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.t1-wrap { position: relative; margin-top: var(--s2); }
.t1-row { display: flex; align-items: center; gap: var(--s2); min-height: 32px; }
.t1-row .t1-legend { flex: 1 1 auto; min-width: 0; margin: 0; }
.t1-edge { position: relative; flex: none; display: inline-flex; align-items: center; gap: 2px; min-height: 32px; padding: 0 var(--s1); font: 650 var(--t-xs) var(--sans); color: var(--accent); background: none; border: 0; cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.t1-edge[hidden] { display: none; }
/* A 44 px tap area around a 32 px row. */
.t1-edge::before { content: ''; position: absolute; inset: -6px -4px; }
.t1-today { margin-left: auto; }
.t1-back { margin-right: auto; }
.t1-back:not(.is-left) .t1-chev { order: 2; }
.t1-back.is-left .t1-chev { transform: scaleX(-1); }
.t1-edge:active { opacity: .6; }
.t1-chev { flex: none; }
.t1-scroll { overflow-x: auto; overscroll-behavior-x: contain; border-radius: var(--r-embed); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.t1-scroll::-webkit-scrollbar { display: none; }
.t1-svg { display: block; }
.mt-strip .t1-svg { cursor: pointer; }
.t1-site { fill: var(--accent-soft); }
.t1-range { fill: var(--accent); opacity: .18; }
.t1-bar { fill: var(--fg-3); opacity: .45; }
.t1-ev { fill: var(--accent); opacity: .75; }
.t1-axis { stroke: var(--fg-3); stroke-width: 1.5; }
.t1-tick { stroke: var(--fg-3); stroke-width: 1; opacity: .6; }
.t1-year { font: 500 11px var(--sans); fill: var(--fg-3); }
.t1-year.big { font-weight: 700; fill: var(--fg-2); }
.t1-lm line { stroke: var(--line); stroke-width: 1; }
.t1-lm circle { fill: var(--fg-2); }
.t1-lm text { font: 600 11px var(--sans); fill: var(--fg-2); }
.t1-lm:hover text, .t1-lm:focus text { fill: var(--accent); text-decoration: underline; }
.t1-now line { stroke: var(--fg); stroke-width: 2; }
.t1-now text { font: 700 12px var(--sans); fill: var(--fg); }
.t1-mark { stroke: var(--accent); stroke-width: 3; }
.t1-span { fill: var(--accent); opacity: .3; }
.t1-life rect { fill: none; stroke: var(--fg-2); stroke-width: 1.2; stroke-dasharray: 4 3; }
.t1-life text { font: 600 10px var(--sans); fill: var(--fg-2); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.t1-measure line, .t1-measure path { stroke: var(--accent); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.t1-measure text { font: 650 11px var(--sans); fill: var(--accent); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; font-variant-numeric: tabular-nums; }
.t1-legend { margin-top: 3px; font-size: 11px; line-height: 1.3; color: var(--fg-3); }
.t1-legend[hidden] { display: none; }
.mo.mo-top { padding: var(--s2) 0 0; }

/* map: the coastline image with an SVG overlay of the same size */
.map { position: relative; line-height: 0; }
.map-img { display: block; width: 100%; height: auto; }
.map-over { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mk-dot { fill: var(--fg-3); opacity: .45; }
.mk-ring { fill: none; stroke: var(--fg-3); stroke-width: 3; stroke-dasharray: 6 6; opacity: .6; }
.mk.on .mk-dot { fill: var(--accent); opacity: 1; stroke: var(--accent-soft); stroke-width: 26; paint-order: stroke; }
.mk.on .mk-ring { stroke: var(--accent); opacity: 1; }
.map-mini .mk-dot { opacity: .35; }
.map-big .mk-dot { opacity: .7; }
.mk-label { font: 600 30px var(--sans); fill: var(--fg-2); paint-order: stroke; stroke: var(--bg); stroke-width: 8px; stroke-linejoin: round; }
.mk.on .mk-label { fill: var(--accent); }
.mk-a { cursor: pointer; }
.mk-hit { fill: transparent; }
.mk-a:focus-visible .mk-dot { stroke: var(--accent); stroke-width: 8; }

/* timeline */
.tl-wrap { display: flex; flex-direction: column; }
.tl { display: block; width: 100%; height: 44px; }
.tl-bar { fill: var(--fg-3); opacity: .4; }
.tl-base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tl-mark { stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.tl-span { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.tl-range { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tl-ticks { display: flex; justify-content: space-between; font-size: var(--t-xs); line-height: 1.2; color: var(--fg-3); font-variant-numeric: tabular-nums; margin-top: 2px; }

/* home orientation */
.or { padding: var(--s4) 0 var(--s2); }
.or-h { font: 600 var(--t-l)/1.3 var(--serif); padding: 0 var(--s4); }
.or-note { padding: 2px var(--s4) 0; font-size: var(--t-s); color: var(--fg-3); }
.faces, .picks, .turns, .convs, .periods { list-style: none; margin: var(--s3) 0 0; padding: 0 var(--s4); display: flex; gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--s4); scrollbar-width: none; overscroll-behavior-x: contain; }
.faces::-webkit-scrollbar, .picks::-webkit-scrollbar, .turns::-webkit-scrollbar, .convs::-webkit-scrollbar, .periods::-webkit-scrollbar { display: none; }
.faces li, .picks li, .turns li, .convs li, .periods li { scroll-snap-align: start; flex: none; }
.faces a { display: flex; flex-direction: column; align-items: center; gap: var(--s1); width: 68px; text-decoration: none; color: var(--fg-2); font-size: var(--t-xs); text-align: center; line-height: 1.2; }
.faces img, .face-mono { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.face-mono { display: flex; align-items: center; justify-content: center; font: 600 1.25rem/1 var(--serif); color: var(--fg-2); }
.pick { display: flex; flex-direction: column; gap: var(--s2); width: 260px; min-height: 100%; padding: var(--s3) var(--s4) var(--s4); background: var(--surface); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--fg); }
.picks li { display: flex; }
.pick-head { display: flex; gap: var(--s2); align-items: center; }
.pick-head .av { width: 32px; height: 32px; }
.pick-head > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.pick-name { font-weight: 650; font-size: var(--t-s); }
.pick-when { font-size: var(--t-xs); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.pick-attr { font-size: var(--t-xs); color: var(--fg-2); font-weight: 500; }
.pick-label { font-size: var(--t-xs); color: var(--fg-2); font-weight: 600; }
.pick-plain { margin-top: -6px; font-weight: 560; line-height: 1.4; border-left: 2px solid var(--accent); padding-left: var(--s2); }
.pick-quote { font: 400 var(--t-s)/1.5 var(--serif); color: var(--fg-2); padding-left: var(--s2); border-left: 2px solid var(--line); }
.pick-quote::before { content: '“'; }
.pick-quote::after { content: '”'; }
.pick-cite { font-size: var(--t-xs); color: var(--fg-3); margin-top: auto; }
.turns a { display: flex; flex-direction: column; gap: 2px; width: 150px; min-height: 92px; padding: var(--s3); border-radius: var(--r-embed); background: var(--accent-soft); text-decoration: none; color: var(--fg); }
.turn-y { font-size: var(--t-xs); color: var(--accent); font-weight: 650; font-variant-numeric: tabular-nums; }
.turn-t { font-size: var(--t-s); font-weight: 600; line-height: 1.3; }
.convs a { display: flex; flex-direction: column; gap: 2px; width: 210px; min-height: 68px; padding: var(--s3); border-radius: var(--r-embed); background: var(--surface-2); text-decoration: none; color: var(--fg); }
.conv-who { font-weight: 600; font-size: var(--t-s); line-height: 1.3; }
.conv-when { font-size: var(--t-xs); color: var(--fg-2); font-variant-numeric: tabular-nums; }
.periods a { display: flex; flex-direction: column; gap: 2px; width: 172px; min-height: 104px; padding: var(--s3); border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--fg); }
.per-y { font-size: var(--t-xs); color: var(--accent); font-weight: 650; font-variant-numeric: tabular-nums; }
.per-t { font: 600 var(--t-m)/1.25 var(--serif); }
.per-n { margin-top: auto; font-size: var(--t-xs); color: var(--fg-3); }
.placechips { list-style: none; margin: var(--s3) 0 0; padding: 0 var(--s4); display: flex; flex-wrap: wrap; gap: var(--s2); }
.placechips a { display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s3); border-radius: var(--r-embed); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--fg); font-size: var(--t-s); font-weight: 600; }
.placechips a span { font-weight: 400; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.placechips a.all { background: transparent; box-shadow: none; color: var(--accent); text-decoration: underline; text-underline-offset: .18em; padding: 0 var(--s1); }
.or-more { padding: var(--s2) var(--s4) 0; }
.or-more a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); text-underline-offset: .18em; }
.or-feedlink { display: flex; flex-wrap: wrap; column-gap: var(--s4); padding: var(--s3) var(--s4) 0; }
.or-feedlink a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
@media (hover: hover) { .periods a:hover .per-t, .placechips a:hover { color: var(--accent); } }
.feed-h { font: 600 var(--t-l)/1.3 var(--serif); padding: var(--s6) var(--s4) var(--s3); scroll-margin-top: 0; }

/* filtered feed */
.filtered h1 { font-size: var(--t-xl); }
.filter-acts { display: flex; gap: var(--s4); align-items: center; margin-top: var(--s3); }
.filter-acts a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; min-height: 44px; padding: 0 var(--s5); font: 600 var(--t-m) var(--sans); color: var(--surface); background: var(--accent); border: 0; border-radius: var(--r-embed); cursor: pointer; text-decoration: none; }
.btn:disabled { background: var(--surface-2); color: var(--fg-3); cursor: default; }
.empty { padding: var(--s5) var(--s4); color: var(--fg-2); }

/* explorer */
.ex { padding: 0 var(--s4); display: grid; gap: var(--s4); }
.ex-map .map { border-radius: var(--r-card); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.ex-hint { font-size: var(--t-xs); color: var(--fg-3); margin-top: calc(var(--s3) * -1); }
.ex fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ex legend { font: 600 var(--t-l)/1.3 var(--serif); margin-bottom: var(--s2); padding: 0; }
.ex-places ul { list-style: none; margin: 0 0 var(--s2); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s3); }
.chk { display: flex; align-items: center; gap: var(--s2); min-height: 44px; border-bottom: 1px solid var(--line); cursor: pointer; }
.chk input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.chk-name { flex: 1; min-width: 0; font-size: var(--t-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk-n { font-size: var(--t-xs); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.ex-tl .tl { height: 56px; }
.tl-hint { color: var(--fg-3); padding: 0 var(--s2); }
.presets a[aria-current="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.ex-range { display: flex; gap: var(--s3); margin-top: var(--s3); }
.ex-range label { flex: 1; display: flex; flex-direction: column; gap: var(--s1); font-size: var(--t-xs); font-weight: 600; color: var(--fg-2); }
.ex-range select { font: 400 16px var(--sans); min-height: 44px; padding: 0 var(--s2); color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-embed); }
.presets { list-style: none; margin: var(--s3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.presets a { display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: var(--s1) var(--s3); border-radius: var(--r-embed); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--fg); font-size: var(--t-s); font-weight: 600; line-height: 1.25; }
.presets span { font-size: var(--t-xs); color: var(--fg-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.ex-go { position: sticky; bottom: 0; display: flex; gap: var(--s4); align-items: center; padding: var(--s3) 0 calc(var(--s3) + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.ex-go .btn { flex: 1; }
.ex-clear { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

/* feed */
.feed { max-width: var(--measure); margin: 0 auto; padding-bottom: var(--s7); }
.intro { padding: var(--s5) var(--s4) var(--s4); }
.intro h1 { font: 600 var(--t-xl)/1.2 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.lede { margin-top: var(--s3); color: var(--fg-2); text-wrap: pretty; }
.era-h { font: 600 var(--t-l)/1.3 var(--serif); padding: var(--s6) var(--s4) var(--s3); scroll-margin-top: 140px; text-wrap: balance; }

.post { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: var(--s4); margin-top: -1px; scroll-margin-top: 250px; }
.post-head { display: flex; gap: var(--s3); align-items: flex-start; }
.av { width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-2); }
.av-mono { display: inline-flex; align-items: center; justify-content: center; font: 600 1.125rem/1 var(--serif); color: var(--fg-2); }
.av-link { display: block; flex: none; border-radius: 50%; }
.who { display: flex; flex-direction: column; min-width: 0; }
.name-h { font-size: var(--t-m); line-height: 1.3; }
.name { font-weight: 650; color: var(--fg); text-decoration: none; font-size: var(--t-m); line-height: 1.3; }
.when { color: var(--fg-3); font-size: var(--t-s); text-decoration: none; font-variant-numeric: tabular-nums; line-height: 1.3; padding: 2px 0; align-self: flex-start; }
.who .attr { font-size: var(--t-s); line-height: 1.35; color: var(--fg-2); font-weight: 500; }
@media (hover: hover) { a.name:hover, .when:hover { text-decoration: underline; } }

.plain-label { margin-top: var(--s4); font-size: var(--t-xs); color: var(--fg-2); font-weight: 600; }
.plain { margin-top: 2px; padding-left: var(--s3); border-left: 2px solid var(--accent); font: 560 var(--t-l)/1.4 var(--sans); color: var(--fg); text-wrap: pretty; }
.context { margin-top: var(--s2); font-size: var(--t-s); color: var(--fg-3); }

.quote { margin: var(--s4) 0 0; padding-left: var(--s4); border-left: 2px solid var(--line); }
.quote blockquote { margin: 0; }
.quote figcaption { display: block; }
.quote blockquote p { font: 400 var(--t-m)/1.55 var(--serif); font-variation-settings: 'opsz' 16; color: var(--fg-2); text-wrap: pretty; }
.quote blockquote p::before { content: '“'; }
.quote blockquote p::after { content: '”'; }
.cite { margin-top: var(--s2); font-size: var(--t-xs); color: var(--fg-3); line-height: 1.45; display: flex; flex-direction: column; }
.cite-work { color: var(--fg-2); font-weight: 500; }
.cite-link { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; margin-bottom: calc(var(--s3) * -1); font-weight: 500; }

.reply-to { margin-top: var(--s4); }
.embed { display: block; background: var(--surface-2); border-radius: var(--r-embed); padding: var(--s3); text-decoration: none; color: var(--fg); }
.embed-who { display: block; font-size: var(--t-xs); color: var(--fg-2); font-weight: 600; }
.embed-quote { display: block; margin-top: var(--s1); font: 400 var(--t-s)/1.5 var(--serif); color: var(--fg-2); }
.embed-quote::before { content: '“'; }
.embed-quote::after { content: '”'; }
@media (hover: hover) { .embed:hover .embed-who { color: var(--accent); } }
.how { margin-top: var(--s2); font-size: var(--t-xs); color: var(--fg-2); }
.answered { margin-top: var(--s3); display: flex; flex-direction: column; }
.answered a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-s); font-weight: 600; margin-bottom: calc(var(--s3) * -1); }

.facts { margin: var(--s5) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line); display: grid; gap: var(--s3); font-size: var(--t-s); }
.facts dt { color: var(--fg-3); font-size: var(--t-xs); font-weight: 600; }
.facts dd { margin: 2px 0 0; color: var(--fg-2); }

/* events */
.event { background: var(--accent-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: var(--s4); margin-top: -1px; scroll-margin-top: 250px; }
.ev-date { color: var(--accent); font-weight: 650; font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.ev-title { margin-top: 2px; font: 650 var(--t-m)/1.35 var(--sans); text-wrap: balance; }
.ev-body { margin-top: var(--s1); font-size: var(--t-s); line-height: 1.5; color: var(--fg-2); text-wrap: pretty; }
.ev-quote { margin: var(--s3) 0 0; padding-left: var(--s3); border-left: 2px solid var(--line); }
.ev-quote blockquote { margin: 0; }
.ev-quote p { font: 400 var(--t-s)/1.5 var(--serif); color: var(--fg-2); }
.ev-quote p::before { content: '“'; }
.ev-quote p::after { content: '”'; }
.ev-src { margin-top: var(--s2); display: flex; flex-wrap: wrap; column-gap: var(--s4); font-size: var(--t-xs); }
.ev-src a { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: calc(var(--s3) * -1); font-weight: 500; }

/* person */
.person-head { display: flex; gap: var(--s4); align-items: center; padding: var(--s5) var(--s4) var(--s3); }
.av-lg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.av-lg.av-mono { font-size: 2.25rem; }
.person-head h1 { font: 600 var(--t-xl)/1.15 var(--serif); }
.life { color: var(--fg-2); font-size: var(--t-s); margin-top: var(--s1); font-variant-numeric: tabular-nums; }
.role { color: var(--fg-3); font-size: var(--t-s); }
.credit, .person-meta { padding: 0 var(--s4); font-size: var(--t-xs); color: var(--fg-3); }
.person-meta { padding-bottom: var(--s4); margin-top: var(--s1); }
.back { display: flex; flex-wrap: wrap; gap: var(--s4); padding: var(--s5) var(--s4); }
.back a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

.people { list-style: none; margin: 0; padding: 0; }
.people a { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: -1px; text-decoration: none; color: var(--fg); min-height: 68px; }
.pp { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pp-name { font-weight: 650; }
.pp-life { font-size: var(--t-s); color: var(--fg-3); }
.pp-n { color: var(--fg-3); font-size: var(--t-s); font-variant-numeric: tabular-nums; }

/* prose pages */
.prose { max-width: var(--measure); margin: 0 auto; padding: var(--s5) var(--s4) var(--s7); }
.prose h1 { font: 600 var(--t-xl)/1.2 var(--serif); }
.prose h2 { font: 600 var(--t-l)/1.3 var(--serif); margin-top: var(--s6); }
.prose p, .prose ul { margin-top: var(--s3); color: var(--fg-2); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: var(--s2); }
.prose strong { color: var(--fg); }
.texts { font-size: var(--t-s); }
.prose code { font-size: .9em; }

/* feedback form */
.fb { margin-top: var(--s4); display: grid; gap: var(--s2); }
.fb fieldset { border: 0; padding: 0; margin: 0 0 var(--s3); display: grid; gap: var(--s1); }
.fb legend { font-weight: 600; margin-bottom: var(--s2); color: var(--fg); }
.radio { display: flex; align-items: center; gap: var(--s2); min-height: 44px; color: var(--fg-2); }
.radio input { width: 20px; height: 20px; accent-color: var(--accent); }
.fb label[for] { font-weight: 600; color: var(--fg); margin-top: var(--s2); }
.fb textarea, .fb input[type="email"] { font: 400 16px/1.5 var(--sans); color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-embed); padding: var(--s3); width: 100%; }
.fb button { margin-top: var(--s3); justify-self: start; min-height: 44px; padding: 0 var(--s5); font: 600 var(--t-m) var(--sans); color: var(--surface); background: var(--accent); border: 0; border-radius: var(--r-embed); cursor: pointer; }
.hp { position: absolute; left: -9999px; }
.ok { color: var(--fg); font-weight: 600; }
.err { color: var(--danger); }
.note { font-size: var(--t-xs); color: var(--fg-3); }

/* card → moment */
article[data-href] { cursor: pointer; }
.to-moment { margin-top: var(--s3); }
.to-moment a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-embed); background: var(--surface-2); color: var(--fg); font-weight: 600; font-size: var(--t-s); text-decoration: none; }
.event .to-moment a { background: var(--surface); }
@media (hover: hover) { .to-moment a:hover { color: var(--accent); } }

/* moment page */
.mo-head { max-width: var(--measure); margin: 0 auto; padding: var(--s4) var(--s4) 0; }
.mo-head h1 { font: 600 var(--t-xl)/1.2 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.mo-sub { margin-top: var(--s1); font-size: var(--t-s); color: var(--fg-2); }
.moment .post, .moment .event { margin-bottom: 0; }
.ev-title-lg { font: 650 var(--t-xl)/1.2 var(--sans); margin-top: var(--s1); }
.mo { padding: var(--s5) var(--s4) 0; }
.mo-h { font: 600 var(--t-l)/1.3 var(--serif); }
.mo-note { margin-top: 2px; font-size: var(--t-xs); color: var(--fg-3); }
.mo-note a { color: inherit; }
.mo-setting { margin: var(--s4) var(--s4) 0; padding: var(--s4); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-card); }
.setting { margin-top: var(--s2); font-size: var(--t-m); line-height: 1.55; color: var(--fg); text-wrap: pretty; }
.mo-setting .mo-note { margin-top: var(--s3); color: var(--fg-2); }
.mo-why { margin: var(--s4) var(--s4) 0; padding: var(--s4); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); }
.why-src { margin-top: var(--s3); }
.why-src summary { display: flex; align-items: center; min-height: 44px; font-size: var(--t-s); font-weight: 600; color: var(--accent); cursor: pointer; list-style: none; }
.why-src summary::-webkit-details-marker { display: none; }
.why-q { margin-top: var(--s2); padding-left: var(--s3); box-shadow: inset 2px 0 0 var(--line); font-family: var(--serif); font-size: var(--t-m); line-height: 1.5; color: var(--fg-2); }
.why-src .mo-note { margin-top: var(--s3); color: var(--fg-2); }
.passage { margin-top: var(--s3); border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.passage summary .when-open { display: none; }
.passage[open] summary .when-open { display: inline; }
.passage[open] summary .when-closed { display: none; }
.more { margin-top: var(--s2); }
.more > summary { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; font-size: var(--t-s); color: var(--accent); cursor: pointer; }
.checks { margin: var(--s1) 0 0; padding-left: 1.2em; font-size: var(--t-s); color: var(--fg-2); }
.checks li + li { margin-top: var(--s1); }
.mo-about .facts { margin-top: var(--s2); padding-top: 0; border-top: 0; }
.passage summary { min-height: 44px; display: flex; align-items: center; padding: 0 var(--s4); font-weight: 600; cursor: pointer; color: var(--accent); }
.passage[open] summary { border-bottom: 1px solid var(--line); }
.passage-text { padding: var(--s3) var(--s4) 0; font: 400 var(--t-m)/1.6 var(--serif); color: var(--fg-2); }
.passage-text p + p { margin-top: var(--s2); }
.passage-text .here { color: var(--fg); background: var(--accent-soft); box-shadow: -8px 0 0 var(--accent-soft), 8px 0 0 var(--accent-soft); border-left: 2px solid var(--accent); padding-left: var(--s2); margin-left: -10px; }
.sp { font: 600 var(--t-xs) var(--sans); color: var(--fg-3); }
.passage .cite { padding: 0 var(--s4) var(--s4); }
.mo-rel { margin: var(--s6) var(--s4) 0; }
.rel-filters { display: flex; gap: var(--s2); overflow-x: auto; margin: var(--s3) calc(-1 * var(--s4)) 0; padding: 0 var(--s4); scrollbar-width: none; }
.rel-filters::-webkit-scrollbar { display: none; }
.rel-filters button { position: relative; flex: none; min-height: 36px; padding: 0 var(--s3); font: 600 var(--t-xs) var(--sans); color: var(--fg-2); background: var(--surface); border: 0; border-radius: var(--r-embed); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.rel-filters button::before { content: ''; position: absolute; inset: -4px 0; }
.rel-filters button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.rels { position: relative; list-style: none; margin: var(--s3) 0 0; padding: 0; }
/* The time line the rows hang from. */
.rels::before { content: ''; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.rel { position: relative; padding-left: 26px; }
.rel::before { content: ''; position: absolute; left: 2px; top: 19px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--fg-3); }
.rel a, .rel-here { display: grid; gap: 4px; padding-block: var(--s3); min-height: 44px; color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); }
.rel-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.rel-date { font-weight: 650; color: var(--fg-2); }
.rel-off { color: var(--fg-3); }
.rel-t { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-s); font-weight: 600; line-height: 1.35; }
.rel-t .av { width: 24px; height: 24px; flex: none; }
.rel-ev { flex: none; width: 10px; height: 10px; margin: 0 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.rel-why { display: flex; flex-wrap: wrap; gap: 4px; }
.rel-tag { padding: 1px 6px; border-radius: 4px; font-size: var(--t-xs); color: var(--fg-2); background: var(--surface-2); }
.rel-tag.rel-event, .rel-tag.rel-reply { color: var(--accent); background: var(--accent-soft); }
.rel-here { background: var(--accent-soft); border-radius: var(--r-embed); padding-right: var(--s3); }
.rel-here::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.rel-here .rel-off { color: var(--accent); font-weight: 650; }
.rel-here .rel-t { color: var(--fg); }
/* A break in the spine where many years pass between two rows. */
.rel-gap { position: relative; margin: 2px 0; padding: var(--s1) 0 var(--s1) 26px; font-size: var(--t-xs); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.rel-gap::before { content: ''; position: absolute; left: 2px; top: 50%; width: 10px; height: 8px; margin-top: -4px; background: var(--bg); box-shadow: inset 0 2px 0 var(--fg-3), inset 0 -2px 0 var(--fg-3); }
.rels.is-folded .rel-far, .rels.is-filtered .rel-gap, .rel[hidden] { display: none; }
.rel-filters button span { font-weight: 500; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.rel-filters button[aria-pressed="true"] span { color: inherit; }
.rel-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s2); padding: 0; font: 600 var(--t-s) var(--sans); color: var(--accent); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.mo-gap { margin: var(--s4) var(--s4) 0; }
@media (hover: hover) { .rel a:hover .rel-t { color: var(--accent); } }

/* footer */
.foot { max-width: var(--measure); margin: 0 auto; padding: var(--s5) var(--s4) calc(var(--s6) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: var(--t-s); color: var(--fg-3); }
.foot nav { display: flex; gap: var(--s2); margin-top: var(--s2); }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; padding-right: var(--s3); color: var(--fg-2); }

/* wider screens: cards get room and corners */
@media (min-width: 520px) {
  .post, .people a { border: 1px solid var(--line); border-radius: var(--r-card); margin: var(--s4) var(--s4) 0; }
  .post { padding: var(--s5); }
  /* Events stay full-width bands: the world, not a card. */
  .event { margin-top: var(--s4); padding: var(--s5); }
  .people li + li a { margin-top: var(--s2); }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* On a moment the title block already says when and where. */
.mt-static .mt-now { display: none; }

/* regions */
.region-h { display: flex; flex-direction: column; gap: 2px; font: 600 var(--t-xl)/1.15 var(--serif); padding: var(--s7) var(--s4) 0; scroll-margin-top: 220px; }
.region-h span { font: 500 var(--t-s) var(--sans); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.region-gap { padding: var(--s2) var(--s4) 0; font-size: var(--t-s); color: var(--fg-2); }
.feed-jump { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: 0 var(--s4) var(--s3); font-size: var(--t-s); color: var(--fg-2); }
.feed-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); border-radius: var(--r-embed); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); text-decoration: none; font-variant-numeric: tabular-nums; }
.feed-jump a:active { background: var(--surface-2); }
.or-region { padding: var(--s3) var(--s4) 0; font-size: var(--t-s); font-weight: 600; color: var(--fg-2); }
.map[hidden], .ex-pl[hidden], .presets li[hidden] { display: none; }
.ex-regions { display: flex; gap: 0; border-radius: var(--r-embed); box-shadow: inset 0 0 0 1px var(--line); padding: 2px; background: var(--surface); }
.ex-region { flex: 1 1 0; min-width: 0; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: var(--s1) var(--s2); font: 600 var(--t-s) var(--sans); color: var(--fg); background: transparent; border: 0; border-radius: calc(var(--r-embed) - 2px); cursor: pointer; }
.ex-region span { font-weight: 500; font-size: var(--t-xs); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.ex-region[aria-pressed="true"] span { color: inherit; }
.ex-region[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.ex-rh { font: 600 var(--t-s) var(--sans); color: var(--fg-2); margin: var(--s3) 0 var(--s1); }

/* ---- /moments: rows of years, each swiping sideways */
.mgrid { padding-bottom: var(--s7); }
.mrow { padding-top: var(--s4); scroll-margin-top: 240px; }
.mrow-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding: 0 var(--s4); font: 600 var(--t-s) var(--sans); color: var(--fg); font-variant-numeric: tabular-nums; }
.mrow-h span { font-weight: 500; font-size: var(--t-xs); color: var(--fg-3); }
.mrow-scroll { --card: min(78vw, 300px); position: relative; display: flex; align-items: flex-start; gap: var(--s3); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: var(--s2) calc(50% - var(--card) / 2) var(--s3); scrollbar-width: none; }
.mrow-scroll::-webkit-scrollbar { display: none; }
/* Padding of half a row each side lets any card, first or last, reach the middle. */
.mc { flex: 0 0 var(--card); scroll-snap-align: center; display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) var(--s4) var(--s4); border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow var(--dur) ease; }
.mc.is-on { box-shadow: inset 0 0 0 2px var(--accent); }
.mc-ev { background: var(--accent-soft); }
.mc-who { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-xs); font-weight: 650; color: var(--fg-2); min-height: 28px; }
.mc-who .av { width: 28px; height: 28px; }
.mc-who .rel-ev { margin: 0 9px; }
.mc-when { font-size: var(--t-xs); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.mc-t { font: 600 var(--t-m)/1.3 var(--serif); }
.mc-t a { color: var(--fg); text-decoration: none; }
.mc-line { font-size: var(--t-s); line-height: 1.45; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) { .mc:hover .mc-t a { color: var(--accent); } }
@media (min-width: 760px) { .mrow-scroll { scroll-snap-type: none; } }
.mrow-n { margin-left: auto; font-variant-numeric: tabular-nums; }
.mrow-btns { display: none; gap: var(--s1); }
.mrow-b { position: relative; width: 36px; height: 36px; font: 600 var(--t-m) var(--sans); color: var(--fg); background: var(--surface); border: 0; border-radius: var(--r-embed); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.mrow-b:hover { color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .mrow-btns { display: inline-flex; }
  .mrow-swipe { display: none; }
  /* Clipped cards fade at the column's edges rather than cut hard. */
  .mrow-scroll { -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--s6), #000 calc(100% - var(--s6)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--s6), #000 calc(100% - var(--s6)), transparent); }
}
.mrow-h { align-items: center; }
.mrow-gap { padding: var(--s3) var(--s4) 0; font-size: var(--t-xs); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.mt-what { display: none; }
.moments .mt-what { display: block; font-size: var(--t-xs); font-weight: 600; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---- /wiki/<id>: short, skimmable, every line sourced on tap */
.wiki .wk-head { display: flex; align-items: center; gap: var(--s4); padding: var(--s5) var(--s4) 0; }
.wiki .wk-head .av-lg { width: 72px; height: 72px; }
.wiki .wk-head h1 { font: 600 var(--t-xl)/1.15 var(--serif); }
.wiki .wk-head .life { margin-top: 2px; font-size: var(--t-s); color: var(--fg-2); }
.wk-lede { padding: var(--s4) var(--s4) 0; font-size: var(--t-m); line-height: 1.5; }
.wk-how { padding: var(--s2) var(--s4) 0; }
.wk-sec { padding: var(--s5) var(--s4) 0; }
.wk-sec h2 { font: 600 var(--t-l)/1.3 var(--serif); }
.wk-list { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.wk-line summary { position: relative; display: block; padding: var(--s2) 0 var(--s2) var(--s4); font-size: var(--t-m); line-height: 1.5; color: var(--fg); cursor: pointer; list-style: none; }
.wk-line summary::-webkit-details-marker { display: none; }
li.wk-line summary::before { content: ''; position: absolute; left: 2px; top: calc(var(--s2) + .7em); width: 5px; height: 5px; border-radius: 50%; background: var(--fg-3); }
.wk-lede .wk-line summary { padding-left: 0; font-size: var(--t-l); line-height: 1.45; }
.wk-line details[open] summary { color: var(--fg); }
.wk-line details[open] summary::before { background: var(--accent); }
.wk-src { margin: 0 0 var(--s3) var(--s4); padding: var(--s2) var(--s3); border-radius: var(--r-embed); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.wk-src .why-q:first-child { margin-top: 0; }
.wk-src .mo-note { margin-top: var(--s2); }
.wk-posts { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.wk-posts a { display: flex; flex-direction: column; gap: 2px; padding: var(--s2) 0; min-height: 44px; color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); font-size: var(--t-s); font-weight: 600; }
.wk-more { padding-top: var(--s2); }
.wk-more a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.wk-foot { padding: var(--s6) var(--s4) var(--s4); }
.wiki-cta { padding: var(--s3) var(--s4) 0; }
.wiki-cta a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-embed); font-weight: 650; color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); text-decoration: none; }
@media (hover: hover) { .wk-posts a:hover span:last-child { color: var(--accent); } }
.say { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s1); }
.say-b { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s3) 0 var(--s2); font: 600 var(--t-xs) var(--sans); color: var(--accent); background: var(--accent-soft); border: 0; border-radius: var(--r-embed); cursor: pointer; }
.say-b::before { content: ''; position: absolute; inset: -4px 0; }
.say-b.is-playing { box-shadow: inset 0 0 0 1px var(--accent); }
.say-ipa { font-size: var(--t-s); color: var(--fg-2); }
.say-credit { padding: var(--s3) var(--s4) 0; }
.wk-mt-bar { display: flex; justify-content: flex-end; padding: var(--s3) var(--s4) 0; }
.wk-mt-t { position: relative; display: inline-flex; align-items: center; gap: var(--s2); min-height: 32px; padding: 0 var(--s3); font: 600 var(--t-xs) var(--sans); color: var(--fg-2); background: var(--surface); border: 0; border-radius: var(--r-embed); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.wk-mt-t::before { content: ''; position: absolute; inset: -6px 0; }
/* A small switch: filled when on. */
.wk-mt-t::after { content: ''; order: -1; width: 22px; height: 12px; border-radius: 6px; background: var(--line); box-shadow: inset 2px 0 0 2px var(--surface), inset -12px 0 0 2px var(--fg-3); }
.wk-mt-t[aria-pressed="true"] { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.wk-mt-t[aria-pressed="true"]::after { background: var(--accent-soft); box-shadow: inset 12px 0 0 2px var(--accent), inset -2px 0 0 2px var(--surface); }
.wk-mt[hidden] { display: none; }
/* The "ask for a page" bar sits under the header, clear of the phone's own
   selection menu and its bottom panel. */
.askbar { position: fixed; z-index: 30; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 64px); transform: translateX(-50%); width: min(calc(100vw - 2 * var(--s4)), 560px); display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s3); font-size: var(--t-s); color: var(--fg); background: var(--surface); border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--line), 0 6px 24px rgba(0, 0, 0, .14); }
.askbar[hidden] { display: none; }
.askbar-t { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.askbar-go { flex: none; min-height: 40px; padding: 0 var(--s3); font: 650 var(--t-s) var(--sans); color: var(--surface); background: var(--accent); border: 0; border-radius: var(--r-embed); cursor: pointer; }
.askbar-x { flex: none; width: 40px; height: 40px; font: 400 22px/1 var(--sans); color: var(--fg-2); background: none; border: 0; cursor: pointer; }
.wk-rel h3 { margin-top: var(--s4); font: 600 var(--t-s) var(--sans); color: var(--fg-2); }
.wk-rel .placechips { padding: var(--s2) 0 0; }
.wk-people, .wk-evs { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.wk-people a { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: var(--s1) 0; color: var(--fg); text-decoration: none; }
.wk-people img, .wk-people .face-mono { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.wk-people .face-mono { display: inline-flex; align-items: center; justify-content: center; font: 600 var(--t-s) var(--serif); color: var(--fg-2); background: var(--surface-2); }
.wk-people a > span { display: flex; flex-direction: column; min-width: 0; }
.wk-n { font-size: var(--t-s); font-weight: 650; }
.wk-why { font-size: var(--t-xs); color: var(--fg-3); }
.wk-evs a { display: flex; flex-direction: column; gap: 2px; padding: var(--s2) 0; min-height: 44px; color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); font-size: var(--t-s); font-weight: 600; }
@media (hover: hover) { .wk-people a:hover .wk-n, .wk-evs a:hover span:last-child { color: var(--accent); } }
.wk-line summary a.wk-missing, .wk-lede a.wk-missing { text-decoration-style: dashed; }
.wk-site { display: inline; margin-left: 2px; padding: 6px 0 6px 12px; background-color: var(--fg-3); opacity: .7; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: left center; mask-position: left center; -webkit-mask-size: 11px 11px; mask-size: 11px 11px; text-decoration: none; }
.wk-site:hover { background-color: var(--accent); opacity: 1; }
.wk-site-place { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%2014s4.5-4.2%204.5-7.5a4.5%204.5%200%200%200-9%200C3.5%209.8%208%2014%208%2014z%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%226.5%22%20r%3D%221.6%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%2014s4.5-4.2%204.5-7.5a4.5%204.5%200%200%200-9%200C3.5%209.8%208%2014%208%2014z%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%226.5%22%20r%3D%221.6%22/%3E%3C/svg%3E"); }
.wk-site-m { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%225.5%22/%3E%3Cpath%20d%3D%22M8%205v3l2%201.5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%225.5%22/%3E%3Cpath%20d%3D%22M8%205v3l2%201.5%22/%3E%3C/svg%3E"); }
.wk-site-period { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%225.5%22/%3E%3Cpath%20d%3D%22M8%205v3l2%201.5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%225.5%22/%3E%3Cpath%20d%3D%22M8%205v3l2%201.5%22/%3E%3C/svg%3E"); }
.wk-site-p { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3.5%2010.5c0-2.5%201-4.5%203-5.5M9%2010.5c0-2.5%201-4.5%203-5.5%22/%3E%3Ccircle%20cx%3D%225%22%20cy%3D%2210.5%22%20r%3D%221.5%22/%3E%3Ccircle%20cx%3D%2210.5%22%20cy%3D%2210.5%22%20r%3D%221.5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3.5%2010.5c0-2.5%201-4.5%203-5.5M9%2010.5c0-2.5%201-4.5%203-5.5%22/%3E%3Ccircle%20cx%3D%225%22%20cy%3D%2210.5%22%20r%3D%221.5%22/%3E%3Ccircle%20cx%3D%2210.5%22%20cy%3D%2210.5%22%20r%3D%221.5%22/%3E%3C/svg%3E"); }
.wk-stub { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding: var(--s4) var(--s4) 0; }
.wk-stub a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.wk-nb { white-space: nowrap; }
.wk-nb > a { white-space: normal; }

/* ---- search: header button, panel (full screen on a phone), results */
.top-search { gap: 6px; }
.top-search svg { flex: none; }
@media (max-width: 420px) { .top-search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.srch { width: 100%; max-width: 640px; height: 100%; max-height: 100dvh; margin: 0 auto; padding: 0; border: 0; color: var(--fg); background: var(--bg); }
@media (min-width: 700px) { .srch { height: auto; max-height: min(80dvh, 760px); margin-top: 10dvh; border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(0, 0, 0, .25); } }
.srch::backdrop { background: rgba(10, 12, 15, .45); }
.srch-top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s4); padding-top: max(var(--s2), env(safe-area-inset-top)); background: var(--bg); border-bottom: 1px solid var(--line); color: var(--fg-3); }
.sr-in { flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 0 var(--s2); font: 400 16px var(--sans); color: var(--fg); background: transparent; border: 0; outline: none; }
.srch-x { flex: none; min-height: 44px; padding: 0 var(--s3); font: 600 var(--t-s) var(--sans); color: var(--accent); background: none; border: 0; cursor: pointer; }
.srch-out { padding: 0 var(--s4) var(--s6); }
.sr-g h2 { margin-top: var(--s4); font: 600 var(--t-xs) var(--sans); color: var(--fg-3); }
.sr-g ul { list-style: none; margin: var(--s1) 0 0; padding: 0; }
.sr-g a { display: flex; flex-direction: column; gap: 1px; padding: var(--s2) 0; min-height: 44px; color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); }
.sr-g a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-n { font-size: var(--t-m); font-weight: 600; line-height: 1.3; }
.sr-s { font-size: var(--t-xs); color: var(--fg-3); }
.sr-did, .sr-none, .sr-hint { margin-top: var(--s4); font-size: var(--t-s); color: var(--fg-2); }
.sr-did a { font-weight: 650; }
@media (hover: hover) { .sr-g a:hover .sr-n { color: var(--accent); } }
.sr-form { display: flex; gap: var(--s2); padding: var(--s3) var(--s4) 0; }
.sr-form .sr-in { border-radius: var(--r-embed); box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); padding: 0 var(--s3); }
.search-page .sr-out { padding: 0 var(--s4) var(--s6); }
.sr-in::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.person-what { padding: var(--s4) var(--s4) var(--s3); }
.person-what h2 { font: 600 var(--t-l)/1.25 var(--serif); }
.person-what > p { margin-top: var(--s2); font-size: var(--t-s); line-height: 1.5; color: var(--fg-2); }
.person-toc { margin-top: var(--s2); }
.person-toc summary { display: flex; align-items: center; min-height: 44px; font-size: var(--t-s); font-weight: 650; color: var(--accent); cursor: pointer; }
.person-toc ol { list-style: none; margin: 0; padding: 0; }
.person-toc a { display: flex; flex-direction: column; gap: 1px; padding: var(--s1) 0; min-height: 40px; justify-content: center; color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); font-size: var(--t-s); font-weight: 600; }
@media (hover: hover) { .person-toc a:hover span:last-child { color: var(--accent); } }
.person-foot { padding: var(--s5) 0 0; }
.person-foot .credit { margin-top: var(--s1); }
.wiki-cta a.is-missing { color: var(--fg-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.person article.post { scroll-margin-top: 250px; }
.wiki-cta span { display: block; margin-top: var(--s1); font-size: var(--t-xs); color: var(--fg-3); }

/* ---- compact post card (lists) */
.post-c .post-head { align-items: flex-start; }
.post-c .av { width: 36px; height: 36px; }
.post-c .name-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); font-size: var(--t-s); }
.post-c .when { font-size: var(--t-xs); font-weight: 500; color: var(--fg-3); text-decoration: none; }
.post-t { margin-top: 2px; font: 600 var(--t-m)/1.3 var(--serif); }
.post-t a { color: var(--fg); text-decoration: none; }
.ctx { margin-top: var(--s2); font-size: var(--t-s); line-height: 1.45; color: var(--fg-2); }
.ctx span { font-weight: 650; color: var(--fg); }
.links-c { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); margin-top: var(--s2); font-size: var(--t-xs); }
.links-c a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.post-c .plain { margin-top: var(--s3); font-size: var(--t-l); line-height: 1.35; }
.quote-c { margin: var(--s3) 0 0; padding-left: var(--s3); box-shadow: inset 2px 0 0 var(--line); }
.quote-c blockquote p { font: 400 var(--t-m)/1.5 var(--serif); color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.quote-c.is-open blockquote p { display: block; }
.quote-c blockquote p::before { content: '“'; }
.quote-c blockquote p::after { content: '”'; }
.quote-c figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s3); margin-top: var(--s1); }
.cite-c { font-size: var(--t-xs); color: var(--fg-3); }
.q-all { min-height: 32px; padding: 0; font: 600 var(--t-xs) var(--sans); color: var(--accent); background: none; border: 0; cursor: pointer; }
.post-c .av-link { display: flex; min-width: 44px; min-height: 44px; }

/* Cards in lists stand apart: each its own rounded box with a gap between
   (Eyal: "the cards need to be more visually separated"). */
.post-c, .event[data-href] { margin: var(--s3) var(--s3) 0; border: 0; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .05); }
.post-c + .post-c, .post-c + .event[data-href], .event[data-href] + .post-c, .event[data-href] + .event[data-href] { margin-top: var(--s4); }
@media (min-width: 700px) { .post-c, .event[data-href] { margin-left: 0; margin-right: 0; } }
.who-is { margin-top: var(--s2); font-size: var(--t-xs); font-weight: 600; color: var(--fg-2); }
.post-c .who-is + .plain { margin-top: var(--s1); }
.post-c .links-c { margin-top: var(--s2); padding-top: var(--s1); border-top: 1px solid var(--line); }
a.tl { color: inherit; text-decoration-color: var(--accent); text-underline-offset: .16em; }
a.tl.wk-missing { text-decoration-style: dashed; }
@media (hover: hover) { a.tl:hover { color: var(--accent); } }
