/* ==========================================================================
   DabPop — shared stylesheet ("The Seoul Edit", CLAUDE.md §7)
   Two themes: light by default, dark via <html data-theme="dark"> (set by the
   inline head snippet before first paint and by the toggle in main.js).
   Components use ONLY the tokens in §1, so both themes follow automatically.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  color-scheme: light;
  /* Ink & Seoul Red */
  --paper: #F7F6F2;        /* page background */
  --surface: #FFFFFF;      /* tables, inputs, boxes */
  --surface-2: #EFEDE7;    /* hovers, image placeholders' backdrop */
  --ink: #121212;          /* headings, primary text, hairlines */
  --body: #2A2A2A;         /* long-form copy */
  --muted: #4A4A4A;        /* captions, labels, metadata */
  --rule: #C9C6BE;         /* secondary dividers */
  --accent: #B3121F;       /* "Pop", kickers, link underlines, category tags */
  --on-accent: #FFFFFF;    /* text on an --accent fill */
  --badge-bg: #F7F6F2;     /* count badge on images */
  --badge-fg: #121212;
  --img: #1E1E1E;          /* placeholder block behind a missing image */
  --img-ink: #F7F6F2;      /* icon on --img */
  --band: #121212;         /* sections band + footer */
  --band-ink: #F7F6F2;
  --band-muted: #A8A49B;
  --band-rule: #4A4A4A;
  --band-accent: #F7F6F2;  /* "Pop" in the footer wordmark */
  --focus: #B3121F;

  --f-display: 'Bodoni Moda', 'Bodoni 72', Didot, 'Times New Roman', serif;
  --f-body: 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-ko: 'Noto Serif KR', 'Apple SD Gothic Neo', 'Malgun Gothic', serif;

  --h1: 62px;
  --h2: 38px;
  --ct: 26px;
  --bar-h: 60px;           /* sticky top bar height, for scroll-padding */
}

:root[data-theme="dark"] {
  color-scheme: dark;
  /* Night Edition */
  --paper: #0F0F12;
  --surface: #16161A;
  --surface-2: #1F1F25;
  --ink: #F2EFE8;
  --body: #D9D6CF;
  --muted: #A9A6A0;
  --rule: #3A3A42;
  --accent: #FF3E7F;
  --on-accent: #0F0F12;    /* never white on the pink */
  --badge-bg: #F2EFE8;
  --badge-fg: #0F0F12;
  --img: #26262E;
  --img-ink: #F2EFE8;
  --band: #1A1A1F;
  --band-ink: #F2EFE8;
  --band-muted: #A9A6A0;
  --band-rule: #3A3A42;
  --band-accent: #FF3E7F;
  --focus: #FF3E7F;
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.55;
}
/* width: 100% stops a narrow page (About, Terms) from shrinking to its text and floating off-centre */
body > main { flex: 1 0 auto; width: 100%; }
img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
[lang="ko"], .ko { font-family: var(--f-ko); }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 16px;
  font-weight: 700; color: var(--on-accent); background: var(--accent); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.serif { font-family: var(--f-display); }
.kicker, .label {
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; line-height: 1.4;
}
.kicker { color: var(--accent); }
.label { color: var(--muted); letter-spacing: .14em; font-weight: 600; }

/* 3. Layout ---------------------------------------------------------------- */
.wrap { max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }
main { display: block; }

