:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f2f4f7;
  --text: #0a2540;
  --muted: #5b6b7f;
  --line: #d9e1ea;
  --brand: #008060;
  --brand-strong: #00684a;
  --accent: #635bff;
  --accent-soft: #eef2ff;
  --amber: #a15c00;
  --ink-soft: #0a2540;
  --warn: #a15c00;
  --blue: #635bff;
  --rose: #b42318;
  --shadow: 0 14px 34px rgba(10, 37, 64, 0.08);
}

body.dark {
  color-scheme: dark;
  --bg: #0b1220;
  --panel: #111827;
  --panel-soft: #172033;
  --text: #f6f8fb;
  --muted: #a8b3c2;
  --line: #263247;
  --brand: #00a878;
  --brand-strong: #34d399;
  --accent: #9b8cff;
  --accent-soft: #1b2140;
  --amber: #f2b84b;
  --ink-soft: #f6f8fb;
  --warn: #f2b84b;
  --blue: #9b8cff;
  --rose: #fb7185;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(99, 91, 255, 0.045), transparent 30%),
    linear-gradient(180deg, rgba(0, 128, 96, 0.055), transparent 300px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, var(--panel-soft));
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: block;
  background: transparent;
  border: 0;
  overflow: visible;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.workspace-switcher {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.workspace-switcher span,
.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 700;
}

.workspace-switcher strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 12px;
}

.nav-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  text-align: left;
}

.nav-item.is-active,
.nav-item:hover {
  background: var(--panel);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--brand);
}

.icon {
  width: 22px;
  text-align: center;
  color: var(--brand);
  font-weight: 700;
}

.source-panel,
.mini-card,
.rail-section,
.stat-block {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}

.source-panel {
  padding: 16px;
  display: grid;
  gap: 10px;
  max-height: 310px;
  overflow: auto;
}

.source-filter-list {
  display: grid;
  gap: 10px;
}

.panel-title {
  color: var(--muted);
  font-size: 13px;
}

.source-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.source-panel input {
  accent-color: var(--brand);
}

.mini-card {
  margin-top: auto;
  padding: 16px;
}

.metric-label,
.stat-block span,
.section-head p,
.article-meta,
.article-tags,
.article-signal span,
.health-row span,
.section-head.compact span {
  color: var(--muted);
}

.mini-card strong {
  display: block;
  font-size: 32px;
  margin: 6px 0;
}

.mini-card small {
  color: var(--muted);
  line-height: 1.5;
}

.disclaimer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
}

.main {
  min-width: 0;
  padding: 18px 20px 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

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

h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
  margin-top: 4px;
  color: var(--ink-soft);
}

.topbar p {
  color: var(--muted);
  margin-top: 6px;
  max-width: 760px;
  line-height: 1.45;
}

.desk-brief {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 10px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 48%),
    var(--panel);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: none;
}

.brief-copy {
  min-width: 0;
}

.brief-copy span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brief-copy strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.brief-copy p {
  color: var(--muted);
  line-height: 1.4;
  margin-top: 4px;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.brief-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.brief-status-grid div {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 72%, var(--panel-soft));
  border-radius: 8px;
  padding: 9px;
}

.brief-status-grid span,
.brief-status-grid strong {
  display: block;
}

.brief-status-grid span {
  color: var(--muted);
  font-size: 12px;
}

.brief-status-grid strong {
  margin-top: 5px;
  font-size: 16px;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: min(100%, 520px);
}

.refresh-status {
  display: grid;
  gap: 2px;
  min-width: 118px;
  color: var(--text);
  font-size: 13px;
}

.refresh-status small {
  color: var(--muted);
}

.search-box {
  width: min(420px, 100%);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0 12px;
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.icon-button,
.text-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
  border-radius: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
}

.text-button {
  min-height: 30px;
  padding: 0 10px;
}

.text-button:hover,
.icon-button:hover,
.focus-strip button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.trust-strip {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  margin-bottom: 14px;
}

.trust-strip div {
  background: var(--panel);
  padding: 12px 14px;
}

.trust-strip span,
.trust-strip strong {
  display: block;
}

.trust-strip span {
  color: var(--muted);
  font-size: 12px;
}

.trust-strip strong {
  color: var(--text);
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.35;
}

