/* Hamilton Cemeteries Timeline — stylesheet
   Visual language from the two infographic films (STYLE.md): one dark warm
   surface, serif only for titles and the big number, a kicker above every
   title, narration in parchment, a SOURCE line at the foot of everything.
   Three grammars, never blurred: a person is a stroke or a name you can
   open; a count is a ruled numeral with its footing; absence is hatching
   and words. */

:root {
  color-scheme: dark;
  /* base */
  --stone: #1a1a19;      /* SURF: page */
  --stone-2: #222221;    /* recessed */
  --stone-3: #2b2b29;    /* GRID: hover, hairlines */
  --paper: #202020;      /* raised: drawer, inputs, cards */
  --ink: #f0efec;        /* INK: headings, the number that matters */
  --ink-2: #dad9cf;      /* INK2: body, labels */
  --ink-3: #a3a29b;      /* INK3: source lines, ticks, n= */
  --mute: #55544f;       /* MUTE: non-data fills only, never text */
  --rule: #2b2b29;       /* GRID */
  /* series */
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --amber: #e8a33d;
  --grey: #7b7a74;       /* categorical "other / not recorded" */
  --now: var(--s2);      /* the chosen date: the accent */
  --now-soft: rgba(217, 89, 38, 0.16);
  --lv: var(--s1);       /* Lakeview */
  --hm: var(--s3);       /* Harmony */
  --pv: var(--s2);       /* Pleasant Valley */
  /* narration */
  --narr: #ecdfc2;
  --narr-2: #cdc2a6;
  --hatch-ink: rgba(240, 239, 236, 0.22);
  --hatch: repeating-linear-gradient(135deg, transparent 0 4px, var(--hatch-ink) 4px 5px);
  --serif: Georgia, 'DejaVu Serif', 'Times New Roman', serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, 'DejaVu Sans', system-ui, sans-serif;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9);
  --header-h: 60px;
  --gutter: 64px;
}
@media (max-width: 1100px) { :root { --gutter: 32px; } }
@media (max-width: 760px) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--stone); color: var(--ink-2);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.15; color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 700; }
h3, h4 { font-family: var(--sans); font-weight: 700; }
p { margin: 0 0 0.8em; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img, canvas, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--s2); outline-offset: 2px; }
.sans { font-family: var(--sans); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.loading { color: var(--ink-3); padding: 40px var(--gutter); }

/* ---------- the kicker: a 34 × 2 px rule, then bold uppercase in the accent ---------- */
.kicker, [data-k]::before {
  display: block; font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--s2); line-height: 1.2;
  padding-top: 14px; margin-bottom: 10px;
  background: linear-gradient(var(--s2), var(--s2)) no-repeat 0 0 / 34px 2px;
}
[data-k]::before { content: attr(data-k); }

/* ---------- narration and the source line ---------- */
.narr, .footing, .figure .cap, .prose, .callout, .silence, .empty { font-family: var(--sans); color: var(--narr); }
.narr b, .footing b, .figure .cap b, .prose b, .callout b { font-weight: 700; color: var(--narr); }
.narr-2 { color: var(--narr-2); }
.source {
  font-family: var(--sans); font-size: 13px; color: var(--ink-3); opacity: 0.85; line-height: 1.5;
  margin-top: 18px; word-break: break-word;
}
.source > span:first-child { font-weight: 700; letter-spacing: 0.06em; margin-right: 10px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  height: var(--header-h); padding: 0 var(--gutter);
  background: var(--stone); border-bottom: 1px solid var(--rule);
}
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand-town { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--ink); }
.brand-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.nav { display: flex; gap: 2px; font-size: 14px; }
.nav a { text-decoration: none; padding: 8px 12px; color: var(--ink-3); }
.nav a:hover { color: var(--ink); background: var(--stone-2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--s2); }
.search { position: relative; }
.search input {
  width: 300px; max-width: 42vw; padding: 8px 12px; border: 1px solid var(--stone-3); border-radius: 2px;
  background: var(--paper); font-size: 14px; color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.q-results {
  position: absolute; right: 0; top: calc(100% + 6px); width: 420px; max-width: 90vw; max-height: 60vh; overflow: auto;
  background: var(--paper); border: 1px solid var(--stone-3); box-shadow: var(--shadow); z-index: 40; padding: 6px 0;
}
.q-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 7px 14px; cursor: pointer; text-decoration: none; }
.q-row:hover, .q-row[aria-selected="true"] { background: var(--stone-3); }
.q-row .q-name { font-size: 15px; color: var(--ink); }
.q-row .q-meta { font-size: 12px; color: var(--ink-3); text-align: right; white-space: nowrap; }
.q-more { padding: 6px 14px; font-size: 12px; color: var(--ink-3); }

