:root {
  --bg: #f6f3eb;
  --text: #242520;
  --muted: #68655b;
  --line: #cec8ba;
  --serif: "Newsreader", Georgia, serif;
  --body: "Source Serif 4", Georgia, serif;
  --ui: "Inter", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--body); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 5; padding: 10px 16px; background: var(--text); color: var(--bg); font: 13px var(--ui); }
.skip-link:focus { top: 16px; }
.home-wrap { max-width: 1256px; margin: 0 auto; padding: 48px 36px 28px; }
.home-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 36px; padding: 0 0 28px; border-bottom: 2px solid var(--text); }
.home-header h1 { margin: 0 0 -12px; font: 500 clamp(64px, 7.3vw, 104px)/1 var(--serif); letter-spacing: -.065em; }
.home-header p { margin: 0 0 2px; font: 17px/1.5 var(--body); color: var(--muted); }
.browse-topics { display: inline-block; margin-top: 12px; font: 11px/1.5 var(--ui); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
.browse-topics:hover { text-decoration-color: currentColor; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 27px 0 19px; }
.section-heading h2 { margin: 0; font: 500 10px/1.5 var(--ui); text-transform: uppercase; letter-spacing: .13em; }
.section-heading p { margin: 0; font: 11px/1.5 var(--ui); color: var(--muted); }
#featured { display: grid; gap: 20px; }
.topic-card { position: relative; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 44px; padding: 32px 36px 28px; border: 1px solid var(--line); }
.topic-intro { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.topic-intro > :not(.topic-art):not(canvas) { position: relative; z-index: 1; }
.topic-kicker { margin: 0 0 18px; font: 500 9px/1.5 var(--ui); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.topic-card h2 { margin: 0; font: 400 43px/1.03 var(--serif); letter-spacing: -.035em; text-wrap: balance; }
.topic-card h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.topic-card h2 em { font-weight: inherit; }
.no-break { white-space: nowrap; }
.topic-description { max-width: 330px; margin: 13px 0 0; font: 14px/1.55 var(--body); color: var(--muted); }
.topic-meta { display: flex; width: 100%; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px 20px; margin-top: auto; padding-top: 24px; font: 10px/1.6 var(--ui); }
.topic-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.topic-open { white-space: nowrap; }
.topic-open span { margin-left: 5px; font-size: 14px; }
.topic-open:hover { text-decoration: underline; text-underline-offset: 4px; }
.topic-chart { display: flex; align-items: flex-end; min-width: 0; }
.chart-link { display: block; position: relative; width: 100%; }
.chart-axis { position: relative; min-height: 174px; width: 100%; border-bottom: 1px solid var(--text); }
.chart-axis::after { content: ""; position: absolute; bottom: -4px; left: 0; right: 0; height: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10%); pointer-events: none; }
.chart-labels { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; color: var(--muted); font: 9px/1.5 var(--ui); text-transform: uppercase; letter-spacing: .035em; }
.chart-labels > :last-child { text-align: right; }
.chart-threshold { text-align: center; }
.chart-message { position: absolute; inset: 0 12px 27px; display: flex; align-items: center; justify-content: center; margin: 0; text-align: center; font: 12px/1.6 var(--ui); color: var(--muted); pointer-events: none; }
.chart-message:empty { display: none; }
.chart-marker { position: absolute; display: flex; align-items: center; justify-content: center; }
.marker-letter { font: 20px/1 var(--serif); }
.marker-letter[lang="zh-Hans"] { font-family: "Noto Serif SC", serif; font-size: 18px; }
.marker-shape svg { display: block; width: 13px; height: 13px; }
.marker-face img { width: 20px; height: 20px; image-rendering: pixelated; }
.topic-china { --bg: #f0ebdf; background: var(--bg); }
.topic-art { position: absolute; top: -32px; right: -64px; height: calc(100% + 60px); width: 115%; object-fit: cover; object-position: right center; filter: grayscale(.7); opacity: .16; mix-blend-mode: multiply; mask-image: linear-gradient(90deg, transparent 5%, black 70%, transparent), linear-gradient(180deg, transparent, black 20%, black 70%, transparent); mask-composite: intersect; pointer-events: none; }
.topic-navier { --bg: #faf8f1; --muted: #626962; --text: #202823; background: var(--bg); }
#vortex { position: absolute; inset: -24px -20px; width: calc(100% + 40px); height: calc(100% + 48px); opacity: .55; pointer-events: none; mask-image: radial-gradient(ellipse, black 30%, transparent 72%); }
.topic-navier h2 { text-shadow: 0 0 14px var(--bg), 0 0 5px var(--bg); }
.topic-luckey { --bg: #101018; --text: #e8e8f0; --muted: #a09faf; --line: #343447; background: var(--bg); color: var(--text); border-color: #343447; }
.topic-luckey h2 { font: 400 26px/1.65 "Press Start 2P", monospace; letter-spacing: -.035em; }
.topic-luckey h2 a { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 15px; }
.topic-luckey h2 .luckey-name { color: #ff2e88; }
.topic-luckey h2 .graham-name { color: #2ed9ff; }
.pixel-v { color: var(--muted); font-size: 12px; }
.topic-luckey .chart-axis { border-bottom: 2px solid #54546b; }
.topic-atlas { --bg: #F4F3ED; --text: #242C2D; --muted: #626C6C; --line: #C9CECA; background: var(--bg); }
.topic-atlas h2 { font: 600 61px/.92 "Barlow Condensed", "Arial Narrow", sans-serif; text-transform: uppercase; letter-spacing: -.015em; }
.topic-atlas h2 span { display: block; }
.topic-atlas .topic-art { top: -20px; right: -20px; width: 47%; height: calc(100% + 40px); object-fit: contain; opacity: .7; }
.marker-number.entry-number { border: 1px solid #8FA4A5; color: #365B63; font: 500 8px/1 "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }
#more-section { scroll-margin-top: 24px; }
.more-heading { margin: 46px 0 0; padding: 24px 0 20px; border-top: 2px solid var(--text); }
.more-heading h2 { font: 400 36px/1 var(--serif); text-transform: none; letter-spacing: -.03em; }
#more-topics { display: block; }
.topic-plain { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: 64px; padding: 22px 0; border: 0; border-top: 1px solid var(--line); }
.topic-plain h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; text-wrap: initial; }
.topic-plain .topic-meta { padding-top: 8px; margin-top: 0; font-size: 10px; }
.topic-plain .chart-axis { min-height: 48px; }
.topic-plain .chart-message { font-size: 11px; }
.topic-plain .chart-labels { font-size: 8px; padding-top: 9px; letter-spacing: 0; text-transform: none; }
.topic-plain .marker-shape svg { width: 9px; height: 9px; }
.home-feedback { font: 12px/1.6 var(--ui); color: var(--muted); }
.home-feedback:has(#home-status:not([hidden]):not(:empty)) { padding: 24px 0; }
#retry-home { padding: 5px 12px; margin-left: 10px; background: transparent; border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.home-footer { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 8px 24px; margin-top: 42px; padding-top: 20px; border-top: 2px solid var(--text); }
.home-footer > a { font: 500 25px/1 var(--serif); letter-spacing: -.04em; }
.home-footer p { margin: 0; color: var(--muted); font: 10px/1.7 var(--ui); text-align: right; }
.home-footer .art-credit { grid-column: 1/-1; font-size: 9px; }
.art-credit a { text-decoration: underline; text-underline-offset: 2px; }
.noscript-note { font: 14px/1.6 var(--body); }
.noscript-note a { text-decoration: underline; }
@media (max-width: 1000px) {
  .home-wrap { padding: 36px 24px 24px; }
  .topic-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; padding: 26px 26px 24px; }
  .topic-card h2 { font-size: 37px; }
  .topic-luckey h2 { font-size: 22px; }
  .topic-atlas h2 { font-size: 54px; }
  .topic-plain { padding: 21px 0; gap: 40px; }
  .topic-plain h2 { font-size: 26px; }
}
@media (max-width: 700px) {
  .home-wrap { padding: 30px 20px 24px; }
  .home-header { display: block; padding-bottom: 22px; }
  .home-header h1 { font-size: clamp(59px, 14vw, 90px); margin: 0; }
  .home-header p { margin: 13px 0 0; font-size: 14px; }
  .home-header br { display: none; }
  .browse-topics { margin-top: 9px; font-size: 10px; }
  .section-heading { margin: 21px 0 15px; gap: 16px; }
  .section-heading p { font-size: 9px; }
  .section-heading h2 { font-size: 9px; }
  #featured { gap: 16px; }
  .topic-card { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 22px; }
  .topic-kicker { margin-bottom: 15px; font-size: 8px; }
  .topic-card h2 { font-size: 40px; max-width: 410px; }
  .topic-description { font-size: 13px; margin-top: 11px; }
  .topic-meta { font-size: 9px; padding-top: 18px; }
  .chart-axis { min-height: 90px; }
  .chart-labels { font-size: 8px; }
  .chart-message { font-size: 11px; }
  .topic-art { right: -22px; top: -24px; height: calc(100% + 24px); }
  .topic-luckey h2 { font-size: 25px; }
  .topic-luckey h2 a { gap: 2px 14px; }
  .topic-luckey .pixel-v { font-size: 11px; }
  .topic-atlas h2 { font-size: 59px; }
  .more-heading { margin: 30px 0 0; }
  .more-heading h2 { font-size: 32px; }
  .topic-plain { grid-template-columns: minmax(0, 1fr); padding: 21px 0; gap: 9px; }
  .topic-plain .topic-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 8px 16px; }
  .topic-plain .topic-meta { width: auto; padding: 0; font-size: 9px; text-align: right; }
  .topic-plain h2 { font-size: 25px; }
  .topic-plain .chart-labels { font-size: 8px; }
  .topic-plain .chart-message { font-size: 10px; }
  .home-footer { grid-template-columns: 1fr; margin-top: 24px; gap: 13px; }
  .home-footer p { text-align: left; }
}
@media (max-width: 380px) {
  .home-wrap { padding-left: 16px; padding-right: 16px; }
  .topic-card { padding-left: 18px; padding-right: 18px; }
  .topic-card h2 { font-size: 35px; }
  .topic-luckey h2 { font-size: 23px; }
  .topic-atlas h2 { font-size: 54px; }
  .topic-plain { padding-left: 0; padding-right: 0; }
  .topic-plain h2 { font-size: 24px; }
  .section-heading { flex-wrap: wrap; gap: 4px 12px; }
}
