:root {
  color-scheme: light;
  --paper: #f5f6f4;
  --surface: #fff;
  --ink: #17201d;
  --muted: #68736d;
  --faint: #a0aaa4;
  --line: #dbe0dc;
  --line-strong: #c4ccc6;
  --orange: #ed5b24;
  --orange-soft: #fff0e8;
  --green: #2b745b;
  --shadow: 0 18px 42px rgba(34, 47, 40, .07);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 320px; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(245,246,244,.93); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.header-inner { width: min(1240px, calc(100% - 48px)); margin: auto; min-height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 18px; font-weight: 800; letter-spacing: .01em; }
.brand img { flex: 0 0 34px; }
.brand em { color: var(--orange); font-style: normal; font-weight: 600; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link { padding: 8px 12px; color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link.is-active { font-weight: 700; }
.nav-link span { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 3px; border-radius: 50%; background: var(--orange-soft); color: var(--orange); font-size: 11px; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 20px; transition: border-color .2s, color .2s, transform .2s; }
.icon-button:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-1px); }

.page-shell { width: min(1240px, calc(100% - 48px)); margin: auto; }
.intro-band { display: flex; justify-content: space-between; align-items: end; gap: 32px; padding: 74px 0 55px; }
.eyebrow { margin: 0 0 13px; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .14em; line-height: 1.4; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 15px; font-size: clamp(34px, 5vw, 64px); line-height: 1.03; letter-spacing: -.045em; }
.intro-copy { max-width: 650px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.edition-stamp { min-width: 145px; padding: 17px 18px; border-top: 2px solid var(--orange); border-bottom: 1px solid var(--line-strong); text-align: right; }
.edition-stamp strong, .edition-stamp span { display: block; }
.edition-stamp strong { font-size: 15px; letter-spacing: .08em; }
.edition-stamp span { margin-top: 7px; color: var(--muted); font-size: 12px; }

.toolbar { display: flex; align-items: center; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.search-box { display: flex; align-items: center; flex: 1; min-width: 200px; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--surface); }
.search-icon { margin-right: 9px; color: var(--orange); font-size: 24px; line-height: 0; transform: rotate(-20deg); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.search-box kbd { padding: 2px 6px; border: 1px solid var(--line); color: var(--faint); font-size: 11px; }
.filter-row { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-button { padding: 8px 11px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.filter-button span { margin-left: 4px; color: var(--faint); font-size: 11px; }
.filter-button:hover, .filter-button.is-selected { color: var(--ink); background: var(--orange-soft); }
.filter-button.is-selected { font-weight: 700; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 72px; padding: 48px 0 90px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 19px; }
.section-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.result-count { color: var(--muted); font-size: 13px; }
.story-list { border-top: 1px solid var(--line-strong); }
.story-card { display: grid; grid-template-columns: 45px minmax(0, 1fr) 86px; gap: 17px; padding: 22px 0 20px; border-bottom: 1px solid var(--line); }
.story-rank { color: var(--orange); font-size: 15px; font-weight: 800; }
.story-card h3 { margin: 0 0 7px; font-size: 20px; line-height: 1.35; letter-spacing: -.02em; }
.story-card h3 button { padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.story-card h3 button:hover { color: var(--orange); }
.story-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; color: var(--muted); font-size: 12px; }
.story-meta .source { color: var(--green); }
.story-summary { max-width: 690px; margin: 0; color: #59635e; font-size: 14px; line-height: 1.75; }
.story-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 13px; }
.story-tag { padding: 3px 7px; background: #eef1ed; color: var(--muted); font-size: 11px; }
.story-actions { display: flex; flex-direction: column; align-items: end; gap: 9px; }
.story-actions button, .story-actions a { color: var(--faint); background: transparent; border: 0; font-size: 12px; text-decoration: none; }
.story-actions button:hover, .story-actions a:hover, .story-actions button.is-saved { color: var(--orange); }
.story-actions .points { color: var(--ink); font-size: 18px; font-weight: 800; }
.empty-state { padding: 66px 0; border-bottom: 1px solid var(--line); text-align: center; }
.empty-mark { color: var(--orange); font-size: 42px; }
.empty-state h3 { margin: 11px 0 7px; }
.empty-state p { margin: 0; color: var(--muted); }

.side-rail { border-left: 1px solid var(--line); padding-left: 27px; }
.rail-block { padding: 0 0 29px; margin-bottom: 29px; border-bottom: 1px solid var(--line); }
.rail-block h2 { margin-bottom: 12px; font-size: 19px; letter-spacing: -.02em; }
.rail-block p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.75; }
.text-link { display: inline-flex; gap: 8px; color: var(--orange); font-size: 13px; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.rail-list a { display: grid; grid-template-columns: 25px 1fr 16px; align-items: center; gap: 8px; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; font-size: 13px; }
.rail-list a:last-child { border-bottom: 1px solid var(--line); }
.rail-list a:hover { color: var(--orange); }
.rail-list a span { color: var(--orange); font-size: 11px; font-weight: 800; }
.rail-list a b { color: var(--faint); font-size: 12px; }
.source-note { padding-bottom: 0; border-bottom: 0; }

.site-footer { display: flex; justify-content: space-between; gap: 22px; width: min(1240px, calc(100% - 48px)); margin: auto; padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer strong { color: var(--ink); }
.site-footer a { color: var(--orange); text-decoration: none; }
.story-dialog { width: min(720px, calc(100% - 32px)); max-height: min(760px, calc(100% - 32px)); padding: 35px 38px 40px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.story-dialog::backdrop { background: rgba(18, 29, 23, .44); }
.dialog-close { position: absolute; top: 14px; right: 14px; }
.dialog-kicker { margin-bottom: 14px; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.story-dialog h2 { max-width: 620px; margin: 0 0 12px; font-size: 31px; line-height: 1.15; letter-spacing: -.04em; }
.dialog-summary { color: var(--muted); font-size: 16px; line-height: 1.85; }
.dialog-detail { margin: 26px 0; padding: 17px; background: var(--orange-soft); color: #704025; font-size: 13px; line-height: 1.75; }
.dialog-links { display: flex; gap: 18px; flex-wrap: wrap; }
.dialog-links a { color: var(--orange); font-size: 13px; font-weight: 700; text-decoration: none; }
.dialog-links a:hover { text-decoration: underline; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 30; padding: 10px 14px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

body.dark { --paper: #121715; --surface: #1a211e; --ink: #eef3ef; --muted: #a4b0a8; --faint: #6f7d75; --line: #2d3932; --line-strong: #415047; --orange-soft: #37251d; --shadow: 0 18px 42px rgba(0, 0, 0, .25); }
body.dark .site-header { background: rgba(18,23,21,.93); }
body.dark .story-summary { color: #b4c0b8; }
body.dark .story-tag { background: #26332d; }
body.dark .dialog-detail { color: #f0c1a4; }

@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; gap: 45px; }
  .side-rail { border-left: 0; border-top: 1px solid var(--line); padding: 38px 0 0; }
  .rail-block { max-width: 640px; }
}
@media (max-width: 640px) {
  .header-inner, .page-shell, .site-footer { width: min(100% - 28px, 1240px); }
  .header-inner { gap: 8px; min-height: 60px; }
  .brand { font-size: 15px; }
  .brand img { width: 29px; height: 29px; }
  .main-nav { gap: 0; }
  .nav-link { padding: 7px 6px; font-size: 12px; }
  .intro-band { align-items: start; flex-direction: column; padding: 49px 0 35px; }
  .edition-stamp { align-self: stretch; text-align: left; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .filter-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .filter-button { flex: 0 0 auto; }
  .content-layout { padding-top: 35px; }
  .story-card { grid-template-columns: 28px minmax(0, 1fr); gap: 11px; }
  .story-actions { grid-column: 2; flex-direction: row; align-items: center; }
  .story-card h3 { font-size: 17px; }
  .story-summary { font-size: 13px; }
  .site-footer { align-items: start; flex-direction: column; }
  .story-dialog { padding: 32px 22px 26px; }
  .story-dialog h2 { font-size: 26px; }
}