.stat-block {
  padding: 12px;
  min-height: 82px;
}

.stat-block strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
  margin: 6px 0 4px;
}

.stat-block small {
  color: var(--muted);
}

.stat-block.accent {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 38%, var(--panel));
}

.focus-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.focus-strip button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-grid;
  gap: 2px;
  text-align: left;
}

.focus-strip button:hover {
  background: var(--accent-soft);
}

.focus-strip button.is-selected {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--accent);
  color: white;
}

.focus-strip button.is-empty {
  color: var(--muted);
  opacity: 0.68;
}

.focus-count {
  min-width: 22px;
  min-height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 6px;
}

.focus-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.focus-basis {
  max-width: 190px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-strip button.is-selected .focus-count {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.focus-strip button.is-selected .focus-basis {
  color: rgba(255, 255, 255, 0.76);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.feed-section {
  min-width: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.section-head h2 {
  font-size: 18px;
  letter-spacing: 0;
}

.section-head p {
  font-size: 14px;
  margin-top: 2px;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 32px;
  padding: 0 12px;
}

.segmented button.is-selected {
  background: var(--accent);
  color: white;
}

.feed-list {
  display: grid;
  gap: 8px;
}

.source-board-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cluster-list {
  display: grid;
  gap: 14px;
}

.market-brief {
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  background: var(--panel);
  border-radius: 8px;
  padding: 12px;
  box-shadow: none;
}

.market-brief-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.market-brief-head span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.market-brief-head h3 {
  margin: 4px 0 0;
  font-size: 16px;
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.brief-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
}

.brief-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.brief-main {
  min-width: 0;
}

.brief-meta,
.brief-impact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.brief-meta span,
.brief-impact span {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
}

.brief-meta span:first-child {
  color: var(--accent);
}

.brief-card h4 {
  margin: 7px 0 6px;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.brief-card h4 a {
  color: var(--text);
  text-decoration: none;
}

.brief-card h4 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.brief-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-divider {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  padding: 2px 2px;
}

.feed-divider span {
  color: var(--text);
  font-weight: 800;
}

.feed-divider small {
  color: var(--muted);
}

.cluster-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.cluster-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.cluster-head h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.cluster-head h3 a {
  color: var(--text);
  text-decoration: none;
}

.cluster-head h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.cluster-summary {
  color: var(--muted);
  line-height: 1.58;
  font-size: 14px;
}

.cluster-metrics {
  display: grid;
  grid-template-columns: repeat(2, 72px);
  gap: 8px;
}

.cluster-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.cluster-metric strong,
.cluster-metric span {
  display: block;
}

.cluster-metric strong {
  font-size: 20px;
}

.cluster-metric span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.cluster-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cluster-meta span {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.cluster-items {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.cluster-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.cluster-item b {
  color: var(--accent);
  font-size: 12px;
}

.cluster-item a {
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-item a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.cluster-item span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.source-board {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.source-board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.source-board-head h3 {
  margin: 0;
  font-size: 16px;
}

.source-board-head span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.source-board-items {
  display: grid;
}

.source-board-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.source-board-item:first-child {
  border-top: 0;
}

.source-board-rank {
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
}

.source-board-title {
  min-width: 0;
}

.source-board-title a {
  color: var(--text);
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-board-title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.source-board-title small,
.source-board-score {
  color: var(--muted);
  font-size: 12px;
}

.source-board-score {
  white-space: nowrap;
}

.article-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 11px;
  box-shadow: none;
}

.article-card.is-priority {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 5%, transparent), transparent 36%),
    var(--panel);
}

.article-card:hover,
.cluster-card:hover,
.source-board:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  box-shadow: var(--shadow);
}

.article-rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--accent);
  font-weight: 800;
}

.article-body {
  min-width: 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}

.source-pill {
  color: var(--brand-strong);
  background: color-mix(in srgb, var(--brand) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}

.topic-pill {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}

.brief-preview-pill {
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--muted) 22%, var(--line));
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}

.brief-preview-pill.summary_allowed,
.brief-preview-pill.full_text_allowed,
.brief-preview-pill.licensed_only {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 10%, var(--panel));
  border-color: color-mix(in srgb, var(--success) 28%, var(--line));
}

.brief-preview-pill.metadata_only {
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 10%, var(--panel));
  border-color: color-mix(in srgb, var(--amber) 28%, var(--line));
}

.tier-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
  color: var(--muted);
  background: var(--panel-soft);
}

