:root {
  --paper: #f7f5ef;
  --ink: #182739;
  --muted: #68737d;
  --line: #deded7;
  --red: #b74738;
  --white: #fffefa;
  --sans: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.7 var(--sans); }
a { color: inherit; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
summary:focus-visible, #stories:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
.wrap { max-width: 1240px; margin: auto; padding-left: 32px; padding-right: 32px; }
.skip { position: fixed; left: 16px; top: -100px; z-index: 10; padding: 10px; background: var(--ink); color: white; }
.skip:focus { top: 12px; }

/* The site name is a small utility header; news gets the page's space. */
.masthead { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { flex-shrink: 0; font: 700 20px/1.4 var(--sans); letter-spacing: 1px; text-decoration: none; }
.edition-date { color: var(--muted); font-size: 11px; text-align: right; }
.category-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--ink); }
.categories { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: thin; }
.categories button { flex-shrink: 0; position: relative; padding: 11px 1px; border: 0; background: none; color: var(--muted); font-size: 13px; white-space: nowrap; }
.categories button:focus-visible { outline-offset: -3px; }
.categories button.selected { color: var(--ink); font-weight: 700; }
.categories button.selected::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--red); }

.demo-banner { display: flex; align-items: baseline; gap: 12px; margin-top: 12px; padding: 7px 12px; border: 1px solid #dec9a8; background: #efe4d2; color: #6e4b2b; font-size: 11px; }
.demo-banner strong { flex-shrink: 0; }
.notice { margin-top: 12px; padding: 9px 12px; border-left: 3px solid var(--red); background: #f2e6e1; font-size: 12px; }
.edition-bar { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding: 12px 0; color: var(--muted); font-size: 11px; }
.edition-bar strong { font-size: 12px; color: var(--ink); }

.filters { margin-bottom: 22px; padding: 12px 16px; border: 1px solid var(--line); background: #fbfaf6; }
.filter-top { display: flex; justify-content: space-between; align-items: center; }
.filter-label { color: var(--muted); font-size: 11px; }
.text-button { min-height: 28px; padding: 2px 0 2px 10px; border: 0; background: none; color: var(--muted); font-size: 11px; }
.regions { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 10px; }
.regions button { min-height: 30px; padding: 3px 7px; border: 1px solid transparent; border-radius: 3px; background: none; color: #56616c; font-size: 12px; }
.regions button:hover { background: #efeee7; }
.regions button.selected { background: var(--ink); color: white; }
.search-row { display: flex; align-items: center; gap: 20px; padding-top: 10px; border-top: 1px solid var(--line); }
.search-box { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; max-width: 520px; height: 36px; padding: 0 10px; border: 1px solid #d8d9d3; background: var(--white); }
.search-box > span { font-size: 23px; line-height: 1; }
.search-box input { min-width: 0; width: 100%; border: 0; background: none; color: var(--ink); font-size: 12px; }
kbd { padding: 0 4px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.archive-label { display: flex; align-items: center; gap: 10px; min-width: 0; margin-left: auto; color: var(--muted); font-size: 11px; }
select { min-width: 0; max-width: 285px; padding: 7px; border: 1px solid #d8d9d3; border-radius: 0; background: var(--white); color: var(--ink); font-size: 11px; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.section-heading h1 { margin: 0; font: 700 20px/1.5 var(--sans); }
.section-heading > span { color: var(--muted); font-size: 11px; }
.active-filters { margin: -3px 0 13px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.active-filters:empty { display: none; }
.stories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
.story-card { min-width: 0; margin-bottom: 19px; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; color: var(--muted); font-size: 11px; }
.category-tag { color: var(--red); font-weight: 600; }
.related { color: var(--muted); }
.story-card h3 { margin: 9px 0 10px; font: 700 21px/1.6 var(--sans); overflow-wrap: anywhere; }
.story-summary { margin-bottom: 13px; color: #4f5f6d; font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.story-body { display: flow-root; }
.story-picture { float: right; width: 140px; max-width: 40%; margin: 2px 0 10px 15px; }
.story-picture-open { display: block; width: 100%; padding: 0; border: 0; border-radius: 3px; background: none; cursor: zoom-in; }
.story-picture img { display: block; width: 100%; height: auto; max-height: 120px; object-fit: contain; background: #eeeee7; border-radius: 3px; }
.story-picture figcaption { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.image-preview-open { overflow: hidden; }
.image-viewer { width: min(1240px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 16px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); }
.image-viewer::backdrop { background: rgb(10 18 28 / 82%); }
.image-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.image-viewer h2 { margin: 0; font: 700 16px/1.5 var(--sans); }
.image-viewer button { min-width: 76px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); color: var(--ink); }
.image-viewer figure { margin: 0; }
.image-viewer img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 230px); margin: auto; object-fit: contain; }
.image-viewer figcaption { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.image-viewer p { margin: 0; color: var(--muted); }
.selection-method { color: #647164; font-size: 10px; }
.story-bottom { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.evidence { display: block; margin-bottom: 5px; color: #647164; }
.source-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 2px; }
.source-link { color: #586875; text-decoration: none; }
.source-link:hover { color: var(--red); text-decoration: underline; }
time { color: var(--muted); font-size: 10px; }

.coverage-panel { margin: 3px 0 30px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.coverage-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.coverage-panel summary::-webkit-details-marker { display: none; }
.coverage-panel summary::after { content: "+"; font-size: 17px; }
.coverage-panel[open] summary::after { content: "−"; }
.coverage-panel p { margin: 12px 0; color: var(--muted); }
.coverage-panel ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; max-height: 500px; padding: 0; list-style: none; overflow: auto; }
.coverage-panel li { min-width: 0; padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.coverage-panel li span { display: block; color: var(--red); font-size: 11px; }
.coverage-panel li small { display: block; color: var(--muted); font-size: 11px; }
.empty { margin-bottom: 20px; padding: 32px 20px; border: 1px dashed #d4d7cf; background: #fbfaf5; text-align: center; }
.empty h2 { margin: 0 0 12px; font: 700 22px/1.6 var(--sans); }
.empty p { max-width: 470px; margin: 0 auto 18px; color: var(--muted); font-size: 13px; }
.empty button { padding: 8px 18px; border: 1px solid var(--ink); background: none; color: var(--ink); font-size: 12px; }
footer.wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 17px; padding-bottom: 20px; border-top: 1px solid var(--ink); }
.footer-brand { font: 700 14px/1.6 var(--sans); }
footer p, footer a { margin: 0; color: var(--muted); font-size: 11px; text-decoration: none; }

@media (max-width: 900px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .categories { gap: 23px; }
  .search-row { gap: 12px; }
  .archive-label { gap: 7px; }
  select { max-width: 240px; }
  .stories { column-gap: 26px; }
  .story-card h3 { font-size: 20px; }
}

@media (max-width: 650px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .masthead { min-height: 46px; gap: 12px; }
  .brand { font-size: 18px; }
  .edition-date { max-width: 190px; font-size: 10px; line-height: 1.5; }
  .categories { gap: 22px; }
  .categories button { padding-top: 10px; padding-bottom: 10px; font-size: 12px; }
  .demo-banner { gap: 8px; margin-top: 10px; padding: 6px 9px; font-size: 10px; }
  .demo-banner strong { align-self: flex-start; }
  .edition-bar { gap: 2px 10px; padding: 10px 0; font-size: 10px; }
  .edition-bar strong { font-size: 11px; }
  .filters { margin-bottom: 18px; padding: 10px 11px; }
  .regions { gap: 3px 2px; margin-top: 4px; }
  .regions button { padding: 3px 4px; font-size: 11px; }
  .search-row { display: block; padding-top: 9px; }
  .search-box { max-width: none; height: 36px; }
  .archive-label { justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 10px; }
  .archive-label select { flex: 1; max-width: 245px; font-size: 10px; }
  .section-heading { margin-bottom: 12px; }
  .section-heading h1 { font-size: 19px; }
  .stories { grid-template-columns: minmax(0, 1fr); }
  .story-card { margin-bottom: 17px; padding-bottom: 18px; }
  .story-card h3 { font-size: 20px; line-height: 1.6; }
  .story-summary { font-size: 13px; line-height: 1.9; }
  .story-picture { width: 100px; margin-left: 12px; }
  .coverage-panel { margin-bottom: 22px; }
  .coverage-panel ul { grid-template-columns: minmax(0, 1fr); }
  .empty { padding: 28px 14px; }
  .empty h2 { font-size: 20px; }
  footer.wrap { flex-wrap: wrap; }
  footer p { flex-basis: 100%; order: 1; }
}

@media (max-width: 350px) {
  .wrap { padding-left: 13px; padding-right: 13px; }
  .brand { font-size: 17px; }
  .edition-date { max-width: 165px; font-size: 9px; }
  .regions button { padding-left: 5px; padding-right: 5px; }
  .archive-label select { max-width: 205px; }
  .story-card h3 { font-size: 19px; }
}
