:root {
  color-scheme: dark;
  --ink: #f2f5ef;
  --muted: #8d9a93;
  --muted-2: #617069;
  --bg: #07100f;
  --bg-soft: #0a1513;
  --panel: #0d1917;
  --line: rgba(207, 231, 220, 0.14);
  --line-strong: rgba(207, 231, 220, 0.27);
  --acid: #b8ff3d;
  --cyan: #4de1d1;
  --watch: #63e6a5;
  --orange: #ff8156;
  --red: #ff5263;
  --accent-text: var(--acid);
  --on-acid: #08110e;
  --on-acid-muted: rgba(8, 17, 14, 0.65);
  --body-copy: #b6c0bb;
  --item-copy: #c0cac5;
  --detail-copy: #c4cec9;
  --topbar-bg: rgba(7, 16, 15, 0.82);
  --grid-line: rgba(184, 255, 61, 0.025);
  --radar-line: rgba(77, 225, 209, 0.22);
  --radar-ring: rgba(77, 225, 209, 0.19);
  --radar-axis: rgba(77, 225, 209, 0.12);
  --radar-fill: rgba(77, 225, 209, 0.07);
  --hover-surface: rgba(13, 25, 23, 0.72);
  --accent-soft: rgba(77, 225, 209, 0.09);
  --accent-softer: rgba(77, 225, 209, 0.035);
  --max: 1440px;
  --pad: clamp(1.25rem, 3.7vw, 4.5rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

:root[data-theme="light"] {
  color-scheme: light;
  --ink: #24113f;
  --muted: #685b78;
  --muted-2: #887b98;
  --bg: #f7f4ff;
  --bg-soft: #ffffff;
  --panel: #eee8ff;
  --line: rgba(72, 31, 119, 0.14);
  --line-strong: rgba(72, 31, 119, 0.28);
  --acid: #7c3aed;
  --accent-text: #6d28d9;
  --cyan: #6d28d9;
  --watch: #168a49;
  --orange: #be512c;
  --red: #c9364c;
  --on-acid: #ffffff;
  --on-acid-muted: rgba(255, 255, 255, 0.78);
  --body-copy: #554764;
  --item-copy: #493a5a;
  --detail-copy: #493a5a;
  --topbar-bg: rgba(247, 244, 255, 0.9);
  --grid-line: rgba(109, 40, 217, 0.055);
  --radar-line: rgba(109, 40, 217, 0.29);
  --radar-ring: rgba(109, 40, 217, 0.2);
  --radar-axis: rgba(109, 40, 217, 0.13);
  --radar-fill: rgba(124, 58, 237, 0.08);
  --hover-surface: rgba(109, 40, 217, 0.055);
  --accent-soft: rgba(124, 58, 237, 0.11);
  --accent-softer: rgba(124, 58, 237, 0.045);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--ink);
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.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;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-160%);
  background: var(--acid);
  color: var(--on-acid);
  padding: 0.75rem 1rem;
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid var(--acid);
  border-radius: 50%;
}
.brand-mark svg { width: 24px; fill: none; stroke: var(--acid); stroke-width: 2; }

.brand-pill {
  padding: 0.26rem 0.48rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

.topbar-actions { display: flex; align-items: center; gap: 1rem; }

.topbar-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--acid) 50%, transparent);
  animation: pulse 2.4s infinite;
}
.status-time { color: var(--ink); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}
.theme-toggle:hover { border-color: var(--cyan); }
.theme-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.theme-icon { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--panel); }
.theme-icon svg { position: absolute; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: opacity 180ms ease, transform 220ms ease; }
.sun-icon { opacity: 0; transform: rotate(-40deg) scale(0.7); }
.moon-icon { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="light"] .sun-icon { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="light"] .moon-icon { opacity: 0; transform: rotate(40deg) scale(0.7); }

main, footer { width: min(100%, var(--max)); margin: 0 auto; }

