/* Newspaper stylesheet: a broadsheet look (serif type, hairline rules, columns). No boxes, no buttons, no emoji. */
:root {
  --ink: #121212;
  --ink-soft: #363636;
  --muted: #727272;
  --rule: #dfdfdf;
  --rule-strong: #121212;
  --paper: #ffffff;
  --page: #ffffff;
  --link: #326891;
  --flag: #a31515;
  --font-serif: "Georgia", "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --font-display: "Georgia", "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e8e8;
    --ink-soft: #cfcfcf;
    --muted: #9a9a9a;
    --rule: #333333;
    --rule-strong: #e8e8e8;
    --paper: #121212;
    --page: #121212;
    --link: #8fbde6;
    --flag: #ff8f8f;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-serif);
  background: var(--page);
  color: var(--ink);
  line-height: 1.75;
  padding: 0 16px 48px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
.paper { max-width: 1560px; margin: 0 auto; }
.muted { color: var(--muted); font-size: 0.85em; }
.empty { padding: 2rem 0; text-align: center; color: var(--muted); }

/* ---------- Masthead ---------- */
.masthead { text-align: center; padding-top: 14px; border-bottom: 4px double var(--rule-strong); margin-bottom: 20px; }
.masthead-bar {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: var(--font-sans); font-size: 0.72rem; letter-spacing: 0.03em; color: var(--muted);
  padding-bottom: 8px; border-bottom: 1px solid var(--rule);
}
.masthead-bar a { color: var(--muted); }
.masthead-title {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 7vw, 4.2rem);
  letter-spacing: 0.08em; line-height: 1.15; margin: 14px 0 4px;
}
.masthead-title a { text-decoration: none; }
.masthead-tagline { font-style: italic; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 12px; }
.masthead-nav {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px;
  font-family: var(--font-sans); font-size: 0.78rem; padding: 8px 0;
  border-top: 1px solid var(--rule-strong);
}
.masthead-nav a { text-decoration: none; color: var(--ink-soft); }
.masthead-nav a:hover { text-decoration: underline; }

/* ---------- Desk note ---------- */
.desk-note { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 12px 0; margin-bottom: 24px; }
.desk-note-label { font-family: var(--font-sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); }
.desk-note p { font-size: 0.98rem; color: var(--ink-soft); }

/* ---------- Front page: lead and rail ---------- */
.front { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr); gap: 0 32px; align-items: start; margin-bottom: 20px; }
.front > .lead { padding-right: 28px; border-right: 1px solid var(--rule); }
.front > .lead:only-child { grid-column: 1 / -1; border-right: 0; padding-right: 0; }

.kicker { font-family: var(--font-sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; color: var(--flag); margin-bottom: 4px; }
.kicker-site { color: var(--muted); font-weight: 400; letter-spacing: 0; }

.lead-headline { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.3; font-weight: 700; margin-bottom: 10px; }
.lead-dek { font-size: 1.15rem; line-height: 1.7; color: var(--ink-soft); margin-bottom: 12px; }
.lead-why { font-size: 0.88rem; color: var(--muted); border-left: 2px solid var(--rule-strong); padding-left: 10px; margin-bottom: 16px; }
.lead-why-label { font-family: var(--font-sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; margin-right: 8px; }
.lead-body .para { font-size: 1.02rem; }
@media (min-width: 1180px) { .lead-body { column-count: 2; column-gap: 32px; column-rule: 1px solid var(--rule); } }

.rail-title, .block-title {
  font-family: var(--font-sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  border-top: 3px solid var(--rule-strong); padding-top: 6px; margin-bottom: 12px;
}
.rail-list { list-style: none; }
.rail-list li { border-bottom: 1px solid var(--rule); }
.rail-list li:last-child { border-bottom: 0; }
.rail-list a { display: flex; gap: 10px; padding: 7px 0; text-decoration: none; line-height: 1.45; font-size: 0.92rem; }
.rail-list a span:last-child { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rail-more { font-family: var(--font-sans); font-size: 0.78rem; color: var(--muted); padding-top: 8px; }
.rail-list a:hover span:last-child { text-decoration: underline; }
.rail-rank { font-family: var(--font-sans); font-size: 0.72rem; font-weight: 700; color: var(--muted); min-width: 1.4em; padding-top: 3px; }

/* ---------- Blocks and columns ---------- */
.block { margin-bottom: 24px; }
.sub-title { font-family: var(--font-sans); font-size: 0.85rem; font-weight: 700; margin: 18px 0 8px; }
.sub-title a { text-decoration: none; }
.sub-title a:hover { text-decoration: underline; }

/* newspaper columns: as many as the width allows, hairline between them, stories never split */
.columns { columns: 300px; column-gap: 32px; column-rule: 1px solid var(--rule); }
.story { padding: 0 0 18px; break-inside: avoid; }
.story-headline { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.4; font-weight: 700; margin: 2px 0 6px; }
.story-compact .story-headline { font-size: 1.08rem; }
.story-dek { font-size: 0.97rem; color: var(--ink-soft); margin-bottom: 8px; }
.story-row { border-left: 0; border-bottom: 1px solid var(--rule); padding: 14px 0; }
.story-row .story-headline a { text-decoration: none; }
.story-row .story-headline a:hover { text-decoration: underline; }

.para { font-size: 0.95rem; line-height: 1.85; margin-bottom: 0.9em; }
.byline-links { font-family: var(--font-sans); font-size: 0.74rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.byline-links a { color: var(--muted); }

/* ---------- Evidence link: a footnote-style mark ---------- */
.src-link {
  font-family: var(--font-sans); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--link); text-decoration: none; white-space: nowrap; margin-left: 2px;
  border-bottom: 1px dotted currentColor; vertical-align: 0.1em;
}
.src-link span { margin-left: 1px; font-size: 0.85em; }
.src-link:hover { border-bottom-style: solid; }

/* ---------- Labels ---------- */
.kind-badge {
  font-family: var(--font-sans); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--flag); border: 1px solid currentColor; padding: 0 5px; margin-right: 5px; vertical-align: 0.1em;
}
.flag-corrected {
  font-family: var(--font-sans); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--flag); margin-left: 8px; vertical-align: 0.2em;
}

/* ---------- Lists ---------- */
.plain-list { list-style: none; }
.plain-list li { padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list a { text-decoration: none; }
.plain-list a:hover { text-decoration: underline; }

.briefs { list-style: none; columns: 3 340px; column-gap: 28px; column-rule: 1px solid var(--rule); }
.briefs li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 0.9rem; line-height: 1.7; }
.brief-site { font-family: var(--font-sans); font-size: 0.7rem; font-weight: 700; color: var(--muted); margin-right: 6px; }
.brief-headline { font-weight: 700; }
.brief-lead { color: var(--ink-soft); }

.correction-detail { margin-top: 4px; font-size: 0.85rem; color: var(--muted); }

/* ---------- Colophon ---------- */
.colophon { border-top: 4px double var(--rule-strong); margin-top: 40px; padding-top: 16px; font-size: 0.82rem; color: var(--muted); }
.colophon-note { max-width: 760px; margin: 0 auto 14px; line-height: 1.7; }
.colophon-note ul { margin: 6px 0 0 1.2em; }
.colophon a { color: var(--link); }
.colophon-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; font-family: var(--font-sans); font-size: 0.76rem; }
.colophon-copy { text-align: center; margin-top: 10px; font-family: var(--font-sans); font-size: 0.72rem; }

/* ---------- Archive, tag and privacy pages ---------- */
.latest-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--font-sans); font-size: 0.82rem; margin-bottom: 16px; }
.latest-links a { color: var(--link); }
.issue-list { display: flex; flex-direction: column; }
.issue { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.issue-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.issue-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.issue-title:hover { text-decoration: underline; }
.issue-lead { font-size: 0.95rem; margin-top: 2px; }
.prose { max-width: 760px; margin: 0 auto; }
.prose ul { margin: 0 0 1em 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--link); }

