/* Shown
   Layout: a sticky search bar, then a hero with the live total, the year ruler
   (a time navigator that doubles as a trend chart for whatever you search), a toolbar,
   and a bento wall where the post with the most points in each run of nine gets a
   double tile. Type: Archivo (variable width) for everything you read, Geist Mono for
   numbers and metadata. Colour: neutral paper, one HN orange for marks and the one CTA. */

:root {
  --canvas: #F3F2EE;
  --surface: #FFFFFF;
  --wash: #E9E7E1;
  --ink: #1A1814;
  --ink-2: #5E5951;
  --ink-3: #8D887F;
  --rule: #DDDAD3;
  --bar: #CCC7BE;
  --bar-hi: #A39D93;
  --accent: #FF6600;
  --accent-ink: #B34800;
  --on-accent: #1A0E05;
  --accent-wash: rgb(255 102 0 / 0.12);
  --scrim: rgb(22 20 17 / 0.46);
  --shadow-1: 0 1px 2px rgb(26 24 20 / 0.07);
  --shadow-2: 0 2px 4px rgb(26 24 20 / 0.05), 0 18px 38px -18px rgb(26 24 20 / 0.34);
  --tip-bg: #1A1814;
  --tip-fg: #F3F2EE;
  --fav-bg: transparent;

  --t0: #F5E1D0; --t0i: #8C3A06;
  --t1: #F0E5C6; --t1i: #6B500C;
  --t2: #E3E7CC; --t2i: #485416;
  --t3: #D7EADB; --t3i: #1C5A32;
  --t4: #D3E8E7; --t4i: #125858;
  --t5: #DAE3F2; --t5i: #23447E;
  --t6: #E4DEF2; --t6i: #4A3484;
  --t7: #F1DBE2; --t7i: #7C2744;

  --font-ui: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r-1: 4px;
  --r-2: 8px;
  --maxw: 1480px;
  --pad-l: max(clamp(16px, 3vw, 36px), env(safe-area-inset-left, 0px));
  --pad-r: max(clamp(16px, 3vw, 36px), env(safe-area-inset-right, 0px));
  --plot-h: 104px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #111110;
    --surface: #1B1A18;
    --wash: #252320;
    --ink: #EFECE6;
    --ink-2: #A8A299;
    --ink-3: #79746B;
    --rule: #2E2C28;
    --bar: #4A4640;
    --bar-hi: #6E695F;
    --accent: #FF7A1F;
    --accent-ink: #FF9A52;
    --on-accent: #160B03;
    --accent-wash: rgb(255 122 31 / 0.16);
    --scrim: rgb(0 0 0 / 0.62);
    --shadow-1: 0 0 0 1px rgb(255 255 255 / 0.04);
    --shadow-2: 0 0 0 1px rgb(255 255 255 / 0.06), 0 20px 40px -18px rgb(0 0 0 / 0.8);
    --tip-bg: #EFECE6;
    --tip-fg: #111110;
    --fav-bg: #F3F2EE;
    --t0: #3A2315; --t0i: #F5B488;
    --t1: #342B12; --t1i: #E8CD80;
    --t2: #2B3015; --t2i: #C8D486;
    --t3: #183020; --t3i: #92D2A6;
    --t4: #132E2E; --t4i: #8BCFCD;
    --t5: #192540; --t5i: #A5BFEC;
    --t6: #261F40; --t6i: #C0B1EE;
    --t7: #391B25; --t7i: #EDA6BA;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --canvas: #111110;
  --surface: #1B1A18;
  --wash: #252320;
  --ink: #EFECE6;
  --ink-2: #A8A299;
  --ink-3: #79746B;
  --rule: #2E2C28;
  --bar: #4A4640;
  --bar-hi: #6E695F;
  --accent: #FF7A1F;
  --accent-ink: #FF9A52;
  --on-accent: #160B03;
  --accent-wash: rgb(255 122 31 / 0.16);
  --scrim: rgb(0 0 0 / 0.62);
  --shadow-1: 0 0 0 1px rgb(255 255 255 / 0.04);
  --shadow-2: 0 0 0 1px rgb(255 255 255 / 0.06), 0 20px 40px -18px rgb(0 0 0 / 0.8);
  --tip-bg: #EFECE6;
  --tip-fg: #111110;
  --fav-bg: #F3F2EE;
  --t0: #3A2315; --t0i: #F5B488;
  --t1: #342B12; --t1i: #E8CD80;
  --t2: #2B3015; --t2i: #C8D486;
  --t3: #183020; --t3i: #92D2A6;
  --t4: #132E2E; --t4i: #8BCFCD;
  --t5: #192540; --t5i: #A5BFEC;
  --t6: #261F40; --t6i: #C0B1EE;
  --t7: #391B25; --t7i: #EDA6BA;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-ui);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.has-overlay { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--canvas); padding: 8px 12px; border-radius: var(--r-1);
}
.skip:focus { top: 12px; }