.hero {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  min-height: calc(100svh - 72px);
  padding: clamp(5.5rem, 10vw, 9rem) var(--pad) 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.hero-copy { position: relative; z-index: 2; align-self: start; }

.eyebrow {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 1.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.18em;
}
.eyebrow span { color: var(--accent-text); }

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 850px;
  margin-bottom: 1.8rem;
  font-size: clamp(3.6rem, 7.3vw, 7.2rem);
  line-height: 0.89;
  letter-spacing: -0.072em;
  text-wrap: balance;
}
h1 em { color: var(--accent-text); font-style: normal; }

.hero-intro {
  max-width: 560px;
  color: var(--body-copy);
  font-size: clamp(1.02rem, 1.6vw, 1.3rem);
  line-height: 1.65;
}

.hero-radar { position: relative; top: -24px; display: grid; place-items: center; min-height: 380px; }

.radar-grid {
  position: relative;
  width: min(34vw, 440px);
  min-width: 320px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--radar-line);
  border-radius: 50%;
  background: radial-gradient(circle, var(--radar-fill), transparent 65%);
  opacity: 0.84;
}
.radar-ring { position: absolute; inset: 50%; border: 1px solid var(--radar-ring); border-radius: 50%; transform: translate(-50%, -50%); }
.ring-one { width: 32%; height: 32%; }
.ring-two { width: 63%; height: 63%; }
.ring-three { width: 91%; height: 91%; }
.radar-axis { position: absolute; background: var(--radar-axis); }
.axis-x { top: 50%; width: 100%; height: 1px; }
.axis-y { left: 50%; width: 1px; height: 100%; }
.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 310deg, color-mix(in srgb, var(--acid) 3%, transparent), color-mix(in srgb, var(--acid) 35%, transparent));
  animation: sweep 8s linear infinite;
}
.radar-blip { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 16px var(--acid); }
.blip-one { top: 28%; left: 61%; }
.blip-two { top: 65%; left: 32%; animation: blink 2.2s infinite 0.7s; }
.blip-three { top: 76%; left: 69%; animation: blink 2.2s infinite 1.2s; }
.radar-label { position: absolute; top: 53%; left: 54%; color: var(--cyan); font-size: 0.6rem; line-height: 1.4; letter-spacing: 0.14em; }

