: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;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
  color: var(--brand-strong);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(10, 37, 64, 0.09);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

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

.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-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-tags button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  min-height: 32px;
  padding: 0 10px;
}

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

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

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

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

  .article-feedback button {
    flex: 1;
  }

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

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