.label {
  font: 500 11.5px/1.4 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-left: var(--pad-l);
  padding-right: var(--pad-r);
}

/* the up-vote triangle, HN's one piece of vocabulary everybody knows */
.tri {
  display: inline-block; flex: none;
  width: 0; height: 0;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-bottom: 7.5px solid var(--accent);
  transform: translateY(-1px);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px; font-weight: 560; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: border-color .15s, background-color .15s, transform .15s;
}
.btn:hover { border-color: var(--bar-hi); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--accent:hover { border-color: var(--on-accent); }
.btn[aria-pressed="true"] { border-color: var(--accent); }
.btn[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); }
.btn:disabled { opacity: .45; }

.iconbtn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  font: 600 15px/1 var(--font-mono);
  transition: border-color .15s;
}
.iconbtn:hover { border-color: var(--bar-hi); }
.iconbtn svg { width: 17px; height: 17px; }
.iconbtn:disabled { opacity: .4; }

.linkish {
  background: none; border: 0; padding: 0; color: var(--accent-ink);
  text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px;
}

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--canvas) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.is-stuck { border-bottom-color: var(--rule); }
.top__inner {
  display: flex; align-items: center; gap: 12px;
  padding-block: 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  text-decoration: none;
  font-size: 22px; font-weight: 820; font-stretch: 125%;
  letter-spacing: -0.035em; line-height: 1;
}
.brand__mark { width: 19px; height: 17px; fill: var(--accent); }

.search { position: relative; flex: 1 1 auto; max-width: 560px; margin-inline: auto; min-width: 0; }
.search input {
  width: 100%; height: 40px;
  padding: 0 42px 0 38px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface);
  font-size: 15px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; border-color: var(--bar-hi); box-shadow: 0 0 0 4px var(--accent-wash); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--ink-2); pointer-events: none;
}
.search__kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 5px;
  font: 500 12px/1 var(--font-mono); color: var(--ink-2);
  background: var(--canvas);
}
.search input:focus ~ .search__kbd, .search input:not(:placeholder-shown) ~ .search__kbd { display: none; }

.top__tools { display: flex; align-items: center; gap: 8px; flex: none; }

.select { position: relative; display: inline-flex; align-items: center; }
.select .tri { position: absolute; left: 13px; top: 50%; transform: translateY(-60%); pointer-events: none; }
.select select {
  height: 38px; padding: 0 30px 0 28px;
  border-radius: 999px; border: 1px solid var(--rule);
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23857f76' stroke-width='1.5'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  font: 500 13px/1 var(--font-mono);
  -webkit-appearance: none; appearance: none;
}
.select select:hover { border-color: var(--bar-hi); }