.tier-pill.authority {
  color: var(--brand-strong);
  background: color-mix(in srgb, var(--brand) 10%, var(--panel));
  border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
}

.tier-pill.industry {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
}

.tier-pill.community {
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 10%, var(--panel));
  border-color: color-mix(in srgb, var(--amber) 24%, var(--line));
}

.tier-pill.social {
  color: var(--muted);
  background: var(--panel-soft);
}

h3 {
  margin: 7px 0 6px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.article-card.is-priority h3 {
  font-size: 17px;
}

h3 a {
  color: inherit;
  text-decoration: none;
}

h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.article-body p {
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-insight {
  margin-top: 6px;
}

.insight-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 46%),
    color-mix(in srgb, var(--accent-soft) 28%, var(--panel));
  border-radius: 8px;
  padding: 7px 8px;
  display: block;
  min-width: 0;
}

.insight-primary {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.insight-grid {
  display: none;
}

.insight-item {
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--panel) 78%, var(--panel-soft));
  border-radius: 8px;
  padding: 5px 7px;
  min-width: 0;
}

.insight-primary span,
.insight-item span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.insight-primary span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.insight-primary strong,
.insight-item strong {
  display: -webkit-box;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.insight-primary strong {
  font-size: 13px;
  line-height: 1.4;
  -webkit-line-clamp: 1;
}

.insight-item strong {
  -webkit-line-clamp: 1;
}

.article-original-title {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: -1px 0 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-tags {
  display: none;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.article-tags span {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
}

.article-tags span:nth-child(n+4) {
  display: none;
}

.article-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.article-actions span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-feedback {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  background: var(--panel);
}

.article-feedback button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  min-height: 22px;
  padding: 0 8px;
  font-size: 12px;
}

.article-feedback button:hover,
.article-feedback button.is-selected {
  background: var(--accent-soft);
  color: var(--accent);
}

.article-actions a {
  flex: 0 0 auto;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.article-actions a:hover {
  text-decoration: underline;
}

.article-detail-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  min-height: 26px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.article-detail-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.article-detail-button.has-brief {
  border-color: color-mix(in srgb, var(--success) 30%, var(--line));
  color: var(--success);
  background: color-mix(in srgb, var(--success) 8%, var(--panel));
}

.article-detail-button.has-brief:hover {
  border-color: var(--success);
  background: color-mix(in srgb, var(--success) 13%, var(--panel));
}

.article-signal {
  border-left: 1px solid var(--line);
  padding-left: 10px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.article-signal strong {
  font-size: 20px;
  color: var(--text);
}

.sparkline {
  height: 20px;
  display: flex;
  align-items: end;
  gap: 4px;
}

.sparkline i {
  display: block;
  width: 9px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  opacity: 0.8;
}

.sparkline i:nth-child(1) { height: 30%; }
.sparkline i:nth-child(2) { height: 58%; }
.sparkline i:nth-child(3) { height: 48%; }
.sparkline i:nth-child(4) { height: 76%; }
.sparkline i:nth-child(5) { height: 100%; }

.right-rail {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 18px;
}

.rail-section {
  padding: 16px;
}

.release-status {
  border-color: color-mix(in srgb, var(--brand) 22%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 6%, transparent), transparent 48%),
    var(--panel);
}

#releaseBadge {
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--panel));
  color: var(--brand-strong);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
}

#releaseBadge.is-warning {
  border-color: color-mix(in srgb, var(--amber) 26%, var(--line));
  background: color-mix(in srgb, var(--amber) 12%, var(--panel));
  color: var(--amber);
}

.release-version {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.release-version div,
.release-metrics div {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 78%, var(--panel-soft));
  border-radius: 8px;
  padding: 8px;
  min-width: 0;
}