.hero-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  align-self: end;
  margin: 4rem calc(var(--pad) * -1) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric { display: grid; min-height: 158px; padding: 1.5rem var(--pad); border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-primary { background: var(--acid); color: var(--on-acid); }
.metric-label { align-self: start; font-size: 0.7rem; font-weight: 780; letter-spacing: 0.13em; text-transform: uppercase; }
.metric strong { align-self: end; font-size: clamp(2.8rem, 4.5vw, 4.7rem); line-height: 0.82; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.metric-note { align-self: end; color: var(--muted); font-size: 0.71rem; }
.metric-primary .metric-note { color: var(--on-acid-muted); }

.watch { padding: clamp(5rem, 9vw, 9rem) var(--pad); border-right: 1px solid var(--line); border-left: 1px solid var(--line); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.section-heading h2, .brief h2 { margin: 0; font-size: clamp(2.5rem, 5vw, 5rem); line-height: 0.96; letter-spacing: -0.055em; }
.section-heading .eyebrow { margin-bottom: 1rem; }
.section-meta { margin: 0; color: var(--muted); font-size: 0.78rem; }
.section-meta time { color: var(--ink); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem 0 1.2rem; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.search-wrap { position: relative; flex: 0 1 390px; }
.search-wrap svg { position: absolute; top: 50%; left: 1rem; width: 19px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 1.6; }
.search-wrap input { width: 100%; min-height: 46px; padding: 0 1rem 0 3rem; border: 1px solid var(--line); border-radius: 2px; outline: 0; background: var(--bg-soft); color: var(--ink); font-size: 0.92rem; }
.search-wrap input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-wrap input::placeholder { color: var(--muted-2); }

.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
.filter-button { min-height: 39px; padding: 0 0.85rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.73rem; font-weight: 700; letter-spacing: 0.04em; transition: 180ms ease; }
.filter-button:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-button[aria-pressed="true"] { border-color: var(--acid); background: var(--acid); color: var(--on-acid); }

.stream-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); padding-top: 3rem; }

.source-panel { align-self: start; position: sticky; top: 100px; min-width: 0; }
.source-panel-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.kicker { color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.16em; }
.source-total { color: var(--acid); font-size: 0.74rem; font-variant-numeric: tabular-nums; }
.source-panel h3 { margin: 1.25rem 0 1.4rem; font-size: 1.5rem; letter-spacing: -0.035em; }
.source-list { display: grid; gap: 0.42rem; }
.source-item { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 0.7rem; width: 100%; min-height: 40px; padding: 0.55rem 0.65rem; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--item-copy); font-size: 0.83rem; text-align: left; cursor: pointer; transition: 160ms ease; }
.source-item::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.source-item span:last-child { color: var(--muted-2); font-size: 0.7rem; }
.source-item:hover { border-color: var(--line); background: var(--accent-softer); }
.source-item[aria-pressed="true"] { border-color: var(--cyan); background: var(--accent-soft); color: var(--ink); }
.source-item[aria-pressed="true"]::before { background: var(--acid); box-shadow: 0 0 8px color-mix(in srgb, var(--acid) 65%, transparent); }
.source-note { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 0.75rem; line-height: 1.6; }
.risk-legend { display: grid; gap: 0.7rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.risk-legend .detail-label { margin-bottom: 0.15rem; }
.risk-legend > div { display: grid; grid-template-columns: 7px 50px 1fr; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.7rem; }
.risk-legend strong { color: var(--item-copy); font-weight: 650; }
.risk-dot { width: 6px; height: 6px; border-radius: 50%; }
.risk-critical { background: var(--red); box-shadow: 0 0 8px var(--red); }
.risk-high { background: var(--orange); }
.risk-watch { background: var(--watch); box-shadow: 0 0 8px color-mix(in srgb, var(--watch) 50%, transparent); }

.feed-head { display: grid; grid-template-columns: 190px minmax(0, 1fr) 148px; gap: 1rem; padding: 0 1.2rem 0.8rem; color: var(--muted-2); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.13em; }
.results-count { min-height: 1.2rem; margin: 0 0 0.7rem; color: var(--muted); font-size: 0.72rem; text-align: right; }
.feed-wrap { min-width: 0; scroll-margin-top: 92px; }
.article-list { border-top: 1px solid var(--line-strong); }
.news-card { border-bottom: 1px solid var(--line-strong); transition: background 220ms ease; }
.news-card:hover, .news-card.is-open { background: var(--hover-surface); }

.news-trigger { display: grid; grid-template-columns: 190px minmax(0, 1fr) 148px; gap: 1rem; width: 100%; min-height: 132px; padding: 1.25rem; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.priority-cell, .headline-cell, .source-cell { display: flex; }
.priority-cell { flex-direction: column; align-items: flex-start; justify-content: space-between; }
.risk-line { display: flex; align-items: center; gap: 0.65rem; }
.risk-score { color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.risk-score::after { content: "/100"; margin-left: 0.16rem; color: var(--muted-2); font-size: 0.58rem; font-weight: 600; }
.severity { padding: 0.3rem 0.52rem; border: 1px solid currentColor; border-radius: 2px; font-size: 0.62rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.severity[data-severity="Critique"] { color: var(--red); }
.severity[data-severity="Élevée"] { color: var(--orange); }
.severity[data-severity="À suivre"] { color: var(--watch); }
.date { color: var(--muted); font-size: 0.74rem; }
.headline-cell { flex-direction: column; justify-content: space-between; min-width: 0; }
.category { color: var(--accent-text); font-size: 0.66rem; font-weight: 780; letter-spacing: 0.12em; text-transform: uppercase; }
.headline { max-width: 680px; font-size: clamp(1.06rem, 1.7vw, 1.36rem); font-weight: 720; line-height: 1.32; letter-spacing: -0.024em; text-wrap: pretty; }
.source-cell { align-items: center; justify-content: space-between; gap: 0.8rem; }
.source-name { color: var(--muted); font-size: 0.75rem; }
.toggle-icon { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 50%; }
.toggle-icon i { position: absolute; width: 12px; height: 1px; background: var(--ink); transition: transform 220ms ease; }
.toggle-icon i:last-child { transform: rotate(90deg); }
.news-card.is-open .toggle-icon { border-color: var(--acid); background: var(--acid); }
.news-card.is-open .toggle-icon i { background: var(--bg); }
.news-card.is-open .toggle-icon i:last-child { transform: rotate(0); }

.news-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 350ms cubic-bezier(.2,.8,.2,1); }
.news-card.is-open .news-panel { grid-template-rows: 1fr; }
.news-panel-inner { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 3vw, 2.4rem); overflow: hidden; padding: 0 1.25rem; opacity: 0; transition: opacity 180ms ease, padding 350ms ease; }
.news-card.is-open .news-panel-inner { padding-top: 1.4rem; padding-bottom: 2rem; opacity: 1; }
.detail-label { display: block; margin-bottom: 0.65rem; color: var(--muted-2); font-size: 0.6rem; font-weight: 850; letter-spacing: 0.14em; }
.news-panel p, .news-panel li { color: var(--detail-copy); font-size: 0.96rem; line-height: 1.78; }
.news-panel p { margin: 0; }
.article-lead { max-width: 860px; padding-left: 1rem; border-left: 2px solid var(--acid); }
.article-lead p { color: var(--ink); font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-weight: 630; line-height: 1.55; }
.article-explanation { max-width: 900px; }
.explanation { display: grid; gap: 0.9rem; }
.article-analysis-grid { display: grid; grid-template-columns: 1.1fr 0.8fr 1.1fr; gap: clamp(1.4rem, 3vw, 3rem); padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.article-analysis-grid section + section { padding-left: clamp(1.4rem, 3vw, 3rem); border-left: 1px solid var(--line); }
.article-analysis-grid ul { display: grid; gap: 0.55rem; margin: 0; padding-left: 1.15rem; }
.article-analysis-grid li::marker { color: var(--acid); }
.article-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.article-footer > p { max-width: 600px; color: var(--muted-2); font-size: 0.72rem; line-height: 1.5; }
.source-link { align-self: end; display: inline-flex; align-items: center; gap: 0.5rem; color: var(--acid); font-size: 0.78rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.source-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.empty-state { padding: 5rem 1rem; text-align: center; }
.empty-state > span { color: var(--acid); font-size: 0.72rem; }
.empty-state h3 { margin: 1rem 0 0.5rem; font-size: 1.7rem; }
.empty-state p { color: var(--muted); }
.empty-state button { padding: 0.8rem 1rem; border: 1px solid var(--acid); background: transparent; color: var(--acid); cursor: pointer; font-weight: 750; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 0.45rem; padding-top: 2rem; }
.pagination[hidden] { display: none; }
.pagination button { display: grid; place-items: center; min-width: 40px; min-height: 40px; padding: 0 0.75rem; border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.76rem; font-weight: 750; transition: border-color 160ms ease, background 160ms ease, color 160ms ease; }
.pagination button:hover:not(:disabled) { border-color: var(--cyan); color: var(--ink); }
.pagination button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.pagination button[aria-current="page"] { border-color: var(--acid); background: var(--acid); color: var(--on-acid); }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination-direction { min-width: 94px !important; }
.pagination-icon { display: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pagination-ellipsis { display: grid; place-items: center; width: 28px; min-height: 40px; color: var(--muted-2); }

.principle { border-right: 1px solid var(--line); border-left: 1px solid var(--line); }
.principle-heading { padding: clamp(3rem, 5vw, 5rem) var(--pad) 1.5rem; }
.principle-heading .eyebrow { margin: 0; }
.brief {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr auto;
  align-items: end;
  gap: clamp(2rem, 6vw, 7rem);
  padding: clamp(2.5rem, 4.5vw, 4.25rem) var(--pad);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--acid);
  color: var(--on-acid);
}
.brief h2 { font-size: clamp(2.35rem, 4vw, 4rem); }
.brief p { max-width: 500px; margin: 0; font-size: 1rem; line-height: 1.7; }
.brief a { justify-self: end; font-size: 0.82rem; font-weight: 820; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 0.35rem; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 78px; padding: 1rem var(--pad); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); color: var(--muted); font-size: 0.68rem; }
.footer-brand { font-size: 0.8rem; }
.footer-note { margin: 0; text-align: right; }
footer > p:nth-child(2) { margin: 0; text-align: center; }

@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes blink { 50% { opacity: 0.2; } }

@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; }
  .hero-radar { position: absolute; top: 48px; right: -120px; opacity: 0.55; }
  .hero-copy { padding-right: 15vw; }
  .stream-layout { grid-template-columns: minmax(0, 1fr); }
  .source-panel { position: static; display: grid; grid-template-columns: 1fr 2fr; gap: 1rem 2rem; }
  .source-panel-heading { grid-column: 1 / -1; }
  .source-panel h3 { margin: 0; }
  .source-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-note { display: none; }
  .risk-legend { margin-top: 0; }
  .brief { grid-template-columns: 1fr 1fr; }
  .brief a { grid-column: 2; justify-self: start; }
}

@media (max-width: 760px) {
  .topbar { min-height: 64px; }
  .status-time { display: none; }
  .topbar-actions { gap: 0.55rem; }
  .topbar-status > span:nth-child(2) { display: none; }
  .theme-toggle { width: 44px; height: 44px; }
  .hero { min-height: calc(100svh - 64px); padding-top: 4.5rem; }
  .hero-copy { padding-right: 0; }
  .hero-radar { top: 52px; right: -142px; opacity: 0.32; }
  .radar-grid { width: 300px; min-width: 300px; }
  h1 { font-size: clamp(2.9rem, 14vw, 4.8rem); line-height: 0.93; }
  .hero-intro { max-width: min(92%, 34rem); }
  .hero-metrics { grid-template-columns: 1fr 1fr; margin-top: 3.25rem; }
  .metric { min-height: 128px; padding: 1.15rem var(--pad); }
  .metric-primary { grid-column: 1 / -1; }
  .metric:nth-child(2) { border-bottom: 0; }
  .watch { padding-block: 4rem; }
  .section-heading { display: block; }
  .section-heading h2 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .section-meta { margin-top: 1rem; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-wrap { flex-basis: auto; }
  .search-wrap input { min-height: 48px; font-size: 1rem; }
  .filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter-button { flex: 0 0 auto; min-height: 44px; }
  .source-panel { display: block; }
  .source-panel h3 { margin: 1rem 0; }
  .source-list { display: flex; max-width: 100%; overflow-x: auto; padding-bottom: 0.5rem; scroll-snap-type: x proximity; scrollbar-width: none; }
  .source-list::-webkit-scrollbar { display: none; }
  .risk-legend { grid-template-columns: repeat(3, 1fr); margin-top: 1rem; }
  .risk-legend .detail-label { grid-column: 1 / -1; }
  .source-item { flex: 0 0 auto; grid-template-columns: 10px auto auto; width: auto; min-width: max-content; min-height: 44px; padding: 0.55rem 0.8rem; border: 1px solid var(--line); scroll-snap-align: start; }
  .feed-head { display: none; }
  .results-count { margin-top: 0.25rem; text-align: left; }
  .news-trigger { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; padding: 1.25rem 0; }
  .priority-cell { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .headline-cell { min-height: 88px; }
  .headline { font-size: 1.08rem; }
  .source-cell { align-items: end; }
  .source-name { display: none; }
  .news-panel-inner { grid-template-columns: 1fr; padding-inline: 0; }
  .news-card.is-open .news-panel-inner { padding-top: 0.6rem; }
  .news-panel p, .news-panel li { font-size: 1rem; line-height: 1.7; }
  .article-analysis-grid { grid-template-columns: 1fr; }
  .article-analysis-grid section + section { padding-top: 1.4rem; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .article-footer { align-items: flex-start; flex-direction: column; }
  .source-link { justify-self: start; min-height: 44px; align-items: center; }
  .pagination { justify-content: safe center; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: none; }
  .pagination::-webkit-scrollbar { display: none; }
  .pagination button { flex: 0 0 auto; }
  .pagination-direction { width: 44px; min-width: 44px !important; padding: 0; }
  .pagination-direction .pagination-label { display: none; }
  .pagination-direction .pagination-icon { display: block; }
  .brief { grid-template-columns: 1fr; padding-block: 2.5rem; }
  .brief a { grid-column: auto; }
  footer { flex-wrap: wrap; min-height: 68px; gap: 0.65rem 1rem; padding-block: 0.85rem; }
  footer > p:nth-child(2) { display: none; }
  .footer-note { text-align: right; }
}

@media (max-width: 480px) {
  :root { --pad: 1rem; }
  body { background-size: 36px 36px; }
  .topbar { min-height: 60px; }
  .brand { gap: 0.5rem; font-size: 0.82rem; letter-spacing: 0.11em; }
  .brand-mark { width: 32px; }
  .brand-mark svg { width: 22px; }
  .brand-pill { display: none; }
  .topbar-actions { gap: 0.45rem; }
  .theme-toggle { width: 42px; height: 42px; }
  .hero { min-height: calc(100svh - 60px); padding-top: 3.75rem; }
  .hero .eyebrow { margin-bottom: 1.25rem; }
  h1 { margin-bottom: 1.35rem; font-size: clamp(2.7rem, 13.5vw, 3.65rem); letter-spacing: -0.062em; }
  .hero-intro { max-width: 100%; font-size: 1rem; line-height: 1.58; }
  .hero-radar { top: 48px; right: -128px; }
  .radar-grid { width: 260px; min-width: 260px; }
  .hero-metrics { margin-top: 2.75rem; }
  .metric { min-height: 116px; padding: 1rem; }
  .metric strong { font-size: 2.75rem; }
  .metric-label { font-size: 0.64rem; letter-spacing: 0.1em; }
  .metric-note { font-size: 0.68rem; }
  .watch { padding-block: 3.5rem; }
  .section-heading { margin-bottom: 2rem; }
  .section-heading h2 { font-size: 2.7rem; }
  .toolbar { gap: 1rem; }
  .stream-layout { gap: 2.5rem; padding-top: 2rem; }
  .risk-legend { grid-template-columns: 1fr; gap: 0.55rem; }
  .risk-legend .detail-label { grid-column: auto; }
  .risk-legend > div { grid-template-columns: 8px 58px 1fr; min-height: 28px; font-size: 0.75rem; }
  .results-count { font-size: 0.75rem; }
  .news-trigger { gap: 0.75rem; padding-block: 1.15rem; }
  .priority-cell { gap: 0.5rem; }
  .risk-line { gap: 0.5rem; }
  .severity { padding: 0.28rem 0.42rem; letter-spacing: 0.08em; }
  .headline-cell { min-height: 82px; }
  .headline { font-size: 1.04rem; line-height: 1.38; }
  .toggle-icon { width: 38px; height: 38px; }
  .article-lead { padding-left: 0.8rem; }
  .article-lead p { font-size: 1.05rem; }
  .article-analysis-grid { gap: 1.15rem; padding-block: 1.15rem; }
  .pagination { gap: 0.35rem; padding-top: 1.5rem; }
  .pagination button { min-width: 42px; min-height: 42px; padding-inline: 0.65rem; }
  .brief { gap: 1.5rem; }
  .brief h2 { font-size: 2.55rem; }
  .brief p { font-size: 1rem; line-height: 1.6; }
  footer { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@supports (container-type: inline-size) {
  .feed-wrap { container-type: inline-size; }
  @container (max-width: 680px) {
    .news-trigger { grid-template-columns: 1fr auto; }
    .priority-cell { grid-column: 1 / -1; flex-direction: row; align-items: center; }
    .source-name { display: none; }
  }
}