/* ---------- buttons, chips, tags ---------- */
.btn {
  font-size: 14px; line-height: 1; padding: 8px 10px; min-width: 34px;
  border: 1px solid var(--stone-3); background: var(--paper); border-radius: 2px; cursor: pointer; color: var(--ink-2);
}
.btn:hover { background: var(--stone-3); color: var(--ink); }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--stone); border-color: var(--ink); }
.btn-text { padding: 8px 12px; }
.chip {
  font-size: 12.5px; padding: 4px 9px; border-radius: 2px; border: 1px solid var(--stone-3);
  background: transparent; cursor: pointer; color: var(--ink-3); line-height: 1.2;
}
.chip:hover { color: var(--ink); background: var(--stone-2); }
.chip.on { color: var(--ink); border-color: var(--ink-3); background: var(--paper); }
.tag {
  display: inline-block; font-size: 11.5px; padding: 2px 6px; border-radius: 2px;
  background: var(--stone-3); color: var(--ink-2); vertical-align: middle; line-height: 1.3;
}
.tag-absence { background: var(--hatch), var(--stone-2); border: 1px solid var(--s2); }
.tag-disputed { border: 1px dashed var(--ink-3); background: transparent; }
.tag-cem { color: var(--stone); font-weight: 700; }
.tag-cem.L { background: var(--lv); } .tag-cem.H { background: var(--hm); } .tag-cem.P { background: var(--pv); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.dot.L { background: var(--lv); } .dot.H { background: var(--hm); } .dot.P { background: var(--pv); }

/* ---------- timeline ---------- */
.tl { position: relative; height: clamp(520px, 66vh, 800px); background: var(--stone); border-bottom: 1px solid var(--rule); }
.tl canvas { width: 100%; height: 100%; cursor: grab; touch-action: none; }
.tl canvas.dragging { cursor: grabbing; }
.tl-legend { display: flex; gap: 14px 22px; flex-wrap: wrap; align-items: center; order: 3; width: 100%; font-size: 12.5px; color: var(--ink-3); }
.tl-legend .source { margin: 0 0 0 auto; }
.lg i { display: inline-block; width: 18px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.lg-person i { background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat; }
.lg-measure i { border-bottom: 2px solid var(--s1); border-top: 1px solid var(--s1); background: rgba(57, 135, 229, 0.18); }
.lg-absence i { background: var(--hatch); border: 1px solid var(--s2); }
.tip {
  position: absolute; z-index: 5; pointer-events: none; max-width: 340px;
  background: var(--paper); color: var(--ink-2); border: 1px solid var(--stone-3); box-shadow: var(--shadow);
  padding: 8px 10px; font-size: 12.5px; line-height: 1.35;
}
.tip b { font-size: 14px; font-weight: 700; color: var(--ink); display: block; }
.tip .src { color: var(--ink-3); margin-top: 4px; }

.tl-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  padding: 10px var(--gutter); border-bottom: 1px solid var(--rule); background: var(--stone);
}
.tl-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.date-input { font-size: 14px; padding: 7px 8px; border: 1px solid var(--stone-3); border-radius: 2px; background: var(--paper); color: var(--ink); }
.zoom { display: inline-flex; gap: 4px; margin-left: 8px; }
.jumps { display: flex; gap: 6px; flex-wrap: wrap; margin-left: 10px; }
.tl-opts { display: flex; gap: 6px; align-items: center; }
.tl-layers { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 12.5px; order: 2; width: 100%; padding-top: 8px; border-top: 1px solid var(--rule); color: var(--ink-3); }
.tl-layers .group { display: flex; align-items: center; gap: 4px; }
.tl-layers .group > span { margin-right: 4px; }
.tl-layers .chip i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; vertical-align: 0; border-radius: 1px; background: var(--ink-3); }
.tl-layers .chip.on i { background: var(--ink); }
.tl-layers label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

