:root {
  --paper: #f3ede1;
  --paper-2: #ebe3d3;
  --ink: #1f1c17;
  --ink-2: #5d5548;
  --rule: #d6ccb9;
  --accent: #8a3b24;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lane: 34px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 18px/1.55 var(--serif); font-variant-numeric: oldstyle-nums proportional-nums;
  background-image: radial-gradient(rgba(120, 90, 50, .06) 1px, transparent 1px);
  background-size: 4px 4px;
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration-color: rgba(31, 28, 23, .35); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
h1, h2 { font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: .2em 0 .25em; }
h2 { font-size: 1.35rem; margin: 2em 0 .6em; }
main { max-width: 1100px; margin: 0 auto; padding: 0 20px 40px; }

/* header */
.top { display: flex; align-items: center; gap: 16px; justify-content: space-between; max-width: 1100px; margin: 0 auto; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.mark { font-size: 1.05rem; font-weight: 700; text-decoration: none; letter-spacing: .02em; font-variant: small-caps; white-space: nowrap; }
.mark span:nth-child(2) { color: var(--accent); font-style: italic; font-variant: normal; font-weight: 500; }
.find { position: relative; min-width: 0; }
.top .find input { width: min(260px, 44vw); }
input[type=search] {
  font: 16px var(--sans); padding: 9px 12px; border: 1px solid var(--rule); border-radius: 8px;
  background: #fbf8f1; color: var(--ink); outline: none; min-width: 0; max-width: 100%;
}
input[type=search]:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(138, 59, 36, .12); }
.hits {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; min-width: min(260px, calc(100vw - 28px)); margin: 0; padding: 4px 0;
  list-style: none; background: #fbf8f1; border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 10px 30px rgba(40, 30, 10, .12);
}
.hits li a { display: block; padding: 7px 12px; text-decoration: none; }
.hits li a span { display: block; font: 13px/1.3 var(--sans); color: var(--ink-2); }
.hits li a:hover, .hits li a.on { background: var(--paper-2); color: var(--ink); }
.big { display: flex; gap: 8px; max-width: 560px; }
.big input { flex: 1; font-size: 18px; padding: 13px 16px; }
.big button { font: 600 16px var(--sans); padding: 0 20px; border: 0; border-radius: 8px; background: var(--ink); color: var(--paper); cursor: pointer; }
.big button:hover { background: var(--accent); }
.prose .big { margin: 1em 0; }
.prose .hits { position: static; box-shadow: none; }

/* page text */
.crumbs { font: 14px var(--sans); color: var(--ink-2); margin-top: 24px; }
.crumbs a { color: var(--ink-2); }
.dek { color: var(--ink-2); font-size: 1.15rem; margin: 0 0 .4em; max-width: 46em; }
.dates { font: 15px/1.5 var(--sans); color: var(--ink-2); margin: .2em 0 0; }
.person h1 { border-left: 6px solid hsl(var(--h) 45% 42%); padding-left: 14px; margin-left: -20px; }
.q { font-size: 1.1rem; font-weight: 500; font-style: italic; color: var(--ink-2); margin-top: 1.8em; }
.facts p { max-width: 44em; margin: .5em 0; }
.answer { font-size: 1.35rem; max-width: 36em; margin: .3em 0 .8em; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 1.5em 0 .5em; }
.duo > div { border-top: 4px solid hsl(var(--h) 45% 42%); padding-top: 8px; }
.duo h2 { margin: 0 0 .2em; font-size: 1.2rem; }
.duo .dek { font-size: 1rem; }
.pairs ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pairs a { display: inline-block; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; font-size: 15px; background: #fbf8f1; }
.pairs a:hover { border-color: var(--accent); }
.cols { columns: 3 240px; column-gap: 32px; padding: 0; list-style: none; font-size: 16px; }
.cols li { break-inside: avoid; padding: 3px 0; }
.cols span { color: var(--ink-2); font: 13px var(--sans); margin-left: 4px; white-space: nowrap; }
.more { font: 14px var(--sans); color: var(--ink-2); }
.src { margin-top: 3em; padding: 16px 18px; background: var(--paper-2); border-radius: 10px; font: 14px/1.55 var(--sans); color: var(--ink-2); }
.src h2 { font: 600 13px var(--sans); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 6px; }
.src ul { margin: 0 0 6px; padding-left: 18px; }
.src p { margin: 0; }
.prose { max-width: 42em; }
.prose li { margin: .4em 0; }
.cents { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 6px 24px; }
.cents span { font: 13px var(--sans); color: var(--ink-2); }

/* home */
.hero { padding: 44px 0 8px; }
.hero h1 { font-size: clamp(2.3rem, 6.5vw, 4.2rem); max-width: 12em; }
.hero .dek { font-size: 1.25rem; max-width: 34em; margin-bottom: 1.2em; }
.year { margin-top: 36px; }
.yearpick { display: flex; align-items: center; gap: 18px; }
.yearpick input { flex: 1; accent-color: var(--accent); height: 28px; }
.yearpick output { font-size: 2rem; font-weight: 600; min-width: 5.5em; text-align: right; font-variant-numeric: lining-nums tabular-nums; }
.alive { list-style: none; padding: 0; margin: 14px 0 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 4px 24px; min-height: 12em; }
.alive li { padding: 5px 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 10px; }
.alive li a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alive li span { font: 14px var(--sans); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.note { font: 14px var(--sans); color: var(--ink-2); margin: 4px 0 0; }
.cards ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 12px; }
.cards li a { display: block; height: 100%; padding: 14px 16px; background: #fbf8f1; border: 1px solid var(--rule); border-left: 5px solid hsl(var(--h) 45% 42%); border-radius: 8px; text-decoration: none; }
.cards li a:hover { border-color: hsl(var(--h) 45% 42%); color: var(--ink); }

/* the score */
.score { margin: 18px 0 8px; }
.stage {
  position: relative; padding: 6px 0 30px; overflow: hidden; touch-action: pan-y; cursor: crosshair; outline: none;
  background: linear-gradient(var(--paper-2), var(--paper-2)) no-repeat; background-size: 100% calc(100% - 30px);
  border-radius: 8px;
}
.stage:focus-visible { box-shadow: 0 0 0 3px rgba(138, 59, 36, .25); }
.lanes { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.lane { position: relative; height: var(--lane); }
.lane + .lane { border-top: 1px dashed rgba(90, 70, 40, .10); }
.bar {
  position: absolute; top: 8px; height: 18px; min-width: 4px; border-radius: 3px; text-decoration: none;
  --c: hsl(var(--h) 42% 44%);
  background: linear-gradient(90deg, transparent 0, var(--c) var(--f1), var(--c) var(--f2), transparent 100%);
  font: 600 12.5px/18px var(--sans); color: #fff;
}
.bar.live { background: linear-gradient(90deg, transparent 0, var(--c) var(--f1), var(--c) 100%); }
.lane:not(.me) .bar { --c: hsl(var(--h) 34% 74%); color: var(--ink); }
.lane:not(.me) .who { text-shadow: none; }
.me .bar { height: 22px; top: 6px; line-height: 22px; font-size: 13.5px; box-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.who { position: absolute; left: max(6px, var(--f1)); padding-right: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.bar.narrow .who { left: calc(100% + 6px); color: var(--ink); text-shadow: none; }
.bar.flip .who { left: auto; right: calc(100% + 6px); color: var(--ink); text-shadow: none; }
.age { position: absolute; top: 0; padding: 0 6px; border-radius: 3px; background: var(--ink); color: var(--paper); font: 600 12px/18px var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateX(-50%); pointer-events: none; display: none; }
.me .age { line-height: 22px; }
.scrubbing .age.on { display: block; }
.scrubbing .lane.off .bar { opacity: .35; }
.axis { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; font: 12px var(--sans); color: var(--ink-2); font-variant-numeric: lining-nums tabular-nums; }
.axis span { position: absolute; top: 6px; transform: translateX(-50%); white-space: nowrap; }
.axis span[hidden] { display: none; }
.axis span::before { content: ""; position: absolute; left: 50%; bottom: 100%; height: 5px; border-left: 1px solid var(--ink-2); }
.tick { position: absolute; top: 0; bottom: 30px; border-left: 1px solid rgba(90, 70, 40, .10); pointer-events: none; }
.scrub { position: absolute; top: 0; bottom: 26px; width: 0; border-left: 2px solid var(--accent); z-index: 3; pointer-events: none; }
.scrub .yr { position: absolute; bottom: -26px; transform: translateX(-50%); background: var(--accent); color: #fff; font: 700 12px/20px var(--sans); padding: 1px 8px; border-radius: 4px; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
figcaption { font: 13.5px/1.5 var(--sans); color: var(--ink-2); margin-top: 6px; }

/* footer */
.foot { max-width: 1100px; margin: 40px auto 0; padding: 20px 20px 40px; border-top: 1px solid var(--rule); font: 14px/1.6 var(--sans); color: var(--ink-2); }
.foot p { margin: .4em 0; max-width: 60em; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  main { padding: 0 14px 30px; }
  .top { padding: 12px 14px; gap: 10px; }
  .top .find { flex: 1; display: flex; justify-content: flex-end; }
  .top .find input { width: 100%; max-width: 220px; }
  .top .hits { left: auto; right: 0; }
  .person h1 { margin-left: -14px; padding-left: 10px; }
  .duo { grid-template-columns: 1fr; gap: 12px; }
  .yearpick { flex-direction: column-reverse; align-items: stretch; gap: 4px; }
  .yearpick output { text-align: left; }
  .answer { font-size: 1.2rem; }
  :root { --lane: 32px; }
}
@media (prefers-reduced-motion: no-preference) { .bar { transition: opacity .15s; } }

/* typed year, year pages */
.yearpick .typed { display: flex; align-items: center; gap: 6px; font: 14px var(--sans); color: var(--ink-2); }
.yearpick .typed input { width: 5.5em; font: 600 16px var(--sans); padding: 6px 8px; border: 1px solid var(--rule); border-radius: 8px; background: #fbf8f1; color: var(--ink); font-variant-numeric: tabular-nums; }
.yearlist { margin-top: 20px; }
.yearnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.yearnav a { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; font: 15px var(--sans); background: #fbf8f1; }
.yearnav a:hover { border-color: var(--accent); }
.years { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