.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: end; gap: 20px 40px;
  padding-block: 34px 6px;
}
.hero__title {
  font-size: clamp(30px, 4.4vw, 56px);
  font-weight: 800; font-stretch: 118%;
  letter-spacing: -0.045em; line-height: 0.98;
  max-width: 16ch;
}
.hero__lede { margin-top: 14px; color: var(--ink-2); font-size: 16px; max-width: 54ch; }
.foot__by a {
  color: var(--ink); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: var(--accent);
}
.foot__by a:hover { color: var(--accent-ink); }
.foot__by { font: 500 12.5px/1.4 var(--font-mono); }
.hero__stat { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.stat__value {
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 640; letter-spacing: -0.045em; line-height: 0.9;
  transition: opacity .25s;
}
.stat__value.is-loading { opacity: .35; }
.stat__label { font: 500 11.5px/1.4 var(--font-mono); color: var(--ink-2); letter-spacing: 0.05em; text-transform: uppercase; }

/* ---------- year ruler ---------- */
.ruler { padding-block: 26px 6px; --axis: 44px; }
.ruler__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding-bottom: 12px;
}
.ruler__title { display: grid; gap: 3px; }
.ruler__note { font-size: 13px; color: var(--ink-2); }
.allbtn {
  flex: none;
  height: 30px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--rule); background: var(--surface);
  font: 600 12px/1 var(--font-mono); color: var(--ink-2);
  transition: border-color .15s, background-color .15s, color .15s;
}
.allbtn:hover { border-color: var(--bar-hi); color: var(--ink); }
.allbtn[aria-pressed="true"] { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.ruler__scroll {
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
  margin-inline: -4px; padding: 4px 4px 2px;
  -webkit-overflow-scrolling: touch;
}
.years {
  position: relative;
  display: grid;
  grid-template-columns: var(--axis) repeat(var(--n, 18), minmax(30px, 1fr));
  min-width: 600px;
}
.years.is-loading .yr__bar { opacity: .45; }
.ruler__grid {
  position: absolute; left: 0; right: 0; top: 0; height: var(--plot-h);
  pointer-events: none;
}
.ruler__grid span {
  position: absolute; left: var(--axis); right: 0; height: 0;
  border-top: 1px solid var(--rule);
}
.ruler__grid em {
  position: absolute; left: calc(var(--axis) * -1); top: -6px;
  width: calc(var(--axis) - 8px); text-align: right;
  font: 500 10.5px/1 var(--font-mono); font-style: normal; color: var(--ink-2);
}
.yr-axis { display: block; }
.yr {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch;
  padding: 0; border: 0; background: none;
  color: var(--ink-2);
  border-radius: var(--r-1);
}
.yr:focus-visible { outline-offset: 0; }
.yr__plot {
  position: relative; height: var(--plot-h);
  display: flex; align-items: flex-end; justify-content: center;
}
.yr__bar {
  width: min(24px, 58%);
  height: 0;
  min-height: 0;
  background: var(--bar);
  border-radius: 4px 4px 0 0;
  transition: height .7s cubic-bezier(.2,.8,.2,1), background-color .15s, opacity .25s;
}
.yr:hover .yr__bar { background: var(--bar-hi); }
.yr.is-sel .yr__bar { background: var(--accent); }
.yr__val {
  position: absolute; left: 50%; transform: translate(-50%, -6px);
  font: 600 11px/1 var(--font-mono); color: var(--ink);
  white-space: nowrap; pointer-events: none;
}
.yr__lbl {
  padding-top: 7px; height: 28px;
  border-top: 1px solid var(--rule);
  font: 500 11px/1 var(--font-mono); text-align: center;
  font-variant-numeric: tabular-nums;
}
.yr:hover .yr__lbl, .yr.is-sel .yr__lbl { color: var(--ink); }
.yr.is-sel .yr__lbl { font-weight: 700; }
.yr__lbl .s { display: none; }

.months {
  display: grid; grid-template-columns: var(--axis) repeat(12, minmax(0, 1fr));
  min-width: 600px;
  margin-top: 16px;
  animation: rise .35s cubic-bezier(.2,.8,.2,1) backwards;
}
.months__title {
  align-self: end; padding-bottom: 36px;
  font: 700 12px/1.1 var(--font-mono); color: var(--ink);
}
.mo { --plot-h: 56px; }
.mo .yr__bar { width: min(22px, 46%); transform-origin: bottom; animation: grow .5s cubic-bezier(.2,.8,.2,1) backwards; }
.mo:disabled { opacity: .35; }
.mo:disabled .yr__lbl { color: var(--ink-3); }

/* ---------- toolbar ---------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-block: 22px 10px;
}
.tabs {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--wash); border-radius: 999px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.tab, .seg__btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 15px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--ink-2); font-size: 14px; font-weight: 560; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.tab:hover, .seg__btn:hover { color: var(--ink); }
.tab[aria-pressed="true"], .seg__btn[aria-pressed="true"] {
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1);
}
.tab__count { font: 600 11px/1 var(--font-mono); color: var(--accent-ink); }
.tab__count:empty { display: none; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--wash); border-radius: 999px; }
.seg__btn svg { width: 15px; height: 15px; }
.seg[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.statusbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  padding-bottom: 16px; min-height: 34px;
}
.status { font-size: 14px; color: var(--ink-2); }
.status strong { color: var(--ink); font-weight: 650; }
.status .num { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 8px 0 11px;
  border-radius: 999px; border: 1px solid var(--rule); background: var(--surface);
  font: 500 12.5px/1 var(--font-mono); color: var(--ink);
}
.chip svg { width: 12px; height: 12px; color: var(--ink-2); }
.chip:hover { border-color: var(--bar-hi); }
.chip--plain { background: transparent; border-color: transparent; color: var(--ink-2); padding-right: 11px; }
.legend {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 12px/1.3 var(--font-mono); color: var(--ink-2);
}
.legend__key {
  display: inline-grid; grid-template-columns: repeat(3, 6px); grid-template-rows: repeat(2, 6px); gap: 2px; flex: none;
}
.legend__key i { background: var(--bar); border-radius: 1px; }
.legend__key i:first-child { grid-row: span 2; grid-column: span 2; background: var(--accent); }
.legend__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); opacity: .7; flex: none; }
.legend .btn { min-height: 30px; font-size: 13px; padding: 0 12px; }

/* ---------- wall ---------- */
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  grid-auto-rows: 1fr;
  grid-auto-flow: row dense;
  gap: 14px;
  transition: opacity .2s;
}
.wall.is-refreshing, .days.is-refreshing { opacity: .45; pointer-events: none; }

