:root {
  color-scheme: dark;
  --bg: #08090b;
  --panel: #11151b;
  --panel-2: #151b22;
  --text: #f4f7fb;
  --muted: #9aa8b7;
  --line: #26313d;
  --accent: #39d98a;
  --accent-2: #5cc8ff;
  --warn: #f6c85f;
  --danger: #ff6b6b;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

.site-header,
.site-footer,
main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #345044;
  border-radius: var(--radius);
  background: #0e2118;
  color: var(--accent);
  font-weight: 800;
}

.brand-text,
.nav a,
.meta-row,
.site-footer,
.support,
.page-head p,
.topic-card p,
.signal-card p,
.brief-block p,
.pulse-main small {
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.94rem;
}

.nav a:hover,
.section-head a:hover,
.topic-card a:hover,
.signal-card a:hover {
  color: var(--accent);
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: 40px;
  align-items: center;
  padding: 56px 0;
}

.eyebrow,
.section-label,
.panel-label,
.category {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 16px;
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.page-head h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
}

.lede {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(1.25rem, 3vw, 2rem);
  color: #dfe8f3;
}

.support {
  max-width: 720px;
  font-size: 1.04rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--panel);
  font-weight: 700;
}

.button.primary {
  border-color: #286b49;
  background: #123321;
  color: var(--accent);
}

.hero-panel,
.topic-card,
.brief-block,
.signal-card,
.table-wrap,
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.scanline {
  height: 3px;
  margin: -20px -20px 20px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--warn));
}

.mini-signal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.mini-signal strong,
.score {
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.section,
.page-head,
.table-wrap {
  margin: 52px 0;
}

.page-head {
  max-width: 900px;
}

.page-head p {
  font-size: 1.08rem;
  line-height: 1.7;
}

.section-head,
.card-top,
.signal-top,
.meta-row,
.pulse-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
}

.section-head a {
  color: var(--accent-2);
  font-weight: 700;
}

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

.topic-card {
  min-height: 230px;
  padding: 18px;
}

.topic-card p,
.signal-card p,
.brief-block p {
  line-height: 1.6;
}

.meta-row {
  flex-wrap: wrap;
  margin-top: 18px;
  font-size: 0.88rem;
}

.meta-row.strong {
  color: #dce8f5;
}

.brief-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 36px 0;
}

.status-grid,
.source-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 36px 0;
}

.stat-card {
  min-height: 132px;
  padding: 18px;
}

.stat-card strong {
  display: block;
  margin-top: 16px;
  color: #eef6ff;
  font-size: 1.7rem;
  line-height: 1.15;
}

.stat-card p {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.55;
}

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

.source-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.source-row span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.source-row small {
  color: var(--muted);
}

.brief-block {
  padding: 20px;
}

.brief-block.wide {
  grid-column: 1 / -1;
}

.quick {
  color: #e7eef7;
  font-size: 1.15rem;
}

.clean-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #dce6ef;
  line-height: 1.7;
}

.signals {
  display: grid;
  gap: 12px;
}

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

.signal-card {
  padding: 18px;
}

.ai-why {
  margin-top: 10px;
  color: #dbe8f2;
}