/* 4. Top bar (sticky) ------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper); border-bottom: 1px solid var(--ink);
}
.topbar-in { display: flex; align-items: center; gap: 12px 24px; min-height: var(--bar-h); }
.mini-logo {
  display: inline-flex; align-items: baseline; min-height: 44px; padding-top: 8px;
  font-family: var(--f-display); font-weight: 700; font-size: 24px; line-height: 1; text-decoration: none;
}
.mini-logo i, .logo-word i { font-style: italic; color: var(--accent); }
.topbar-tag { font-family: var(--f-display); font-style: italic; font-size: 16px; color: var(--muted); white-space: nowrap; }
.mast-panel { display: flex; flex: 1; align-items: center; gap: 8px 20px; }
.util-nav { display: flex; flex-wrap: wrap; margin-left: auto; }
.util-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
}
.util-nav a:hover, .util-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.mast-tools { display: flex; align-items: center; gap: 10px; }
.mast-tools form { display: flex; margin: 0; }

.search {
  display: flex; align-items: center; gap: 8px; height: 44px; min-width: 200px; padding: 0 2px;
  color: var(--muted); border-bottom: 1px solid var(--ink);
}
.search .ico { width: 16px; height: 16px; }
.search input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 15px; color: var(--ink);
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.search:focus-within { border-bottom-color: var(--focus); box-shadow: 0 1px 0 var(--focus); }

.theme-toggle, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px;
  font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 999px; cursor: pointer;
}
.theme-toggle:hover, .nav-toggle:hover { color: var(--paper); background: var(--ink); }
.theme-toggle .ico { width: 16px; height: 16px; }
.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; }
html:not(.js) .theme-toggle { display: none; }
.nav-toggle { display: none; padding: 0; }

/* 5. Masthead (wordmark + section nav) ------------------------------------- */
.masthead { padding-top: 32px; text-align: center; }
.logo { display: inline-block; color: var(--ink); text-decoration: none; }
.logo-word {
  display: block; font-family: var(--f-display); font-weight: 700;
  font-size: clamp(64px, 11vw, 132px); line-height: .9; letter-spacing: -.025em;
}
.mast-tag { margin-top: 14px; font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.mast-tag .ko { letter-spacing: .05em; }
.mast-rule { height: 7px; margin-top: 22px; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }
.masthead.is-compact { padding-top: 22px; }
.masthead.is-compact .logo-word { font-size: clamp(48px, 7vw, 76px); }

/* Category strip: the section nav under the masthead (index + category pages) */
.cat-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; padding: 6px 0;
  border-bottom: 1px solid var(--ink);
}
.cat-strip .chip {
  min-height: 44px; padding: 0 4px; border: 0; background: none;
  font-size: 12.5px; letter-spacing: .14em;
}
.cat-strip .chip:hover { color: var(--ink); background: none; text-decoration: underline; text-underline-offset: 6px; }
.cat-strip .chip.is-active, .cat-strip .chip[aria-current="page"] {
  color: var(--accent); background: none;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
}