.card {
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border-radius: var(--r-2);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s;
  animation: rise .45s cubic-bezier(.2,.8,.2,1) backwards;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.card:has(.card__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.card--feature { grid-column: span 2; grid-row: span 2; }

.card__media {
  position: relative; flex: none;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--tint-bg, var(--wash));
  color: var(--tint-ink, var(--ink-2));
}
.card--feature .card__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 200px; }

.tint-0 { --tint-bg: var(--t0); --tint-ink: var(--t0i); }
.tint-1 { --tint-bg: var(--t1); --tint-ink: var(--t1i); }
.tint-2 { --tint-bg: var(--t2); --tint-ink: var(--t2i); }
.tint-3 { --tint-bg: var(--t3); --tint-ink: var(--t3i); }
.tint-4 { --tint-bg: var(--t4); --tint-ink: var(--t4i); }
.tint-5 { --tint-bg: var(--t5); --tint-ink: var(--t5i); }
.tint-6 { --tint-bg: var(--t6); --tint-ink: var(--t6i); }
.tint-7 { --tint-bg: var(--t7); --tint-ink: var(--t7i); }

/* the cover is what a project looks like before (or without) a screenshot:
   a tint from its domain, a giant initial, and the year it was shown */
.cover { position: absolute; inset: 0; overflow: hidden; background: var(--tint-bg); color: var(--tint-ink); }
.cover__mono {
  position: absolute; right: -0.04em; bottom: -0.27em;
  font-size: 168px; font-weight: 860; font-stretch: 125%;
  letter-spacing: -0.06em; line-height: 1;
  opacity: .92;
  user-select: none;
}
.card--feature .cover__mono { font-size: clamp(220px, 26vw, 380px); }
.cover__year {
  position: absolute; left: 12px; top: 11px;
  font: 600 11px/1 var(--font-mono); letter-spacing: 0.04em;
}
.cover__kind {
  position: absolute; left: 12px; bottom: 11px;
  font: 500 11px/1 var(--font-mono); letter-spacing: 0.02em;
  max-width: 60%;
}
.shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  opacity: 0;
  transition: opacity .45s ease, transform .6s cubic-bezier(.2,.8,.2,1);
  background: var(--surface);
}
.shot.is-ready { opacity: 1; }
.card:hover .shot.is-ready { transform: scale(1.03); }
.badge {
  position: absolute; left: 10px; top: 10px; z-index: 1;
  padding: 4px 7px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 650 11px/1 var(--font-mono); color: var(--ink);
  box-shadow: var(--shadow-1);
}

