:root {
  --paper: #f1ecdf;
  --paper-deep: #e7dece;
  --ink: #171713;
  --ink-soft: #57534a;
  --rule: #aaa08f;
  --rule-dark: #27251f;
  --accent: #9d2f20;
  --sans: "DM Sans", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Newsreader", "Songti SC", STSong, "Source Han Serif SC", "Noto Serif CJK SC", "Noto Serif SC", SimSun, serif;
  --page: min(1500px, calc(100vw - 64px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,.36), transparent 30%),
    repeating-linear-gradient(90deg, rgba(55,44,25,.018) 0 1px, transparent 1px 4px),
    var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

a { color: inherit; transition: color 180ms ease, opacity 180ms ease, transform 180ms ease; }
button, select { font: inherit; }
.page-shell { width: var(--page); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 8px 12px; background: var(--ink); color: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.utility-bar {
  min-height: 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--rule-dark);
  font: 600 12px/1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.utility-bar p { margin: 0; }
.utility-link { min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; }
.utility-link:last-child { justify-self: end; }
.utility-link:hover { color: var(--accent); }
.utility-link:active { transform: translateY(1px); }

.masthead { padding: 28px 0 23px; text-align: center; }
.masthead-kicker, .masthead-note { margin: 0; font: 500 12px/1.25 var(--sans); letter-spacing: .22em; }
.masthead-title { display: block; width: fit-content; margin: 20px auto 5px; text-decoration: none; font: 750 clamp(62px, 8vw, 112px)/.82 var(--serif); letter-spacing: -.065em; }
.masthead-title span { color: var(--accent); font-style: italic; }
.masthead-note { letter-spacing: .14em; color: var(--ink-soft); }

.edition-bar { border-block: 4px double var(--rule-dark); }
.edition-inner { min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 24px; font: 600 12px/1 var(--sans); letter-spacing: .08em; }
.edition-inner { font-variant-numeric: tabular-nums; }
.edition-date { display: flex; align-items: center; gap: 9px; }
.edition-status { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.date-picker { position: relative; display: flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.date-picker::after { content: ""; position: absolute; right: 5px; width: 6px; height: 6px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: translateY(-2px) rotate(45deg); pointer-events: none; }
.date-picker select { min-height: 40px; max-width: 180px; appearance: none; border: 0; border-bottom: 1px solid var(--ink); padding: 7px 29px 7px 5px; background: transparent; color: var(--ink); cursor: pointer; transition: color 180ms ease, border-color 180ms ease, opacity 180ms ease; }
.date-picker select:hover { color: var(--accent); border-color: var(--accent); }
.date-picker select:active { transform: translateY(1px); }
.date-picker select:disabled { cursor: wait; opacity: .45; }

.paper-main { padding-block: clamp(30px, 4vw, 64px) 36px; }
.lead-layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(240px, .8fr); gap: clamp(32px, 5vw, 78px); padding-bottom: 42px; border-bottom: 1px solid var(--rule-dark); }
.lead-story { padding-right: clamp(0px, 2vw, 32px); border-right: 1px solid var(--rule); }
.eyebrow, .story-index { margin: 0; color: var(--accent); font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.lead-story h1 { max-width: 1050px; margin: 10px 0 18px; font-size: clamp(42px, 5.45vw, 80px); font-weight: 650; line-height: 1; letter-spacing: -.042em; text-wrap: balance; }
.lead-story h1.long-title { font-size: clamp(40px, 4.65vw, 70px); }
.lead-story h1.extra-long-title { font-size: clamp(38px, 4.1vw, 62px); line-height: 1.03; }
.tech-term { display: inline-block; max-width: 100%; white-space: nowrap; font-size: .82em; letter-spacing: -.025em; }
.lead-story .dek { max-width: 860px; margin: 0 0 22px; color: #312f29; font-size: clamp(18px, 1.55vw, 23px); line-height: 1.65; }
.source-line { margin: 0; color: var(--ink-soft); font: 500 12px/1.55 var(--sans); }
.source-line a { text-decoration-color: var(--rule); text-underline-offset: 3px; }
.source-line a:hover { color: var(--accent); }
.lead-aside { display: flex; flex-direction: column; }
.lead-aside h2 { margin: 0 0 14px; padding-bottom: 9px; border-bottom: 3px solid var(--ink); font: 650 27px/1.05 var(--serif); }
.aside-item { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: 9px; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.aside-mark { width: 11px; height: 2px; margin-top: .68em; background: var(--accent); }
.aside-copy { min-width: 0; }
.aside-section { display: block; margin-bottom: 5px; color: var(--accent); font: 600 10px/1 var(--sans); letter-spacing: .1em; }
.aside-item a { display: block; text-decoration: none; font-size: 18px; font-weight: 650; line-height: 1.28; }
.aside-item a:hover { color: var(--accent); }

.section-navigation { display: flex; justify-content: center; gap: 6px 22px; overflow-x: auto; padding: 15px 0; border-bottom: 1px solid var(--rule); scrollbar-width: none; font: 600 13px/1.2 var(--sans); letter-spacing: .08em; white-space: nowrap; }
.section-navigation::-webkit-scrollbar { display: none; }
.section-navigation a { position: relative; text-decoration: none; }
.section-navigation a + a::before { content: "◆"; position: absolute; left: -15px; top: 50%; color: var(--rule); font-size: 5px; transform: translateY(-50%); }
.section-navigation a:hover { color: var(--accent); }
.section-navigation a:active { transform: translateY(1px); }
.section-navigation a[aria-current="true"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

.news-section { padding: 42px 0 34px; border-bottom: 1px solid var(--rule-dark); scroll-margin-top: 16px; }
.section-heading { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; margin-bottom: 25px; padding: 0 0 12px; border-bottom: 2px solid var(--ink); }
.section-title-block { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.section-marker { display: grid; grid-template-columns: repeat(4, 6px); gap: 5px; height: 6px; }
.section-marker span { width: 6px; height: 6px; border: 1px solid var(--rule); border-radius: 50%; }
.section-marker span.is-active { border-color: var(--accent); background: var(--accent); }
.section-heading h2 { margin: 0; font-size: clamp(30px, 2.85vw, 43px); font-weight: 620; line-height: 1; letter-spacing: -.025em; }
.section-heading > p:last-child { margin: 0 0 4px; color: var(--ink-soft); font: 500 12px/1 var(--sans); letter-spacing: .06em; }
.stories-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 26px; }
.story { grid-column: span 3; padding-right: 26px; border-right: 1px solid var(--rule); }
.story:last-child { padding-right: 0; border-right: 0; }
.stories-count-1 .story { grid-column: span 7; max-width: 65ch; border-right: 0; }
.stories-count-2 .story { grid-column: span 6; }
.stories-count-3 .story { grid-column: span 4; }
.stories-count-4 .story { grid-column: span 3; }
.story h3 { margin: 7px 0 11px; font-size: clamp(21px, 1.65vw, 25px); font-weight: 600; line-height: 1.18; letter-spacing: -.015em; text-wrap: pretty; }
.story { scroll-margin-top: 28px; }
.story p { margin: 0 0 12px; }
.story .story-body { color: #37342e; }

.brief-section { padding: 42px 0; border-bottom: 4px double var(--rule-dark); }
.brief-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 30px; }
.brief { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 16px 0; border-top: 1px solid var(--rule); }
.brief-number { color: var(--accent); font: 650 12px/1.4 var(--sans); }
.brief h3 { margin: 0 0 7px; font-size: 19px; font-weight: 600; line-height: 1.25; }
.brief p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.brief .source-line { margin-top: 8px; font-size: 11px; }

.edition-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; border-bottom: 4px double var(--rule-dark); }
.edition-footer a { min-width: 0; min-height: 86px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 15px 20px; text-decoration: none; }
.edition-footer span { color: var(--ink-soft); font: 500 10px/1 var(--sans); letter-spacing: .12em; }
.edition-footer strong { overflow: hidden; font: 600 17px/1.15 var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.edition-jump--older { border-right: 1px solid var(--rule); }
.edition-jump--newer { align-items: flex-end; border-left: 1px solid var(--rule); text-align: right; }
.edition-archive { align-items: center; min-width: 180px; text-align: center; }
.edition-footer a:hover { color: var(--accent); }
.edition-footer a:active { transform: translateY(1px); }
.edition-footer a.is-disabled { color: var(--rule); cursor: default; }
.edition-footer a.is-disabled span { color: var(--rule); }
.edition-footer a.is-disabled:active { transform: none; }

.loading-state { min-height: 54vh; padding-top: 8vh; }
.skeleton { background: linear-gradient(90deg, rgba(80,69,49,.08), rgba(255,255,255,.38), rgba(80,69,49,.08)); background-size: 200% 100%; animation: shimmer 1.6s infinite; }
.skeleton-label { width: 110px; height: 11px; }
.skeleton-title { width: 80%; height: clamp(46px, 6vw, 82px); margin-top: 18px; }
.skeleton-title.short { width: 55%; margin-top: 8px; }
.skeleton-copy { width: 65%; height: 90px; margin-top: 30px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.error-state { max-width: 650px; min-height: 45vh; padding-top: 8vh; }
.error-state h1 { margin: 8px 0; font-size: 48px; line-height: 1; }
.error-state button { border: 1px solid var(--ink); padding: 9px 14px; background: transparent; cursor: pointer; }
.error-state button:hover { background: var(--ink); color: var(--paper); }
.error-state button:active { transform: translateY(1px); }
.edition-enter { animation: edition-enter 360ms cubic-bezier(.2,.75,.25,1) both; }
@keyframes edition-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  :root { --page: min(100% - 42px, 980px); }
  .lead-layout { grid-template-columns: minmax(0, 1.65fr) minmax(220px, .75fr); }
  .stories-grid .story { grid-column: span 6; padding: 0 24px 26px 0; margin-bottom: 26px; border-bottom: 1px solid var(--rule); }
  .stories-grid.stories-count-1 .story { grid-column: span 12; max-width: 65ch; }
  .story:nth-child(even) { padding-right: 0; border-right: 0; }
  .brief-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  :root { --page: calc(100% - 32px); }
  body { font-size: 16px; line-height: 1.66; }
  .utility-bar { min-height: 44px; }
  .utility-link { min-height: 44px; font-size: 11px; }
  .masthead { padding: 22px 0 18px; }
  .masthead-kicker { font-size: 10px; letter-spacing: .14em; }
  .masthead-title { font-size: clamp(58px, 20vw, 82px); margin-top: 10px; }
  .masthead-note { display: none; }
  .edition-inner { min-height: 52px; gap: 8px; }
  .edition-date { letter-spacing: .01em; font-size: 12px; }
  .date-picker > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .date-picker select { width: 130px; min-height: 44px; font-size: 12px; }
  .paper-main { padding-top: 28px; }
  .lead-layout { display: block; padding-bottom: 27px; }
  .lead-story { padding-right: 0; border-right: 0; }
  .lead-story h1 { margin-top: 8px; font-size: clamp(38px, 11.4vw, 52px); line-height: 1.02; }
  .lead-story h1.long-title { font-size: clamp(36px, 9.8vw, 46px); }
  .lead-story h1.extra-long-title { font-size: clamp(33px, 8.8vw, 41px); line-height: 1.06; }
  .lead-story .dek { font-size: 17px; line-height: 1.66; }
  .lead-aside { margin-top: 30px; }
  .lead-aside h2 { font-size: 24px; }
  .aside-item:nth-child(n + 5) { display: none; }
  .section-navigation { justify-content: flex-start; margin-inline: -16px; padding-inline: 16px; font-size: 12px; }
  .news-section { padding: 31px 0 22px; }
  .section-heading { grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 21px; padding-bottom: 10px; }
  .section-heading > p:last-child { display: none; }
  .section-heading h2 { font-size: 32px; }
  .section-title-block { gap: 8px; }
  .stories-grid { display: block; }
  .story { padding: 0 0 25px; margin: 0 0 25px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .story:last-child { margin-bottom: 0; border-bottom: 0; }
  .story h3 { font-size: 24px; line-height: 1.18; }
  .brief-section { padding: 31px 0; }
  .brief-grid { display: block; }
  .brief { grid-template-columns: 29px 1fr; }
  .brief .source-line { font-size: 12px; }
  .edition-footer { grid-template-columns: 1fr 1fr; }
  .edition-footer a { min-height: 76px; padding: 13px 11px; }
  .edition-footer strong { font-size: 15px; }
  .edition-archive { grid-column: 1 / -1; grid-row: 2; min-width: 0; min-height: 58px !important; border-top: 1px solid var(--rule); }
  .edition-jump--older { border-right: 1px solid var(--rule); }
  .edition-jump--newer { border-left: 0; }
}

@media (horizontal-viewport-segments: 2) {
  .lead-layout { column-gap: env(viewport-segment-width 0 0); }
  .lead-story { padding-right: 24px; }
  .lead-aside { padding-left: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skeleton { animation: none; }
  .edition-enter { animation: none; }
  a, select { transition: none; }
}