.tl-below { display: grid; grid-template-columns: 400px 1fr; gap: 0; align-items: start; }
@media (max-width: 900px) { .tl-below { grid-template-columns: 1fr; } }

/* ---------- the cursor panel ---------- */
.cursor-panel {
  position: sticky; top: var(--header-h); align-self: start;
  padding: 10px var(--gutter) 28px; border-right: 1px solid var(--rule);
  max-height: calc(100vh - var(--header-h)); overflow: auto;
}
@media (max-width: 900px) { .cursor-panel { position: static; border-right: 0; border-bottom: 1px solid var(--rule); max-height: none; } }
.hero-date { font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1.05; color: var(--ink); }
.hero-date .wd { margin-bottom: 8px; }
.hero-n { display: flex; align-items: baseline; gap: 14px; margin-top: 18px; }
.hero-n .big { font-family: var(--serif); font-weight: 700; font-size: 84px; line-height: 0.9; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-n .lbl { font-size: 15px; color: var(--ink-2); max-width: 150px; line-height: 1.25; }
.split { margin-top: 14px; height: 10px; display: flex; background: var(--stone-3); }
.split i { display: block; height: 100%; }
.split .certain { background: var(--ink); }
.split .possible { background: var(--hatch), var(--mute); }
.split-key { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.footing { font-size: 14px; margin-top: 10px; line-height: 1.45; }
.panel-h { font-size: 13px; color: var(--ink-3); margin: 24px 0 8px; padding-top: 10px; border-top: 1px solid var(--rule); }
.fold { margin-top: 14px; border-top: 1px solid var(--rule); }
.fold summary {
  font-size: 13px; color: var(--ink-3); padding: 10px 0 8px; cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: ''; width: 6px; height: 6px; border-right: 1px solid var(--ink-3); border-bottom: 1px solid var(--ink-3); transform: rotate(-45deg); transition: transform 120ms; flex: none; }
.fold[open] summary::before { transform: rotate(45deg); }
.fold summary:hover { color: var(--ink); }
.fold summary .tag { margin-left: auto; }
.fold > :not(summary) { margin-bottom: 8px; }
.bars { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.bars .bar { height: 9px; background: var(--stone-3); }
.bars .bar i { display: block; height: 100%; }
.bars .bar.L i { background: var(--lv); } .bars .bar.H i { background: var(--hm); } .bars .bar.P i { background: var(--pv); }
.bars .n { font-variant-numeric: tabular-nums; text-align: right; font-weight: 700; color: var(--ink); }
.bars .absent { grid-column: 2 / 4; font-size: 12px; color: var(--ink-3); padding: 2px 0; }
.hist { display: flex; align-items: flex-end; gap: 2px; height: 56px; margin-top: 4px; }
.hist i { flex: 1; background: var(--s1); min-height: 1px; position: relative; }
.hist-x { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.strata-list, .near-list { list-style: none; margin: 0; padding: 0; }
.strata-list li { font-size: 13.5px; padding: 6px 0 6px 14px; margin-bottom: 6px; border-left: 3px solid var(--ink-3); line-height: 1.35; color: var(--ink-2); }
.strata-list li.absence { border: 1px solid var(--s2); border-left-width: 3px; padding: 8px 10px 8px 14px; }
.strata-list li.absence .lay { color: var(--s2); }
.strata-list li .lay { color: var(--ink-3); }
.strata-list li .basis { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.near-list li { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; line-height: 1.3; color: var(--ink-2); }
.near-list li:last-child { border-bottom: 0; }
.near-list .when { font-size: 12px; color: var(--ink-3); padding-top: 2px; }
.near-list .ttl { cursor: pointer; color: var(--ink); }
.near-list .ttl:hover { text-decoration: underline; }
.near-list .meta { font-size: 12.5px; color: var(--ink-3); }
.conf-unverified, .conf-disputed { border: 1px dashed var(--ink-3); padding: 0 4px; font-size: 11px; color: var(--ink-3); }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 2px; font: inherit; color: inherit; }
.linkish:hover { text-decoration-color: var(--ink); }

/* ---------- living list ---------- */
.living { padding: 18px var(--gutter) 60px; min-width: 0; }
.living-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.living-h h2 { font-size: 26px; }
.living-h .ctl { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.living-h select { font-size: 13px; padding: 4px 6px; border: 1px solid var(--stone-3); background: var(--paper); border-radius: 2px; color: var(--ink); }
.living-h input { font-size: 13px; padding: 5px 8px; border: 1px solid var(--stone-3); background: var(--paper); border-radius: 2px; width: 170px; color: var(--ink); }
.rows { display: grid; grid-template-columns: 1fr; }
.row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 0 14px; align-items: baseline;
  padding: 6px 6px; border-bottom: 1px solid var(--rule); cursor: pointer; text-decoration: none; color: var(--ink);
}
.row:hover { background: var(--stone-2); }
.row .age { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.row .age.range { color: var(--ink-3); font-weight: 400; }
.row .name { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .name .pos { font-size: 11px; color: var(--ink-3); margin-left: 6px; border: 1px dashed var(--ink-3); padding: 0 4px; vertical-align: 1px; }
.row .flags { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.row .flags .plot { margin-right: 10px; }
.row .flags .has { margin-left: 6px; }
.group-h { font-size: 12px; color: var(--ink-3); padding: 18px 6px 4px; }
.empty { font-size: 16px; padding: 20px 0; max-width: 60ch; }
.row.possible .name { color: var(--ink-2); }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.45); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 580px; max-width: 100vw; z-index: 50;
  background: var(--paper); border-left: 1px solid var(--stone-3); box-shadow: var(--shadow); overflow: auto;
}
.drawer-close { position: absolute; right: 12px; top: 12px; font-size: 20px; line-height: 1; padding: 4px 10px; }
.drawer-body { padding: 30px 40px 60px; }
.drawer h2 { font-size: 36px; line-height: 1.05; margin: 0 0 10px; }
.drawer .dates { font-size: 17px; line-height: 1.35; color: var(--ink-2); }
.drawer .dates .prec { font-size: 12px; color: var(--ink-3); margin-left: 6px; }
.drawer .at-cursor { margin-top: 16px; padding: 4px 0 4px 18px; border-left: 3px solid var(--s2); font-size: 15px; color: var(--narr); }
.drawer .at-cursor b { font-weight: 700; }
.drawer .at-cursor .btn { margin-left: 8px; font-size: 12px; padding: 4px 8px; }
.sec { margin-top: 28px; }
.sec h3 { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.stone {
  padding: 18px 0 18px 18px; border-left: 3px solid var(--ink-3);
  font-family: var(--serif); font-size: 19px; line-height: 1.45; color: var(--ink); font-variant: small-caps; letter-spacing: 0.03em;
}
.stone-note { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.verbatim { font-size: 14.5px; color: var(--ink-2); padding-left: 14px; border-left: 2px solid var(--stone-3); white-space: pre-wrap; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 4px 14px; font-size: 15px; color: var(--ink-2); }
.kv dt { font-size: 12.5px; color: var(--ink-3); padding-top: 2px; }
.kv dd { margin: 0; }
.fam-row { display: grid; grid-template-columns: 76px 1fr; gap: 6px 12px; padding: 6px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.fam-row .rel { font-size: 12.5px; color: var(--ink-3); }
.fam-row .who { font-size: 15.5px; color: var(--ink); }
.fam-row .basis { font-size: 12.5px; color: var(--ink-3); display: block; margin-top: 2px; }
.fam-row .conf { font-size: 11px; border: 1px solid var(--stone-3); padding: 0 4px; margin-left: 6px; color: var(--ink-3); }
.silence { font-size: 15px; max-width: 52ch; }
.disputed-box { border: 1px dashed var(--ink-3); padding: 12px 14px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.disputed-box .rd { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.disputed-box .rd div { font-size: 15px; color: var(--ink); }
.disputed-box .rd span { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.census-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.census-table th { text-align: left; font-weight: 400; color: var(--ink-3); padding: 4px 8px 4px 0; border-bottom: 1px solid var(--stone-3); }
.census-table td { padding: 5px 8px 5px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.census-table td.y { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.life-events li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 4px 0; font-size: 15px; color: var(--ink-2); }
.life-events .d { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.life-events { list-style: none; margin: 0; padding: 0; }
.src-line { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.finding { font-size: 14.5px; padding: 8px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.finding .ft { font-size: 12.5px; color: var(--ink-3); }

/* ---------- pages ---------- */
.page { padding: 28px var(--gutter) 80px; max-width: 1180px; }
.page h1 { font-size: 44px; letter-spacing: -0.005em; margin-bottom: 10px; }
.page .lede { font-size: 20px; max-width: 62ch; color: var(--ink-2); margin-bottom: 28px; line-height: 1.4; }
.page h2 { font-size: 30px; margin: 56px 0 10px; }
.page h3 { font-size: 16px; margin: 26px 0 8px; }
.prose { max-width: 66ch; font-size: 16.5px; line-height: 1.5; }
.prose p { margin-bottom: 0.9em; }
.callout { max-width: 72ch; padding: 4px 0 4px 18px; border-left: 3px solid var(--s2); margin: 18px 0; font-size: 16px; line-height: 1.5; }
.callout.resolved { border-left-color: var(--s3); }
.callout.absence { background: var(--hatch); border: 1px solid var(--s2); border-left-width: 3px; padding: 10px 14px 10px 18px; }
.callout.absence > * { display: inline; background: var(--stone); padding: 2px 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tabs { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 28px 0 0; border-bottom: 1px solid var(--rule); }
.tab {
  font-size: 14px; padding: 10px 14px 12px; border: 0; background: none; cursor: pointer; color: var(--ink-3);
  box-shadow: inset 0 -2px 0 transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--s2); }
.tab-panel > h2:first-child { margin-top: 36px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 28px 40px; align-items: start; }
.figure { margin: 14px 0 6px; max-width: 980px; }
.figure svg { width: 100%; height: auto; font-family: var(--sans); }
.figure .cap { font-size: 15px; margin-top: 10px; line-height: 1.45; max-width: 70ch; }
.fig-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 24px 44px; margin: 18px 0 8px; }
.stat { min-width: 120px; }
.stat .v { font-family: var(--serif); font-weight: 700; font-size: 46px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .k { font-size: 14px; color: var(--ink-2); margin-top: 6px; line-height: 1.3; max-width: 170px; }
.stat.absence .v { background: var(--hatch); padding: 0 6px; color: var(--ink-2); font-weight: 400; border: 1px solid var(--s2); display: inline-block; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; color: var(--ink-2); }
.tbl th { text-align: left; font-weight: 400; color: var(--ink-3); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--ink-3); }
.tbl td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .serif { color: var(--ink); font-weight: 700; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card { border-left: 3px solid var(--s2); padding: 4px 0 4px 18px; }
.card h4 { font-size: 16px; }
.card .meta { font-size: 12.5px; color: var(--ink-3); margin: 2px 0 8px; }
.card ul { margin: 0; padding: 0; list-style: none; font-size: 14.5px; color: var(--ink-2); }
.card li { padding: 2px 0; }
.card .cause { font-size: 12.5px; color: var(--ink-3); }
.card .plink { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 2px; color: inherit; text-align: left; }
.card .plink:hover { text-decoration-color: var(--ink); }
.card.dup { border-left-color: var(--mute); border-left-style: dashed; opacity: 0.8; }
.card.register { border-left-color: var(--grey); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 18px; font-size: 13px; }
.filters input[type="search"] { font-size: 14px; padding: 7px 10px; border: 1px solid var(--stone-3); background: var(--paper); border-radius: 2px; width: 280px; color: var(--ink); }
.filters select { font-size: 13px; padding: 6px 8px; border: 1px solid var(--stone-3); background: var(--paper); border-radius: 2px; color: var(--ink); }
.count-line { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.people-rows .row { grid-template-columns: minmax(0, 1fr) 300px auto; }
.people-rows .row .dates { font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.btn-more { margin: 14px 0; }
.gantt-row { display: grid; grid-template-columns: 190px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; color: var(--ink-2); max-width: 980px; }
.gantt-row .track { position: relative; height: 12px; background: var(--stone-2); }
.gantt-row .track i { position: absolute; top: 0; bottom: 0; background: var(--s1); }
.gantt-row .track i.void { background: var(--hatch); border: 1px solid var(--s2); }
.gantt-row .track i.here { background: var(--s2); }
.gantt-row .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.gantt-axis { display: grid; grid-template-columns: 190px 1fr 60px; gap: 10px; font-size: 11.5px; color: var(--ink-3); max-width: 980px; }
.gantt-axis .ax { display: flex; justify-content: space-between; }
.map-wrap { position: relative; height: clamp(420px, 70vh, 820px); background: #000; border: 1px solid var(--stone-3); }
#osd { position: absolute; inset: 0; }
.map-attr { font-size: 13px; color: var(--ink-3); margin-top: 8px; line-height: 1.5; max-width: 90ch; }
.near-map { width: 100%; max-width: 560px; }
.era-list li { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 15px; color: var(--ink-2); max-width: 90ch; }
.era-list { list-style: none; padding: 0; margin: 0; }
.era-list .lbl { color: var(--ink); font-weight: 700; }
.era-list .when { font-size: 12.5px; color: var(--ink-3); }
.era-list .basis { font-size: 14px; color: var(--ink-3); display: block; margin-top: 2px; }
.era-list li.absence .lbl { background: var(--hatch); padding: 0 5px; border: 1px solid var(--s2); }
details.more { margin: 8px 0; }
details.more summary { font-size: 13px; color: var(--ink-3); cursor: pointer; }

@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: drawer-in 600ms cubic-bezier(.22,.61,.36,1); }
  @keyframes drawer-in { from { opacity: 0; } to { opacity: 1; } }
}
@media (max-width: 760px) {
  .top { grid-template-columns: 1fr auto; grid-template-rows: auto auto; height: auto; padding: 8px var(--gutter); gap: 6px 12px; }
  .nav { grid-column: 1 / -1; overflow-x: auto; }
  .search input { width: 160px; }
  .q-results { width: calc(100vw - 32px); right: -16px; }
  .brand-sub { display: none; }
  .tl { height: 52vh; }
  .hero-n .big { font-size: 64px; }
  .drawer-body { padding: 48px 18px 60px; }
  .page h1 { font-size: 32px; }
  .page h2 { font-size: 24px; }
  .cursor-panel { max-height: none; }
}
@media print {
  .top, .tl-bar, .drawer-close { display: none; }
}
