:root {
  --canvas: #f7f7f8;
  --surface: #ffffff;
  --surface-soft: #f1f1f2;
  --ink: #2f3033;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --green: #2563eb;
  --green-soft: #eef4ff;
  --orange: #d97706;
  --orange-soft: #fff7ed;
  --blue: #4f46e5;
  --red: #dc2626;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

html[data-theme="dark"] {
  --canvas: #212121;
  --surface: #2f2f2f;
  --surface-soft: #3a3a3a;
  --ink: #ececec;
  --muted: #a1a1aa;
  --line: #444444;
  --line-strong: #5a5a5a;
  --green: #8ab4ff;
  --green-soft: #263858;
  --orange: #f0a35c;
  --orange-soft: #49362a;
  --blue: #a5b4fc;
  --red: #ff8f8f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.site-header {
  position: sticky;
  top: 0;
  height: auto;
  z-index: 30;
  padding: 18px clamp(24px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(210px, 240px) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--ink); color: #fff; }
.brand-mark svg { width: 34px; height: 34px; }
.brand > span:last-child { display: grid; gap: 3px; min-width: 0; }
.brand strong { display: block; max-width: 150px; font-size: 14px; line-height: 1.2; letter-spacing: -.02em; white-space: normal; }
.brand small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }

.primary-nav { display: flex; justify-content: flex-start; gap: 2px; margin: 0; min-width: 0; overflow: hidden; }
.primary-nav button { min-height: 34px; min-width: 0; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; display: flex; align-items: center; gap: 7px; cursor: pointer; text-align: left; color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; flex: 0 1 auto; }
.primary-nav button span { width: 18px; color: #9a9e98; font-size: 9px; font-variant-numeric: tabular-nums; }
.primary-nav button:hover { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.primary-nav button.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.primary-nav button.active span { color: #b9cbbb; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 14px; min-width: max-content; font-size: 12px; }
.theme-switch { width: 170px; min-width: 170px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 2px; }
.theme-switch button { min-height: 27px; padding: 0 5px; border: 0; border-radius: 5px; background: transparent; cursor: pointer; color: var(--muted); font-size: 10px; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 24, 20, .08); }
.text-button { padding: 0; border: 0; background: none; display: flex; align-items: center; justify-content: space-between; gap: 6px; cursor: pointer; color: var(--muted); text-align: left; white-space: nowrap; }
.text-button:hover, .source-link:hover { color: var(--green); }
.text-button span { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-soft); display: grid; place-items: center; color: var(--ink); font-size: 10px; }
.source-link { color: var(--muted); text-decoration: none; white-space: nowrap; }

main { min-width: 0; }
.freshness-strip { min-height: 40px; padding: 8px clamp(24px, 4vw, 60px); border-bottom: 1px solid #d8e5f9; background: var(--green-soft); display: flex; align-items: center; gap: 16px; color: var(--ink); font-size: 12px; }
.freshness-state { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(23, 107, 115, .14); }
.freshness-strip > span { color: var(--muted); }
.freshness-strip button { margin-left: auto; padding: 5px 0; border: 0; border-bottom: 1px solid currentColor; background: none; cursor: pointer; color: var(--green); font-size: 11px; font-weight: 650; }
.freshness-strip.stale { background: var(--orange-soft); border-color: #f1d6b5; }
.freshness-strip.stale .status-dot, .freshness-strip.partial .status-dot { background: #c0782d; }
.freshness-strip.failed { background: #fff0f0; border-color: #f3caca; }
.freshness-strip.failed .status-dot { background: var(--red); }

.page-header { padding: 34px clamp(24px, 4vw, 60px) 28px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; background: var(--surface); }
.kicker { margin: 0 0 9px; color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-size: clamp(28px, 2.7vw, 38px); line-height: 1.16; letter-spacing: -.035em; }
.page-heading > p:last-child { max-width: 690px; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.hero-metrics { display: grid; grid-template-columns: repeat(4, minmax(74px, 1fr)); gap: 8px; }
.hero-metrics div { min-width: 86px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); }
.hero-metrics strong { display: block; margin-bottom: 4px; font-size: 21px; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-metrics span { color: var(--muted); font-size: 10px; white-space: nowrap; }

.view-root { min-height: 620px; padding: 34px clamp(24px, 4vw, 60px) 80px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 24px; }
.section-heading h2 { max-width: 900px; margin: 0; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.28; letter-spacing: -.025em; }
.section-heading > div > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.heading-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.result-count { color: var(--muted); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }

.today-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 26px; align-items: start; }
.lead-feed, .all-feed { border-top: 1px solid var(--line-strong); }
.signal-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 16px; padding: 23px 0 25px; border-bottom: 1px solid var(--line); transition: opacity .2s ease; }
.signal-card.is-read { opacity: .62; }
.signal-card:hover { opacity: 1; }
.signal-index { padding-top: 2px; color: var(--orange); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.signal-index span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--surface-soft); color: var(--muted); font-size: 9px; }
.signal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.signal-meta time { margin-left: auto; color: var(--muted); font-size: 11px; }
.badge { padding: 4px 7px; border-radius: 4px; background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.badge.risk { background: #f7e7e5; color: var(--red); }
.badge.ecosystem { background: #e9eef5; color: var(--blue); }
.badge.neutral { background: var(--surface-soft); color: var(--muted); }
.signal-title { width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font-size: clamp(18px, 1.55vw, 22px); line-height: 1.38; letter-spacing: -.018em; font-weight: 650; }
.signal-title:hover { color: var(--green); }
.signal-summary { max-width: 900px; margin: 10px 0 0; color: var(--muted); line-height: 1.65; font-size: 12px; }
.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.decision-grid > div { padding: 12px 13px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.decision-grid span, .drawer-panel section > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .09em; }
.decision-grid p { margin: 0; line-height: 1.55; font-size: 11px; }
.signal-footer { display: flex; gap: 12px; margin-top: 13px; color: #8a8e87; font-size: 10px; }
.signal-footer span + span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signal-actions { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.signal-actions a, .icon-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); display: grid; place-items: center; text-decoration: none; cursor: pointer; color: var(--muted); }
.icon-button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.signal-card.compact { grid-template-columns: 24px minmax(0, 1fr) 34px; padding: 18px 0; }
.signal-card.compact .signal-title { font-size: clamp(17px, 1.45vw, 21px); }
.signal-card.compact .signal-summary { margin-top: 8px; }

.today-aside { position: sticky; top: 28px; display: grid; gap: 14px; }
.aside-block { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.aside-block > button { width: 100%; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: none; display: flex; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer; color: var(--muted); font-size: 12px; }
.aside-block > button:hover { color: var(--green); }
.aside-block strong { color: var(--ink); font-size: 14px; }
.signal-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto auto; gap: 8px; margin-bottom: 16px; }
.search-box { min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); display: flex; align-items: center; gap: 9px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; }
.signal-toolbar select, .filter-button { min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); cursor: pointer; color: var(--ink); font-size: 12px; }
.filter-button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.load-more { width: 100%; padding: 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface-soft); cursor: pointer; color: var(--green); font-size: 11px; font-weight: 700; }
.load-more span { margin-left: 8px; color: var(--muted); font-weight: 500; }

.timeline-feed { border-top: 0; }
.timeline-day + .timeline-day { margin-top: 34px; }
.timeline-day-header { min-height: 42px; padding: 0 0 10px 82px; border-bottom: 1px solid var(--line-strong); display: flex; align-items: center; gap: 10px; }
.timeline-day-header h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.timeline-day-header span { color: var(--muted); font-size: 11px; }
.timeline-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: stretch; }
.timeline-row.is-read { opacity: .66; }
.timeline-row:hover { opacity: 1; }
.timeline-time { position: relative; padding: 26px 15px 0 0; border-right: 1px solid var(--line); color: var(--muted); text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.timeline-time span { position: absolute; top: 29px; right: -5px; width: 9px; height: 9px; border: 2px solid var(--canvas); border-radius: 50%; background: var(--green); }
.timeline-card { min-width: 0; margin: 12px 0 0 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.timeline-card header { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.timeline-source { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.timeline-source > strong { margin-right: 4px; color: var(--muted); font-size: 11px; font-weight: 550; }
.timeline-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.timeline-actions a { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; color: var(--muted); text-decoration: none; }
.timeline-title { width: 100%; margin: 13px 0 0; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink); text-align: left; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.4; letter-spacing: -.018em; font-weight: 650; }
.timeline-title:hover { color: var(--green); }
.timeline-summary { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.68; }
.timeline-tags { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 11px; }
.timeline-reason { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line-strong); display: grid; grid-template-columns: max-content 1fr; gap: 10px; color: var(--green); }
.timeline-reason strong { font-size: 10px; }
.timeline-reason p { margin: 0; font-size: 11px; line-height: 1.6; }

.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.topic-card { min-height: 300px; padding: 22px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); display: flex; flex-direction: column; }
.topic-card:first-child { grid-column: span 2; min-height: 270px; }
.topic-card:hover { border-color: var(--line-strong); }
.topic-number { margin-bottom: 28px; color: var(--orange); font-size: 13px; font-weight: 750; }
.topic-card h3 { margin: 0; font-size: 22px; line-height: 1.24; }
.topic-latest { color: var(--muted); font-size: 11px; }
.topic-card ul { margin: 16px 0 22px; padding: 0; list-style: none; }
.topic-card li { border-top: 1px solid var(--line); }
.topic-card li button { width: 100%; padding: 10px 0; border: 0; background: none; text-align: left; cursor: pointer; font-size: 12px; line-height: 1.4; }
.topic-cta { margin-top: auto; width: fit-content; padding: 0 0 2px; border: 0; border-bottom: 1px solid currentColor; background: none; cursor: pointer; color: var(--green); font-size: 11px; font-weight: 650; }

.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 980px; }
.integration-card { min-height: 238px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; }
.integration-card-primary { border-color: var(--green); box-shadow: inset 4px 0 var(--green); }
.integration-card h3 { margin: 0 0 11px; font-size: 21px; letter-spacing: -.02em; }
.integration-card > p:not(.kicker) { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.integration-status { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 11px; }
.integration-status .status-dot { width: 6px; height: 6px; background: var(--orange); box-shadow: none; }
.integration-status.ready .status-dot { background: var(--green); box-shadow: 0 0 0 3px rgba(23, 107, 115, .14); }
.integration-link { width: fit-content; margin-top: auto; padding-top: 18px; color: var(--green); font-size: 11px; font-weight: 650; text-decoration: none; }
.integration-link:hover { text-decoration: underline; }
.integration-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 18px; }
.integration-actions a { color: var(--green); font-size: 11px; font-weight: 650; text-decoration: none; }
.integration-actions a:hover { text-decoration: underline; }
.integration-list { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.integration-list li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.integration-list a { color: var(--ink); text-decoration: none; }
.integration-list a:hover { color: var(--green); }
.integration-card code { display: block; margin-top: 16px; padding: 10px; overflow: auto; border-radius: 5px; background: var(--surface-soft); color: var(--green); font-size: 10px; white-space: nowrap; }
.integration-next { display: grid; gap: 5px; margin-top: auto; padding-top: 18px; color: var(--green); font-size: 11px; line-height: 1.55; }
.integration-next span { color: var(--muted); }

.brief-page { max-width: 920px; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.brief-cover { padding: 38px 46px 34px; background: #202123; color: #fff; }
.brief-cover > p { color: #a7c4ff; font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.brief-cover h2 { max-width: 740px; margin: 28px 0; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.12; letter-spacing: -.035em; }
.brief-cover-intro { max-width: 650px; margin: -12px 0 20px; color: #d1d5db; font-size: 12px; line-height: 1.6; }
.brief-meta { display: flex; flex-wrap: wrap; gap: 12px 20px; color: #a1a1aa; font-size: 11px; }
.brief-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.brief-actions button { padding: 8px 12px; border: 1px solid #8ab4ff; border-radius: 6px; background: transparent; color: #fff; cursor: pointer; font-size: 11px; font-weight: 650; }
.brief-actions button:hover { background: rgba(255,255,255,.1); }
.brief-toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(420px, calc(100vw - 48px)); padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--ink); color: var(--surface); box-shadow: 0 8px 24px rgba(31, 35, 41, .18); font-size: 12px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s, transform .18s; }
.brief-toast.visible { opacity: 1; transform: translateY(0); }
.brief-toc { padding: 24px 46px; border-bottom: 1px solid var(--line); display: grid; }
.brief-toc > span { margin-bottom: 12px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.brief-toc button { padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: none; display: grid; grid-template-columns: 32px 1fr; text-align: left; cursor: pointer; font-size: 13px; }
.brief-toc b { font-size: 9px; color: var(--orange); }
.brief-sections { padding: 8px 46px 50px; }
.brief-sections > section { padding-top: 36px; }
.brief-section-title { padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.brief-section-title h3 { margin: 0; font-size: 25px; }

.detail-drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; pointer-events: none; }
.detail-drawer.open { visibility: visible; pointer-events: auto; }
.drawer-backdrop { position: absolute; inset: 0; border: 0; background: rgba(20, 22, 20, .42); opacity: 0; transition: opacity .2s; }
.detail-drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; width: min(600px, 94vw); height: 100%; padding: 48px 42px; overflow: auto; background: var(--surface); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .25s ease; }
.detail-drawer.open .drawer-panel { transform: translateX(0); }
.drawer-close { position: absolute; top: 16px; right: 18px; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); cursor: pointer; font-size: 20px; line-height: 1; }
.drawer-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.drawer-meta time { margin-left: auto; color: var(--muted); font-size: 11px; }
.drawer-panel h2 { margin: 24px 0 10px; font-size: clamp(28px, 4vw, 40px); line-height: 1.14; letter-spacing: -.035em; }
.drawer-original { margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.drawer-lead { padding: 15px 0 20px; border-bottom: 1px solid var(--line-strong); font-size: 15px; line-height: 1.65; }
.drawer-panel section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.drawer-panel section p, .drawer-panel li { line-height: 1.65; font-size: 12px; }
.drawer-actions { display: flex; gap: 9px; margin-top: 24px; }
.drawer-actions a, .drawer-actions button { flex: 1; padding: 12px; border: 1px solid var(--ink); border-radius: 7px; background: var(--ink); color: #fff; text-align: center; text-decoration: none; cursor: pointer; font-weight: 650; font-size: 12px; }
.drawer-actions button { background: var(--surface); color: var(--ink); }
.drawer-open { overflow: hidden; }

.loading-state, .empty-state { min-height: 280px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); }
.loading-state span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; animation: pulse 1s infinite alternate; }
.loading-state span:nth-child(2) { animation-delay: .2s; }
.loading-state span:nth-child(3) { animation-delay: .4s; }
.empty-state strong { color: var(--line-strong); font-size: 30px; }
@keyframes pulse { to { opacity: .2; transform: translateY(-4px); } }

html[data-theme="dark"] .site-header { background: var(--surface); }
html[data-theme="dark"] .brand-mark { background: #ececec; color: #2f3033; }
html[data-theme="dark"] .primary-nav button { color: var(--muted); }
html[data-theme="dark"] .primary-nav button span { color: #737373; }
html[data-theme="dark"] .primary-nav button.active,
html[data-theme="dark"] .filter-button.active,
html[data-theme="dark"] .icon-button.active { background: #e7ebe5; color: #1c201d; border-color: #e7ebe5; }
html[data-theme="dark"] .freshness-strip { border-color: #315d63; }
html[data-theme="dark"] .signal-summary,
html[data-theme="dark"] .timeline-summary { color: var(--muted); }
html[data-theme="dark"] .badge.risk { background: #4b2929; }
html[data-theme="dark"] .badge.ecosystem { background: #303a59; }
html[data-theme="dark"] .brief-cover { background: #171717; }
html[data-theme="dark"] .drawer-actions a { background: #ececec; color: #2f3033; border-color: #ececec; }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: minmax(190px, 1fr) auto; padding-left: 24px; padding-right: 24px; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; padding-top: 12px; border-top: 1px solid var(--line); overflow-x: auto; justify-content: flex-start; }
  .brand { padding-left: 0; padding-right: 0; }
  .brand strong { font-size: 12px; }
  .page-header { grid-template-columns: 1fr; gap: 22px; }
  .hero-metrics { width: min(100%, 520px); }
  .today-layout { grid-template-columns: minmax(0, 1fr) 230px; }
  .signal-toolbar { grid-template-columns: 1fr 1fr; }
  .search-box { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .site-header { position: sticky; top: 0; height: auto; padding: 12px 18px 0; border-right: 0; border-bottom: 1px solid var(--line); background: var(--surface); display: grid; grid-template-columns: 1fr auto; }
  .brand { padding: 0 0 11px; border: 0; }
  .brand-mark { width: 28px; height: 28px; border-radius: 6px; }
  .brand-mark svg { width: 25px; height: 25px; }
  .brand small { display: none; }
  .header-actions { margin: 0; padding: 0 0 11px; border: 0; align-items: center; display: flex; }
  .theme-switch { width: 118px; flex: 0 0 auto; }
  .source-link { display: none; }
  .primary-nav { grid-column: 1 / -1; grid-row: auto; margin: 0 -18px; padding: 0 18px; border-top: 1px solid var(--line); display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .primary-nav button { min-width: max-content; min-height: 42px; padding: 0 13px; border-radius: 0; }
  .primary-nav button span { display: none; }
  .primary-nav button.active { background: transparent; color: var(--green); box-shadow: inset 0 -2px var(--green); }
  .freshness-strip { padding-left: 18px; padding-right: 18px; flex-wrap: wrap; gap: 5px 12px; }
  .freshness-strip > span { flex: 1 1 300px; }
  .page-header { padding: 26px 18px 22px; }
  .view-root { padding: 28px 18px 60px; }
  .today-layout { grid-template-columns: 1fr; }
  .today-aside { position: static; grid-template-columns: 1fr 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card:first-child { grid-column: auto; }
  .integration-grid { grid-template-columns: 1fr; }
  html[data-theme="dark"] .site-header { background: var(--surface); }
}

@media (max-width: 560px) {
  .brand strong { font-size: 11px; }
  .text-button { font-size: 11px; }
  .freshness-state { width: 100%; }
  .freshness-strip > span { flex-basis: calc(100% - 80px); font-size: 11px; }
  .page-heading h1 { font-size: 28px; }
  .hero-metrics { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .hero-metrics div { min-width: 0; padding: 9px 7px; }
  .hero-metrics strong { font-size: 18px; }
  .hero-metrics span { font-size: 9px; }
  .section-heading { display: block; }
  .heading-date, .result-count { display: block; margin-top: 10px; }
  .signal-card, .signal-card.compact { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
  .signal-actions { grid-column: 2; flex-direction: row; justify-content: flex-end; }
  .signal-meta time { width: 100%; margin: 2px 0 0; }
  .signal-title, .signal-card.compact .signal-title { font-size: 18px; }
  .decision-grid { grid-template-columns: 1fr; }
  .today-aside { grid-template-columns: 1fr; }
  .signal-toolbar { grid-template-columns: 1fr; }
  .search-box { grid-column: auto; }
  .brief-cover, .brief-toc, .brief-sections { padding-left: 22px; padding-right: 22px; }
  .brief-cover h2 { font-size: 34px; }
  .drawer-panel { padding: 48px 22px; }
  .timeline-day-header { padding-left: 54px; }
  .timeline-row { grid-template-columns: 42px minmax(0, 1fr); }
  .timeline-time { padding-right: 9px; font-size: 10px; }
  .timeline-card { margin-left: 10px; padding: 15px 14px; }
  .timeline-card header { gap: 8px; }
  .timeline-reason { grid-template-columns: 1fr; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