.card__body {
  display: flex; flex-direction: column; gap: 3px;
  padding: 11px 14px 12px;
  flex: 1 1 auto; min-height: 0;
}
.card--feature .card__body { flex: 0 0 auto; padding: 14px 18px 16px; gap: 5px; }
.card__site {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start; max-width: 100%;
  padding: 0; border: 0; background: none;
  font: 500 11.5px/1.5 var(--font-mono); color: var(--ink-2);
  text-align: left;
}
.card__site span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.card__site:hover { color: var(--accent-ink); }
.fav { width: 14px; height: 14px; border-radius: 3px; flex: none; background: var(--fav-bg); padding: var(--fav-pad, 0); }
.card__title {
  font-size: 15.5px; font-weight: 640; line-height: 1.24; letter-spacing: -0.012em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-wrap: pretty;
}
.card--feature .card__title {
  font-size: clamp(20px, 1.9vw, 27px); font-weight: 760; font-stretch: 92%;
  letter-spacing: -0.025em; line-height: 1.08; -webkit-line-clamp: 3;
}
.card__link { text-decoration: none; }
.card__link:focus-visible { outline: none; }
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__tag {
  color: var(--ink-2); font-size: 13.5px; line-height: 1.38;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card--feature .card__tag { font-size: 15px; }
.card__excerpt {
  margin-top: 4px; color: var(--ink-2); font-size: 13.5px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta {
  margin-top: auto; padding-top: 9px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font: 500 11.5px/1.2 var(--font-mono); color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.card__meta .pts { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-weight: 650; }
.cmt-n { display: inline-flex; align-items: center; gap: 5px; }
.cmt-n::before {
  content: ""; width: 11px; height: 10px; flex: none;
  background: currentColor; opacity: .8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 10'%3E%3Cpath d='M0 0h11v7H4.5L1.5 10V7H0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 10'%3E%3Cpath d='M0 0h11v7H4.5L1.5 10V7H0z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.card__meta time { margin-left: auto; }
.card__actions {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  display: flex; gap: 6px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .15s, transform .15s;
}
.card:hover .card__actions, .card:focus-within .card__actions { opacity: 1; transform: none; }
.card__actions:has([aria-pressed="true"]) { opacity: 1; transform: none; }
.act {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}
.act svg { width: 15px; height: 15px; }
.act:hover { color: var(--accent-ink); }
.act[aria-pressed="true"] { color: var(--accent); }
.act[aria-pressed="true"] svg { fill: currentColor; }
@media (hover: none) {
  .card__actions { opacity: 1; transform: none; }
}

.card--ghost { animation: none; box-shadow: none; background: var(--wash); opacity: .6; }
.card--ghost .card__media { background: var(--rule); opacity: .5; }
.card--ghost .card__body { min-height: 96px; }

.end { display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 12px; padding-block: 34px 20px; text-align: center; color: var(--ink-2); }
.end p { max-width: 56ch; }
.empty { padding-block: 60px 30px; text-align: center; display: grid; justify-items: center; gap: 14px; grid-column: 1 / -1; }
.empty h3 { font-size: 22px; font-weight: 760; font-stretch: 110%; letter-spacing: -0.03em; }
.empty p { color: var(--ink-2); max-width: 46ch; }
#sentinel { height: 1px; }

/* ---------- on this day ---------- */
.days { display: grid; gap: 34px; transition: opacity .2s; }
.day__head {
  display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.day__year { font-size: 34px; font-weight: 820; font-stretch: 122%; letter-spacing: -0.05em; line-height: 1; }
.day__sub { font: 500 12px/1.3 var(--font-mono); color: var(--ink-2); }
.day__all { margin-left: auto; font: 500 12.5px/1.3 var(--font-mono); color: var(--accent-ink); text-decoration: none; }
.day__all:hover { text-decoration: underline; }
.wall--day { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---------- map ---------- */
.map__frame {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-1);
  padding: 14px 10px 8px;
  transition: opacity .2s;
}
.map__frame.is-loading { opacity: .5; }
.map__frame canvas { display: block; width: 100%; }
.map__overlay { position: absolute; left: 10px; top: 14px; cursor: crosshair; touch-action: pan-y; }
.map__overlay.is-pointing { cursor: pointer; }
.map__empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); }
.map__note { padding-top: 10px; font: 500 12px/1.4 var(--font-mono); color: var(--ink-2); }

/* ---------- tooltip & toast ---------- */
.tip {
  position: fixed; z-index: 90; left: 0; top: 0;
  max-width: 300px;
  padding: 7px 9px;
  border-radius: 6px;
  background: var(--tip-bg); color: var(--tip-fg);
  font: 500 12px/1.4 var(--font-mono);
  pointer-events: none;
  box-shadow: 0 8px 24px -10px rgb(0 0 0 / .45);
}
.tip strong { display: block; font: 650 13px/1.3 var(--font-ui); margin-bottom: 2px; }
.toast {
  position: fixed; z-index: 95;
  left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--tip-bg); color: var(--tip-fg);
  font-size: 14px; font-weight: 560;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; }
.scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .2s ease; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(660px, 100%);
  background: var(--surface);
  overflow-y: auto; overscroll-behavior: contain;
  box-shadow: -24px 0 60px -30px rgb(0 0 0 / .5);
  animation: slide .32s cubic-bezier(.2,.8,.2,1);
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  outline: none;
}
.drawer__bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px 20px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.drawer__nav { display: flex; gap: 6px; }
.d-pad { padding-left: 24px; padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.d-media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  margin: 18px 24px 0; margin-right: max(24px, env(safe-area-inset-right, 0px));
  border-radius: var(--r-2);
  box-shadow: var(--shadow-1);
}
.d-media .cover__mono { font-size: clamp(220px, 50vw, 420px); }
.d-caption { padding-top: 8px; font: 500 11.5px/1.4 var(--font-mono); color: var(--ink-2); opacity: 0; transition: opacity .3s; }
.d-media:has(.shot.is-ready) + .d-pad .d-caption { opacity: 1; }
.d-head { padding-top: 22px; display: grid; gap: 10px; }
.d-title { font-size: clamp(26px, 4vw, 36px); font-weight: 800; font-stretch: 96%; letter-spacing: -0.035em; line-height: 1.04; }
.d-tag { font-size: 18px; color: var(--ink-2); line-height: 1.35; }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.d-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  margin: 12px 0 0; border-radius: var(--r-2); overflow: hidden;
  background: var(--rule); border: 1px solid var(--rule);
}
.d-stats div { background: var(--surface); padding: 10px 12px; min-width: 0; }
.d-stats dt { font: 500 10.5px/1.3 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.d-stats dd { margin: 4px 0 0; font: 600 15px/1.2 var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-stats dd .linkish { font: inherit; }
.d-text { padding-top: 20px; }
.d-section { padding-top: 30px; }
.d-section > h3 { padding-bottom: 12px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; display: flex; justify-content: space-between; gap: 10px; }
.d-section > h3 a { color: var(--accent-ink); text-decoration: none; text-transform: none; letter-spacing: 0; }

.prose { font-size: 15px; line-height: 1.58; overflow-wrap: anywhere; }
.prose p { margin: 0 0 .75em; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.prose pre {
  margin: 0 0 .75em; padding: 10px 12px; overflow-x: auto;
  background: var(--wash); border-radius: var(--r-1);
  font: 12.5px/1.5 var(--font-mono); white-space: pre;
}
.prose code { font-family: var(--font-mono); font-size: .9em; }

.cmts { display: grid; }
.cmt { padding: 14px 0 12px calc(var(--d, 0) * 14px); border-bottom: 1px solid var(--rule); }
.cmt .cmt { border-bottom: 0; padding-bottom: 4px; border-left: 2px solid var(--rule); padding-left: 12px; margin-top: 10px; }
.cmt__head { display: flex; gap: 10px; align-items: baseline; padding-bottom: 5px; font: 500 12px/1.3 var(--font-mono); color: var(--ink-2); }
.cmt__head a { text-decoration: none; }
.cmt__head a:first-child { color: var(--ink); font-weight: 650; }
.cmt__head a:hover { text-decoration: underline; }
.cmt__body { font-size: 14.5px; }
.cmt__toggle {
  margin-top: 8px; padding: 0; border: 0; background: none;
  font: 600 12px/1.3 var(--font-mono); color: var(--accent-ink);
}
.cmt__toggle::before { content: "+ "; }
.cmt__toggle[aria-expanded="true"]::before { content: "− "; }
.cmts__more { margin-top: 16px; justify-self: start; }

.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; padding-top: 10px; }
.mini {
  display: grid; gap: 6px; align-content: space-between;
  padding: 11px 12px; min-height: 76px;
  border-radius: var(--r-2); border: 1px solid var(--rule);
  text-decoration: none;
  transition: border-color .15s;
}
.mini:hover { border-color: var(--bar-hi); }
.mini__name { font-size: 14px; font-weight: 620; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini__meta { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--font-mono); color: var(--ink-2); }

/* ---------- shuffle ---------- */
.shuffle { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) var(--pad-r) max(16px, env(safe-area-inset-bottom, 0px)) var(--pad-l); }
.shuffle__panel {
  position: relative;
  width: min(1120px, 100%); max-height: 100%;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / .6);
  animation: pop .32s cubic-bezier(.2,.8,.2,1);
  outline: none;
}
.shuffle__panel.is-loading .shuffle__media, .shuffle__panel.is-loading .shuffle__info { opacity: .4; transition: opacity .15s; }
.shuffle__media { position: relative; min-height: 320px; overflow: hidden; }
.shuffle__media .cover__mono { font-size: clamp(260px, 34vw, 520px); }
.shuffle__info { display: flex; flex-direction: column; gap: 12px; padding: 28px 28px 20px; overflow-y: auto; min-height: 0; }
.shuffle__name { font-size: clamp(26px, 3.2vw, 40px); font-weight: 820; font-stretch: 100%; letter-spacing: -0.04em; line-height: 1.02; padding-right: 36px; }
.shuffle__tag { font-size: 18px; color: var(--ink-2); line-height: 1.35; }
.shuffle__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 500 12.5px/1.3 var(--font-mono); color: var(--ink-2); }
.shuffle__meta .pts { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 650; }
.shuffle__text { font-size: 14.5px; max-height: 210px; overflow-y: auto; padding-right: 6px; color: var(--ink); }
.shuffle__text:empty { display: none; }
.shuffle__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.shuffle__nav {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--rule);
}
.shuffle__close { position: absolute; top: 14px; right: 14px; z-index: 2; }