.ai-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.muted-note {
  color: var(--muted);
  line-height: 1.6;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid #315442;
  border-radius: 999px;
  background: #0f231a;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.signal-strength,
.event-time,
.rank {
  color: var(--muted);
  font-size: 0.88rem;
}

.table-wrap {
  overflow: hidden;
}

.pulse-list {
  display: grid;
}

.pulse-row {
  min-height: 76px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.pulse-row:last-child {
  border-bottom: 0;
}

.rank {
  width: 28px;
  font-variant-numeric: tabular-nums;
}

.pulse-main {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.pulse-meta {
  display: contents;
}

.site-footer {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.footer-brand,
.footer-meta {
  display: grid;
  gap: 6px;
}

.footer-brand {
  max-width: 680px;
}

.footer-brand span:first-child {
  color: #dbe5ef;
  font-weight: 650;
}

.footer-brand a {
  color: var(--accent);
}

.footer-brand a:hover {
  color: var(--accent-2);
}

.footer-meta {
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}

.topic-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.editorial {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.signal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.signal-summary strong,
.signal-summary span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.limited-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #5a4f2d;
  border-radius: var(--radius);
  background: #1f1b10;
}

.limited-note p {
  margin: 0;
  color: #d8cfae;
  line-height: 1.55;
}

.signal-card {
  border-left: 3px solid #33414f;
}

.signal-new,
.signal-rising,
.signal-source-backed {
  border-left-color: var(--accent);
}

.signal-low-signal,
.signal-noise {
  opacity: 0.82;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.short-link {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.share-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #315442;
  border-radius: var(--radius);
  color: var(--accent);
  background: #0f231a;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.share-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.repost-count,
.copy-status {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.source-chips span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: #dce7f2;
}

.source-chips strong {
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.status-high-signal {
  border-color: #277149;
  background: #0f2a1c;
  color: var(--accent);
}

.status-moving {
  border-color: #23637b;
  background: #0d2530;
  color: var(--accent-2);
}

.status-watch {
  border-color: #5c512f;
  background: #211d10;
  color: var(--warn);
}

.status-quiet,
.status-limited-data {
  border-color: #3a4653;
  background: #171d24;
  color: var(--muted);
}

.dashboard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.dashboard-row {
  display: grid;
  grid-template-columns: 34px minmax(260px, 1fr) repeat(7, auto) minmax(120px, auto);
}

.metric,
.updated {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.brief-grid {
  margin: 36px 0 56px;
}

.brief-preview {
  min-height: 280px;
}

.quality-module {
  background: #10161d;
}

.quality-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.quality-strip span {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--muted);
}

.quality-strip strong {
  color: #eef6ff;
  font-size: 1rem;
}

.quality-label {
  border-color: #4a5260;
  background: #171d25;
  color: #dce7f2;
}

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

.mini-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mini-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.quality-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.quality-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) minmax(110px, auto) repeat(6, minmax(70px, auto)) minmax(150px, auto) minmax(130px, auto);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: #dce7f2;
}

.quality-row:last-child {
  border-bottom: 0;
}

.quality-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.source-health-head,
.source-health-row {
  grid-template-columns: minmax(180px, 1.4fr) repeat(7, minmax(88px, auto)) minmax(220px, 1fr);
}

.mini-signal span {
  display: grid;
  gap: 3px;
}

.mini-signal small {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 44px 0 28px;
  }

  .topic-grid,
  .homepage-signals,
  .brief-layout,
  .status-grid,
  .source-groups,
  .quality-columns {
    grid-template-columns: 1fr;
  }

  .pulse-row {
    align-items: flex-start;
  }

  .dashboard-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px 12px;
    min-height: 0;
    padding: 18px 16px;
  }

  .dashboard-row .rank {
    grid-column: 1;
    grid-row: 1 / span 4;
    width: auto;
    padding-top: 2px;
  }

  .dashboard-row .pulse-main {
    grid-column: 2;
    min-width: 0;
  }

  .dashboard-row .pulse-meta {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .dashboard-row .pulse-main strong,
  .dashboard-row .pulse-main small {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  .dashboard-row .pulse-main strong {
    font-size: 1.06rem;
    line-height: 1.2;
  }

  .dashboard-row .pulse-main small {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-height: 1.42;
  }

  .pulse-meta .pill,
  .pulse-meta .metric,
  .pulse-meta .score,
  .pulse-meta .updated {
    justify-self: start;
    white-space: normal;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .signal-summary {
    grid-template-columns: 1fr;
  }

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

  .quality-table {
    overflow-x: auto;
  }

  .quality-row {
    min-width: 1080px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 22px, 1160px);
  }

  .brand-text {
    display: none;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .footer-meta {
    justify-items: start;
    text-align: left;
    white-space: normal;
  }

  h1,
  .page-head h1 {
    font-size: 2.7rem;
    line-height: 1;
  }
}
