:root {
  color-scheme: light;
  --ink: #171a18;
  --muted: #626a64;
  --faint: #8a938d;
  --line: #dde3de;
  --line-strong: #c7d0ca;
  --surface: #ffffff;
  --wash: #f7f8f6;
  --soft: #eef2ee;
  --primary: #236b5f;
  --primary-soft: #e4f0ec;
  --news: #316b9d;
  --claim: #96742b;
  --alert: #a14034;
  --feed-shadow: 0 18px 46px rgba(23, 26, 24, 0.09);
  --metric-shadow: 0 6px 16px rgba(23, 26, 24, 0.035);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(23, 26, 24, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 26, 24, 0.018) 1px, transparent 1px),
    var(--wash);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration-color: rgba(35, 107, 95, 0.42);
  text-underline-offset: 4px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 52px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 246, 0.93);
  backdrop-filter: blur(16px);
}

.brand,
nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 780;
  text-decoration: none;
}

.brand-mark {
  width: 15px;
  height: 15px;
  border: 4px solid var(--primary);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #dce9e4;
}

nav {
  gap: 4px;
}

nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 680;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  background: var(--soft);
  color: var(--ink);
}

main {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
}

.briefing-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0 12px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 840;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  display: inline-block;
  margin-bottom: 0;
  font-size: 1.48rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  padding-bottom: 9px;
  border-bottom: 2px solid var(--ink);
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.briefing-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, auto));
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--metric-shadow);
}

.briefing-metrics div {
  min-height: 52px;
  padding: 9px 12px;
  border-left: 1px solid var(--line);
}

.briefing-metrics div:first-child {
  border-left: 0;
}

.briefing-metrics dt {
  color: var(--faint);
  font-size: 0.67rem;
  font-weight: 780;
  text-transform: uppercase;
}

.briefing-metrics dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 760;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 22px;
  align-items: start;
  padding: 14px 0 32px;
}

.updates-panel,
.rail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.updates-panel {
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdfb 100%);
  box-shadow: var(--feed-shadow);
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.updates-panel > .panel-head {
  border-bottom: 2px solid var(--ink);
}

.panel-head.compact {
  padding-bottom: 14px;
}

.feed-message {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.feed-message[hidden] {
  display: none;
}

.feed-list {
  display: grid;
}

.feed-card {
  display: grid;
  gap: 9px;
  padding: 15px 16px 15px 18px;
  border-top: 1px solid var(--line);
  border-left: 2px solid transparent;
  background: transparent;
}

.feed-card:first-child {
  border-top: 0;
}

.feed-card:hover {
  border-left-color: var(--primary);
  background: rgba(255, 255, 255, 0.58);
}

.feed-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.classification {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 0 0 8px;
  border-left: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}

.classification.secondary {
  border-left-color: var(--news);
  color: var(--news);
}

.feed-card time,
.timeline-list time {
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.feed-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.28;
  letter-spacing: 0;
}

.feed-card p {
  max-width: 78ch;
  margin: 0;
  color: #343b37;
  font-size: 0.9rem;
}

.feed-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.feed-card-footer > * {
  display: inline-flex;
  align-items: center;
}

.feed-card-footer > * + *::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 14px;
  border-radius: 50%;
  background: var(--line-strong);
}

.feed-source {
  color: var(--ink);
  font-weight: 700;
}

.feed-card-footer a {
  font-weight: 720;
}

.side-rail {
  position: sticky;
  top: 70px;
  display: grid;
  gap: 14px;
}

.rail-panel {
  overflow: hidden;
  box-shadow: none;
}

.source-list,
.timeline-list,
.rank-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-list li,
.timeline-list li,
.rank-list div {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}

.source-list a {
  display: block;
  font-size: 0.88rem;
  font-weight: 730;
}

.source-list span,
.timeline-list span,
.rank-list dd {
  color: var(--muted);
  font-size: 0.8rem;
}

.source-list span {
  display: block;
  margin-top: 3px;
  text-transform: capitalize;
}

.timeline-list li {
  display: grid;
  gap: 4px;
}

.rank-list dt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.84rem;
  font-weight: 760;
}

.rank-list dd {
  margin: 0;
}

.rank-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.rank-dot.primary {
  background: var(--primary);
}

.rank-dot.news {
  background: var(--news);
}

.rank-dot.claims {
  background: var(--claim);
}

.disclaimer {
  margin: -8px 0 30px;
  padding: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
  text-align: center;
}

.disclaimer p {
  margin: 0;
}

footer {
  border-top: 1px solid var(--line);
  padding: 18px 28px 30px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

footer p {
  margin: 0;
}

@media (max-width: 940px) {
  .briefing-bar,
  .workspace {
    grid-template-columns: 1fr;
  }

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

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

}

@media (max-width: 720px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 18px;
  }

  nav {
    flex-wrap: wrap;
  }

  main {
    width: min(100% - 24px, 1240px);
  }

  h1 {
    font-size: 1.5rem;
  }

  .briefing-metrics,
  .side-rail {
    grid-template-columns: 1fr;
  }

  .briefing-metrics div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .briefing-metrics div:first-child {
    border-top: 0;
  }

  .panel-head,
  .feed-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .feed-message {
    text-align: left;
  }

  .feed-card-footer {
    display: grid;
    gap: 4px;
  }

  .feed-card-footer > * + *::before {
    display: none;
  }
}