.release-version span,
.release-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.release-version strong,
.release-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.release-notes {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.release-notes div {
  position: relative;
  padding-left: 12px;
}

.release-notes div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.section-head.compact {
  margin-bottom: 12px;
}

.section-head.compact h2 {
  font-size: 16px;
}

.signal-list {
  display: grid;
  gap: 8px;
}

.topic-list {
  display: grid;
  gap: 8px;
}

.topic-list button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.topic-list button:hover {
  border-color: var(--accent);
}

.topic-list span {
  overflow-wrap: anywhere;
}

.topic-list strong {
  color: var(--accent);
  font-size: 14px;
}

.signal-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 10px;
}

.signal-card button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
  width: 100%;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.signal-card button:hover {
  color: var(--accent);
}

.signal-card p {
  color: var(--muted);
  line-height: 1.45;
  margin-top: 6px;
  font-size: 12px;
}

.signal-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.signal-meta span {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
}

.watch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.watch-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.watch-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}

.watch-form input {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 9px;
  font: inherit;
  font-size: 13px;
}

.watch-form input:focus {
  outline: 2px solid color-mix(in srgb, var(--violet) 28%, transparent);
  outline-offset: 1px;
  border-color: var(--violet);
}

#watchStatus {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#watchStatus.is-good {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

#watchStatus.is-warn {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, var(--panel));
}

.watch-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  overflow: hidden;
  min-height: 32px;
}

.watch-tag button {
  border: 0;
  background: transparent;
  color: var(--text);
  min-height: 30px;
}

.watch-tag button[data-word] {
  padding: 0 9px 0 11px;
}

.watch-tag button[data-remove-word] {
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  min-width: 30px;
  padding: 0;
}

.watch-tag button:hover {
  color: var(--accent);
}

.watch-empty {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  line-height: 1.45;
  width: 100%;
}

.health-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.health-row:first-of-type {
  border-top: 0;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  color: var(--muted);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, transparent), transparent 52%),
    var(--panel);
}

.empty-state span,
.empty-state strong,
.empty-state p {
  display: block;
}

.empty-state span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.empty-state strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  margin-top: 7px;
}

.empty-state p {
  line-height: 1.58;
  margin-top: 8px;
  max-width: 560px;
}

.empty-state .text-button {
  margin-top: 14px;
  min-height: 36px;
}

.empty-state.is-compact {
  padding: 16px;
}

.empty-state.is-compact strong {
  font-size: 15px;
}

.empty-state.is-compact p {
  font-size: 13px;
}

.loading-skeleton {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.skeleton-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.skeleton-head span {
  display: block;
  width: 92px;
  height: 11px;
  border-radius: 999px;
  background: var(--panel-soft);
}

.skeleton-head strong,
.skeleton-head p {
  display: block;
}

.skeleton-head strong {
  margin-top: 10px;
  color: var(--text);
  font-size: 18px;
}

.skeleton-head p {
  color: var(--muted);
  margin-top: 6px;
}

.skeleton-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 10px;
  background: color-mix(in srgb, var(--panel) 82%, var(--panel-soft));
}

.skeleton-card i,
.skeleton-card b,
.skeleton-card em,
.skeleton-card small {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--panel-soft), color-mix(in srgb, var(--panel-soft) 62%, var(--panel)), var(--panel-soft));
  background-size: 220% 100%;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.skeleton-card i {
  width: 120px;
  height: 16px;
}

.skeleton-card b {
  width: min(78%, 520px);
  height: 22px;
}

.skeleton-card em {
  width: min(92%, 700px);
  height: 14px;
}

.skeleton-card small {
  width: min(46%, 280px);
  height: 14px;
}

@keyframes skeleton-pulse {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.has-article-drawer {
  overflow: hidden;
}

.article-drawer[hidden] {
  display: none;
}

.article-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(720px, calc(100vw - 28px));
}

.article-drawer-backdrop {
  background: rgb(7 17 32 / 0.36);
  backdrop-filter: blur(5px);
}

.article-drawer-panel {
  position: relative;
  overflow: auto;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 64px rgb(10 37 64 / 0.18);
  padding: 26px;
}

.drawer-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--muted);
  font-size: 22px;
  z-index: 2;
}

.drawer-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.drawer-content {
  display: grid;
  gap: 14px;
  margin-top: -16px;
}

