:root {
  color-scheme: light;
  --bg: #f8f7f3;
  --surface: #efefeb;
  --ink: #292c31;
  --muted: #626872;
  --line: #d9dbde;
  --accent: #335e78;
  --focus: #3b7192;
  --body-size: 18px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c1e22;
  --surface: #25282e;
  --ink: #d4d6dc;
  --muted: #a6abb4;
  --line: #3b3f47;
  --accent: #aac3d6;
  --focus: #a6c8df;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1c1e22;
    --surface: #25282e;
    --ink: #d4d6dc;
    --muted: #a6abb4;
    --line: #3b3f47;
    --accent: #aac3d6;
    --focus: #a6c8df;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--body-size)/1.85 system-ui, -apple-system, "PingFang SC", "Noto Sans CJK SC", sans-serif; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 4px 9px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.masthead, main { width: min(1540px, calc(100% - 64px)); margin-inline: auto; }
.masthead { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.wordmark { font-family: Georgia, "Times New Roman", serif; font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.035em; }
.site-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.site-nav button { line-height: 1.5; }
.date-bar { display: flex; align-items: baseline; gap: 14px; margin: 24px 0; }
.date-bar h1 { margin: 0; font-size: 18px; font-weight: 500; }
.date-bar > span { color: var(--muted); font-size: 13px; }
.reading-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 56px; }
.contents { min-width: 0; position: sticky; top: 24px; font-size: 14px; }
.contents details { max-height: calc(100dvh - 48px); overflow-y: auto; scrollbar-width: thin; padding-right: 12px; }
.contents summary { cursor: pointer; font-size: 15px; font-weight: 650; padding-bottom: 12px; }
.contents nav { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.contents a { display: block; padding: 4px 10px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; border-left: 2px solid transparent; margin-left: -1px; }
.contents a[aria-current="location"] { color: var(--ink); border-left-color: var(--accent); }
.toc-list, .toc-list ul { list-style: none; margin: 0; padding: 0; }
.toc-list ul { padding-left: 10px; }
.toc-list > li + li { margin-top: 12px; }
.contents .toc-edition { color: var(--ink); font-weight: 600; }
.contents .toc-section { margin-top: 7px; }
.contents .toc-article { font-size: 13px; }
.news-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; min-width: 0; }
.news-column, .reader-content, .story { min-width: 0; }
.column-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 22px; border-bottom: 2px solid var(--line); }
.column-heading h2 { font-size: 25px; margin: 0; line-height: 1.5; }
.history-link { font-size: 14px; color: var(--muted); }
.section-title { font-size: 16px; font-weight: 600; color: var(--muted); margin: 28px 0 16px; }
.news-section:first-of-type > .section-title { margin-top: 0; }
.story { margin-bottom: 28px; padding-bottom: 26px; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.story-title { font-size: 23px; line-height: 1.6; font-weight: 650; margin: 0 0 8px; overflow-wrap: anywhere; text-wrap: pretty; }
.story-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.news-body p { margin: 0 0 14px; overflow-wrap: anywhere; }
.news-body p:last-child { margin-bottom: 0; }
.story-sources { font-size: 14px; margin: 16px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.story-sources a { color: var(--accent); }
.story-image { margin: 18px 0; }
.story-image img { display: block; max-width: 100%; height: auto; border-radius: 3px; }
.story-image figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.story-image a { color: var(--accent); }
.empty-state { color: var(--muted); margin: 24px 0; font-size: 16px; }
.page-heading { margin: 26px 0 30px; }
.page-heading h1 { font-size: clamp(25px, 3vw, 32px); line-height: 1.55; font-weight: 650; margin: 10px 0; }
.back { color: var(--muted); font-size: 14px; }
.document-tools { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; font-size: 14px; color: var(--muted); }
.document-tools a { color: var(--accent); }
.single-layout { grid-template-columns: 220px minmax(0, 760px); }
.single-layout .section-title { font-size: 18px; }
.single-layout .story-title { font-size: 25px; }
.archive-page { max-width: 980px; margin-inline: auto; padding-bottom: 48px; }
.archive-filters { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 22px; font-size: 15px; }
.archive-filters a { color: var(--muted); }
.archive-filters a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 7px; }
.search input { width: min(100%, 440px); padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--ink); font-size: 16px; margin-bottom: 25px; }
.archive-entry { display: grid; grid-template-columns: 110px minmax(0, 1fr) 36px; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); align-items: baseline; }
.archive-entry time, .download { color: var(--muted); font-size: 14px; }
.archive-entry h2 { margin: 0; font-size: 19px; line-height: 1.65; }
.prose { overflow-wrap: anywhere; }
.prose a { color: var(--accent); }
.prose img, .prose video { max-width: 100%; height: auto; }
.prose pre, .prose table { display: block; max-width: 100%; overflow-x: auto; }
.prose pre { padding: 14px; background: var(--surface); }
.prose h1, .prose h2, .prose h3 { line-height: 1.6; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 12px; padding: 8px 16px; background: var(--surface); z-index: 10; }
@media (max-width: 1279px) {
  .reading-layout, .single-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .contents { position: sticky; top: 0; z-index: 3; background: var(--bg); border-block: 1px solid var(--line); }
  .contents details { max-height: 55dvh; padding: 0; }
  .contents summary { padding: 9px 0; }
  .contents nav { margin: 0 0 14px 1px; }
  .single-layout .reader-content { width: 100%; max-width: 760px; margin-inline: auto; }
  html { scroll-padding-top: 70px; }
}
@media (max-width: 999px) {
  .news-columns { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .home-layout { max-width: 760px; margin-inline: auto; }
}
@media (max-width: 600px) {
  .masthead, main { width: calc(100% - 32px); }
  .masthead { min-height: 64px; gap: 12px; }
  .wordmark { font-size: 25px; }
  .site-nav { gap: 11px; font-size: 13px; }
  .site-nav button { padding: 4px 6px; }
  .date-bar { margin: 20px 0; }
  .date-bar h1 { font-size: 16px; }
  .date-bar > span { font-size: 12px; }
  .column-heading { margin-bottom: 20px; }
  .column-heading h2 { font-size: 23px; }
  .story-title, .single-layout .story-title { font-size: 22px; }
  .story-meta { font-size: 13px; }
  .document-tools > span { flex-basis: 100%; }
  .page-heading { margin-top: 20px; }
  .archive-entry { grid-template-columns: minmax(0, 1fr) 36px; gap: 6px 12px; }
  .archive-entry time { grid-column: 1 / -1; }
  .archive-entry h2 { font-size: 18px; }
  .search input { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print {
  .masthead, .contents, .document-tools, .skip-link, .history-link { display: none; }
  .reading-layout, .news-columns { display: block; }
  body { background: white; color: black; }
  main { width: 100%; }
  .story { break-inside: avoid; }
}