/* ---------- help ---------- */
.help { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.help__panel {
  position: relative; width: min(440px, 100%);
  background: var(--surface); border-radius: 12px; padding: 22px 24px 18px;
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / .6);
  animation: pop .25s cubic-bezier(.2,.8,.2,1);
  outline: none;
}
.help__panel h2 { font-size: 20px; font-weight: 780; font-stretch: 110%; letter-spacing: -0.03em; margin-bottom: 12px; }
.help dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; margin: 0; align-items: center; }
.help dt { display: flex; gap: 4px; }
.help dd { margin: 0; color: var(--ink-2); font-size: 14px; }
kbd {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px;
  border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 5px;
  font: 600 12px/1 var(--font-mono); background: var(--canvas); color: var(--ink);
}
.help .iconbtn { position: absolute; top: 14px; right: 14px; }

/* ---------- footer ---------- */
.foot { padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); margin-top: 30px; border-top: 1px solid var(--rule); }
.foot__inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 48px; }
.foot blockquote { margin: 0; font-size: 21px; font-weight: 700; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1.2; max-width: 30ch; }
.foot cite { display: block; margin-top: 8px; font: 500 11.5px/1.4 var(--font-mono); font-style: normal; color: var(--ink-2); }
.foot__notes { display: grid; gap: 8px; align-content: start; font-size: 13.5px; color: var(--ink-2); }
.foot__notes a { color: var(--ink); }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: translateY(14px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .yr__lbl .l { display: none; }
  .yr__lbl .s { display: inline; }
}
@media (max-width: 860px) {
  .top__inner { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .top__tools { margin-left: auto; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 22px; }
  .hero__stat { align-items: flex-start; text-align: left; flex-direction: row; align-items: baseline; gap: 12px; }
  .shuffle__panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .shuffle__media { min-height: 0; aspect-ratio: 16 / 10; }
  .shuffle__info { padding: 20px 20px 14px; }
  .foot__inner { grid-template-columns: minmax(0, 1fr); }
  .legend { margin-left: 0; }
}
@media (max-width: 560px) {
  .ruler { --axis: 34px; --plot-h: 92px; }
  .card--feature { grid-column: auto; grid-row: auto; }
  .card--feature .card__media { aspect-ratio: 16 / 10; flex: none; min-height: 0; }
  .card--feature .cover__mono { font-size: 168px; }
  .wall { gap: 12px; }
  .brand__name { font-size: 20px; }
  .top__tools .btn span { display: none; }
  #helpBtn { display: none; }
  .top__inner { padding-block: 10px; gap: 10px; }
  .top__tools .btn { padding: 0 11px; }
  .select select { padding-right: 26px; }
  .d-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-media { margin-inline: 16px; }
  .d-pad { padding-left: 16px; padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .shuffle { padding: 0; }
  .shuffle__panel { border-radius: 0; height: 100%; }
  .shuffle__nav .label { display: none; }
  .day__all { margin-left: 0; }
}