.drawer-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.detail-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.drawer-content h2 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.detail-original-title {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.detail-state {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}

.detail-state.is-loading {
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}

.detail-state.is-error {
  border: 1px solid color-mix(in srgb, var(--warn) 28%, var(--line));
  background: color-mix(in srgb, var(--warn) 10%, var(--panel));
  color: var(--warn);
}

.detail-summary-block {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 7%, transparent), transparent 56%),
    var(--panel-soft);
  border-radius: 8px;
  padding: 14px;
}

.detail-summary-block.secondary {
  background: var(--panel);
}

.detail-summary-block span,
.detail-insight-card span,
.detail-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-summary-block p {
  color: var(--text);
  line-height: 1.65;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.detail-ai-brief {
  display: grid;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 58%),
    var(--panel);
  border-radius: 8px;
  padding: 14px;
}

.detail-ai-brief.is-empty {
  border-style: dashed;
  color: var(--muted);
}

.detail-ai-brief.is-public-guide {
  border-color: color-mix(in srgb, var(--line) 72%, var(--accent));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel-soft) 78%, transparent), transparent 58%),
    var(--panel);
}

.ai-brief-mode-notice {
  display: grid;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--warning) 30%, var(--line));
  background: color-mix(in srgb, var(--warning) 7%, var(--panel));
  border-radius: 8px;
  padding: 11px 12px;
}

.ai-brief-mode-notice.is-generated {
  border-color: color-mix(in srgb, var(--success) 32%, var(--line));
  background: color-mix(in srgb, var(--success) 7%, var(--panel));
}

.ai-brief-mode-notice span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-brief-mode-notice strong {
  color: var(--text);
  font-size: 15px;
}

.ai-brief-mode-notice p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ai-brief-lede {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 12px;
}

.ai-brief-provenance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ai-brief-provenance div {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, var(--panel));
  border-radius: 8px;
  padding: 10px;
}

.ai-brief-provenance span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-brief-provenance strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  margin-top: 5px;
}

.ai-brief-provenance small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}

.ai-brief-lede span,
.ai-brief-grid span,
.ai-brief-watch span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.ai-brief-lede strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1.45;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.ai-brief-keyfacts {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-soft) 74%, var(--panel));
  border-radius: 8px;
  padding: 12px;
}

.ai-brief-keyfacts span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.ai-brief-keyfacts ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.ai-brief-keyfacts li {
  color: var(--text);
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.ai-brief-keyfacts li + li {
  margin-top: 5px;
}

.ai-brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-brief-reliability {
  display: grid;
  grid-template-columns: 1.1fr repeat(2, minmax(0, 1fr)) .72fr;
  gap: 8px;
}

.ai-brief-basis-card,
.ai-brief-boundary-card,
.ai-brief-confidence-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-soft) 72%, var(--panel));
  border-radius: 8px;
  padding: 10px;
}

.ai-brief-boundary-card.is-limit {
  background: color-mix(in srgb, var(--warning) 7%, var(--panel));
}

.ai-brief-basis-card span,
.ai-brief-boundary-card span,
.ai-brief-confidence-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-brief-basis-card strong,
.ai-brief-confidence-card strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  margin-top: 5px;
}

.ai-brief-basis-card small,
.ai-brief-confidence-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  margin-top: 4px;
}

.ai-brief-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 9px;
}

.ai-brief-bars span {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 20%, transparent);
}

.ai-brief-bars span.is-active {
  background: var(--accent);
}

.ai-brief-boundary-card ul {
  margin: 7px 0 0;
  padding-left: 16px;
}

.ai-brief-boundary-card li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ai-brief-boundary-card li + li {
  margin-top: 4px;
}

.ai-brief-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px;
}

.ai-brief-grid p,
.ai-brief-watch li,
.ai-brief-footnote {
  color: var(--muted);
  line-height: 1.58;
}

.ai-brief-grid p {
  margin-top: 7px;
  overflow-wrap: anywhere;
}

.ai-brief-evidence {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ai-brief-evidence div {
  min-width: 0;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-soft) 70%, var(--panel));
  border-radius: 8px;
  padding: 10px;
}

.ai-brief-evidence span,
.ai-brief-source-excerpt span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-brief-evidence strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-brief-source-excerpt {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--panel);
}

.ai-brief-source-excerpt p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.ai-brief-watch {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 12px;
}

.ai-brief-watch ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.ai-brief-watch li + li {
  margin-top: 5px;
}