/* Chips (post tags, tag cloud) */
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: transparent; border: 1px solid var(--ink);
}
.chip:hover { color: var(--paper); background: var(--ink); }
.chip.is-active, .chip[aria-current="page"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.chip-n { font-variant-numeric: tabular-nums; opacity: .75; letter-spacing: 0; }

/* 6. Homepage hero (latest post) ------------------------------------------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; gap: 44px;
  padding: 44px 0 52px; border-bottom: 1px solid var(--ink);
}
.hero-media { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hero-media .media { flex: 1; min-height: 320px; }
.hero-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hero-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.hero-cat {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.hero-cat:hover { color: var(--accent); }
.hero-t { font-family: var(--f-display); font-weight: 600; font-size: clamp(38px, 4.6vw, var(--h1)); line-height: 1.02; letter-spacing: -.015em; }
.hero-t a { text-decoration: none; }
.hero-ko { font-family: var(--f-ko); font-weight: 500; font-size: 20px; color: var(--muted); }
.hero-blurb { font-size: 18px; line-height: 1.65; color: var(--body); }
.stat-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 6px 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.stat-list li { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 14px 14px 0; }
.stat-list li + li { padding-left: 14px; border-left: 1px solid var(--rule); }
.stat-list li > span:first-child { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat-list .val { font-family: var(--f-display); font-size: 21px; font-weight: 600; line-height: 1.2; font-variant-numeric: lining-nums; overflow-wrap: anywhere; }
.hero-cta { align-self: flex-start; margin-top: 4px; }

/* 7. Media boxes (hero, cards, post lead) ---------------------------------- */
.media, .card-img, .post-lead {
  position: relative; display: grid; place-items: center; overflow: hidden;
  color: var(--img-ink); background: var(--img);
}
.media { aspect-ratio: 4 / 3; }
.media img, .card-img img, .post-lead img { width: 100%; height: 100%; object-fit: cover; }
/* YouTube's hqdefault thumbnails are 4:3 with the 16:9 picture letterboxed: zoom past the bars */
.media img[src*="img.youtube.com/"], .card-img img[src*="img.youtube.com/"] { transform: scale(1.34); }
.media .ico { width: 120px; height: 120px; stroke-width: 1; }
.badge {
  position: absolute; top: 0; z-index: 1; padding: 7px 12px; line-height: 1.2;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.badge-cat { left: 0; max-width: calc(100% - 96px); color: var(--on-accent); background: var(--accent); overflow-wrap: anywhere; }
.badge-n {
  right: 0; color: var(--badge-fg); background: var(--badge-bg);
  font-family: var(--f-display); font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; padding: 4px 12px;
}
.caption, .post-lead-caption {
  font-family: var(--f-display); font-style: italic; font-size: 15px; text-align: center; color: var(--muted);
}

/* 8. Buttons + links ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 36px;
  font-family: var(--f-body); font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; background: transparent; border: 1.5px solid var(--ink); cursor: pointer;
}
.btn:hover { color: var(--paper); background: var(--ink); }
.btn-primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.link, .cta-link {
  font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.link:hover, .cta-link:hover { color: var(--accent); }
.cta-link { font-size: 15px; letter-spacing: .04em; }

/* 9. Section heads + card grid --------------------------------------------- */
.section { padding-top: 40px; padding-bottom: 8px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.sec-head h2 { font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: var(--h2); line-height: 1.1; }
.sec-head a { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.sec-head a:hover { color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 36px; }
.card {
  display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-top: 16px;
  color: var(--ink); text-decoration: none; border-top: 1px solid var(--ink);
}
.card-img { aspect-ratio: 4 / 3; }
.card-img .ico { width: 84px; height: 84px; stroke-width: 1.1; }
.card .badge-n { font-size: 15px; padding: 4px 11px; }
.card .badge-cat { font-size: 10.5px; padding: 6px 10px; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.card-t { font-family: var(--f-display); font-weight: 600; font-size: var(--ct); line-height: 1.12; }
.card-blurb { font-size: 15px; line-height: 1.6; color: var(--body); }
.card-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: auto; padding-top: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.card-cta { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.card:hover .card-t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.card:hover .card-cta { color: var(--accent); }
.more { display: flex; justify-content: center; padding: 52px 0 24px; }
.empty-note { grid-column: 1 / -1; padding: 24px 0; font-family: var(--f-display); font-style: italic; font-size: 20px; color: var(--muted); }

/* 10. Dark band: sections list + footer ------------------------------------ */
.band { margin-top: 64px; color: var(--band-ink); background: var(--band); }
.band-in { padding-top: 48px; padding-bottom: 52px; }
.band h2 { margin-bottom: 26px; font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 34px; }
.band-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 28px; margin: 0; padding: 0; list-style: none; }
.band-list a {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-height: 44px; padding: 14px 0;
  color: var(--band-ink); text-decoration: none; border-top: 1px solid var(--band-rule);
}
.band-list .n { font-family: var(--f-display); font-size: 15px; color: var(--band-muted); }
.band-list .t { font-family: var(--f-display); font-size: 21px; font-weight: 600; }
.band-list .ko { font-size: 13px; color: var(--band-muted); }
.band-list a:hover .t { text-decoration: underline; text-underline-offset: 5px; }

.foot { margin-top: 64px; color: var(--band-ink); background: var(--band); }
.band + .foot { margin-top: 0; border-top: 1px solid var(--band-rule); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 28px; padding-bottom: 28px; }
.foot-logo { font-family: var(--f-display); font-weight: 700; font-size: 26px; text-decoration: none; color: var(--band-ink); }
.foot-logo i { font-style: italic; color: var(--band-accent); }
.foot-tag { font-size: 14px; color: var(--band-muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.foot-links a, .foot .link-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--band-ink); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.foot-links a:hover, .foot .link-btn:hover { text-decoration: underline; text-underline-offset: 5px; }
.foot-fine { padding-bottom: 28px; font-size: 13px; color: var(--band-muted); }

/* 11. Page heads (category, tags, search, about, hubs…) -------------------- */
.page-head { padding: 40px 0 8px; }
.page-head h1 { max-width: 22ch; font-family: var(--f-display); font-weight: 600; font-size: calc(var(--h1) * .85); line-height: 1.04; }
.page-head .ko-sub { margin-top: 8px; font-family: var(--f-ko); font-size: 20px; color: var(--muted); }
.page-head p.lede { max-width: 62ch; margin-top: 14px; font-size: 18px; color: var(--body); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* 12. Post page ------------------------------------------------------------ */
.post { padding-top: 32px; padding-bottom: 24px; }
.post-head { max-width: 900px; }
.post-h1 { max-width: 20ch; margin: 10px 0 10px; font-family: var(--f-display); font-weight: 600; font-size: clamp(38px, 5vw, var(--h1)); line-height: 1.03; letter-spacing: -.015em; }
.post-ko { margin-bottom: 14px; font-family: var(--f-ko); font-weight: 500; font-size: 20px; color: var(--muted); }
.post-blurb { max-width: 62ch; font-size: 19px; line-height: 1.6; color: var(--body); }
.post-asof { margin-top: 12px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.post-lead-fig { margin: 28px 0 36px; }
.post-lead { aspect-ratio: 21 / 9; }
.post-lead .ico { width: 150px; height: 150px; stroke-width: .9; }
.post-lead-caption { margin-top: 10px; }

/* Data table (table.js) */
.dt { margin: 0; }
.dt-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; margin-bottom: 16px; }
.dt-tools .search { flex: 0 1 340px; min-width: 240px; }
.dt-filter-toggle { display: none; }
.dt-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.dt-field { display: flex; flex-direction: column; gap: 4px; }
.dt-field .label { font-size: 11px; }
.dt-field select {
  height: 44px; min-width: 160px; padding: 0 36px 0 12px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--ink); border-radius: 0; appearance: none; -webkit-appearance: none; cursor: pointer;
}
.dt-field select:focus-visible { border-color: var(--focus); }
.dt-clear { min-height: 44px; padding: 0 18px; letter-spacing: .14em; }
.dt-count { margin-left: auto; align-self: center; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dt-scroll { overflow-x: auto; background: var(--surface); border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }
.dt-table { width: 100%; min-width: 720px; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
.dt-table caption { text-align: left; }
.dt-table th {
  padding: 12px 16px; text-align: left; white-space: nowrap; vertical-align: bottom;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--ink);
}
.dt-table td { padding: 12px 16px; vertical-align: middle; border-bottom: 1px solid var(--rule); }
.dt-table tbody tr:last-child td { border-bottom: 0; }
.dt-table tbody tr:hover { background: var(--surface-2); }
.dt-table .r, .dt-table th.r { text-align: right; }
.dt-table td.num { white-space: nowrap; }
.dt-table td.rank { font-family: var(--f-display); font-size: 20px; font-weight: 700; }
.dt-table td.name { min-width: 180px; font-weight: 600; }
.dt-table td.name .ko { display: block; font-weight: 500; font-size: 13px; color: var(--muted); }
.dt-table td.name a { text-decoration: none; }
.dt-table td.name a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.dt-sort {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0; margin: 0;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
  background: transparent; border: 0; cursor: pointer;
}
.dt-sort:hover { color: var(--ink); }
.dt-sort .arr { font-size: 12px; opacity: .6; }
th[aria-sort="ascending"] .dt-sort, th[aria-sort="descending"] .dt-sort { color: var(--accent); }
th[aria-sort="ascending"] .dt-sort .arr, th[aria-sort="descending"] .dt-sort .arr { opacity: 1; }
.dt-empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.table-note { max-width: 80ch; margin-top: 12px; font-size: 14px; color: var(--muted); }

/* Narrative */
.narrative { margin-top: 64px; }
.narrative > h2, .sources h2, .appears h2, .facts h2 {
  margin-bottom: 22px; font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: var(--h2);
}
.entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 44px; padding: 32px 0; border-top: 1px solid var(--ink); }
.entry-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; }
.entry-rank { font-family: var(--f-display); font-size: 34px; font-weight: 700; line-height: 1; color: var(--accent); }
.entry h3 { font-family: var(--f-display); font-weight: 600; font-size: calc(var(--h2) * .82); line-height: 1.1; }
.entry h3 .ko { margin-left: 8px; font-size: .55em; font-weight: 500; color: var(--muted); }
.entry-val { margin-left: auto; font-family: var(--f-display); font-size: 22px; font-weight: 600; }
.entry-body { max-width: 62ch; color: var(--body); }
.entry-body p + p { margin-top: 12px; }
.entry-body:last-child { grid-column: 1 / -1; max-width: 72ch; }
.prose-sec { padding: 28px 0; border-top: 1px solid var(--ink); }
.prose-sec h3 { margin-bottom: 12px; font-family: var(--f-display); font-size: 28px; }
.prose-sec p + p, .prose-sec .entry-body + .entry-body { margin-top: 12px; }
.prose-sec .embed { max-width: 860px; margin-top: 20px; }
.fn a { padding: 0 2px; font-size: .8em; font-weight: 700; color: var(--accent); text-decoration: none; vertical-align: super; line-height: 0; }
.embed { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--img); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-facade { position: absolute; inset: 0; display: block; width: 100%; padding: 0; border: 0; background: var(--img); cursor: pointer; }
.embed-facade img { width: 100%; height: 100%; object-fit: cover; }
.play-btn {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(18, 18, 18, .55); border: 1.5px solid #F7F6F2; transition: background-color .2s;
}
.play-btn svg { width: 30px; height: 30px; margin-left: 4px; fill: #F7F6F2; }
.embed-facade:hover .play-btn, .embed-facade:focus-visible .play-btn { background: var(--accent); border-color: var(--accent); }
.entry-img { overflow: hidden; }
.entry-img img { width: 100%; }

/* "Latest" headlines (data/news.json via sync-cards.py; main.js hides expired items) */
.latest { padding-top: 34px; }
.latest .sec-head { margin-bottom: 8px; }
.latest-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.latest-item { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule); }
.latest-date { padding-top: 3px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: var(--accent); }
.latest-text { margin: 0; color: var(--body); }
.latest-src { font-size: 13px; color: var(--muted); }
.latest-links { margin: 6px 0 0; font-size: 14px; }
.latest-links .link { display: inline; }
.latest-links .link + .link { margin-left: 14px; }
.latest-box { max-width: 72ch; margin: 22px 0 0; padding: 10px 0 0; border-top: 3px solid var(--ink); }
.latest-box .latest-list { grid-template-columns: minmax(0, 1fr); }
.latest-box .latest-item:first-of-type { border-top: 0; }
.latest-box .label { display: block; margin-bottom: 2px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 44px 0; }
.sources { padding-top: 28px; border-top: 1px solid var(--ink); }
.sources ol { display: grid; gap: 8px; margin: 0; padding-left: 22px; font-size: 14px; color: var(--muted); }
.sources a { color: var(--ink); overflow-wrap: anywhere; }
.sources li:target { color: var(--ink); background: var(--surface-2); }

/* 13. Profile hubs --------------------------------------------------------- */
.profile-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 36px 48px; align-items: start; padding: 36px 0 12px; }
.profile-type { color: var(--accent); }
.profile-name { margin-top: 10px; font-family: var(--f-display); font-weight: 600; font-size: clamp(42px, 6vw, 76px); line-height: 1; letter-spacing: -.02em; }
.profile-name .ko { display: block; margin-top: 10px; font-size: 24px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.profile-intro { max-width: 66ch; margin-top: 22px; font-size: 18px; line-height: 1.7; color: var(--body); }
.profile-intro p + p { margin-top: 14px; }
.facts { margin-top: 48px; }
.facts-table { width: 100%; max-width: 760px; border-collapse: collapse; border-top: 3px solid var(--ink); }
.facts-table th, .facts-table td { padding: 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.facts-table th { width: 34%; padding-right: 20px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts-table td { font-weight: 500; }
.appears { margin-top: 56px; }
.appears-list { margin: 0; padding: 0; list-style: none; border-top: 3px solid var(--ink); }
.appears-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.appears-list .pos { min-width: 3.2em; font-family: var(--f-display); font-size: 22px; font-weight: 700; color: var(--accent); }
.appears-list a { flex: 1 1 320px; font-family: var(--f-display); font-size: 21px; font-weight: 600; text-decoration: none; }
.appears-list a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.appears-list .meta { font-size: 13px; color: var(--muted); }
.related { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.type-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 8px; }
.type-filter button.chip { cursor: pointer; font-family: var(--f-body); }
.az { columns: 3 260px; column-gap: 40px; margin: 24px 0 0; padding: 0; list-style: none; }
.az li { break-inside: avoid; padding: 10px 0; border-top: 1px solid var(--rule); }
.az a { font-family: var(--f-display); font-size: 20px; font-weight: 600; text-decoration: none; }
.az a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.az .meta { display: block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.az-letter { break-after: avoid; padding-top: 18px; font-family: var(--f-display); font-style: italic; font-size: 30px; color: var(--accent); border: 0 !important; }

/* 14. Glossary, calendar, category tiles, search, prose, 404 --------------- */
.glossary { margin: 24px 0 0; max-width: 820px; }
.glossary dt { padding-top: 22px; border-top: 1px solid var(--ink); font-family: var(--f-display); font-size: 26px; font-weight: 600; }
.glossary dt .ko { margin-left: 10px; font-size: 16px; font-weight: 500; color: var(--muted); }
.glossary dt .rom { margin-left: 8px; font-family: var(--f-body); font-size: 13px; font-style: italic; color: var(--muted); }
.glossary dd { margin: 8px 0 22px; color: var(--body); }
.glossary dd + dd { margin-top: -12px; }
.az-jump { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 18px; }
.az-jump a { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; font-family: var(--f-display); font-size: 18px; font-weight: 600; text-decoration: none; border: 1px solid var(--rule); }
.az-jump a:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.cal-updated { margin-top: 10px; font-size: 13px; color: var(--muted); }
.cal-final { display: inline-block; margin-left: 8px; padding: 2px 8px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); }

.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 36px; padding: 24px 0 8px; }
.cat-tile { display: flex; flex-direction: column; gap: 8px; padding: 22px 0 26px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--ink); }
.cat-tile .ico { width: 36px; height: 36px; color: var(--accent); stroke-width: 1.3; }
.cat-tile h2 { font-family: var(--f-display); font-size: var(--ct); line-height: 1.15; }
.cat-tile h2 .ko { margin-left: 8px; font-size: 15px; font-weight: 500; color: var(--muted); }
.cat-tile p { font-size: 15px; color: var(--body); }
.cat-tile .chip-n { margin-top: auto; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cat-tile:hover h2 { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 24px 0; }
.results-status { margin: 8px 0 24px; color: var(--muted); }
.search-page-form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.search-page-form .search { flex: 1 1 420px; max-width: 640px; height: 56px; }
.search-page-form .search input { font-size: 19px; }

.prose { max-width: 70ch; padding: 8px 0 24px; color: var(--body); }
.prose h2 { margin: 40px 0 12px; font-family: var(--f-display); font-size: 30px; color: var(--ink); }
.prose h3 { margin: 28px 0 10px; font-size: 18px; color: var(--ink); }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 4px; }

.notfound { padding: 96px 0; text-align: center; }
.notfound .code { font-family: var(--f-display); font-style: italic; font-size: 120px; font-weight: 700; line-height: 1; color: var(--accent); }
.notfound h1 { margin: 16px 0 12px; font-family: var(--f-display); font-size: var(--h2); }
.notfound p { margin-bottom: 28px; color: var(--muted); }
.notfound .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Reserved ad slots (CLAUDE.md §2): fixed heights so ads never shift layout. Unused until ads go live. */
.ad-slot { display: grid; place-items: center; min-height: 280px; margin: 40px 0; background: var(--surface-2); }
.ad-slot.is-leader { min-height: 90px; }
.ad-slot::before { content: "Advertisement"; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* 15. Responsive ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .grid, .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar-tag { display: none; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 28px; }
  .hero-media .media { min-height: 0; }
  .profile-head { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  :root { --h1: 38px; --h2: 28px; --ct: 23px; --bar-h: 56px; }
  .wrap, .wrap-narrow { padding: 0 16px; }

  /* Top bar: mini logo + theme toggle + menu button; util nav and search fold into a panel */
  .topbar-in { flex-wrap: wrap; gap: 8px; }
  .mini-logo { margin-right: auto; }
  .theme-toggle { padding: 0; width: 44px; }
  .theme-toggle .tt-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-toggle { display: inline-flex; width: 44px; }
  .nav-toggle .i-close { display: none; }
  .topbar.is-open .nav-toggle .i-menu { display: none; }
  .topbar.is-open .nav-toggle .i-close { display: block; }
  /* Without JS (no .js class) the panel simply stays open */
  .mast-panel { order: 5; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding-bottom: 10px; }
  .js .mast-panel { display: none; }
  .js .topbar.is-open .mast-panel { display: flex; }
  html:not(.js) .nav-toggle { display: none; }
  .util-nav { flex-direction: column; margin-left: 0; }
  .util-nav a { padding: 0; font-size: 13px; }
  .mast-tools, .mast-tools form { width: 100%; }
  .mast-tools .search { flex: 1; min-width: 0; }

  .masthead { padding-top: 22px; }
  .mast-tag { letter-spacing: .14em; }
  /* Category strip: one horizontally scrolling row; main.js scrolls the active chip into view */
  .cat-strip { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; gap: 0 16px; }
  .cat-strip::-webkit-scrollbar { display: none; }
  .cat-strip .chip { flex: none; white-space: nowrap; }

  .grid, .cat-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .band-list { grid-template-columns: minmax(0, 1fr); }
  .stat-list { grid-template-columns: minmax(0, 1fr); }
  .stat-list li { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; }
  .stat-list li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .stat-list .val { text-align: right; font-size: 19px; }

  /* Table filters collapse behind a "Filters" button */
  .dt-tools .search { flex: 1 1 100%; min-width: 0; }
  .dt-filter-toggle { display: inline-flex; }
  .dt-filters { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; }
  .dt.filters-open .dt-filters { display: flex; }
  .dt-field select { width: 100%; }
  .dt-count { margin-left: 0; }

  .entry { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .entry-val { margin-left: 0; }
  .post-lead { aspect-ratio: 4 / 3; }
  .post-lead img[src*="img.youtube.com/"] { transform: scale(1.34); }
  .latest-list { grid-template-columns: minmax(0, 1fr); }
  .facts-table th { width: 42%; }
  .notfound .code { font-size: 88px; }
}

/* 16. Motion + print ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .cat-strip, .band, .foot, .dt-tools, .more, .consent, .ad-slot { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
}
html:not(.js) .js-only { display: none; }