/* ---------- In-feed ad (AGENTS.md 7.3): quiet, labelled, never an overlay ---------- */
.ad-slot { margin: 24px 0; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); overflow: hidden; font-size: 0.9rem; }
.ad-slot .ad-label { font-family: var(--font-sans); font-size: 0.64rem; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 6px; }

/* ---------- Narrow screens ---------- */
/* ---------- Search (built into the masthead of every page; results open in a panel under it) ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.masthead-search { text-align: left; max-width: 720px; margin: 0 auto 14px; padding: 0 4px; }
.masthead-search input[type="search"] { width: 100%; font: inherit; font-family: var(--font-sans); font-size: 0.95rem; padding: 8px 12px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 0; }
.masthead-search input[type="search"]:focus { outline: 2px solid var(--flag); outline-offset: 1px; }
.search-panel { margin-top: 8px; padding: 4px 14px 12px; background: var(--paper); border: 1px solid var(--rule-strong); border-top: 3px solid var(--ink); }
.search-panel[hidden] { display: none; }
.search-tabs { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--rule-strong); }
.search-tabs button { font: inherit; font-family: var(--font-sans); font-size: 0.85rem; padding: 8px 14px; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.search-tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.search-tabs .n { margin-left: 6px; font-size: 0.75rem; color: var(--muted); font-weight: 400; }
.search-tabs .search-close { margin-left: auto; font-size: 0.78rem; border-bottom-color: transparent; }
.search-status { margin: 8px 0 0; }
.hits { list-style: none; max-height: 70vh; overflow-y: auto; }
.hit { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.hit:last-child { border-bottom: 0; }
.hit h3 { font-family: var(--font-display); font-size: 1.08rem; line-height: 1.4; }
.hit h3 a { text-decoration: none; }
.hit h3 a:hover { text-decoration: underline; }
.hit-meta { font-family: var(--font-sans); font-size: 0.72rem; color: var(--muted); margin: 3px 0; }
.hit-snippet { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.7; }
.masthead-search mark { background: rgba(255, 213, 79, 0.45); color: inherit; padding: 0 1px; }
.search-more { font: inherit; font-family: var(--font-sans); font-size: 0.85rem; padding: 7px 20px; color: var(--ink); background: none; border: 1px solid var(--rule-strong); cursor: pointer; }
.search-more[hidden] { display: none; }

@media (max-width: 760px) {
  .front { grid-template-columns: 1fr; }
  .front > .lead { padding-right: 0; border-right: 0; margin-bottom: 20px; }
  .story { border-bottom: 1px solid var(--rule); margin-bottom: 14px; }
  .briefs { columns: 1; }
}

@media print {
  body { padding: 0; }
  .masthead-nav, .ad-slot { display: none; }
  .src-link { color: #000; }
}