.ai-brief-footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.ai-brief-footnote small {
  color: var(--muted);
  font-weight: 800;
}

.detail-insight-grid,
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-insight-card,
.detail-metrics div {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px;
  min-width: 0;
}

.detail-insight-card.wide {
  grid-column: 1 / -1;
}

.detail-insight-card strong {
  display: block;
  color: var(--text);
  line-height: 1.5;
  margin-top: 7px;
  overflow-wrap: anywhere;
}

.detail-metrics strong {
  display: block;
  color: var(--text);
  font-size: 20px;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.detail-tags span {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 12px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.detail-action-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.detail-actions .text-button {
  width: auto;
  color: var(--accent);
  text-decoration: none;
}

.detail-copy-button {
  background: var(--panel);
}

.detail-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.detail-section-head h3 {
  margin: 0;
  font-size: 16px;
}

.detail-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-related {
  display: grid;
  gap: 10px;
}

.detail-related-list {
  display: grid;
  gap: 8px;
}

.detail-related-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.detail-related-item button {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.detail-related-item button:hover strong {
  color: var(--accent);
  text-decoration: underline;
}

.detail-related-item span,
.detail-related-item small {
  color: var(--muted);
  font-size: 12px;
}

.detail-related-item strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-related-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 14px;
  line-height: 1.5;
}

@media (max-width: 1380px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desk-brief {
    grid-template-columns: 1fr;
  }

  .brief-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(210px, 240px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  .sidebar > * {
    grid-column: 1;
  }

  .brand {
    grid-row: 1;
  }

  .workspace-switcher {
    grid-row: 2;
  }

  .mini-card {
    grid-row: 3;
  }

  .disclaimer {
    grid-row: 4;
  }

  .nav-group,
  .source-panel {
    grid-column: 2;
  }

  .nav-group {
    grid-row: 1;
  }

  .source-panel {
    grid-row: 2 / span 3;
  }

  .nav-group {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .source-panel {
    max-height: 230px;
  }

  .source-filter-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel-title {
    grid-column: 1 / -1;
  }

  .mini-card {
    margin-top: 0;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }
}

@media (max-width: 900px) {
  .nav-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .source-filter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 12px;
    display: grid;
    grid-template-columns: 1fr;
    background: color-mix(in srgb, var(--panel) 94%, var(--bg));
    backdrop-filter: blur(14px);
  }

  .sidebar > * {
    grid-column: 1;
    grid-row: auto;
  }

  .workspace-switcher,
  .mini-card,
  .disclaimer {
    display: none;
  }

  .source-panel {
    display: none;
  }

  .topbar {
    display: grid;
    gap: 16px;
  }

  h1 {
    font-size: 26px;
  }

  .toolbar,
  .search-box {
    width: 100%;
  }

  .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
    min-width: 0;
  }

  .refresh-status {
    grid-column: 1 / -1;
  }

  .search-box {
    grid-column: 1 / span 2;
  }

  #autoRefreshButton {
    grid-column: 2 / span 2;
  }

  .text-button,
  .icon-button {
    width: 100%;
  }

  .icon-button {
    width: 42px;
  }

  .summary-grid,
  .right-rail,
  .source-board-list,
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .brief-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .nav-item {
    width: 100%;
    min-width: 0;
    justify-content: center;
    white-space: normal;
    border: 1px solid var(--line);
    background: var(--panel);
  }

  .source-filter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    align-items: flex-start;
    display: grid;
  }

  .market-brief-head,
  .feed-divider {
    align-items: flex-start;
    display: grid;
  }

  .article-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .article-card.is-priority h3 {
    font-size: 17px;
  }

  .cluster-head,
  .cluster-item {
    grid-template-columns: 1fr;
  }

  .cluster-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-signal {
    grid-column: 2;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .ai-brief-grid {
    grid-template-columns: 1fr;
  }

  .ai-brief-provenance {
    grid-template-columns: 1fr;
  }

  .ai-brief-reliability {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-brief-evidence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .article-feedback {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .article-feedback button {
    flex: 1;
  }

  .article-drawer {
    display: block;
  }

  .article-drawer-backdrop {
    position: absolute;
    inset: 0;
  }

  .article-drawer-panel {
    position: absolute;
    inset: 0;
    border-left: 0;
    padding: 18px;
  }

  .drawer-content h2 {
    font-size: 24px;
  }

  .right-rail {
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .main,
  .sidebar {
    padding: 14px;
  }

  h1 {
    font-size: 24px;
  }

  .topbar p {
    line-height: 1.5;
  }

  .nav-item {
    min-height: 38px;
  }

  .nav-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid,
  .brief-grid,
  .brief-status-grid {
    grid-template-columns: 1fr;
  }

  .desk-brief {
    padding: 14px;
  }

  .brief-copy strong {
    font-size: 20px;
  }

  .trust-strip div {
    padding: 10px 12px;
  }

  .source-panel {
    max-height: 170px;
  }

  .focus-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .focus-strip button {
    border-radius: 8px;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
    padding: 0 8px;
  }

  .source-board-item {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .source-board-score {
    grid-column: 2;
  }

  .cluster-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .detail-insight-grid,
  .detail-metrics {
    grid-template-columns: 1fr;
  }

  .ai-brief-evidence {
    grid-template-columns: 1fr;
  }

  .ai-brief-provenance {
    grid-template-columns: 1fr;
  }

  .ai-brief-reliability {
    grid-template-columns: 1fr;
  }

  .detail-related-item {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    display: grid;
  }

  .detail-action-group {
    display: grid;
    width: 100%;
  }

  .detail-actions .article-feedback,
  .detail-actions .text-button {
    width: 100%;
  }

	  .empty-state,
	  .loading-skeleton {
	    padding: 14px;
	  }
	}

@media (max-width: 760px) {
  .sidebar {
    padding: 10px 12px;
    gap: 8px;
    box-shadow: 0 1px 0 var(--line);
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand small {
    display: none;
  }

  .nav-group {
    display: flex;
    grid-template-columns: none;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav-group::-webkit-scrollbar,
  .focus-strip::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 34px;
    padding: 0 10px;
    white-space: nowrap;
    box-shadow: none;
  }

  .nav-item.is-active,
  .nav-item:hover {
    box-shadow: inset 0 -2px 0 var(--brand);
  }

  .main {
    padding: 12px;
  }

  .topbar {
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .eyebrow,
  .topbar p,
  .refresh-status,
  #refreshNowButton,
  #autoRefreshButton,
  .summary-grid,
  .trust-strip,
  .right-rail {
    display: none;
  }

  h1 {
    margin-top: 0;
    font-size: 22px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .search-box {
    grid-column: 1;
    height: 40px;
  }

  #themeButton {
    grid-column: 2;
  }

  .focus-strip {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 2px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .focus-strip button {
    flex: 0 0 auto;
    min-width: 126px;
    min-height: 38px;
    border-radius: 8px;
    padding: 5px 9px;
  }

  .focus-basis {
    display: none;
  }

  .section-head {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-bottom: 6px;
  }

  .section-head h2 {
    font-size: 18px;
  }

  .section-head p {
    display: none;
  }

  .segmented {
    width: auto;
    flex: 0 0 auto;
  }

  .segmented button {
    min-height: 30px;
    padding: 0 10px;
  }

  .feed-list {
    gap: 7px;
  }

  .article-card {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .article-rank {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .article-meta {
    gap: 4px;
    font-size: 12px;
  }

  .source-pill,
  .topic-pill,
  .brief-preview-pill,
  .tier-pill {
    max-width: 100%;
    padding: 1px 6px;
  }

  h3,
  .article-card.is-priority h3 {
    margin: 5px 0;
    font-size: 15px;
  }

  .article-original-title {
    display: none;
  }

  .article-body p {
    -webkit-line-clamp: 2;
  }

  .article-insight {
    margin-top: 5px;
  }

  .insight-panel {
    padding: 6px;
  }

  .insight-primary {
    display: grid;
    gap: 2px;
  }

  .article-actions {
    margin-top: 6px;
    padding-top: 6px;
  }

  .article-signal {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 7px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .sparkline {
    display: none;
  }
}

@media (max-width: 520px) {
  .main,
  .sidebar {
    padding: 10px 12px;
  }

  .nav-group {
    grid-template-columns: none;
  }

  .focus-strip button {
    min-width: 120px;
  }
}
