/* ==========================================================================
   Daily Briefing — Editorial Intelligence Broadsheet Stylesheet
   ========================================================================== */

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-subtle: #f3f0ea;
  --border: #e4dfd6;
  --border-strong: #cfc8bc;

  --ink: #181a1f;
  --ink-secondary: #4a505c;
  --ink-muted: #6f7684;

  --accent: #a63a2b;
  --accent-soft: rgba(166, 58, 43, 0.09);

  --pos: #157347;
  --pos-soft: rgba(21, 115, 71, 0.11);
  --neg: #b9382c;
  --neg-soft: rgba(185, 56, 44, 0.11);
  --warn: #b4690e;
  --warn-soft: rgba(180, 105, 14, 0.12);
  --neutral-badge: #eef0f3;

  --bias-center: #2b6e58;
  --bias-left: #2b6cb0;
  --bias-right: #b9382c;
  --bias-state: #b4690e;

  --sent-very-neg: #9e1f1f;
  --sent-neg: #c84632;
  --sent-slight-neg: #d97a2b;
  --sent-neutral: #848d9c;
  --sent-slight-pos: #5a9e6f;
  --sent-pos: #1f8454;
  --sent-very-pos: #0e6b4f;

  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 8px;
  --radius-sm: 5px;
  --shadow-sm: 0 1px 2px rgba(24, 26, 31, 0.04);
  --shadow-md: 0 4px 14px rgba(24, 26, 31, 0.06);
  --max-width: 1180px;
}

[data-theme="dark"] {
  --bg: #161b24;
  --surface: #1d2430;
  --surface-subtle: #242d3c;
  --border: #303a4d;
  --border-strong: #435068;

  --ink: #eef0f4;
  --ink-secondary: #bcc4d2;
  --ink-muted: #8a95a8;

  --accent: #e06d53;
  --accent-soft: rgba(224, 109, 83, 0.14);

  --pos: #34c38f;
  --pos-soft: rgba(52, 195, 143, 0.14);
  --neg: #f06558;
  --neg-soft: rgba(240, 101, 88, 0.14);
  --warn: #e6a23c;
  --warn-soft: rgba(230, 162, 60, 0.15);
  --neutral-badge: #273142;

  --bias-center: #5ec49b;
  --bias-left: #6eaef5;
  --bias-right: #f07468;
  --bias-state: #e6a23c;

  --sent-very-neg: #ff5252;
  --sent-neg: #f06f5d;
  --sent-slight-neg: #e89c4a;
  --sent-neutral: #8a95a8;
  --sent-slight-pos: #73c48d;
  --sent-pos: #34c38f;
  --sent-very-pos: #20d4a0;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

/* ---------- Masthead ---------- */

.masthead {
  background: var(--surface);
}

.masthead-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.back-home {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: 4px;
  transition: color 0.15s ease;
}

.back-home:hover {
  color: var(--accent);
}

.title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.masthead h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.edition-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.masthead-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.masthead-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.masthead-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.masthead-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.masthead-btn[aria-expanded="true"] .collapse-chevron {
  transform: rotate(180deg);
}

.masthead-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.masthead-icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.masthead-icon-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.masthead-icon-btn.is-spinning svg {
  animation: spin-once 0.75s linear infinite;
}

@keyframes spin-once {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.masthead-controls .segmented {
  height: 32px;
  align-items: stretch;
}

.masthead-controls .seg-btn {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
}

.archive-nav {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  padding: 0 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.icon-btn:hover:not(:disabled) {
  background: var(--border);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.date-select {
  appearance: none;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  height: 100%;
  padding: 0 12px;
  cursor: pointer;
  outline: none;
}

/* ---------- Section Nav ---------- */

.section-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.section-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  overflow-x: auto;
}

.nav-links {
  display: flex;
  gap: 20px;
  white-space: nowrap;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-links a.active {
  font-weight: 600;
}

.health-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.health-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.health-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pos);
}

.health-dot.partial {
  background: var(--warn);
}

.health-dot.failed {
  background: var(--neg);
}

/* ---------- Main Layout ---------- */

.main-content {
  padding-top: 26px;
  padding-bottom: 64px;
}

.status-banner {
  background: var(--warn-soft);
  border: 1px solid var(--warn);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13.5px;
}

.section {
  margin-bottom: 44px;
  scroll-margin-top: calc(var(--nav-height, 43px) + 8px);
}

.section-header {
  position: sticky;
  top: var(--nav-height, 43px);
  z-index: 25;
  background: var(--bg);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 2px;
}

h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-narrative {
  margin: 0 0 20px;
  max-width: 90%;
  font-size: 15.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
}

.executive-list li strong,
.section-narrative strong,
.news-summary strong,
.conflict-summary strong,
.policy-summary strong,
.topic-note strong {
  font-weight: 600;
  color: var(--ink);
}

.ticker-tag {
  position: relative;
  display: inline-block;
  padding: 0 5px;
  margin: 0 1px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.86em;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: baseline;
  white-space: nowrap;
  cursor: help;
}

.icon-glue {
  white-space: nowrap;
}

.ticker-tag.pos {
  border-color: rgba(21, 115, 71, 0.35);
  background: var(--pos-soft);
}

.ticker-tag.neg {
  border-color: rgba(185, 56, 44, 0.35);
  background: var(--neg-soft);
}

.ticker-tag.is-private {
  border-color: var(--border-strong);
  background: var(--neutral-badge);
}

.company-mention {
  cursor: help;
}

.country-mention {
  display: inline;
  border-bottom: 1px dashed var(--border-strong);
  border-bottom-color: color-mix(in srgb, var(--ink-muted) 65%, transparent);
  padding-bottom: 1px;
  cursor: help;
}

.country-map-tip {
  position: fixed;
  z-index: 70;
  width: 240px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 9px;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

[data-theme="dark"] .country-map-tip {
  background: #0f141c;
  border-color: var(--border-strong);
}

.cmap-stage {
  width: 100%;
  height: 124px;
  border-radius: 5px;
  background: var(--surface-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .cmap-stage {
  background: #161d29;
}

.cmap-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cmap-land {
  fill: var(--border);
  stroke: var(--surface);
  stroke-width: 0.6;
  stroke-linejoin: round;
}

[data-theme="dark"] .cmap-land {
  fill: #2a3447;
  stroke: #161d29;
}

.cmap-target {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 0.75;
  stroke-linejoin: round;
}

.cmap-dot-ring {
  fill: var(--accent);
  fill-opacity: 0.25;
}

.cmap-dot {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 1;
}

.cmap-loading {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.cmap-footer {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cmap-title {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.cmap-title.is-city {
  justify-content: space-between;
  gap: 8px;
}

.cmap-title-left {
  display: inline-flex;
  align-items: center;
}

.cmap-title.is-city .cmap-cont {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-muted);
}

.cmap-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
}

.cmap-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.cmap-cont {
  opacity: 0.8;
  white-space: nowrap;
}

.party-mention {
  display: inline;
  border-bottom: 1px dashed var(--border-strong);
  padding-bottom: 1px;
}

.party-mention.dem {
  border-bottom-color: color-mix(in srgb, #2563eb 65%, transparent);
}

.party-mention.gop {
  border-bottom-color: color-mix(in srgb, #dc2626 65%, transparent);
}

.inline-party-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  margin-right: 4px;
  margin-top: -2px;
  vertical-align: middle;
  border-radius: 3px;
}

.inline-flag-icon {
  display: inline-block;
  width: 16px;
  height: 12px;
  min-width: 16px;
  min-height: 12px;
  margin-right: 4px;
  margin-top: -2px;
  border-radius: 2.5px;
  vertical-align: middle;
  object-fit: fill;
  box-shadow: 0 0 0 0.75px var(--border-strong);
}

.inline-logo {
  display: inline-block;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  margin-right: 4px;
  margin-top: -2px;
  border-radius: 3px;
  vertical-align: middle;
  object-fit: contain;
  background: #ffffff;
  padding: 1px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.14);
}

.ticker-tag .inline-logo {
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  margin-right: 3px;
  margin-top: -2px;
  vertical-align: middle;
}

.floating-tip {
  position: fixed;
  z-index: 65;
  background: var(--ink);
  color: var(--bg);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.35;
  max-width: calc(100vw - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.floating-tip.is-subtle {
  background: var(--surface);
  color: var(--ink-secondary);
  border: 1px solid var(--border-strong);
}

.floating-tip.is-company {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-family: var(--font-sans);
  font-size: 12px;
  white-space: normal;
  overflow: visible;
  min-width: 215px;
  max-width: min(290px, calc(100vw - 24px));
}

[data-theme="dark"] .floating-tip.is-company {
  background: #0f141c;
  color: var(--ink);
  border-color: var(--border-strong);
}

.ctip-head {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.ctip-quote {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-secondary);
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.ctip-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  font-size: 11.5px;
  line-height: 1.4;
}

.ctip-k {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding-top: 1px;
}

.ctip-v {
  color: var(--ink);
  font-weight: 500;
}

.ctip-bias {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ctip-bias .half-ring-svg {
  width: 20px;
  height: 13px;
  flex-shrink: 0;
}

.cmap-target.is-region {
  fill-opacity: 0.35;
}

/* ---------- KPI Strip & Executive Brief ---------- */

.kpi-wrapper {
  margin-bottom: 18px;
}

.kpi-mobile-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.kpi-toggle-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
}

.kpi-mobile-toggle[aria-expanded="true"] .collapse-chevron {
  transform: rotate(180deg);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.kpi-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brief-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.afternoon-panel {
  margin-top: 16px;
  border-top-color: var(--warn);
}

.afternoon-kicker {
  color: var(--warn);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mode-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}

.executive-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.executive-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
}

.exec-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.exec-text {
  flex: 1;
  min-width: 0;
}

.sentiment-gauge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 14px;
  flex-shrink: 0;
  cursor: help;
}

.half-ring-svg {
  width: 22px;
  height: 13px;
  display: block;
  overflow: visible;
}

.half-ring-track {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.7;
}

/* ---------- News Grid ---------- */

.filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.news-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.news-card.is-collapsed {
  padding: 14px 18px;
  gap: 8px;
  background: var(--surface-subtle);
}

.news-card.is-collapsed .news-summary,
.news-card.is-collapsed .why-box,
.news-card.is-collapsed .source-links {
  display: none;
}

.news-card-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.continued-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--neutral-badge);
  padding: 2px 6px;
  border-radius: 4px;
}

.afternoon-pill,
.morning-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
}

.afternoon-pill {
  color: var(--warn);
  background: var(--warn-soft);
}

.morning-pill {
  color: var(--accent);
  background: var(--accent-soft);
}

.card-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.card-toggle-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cat-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--ink-secondary);
}

.news-card h3 {
  font-family: var(--font-serif);
  font-size: 18.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.news-summary {
  margin: 0;
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.why-box {
  margin-top: auto;
  padding: 9px 11px;
  background: var(--surface-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink-secondary);
}

.why-box strong {
  color: var(--ink);
  font-weight: 600;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.source-chip {
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.source-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.source-popover {
  position: fixed;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  font-size: 10.5px;
  max-width: calc(100vw - 24px);
}

.source-popover.is-hover {
  pointer-events: none;
  opacity: 0.94;
}

.source-popover-bias {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
  font-weight: 500;
}

.source-popover-bias[data-bias-tone="center"] { color: var(--bias-center); }
.source-popover-bias[data-bias-tone="left"] { color: var(--bias-left); }
.source-popover-bias[data-bias-tone="right"] { color: var(--bias-right); }
.source-popover-bias[data-bias-tone="state"] { color: var(--bias-state); }

.source-popover-link {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  padding-left: 6px;
  border-left: 1px solid var(--border);
}

/* ---------- Markets & Sector Heatmap ---------- */

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pos);
}

.live-dot.fresh {
  background: var(--pos);
}

.live-dot.aging {
  background: var(--warn);
}

.live-dot.stale {
  background: var(--neg);
}

.regime-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--neutral-badge);
  color: var(--ink);
}

.regime-badge.risk-on {
  background: var(--pos-soft);
  color: var(--pos);
}

.regime-badge.risk-off,
.regime-badge.volatility-spike {
  background: var(--neg-soft);
  color: var(--neg);
}

.segmented {
  display: inline-flex;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
  margin-bottom: 24px;
}

.fear-greed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.fg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.fg-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.fg-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.fg-score {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.fg-scale {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.fg-rating {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--neutral-badge);
  color: var(--ink);
}

.fg-rating.extreme-fear,
.fg-rating.fear {
  background: var(--neg-soft);
  color: var(--neg);
}

.fg-rating.greed,
.fg-rating.extreme-greed {
  background: var(--pos-soft);
  color: var(--pos);
}

.fg-rating.neutral {
  background: var(--warn-soft);
  color: var(--warn);
}

.fg-history {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.fg-history strong {
  color: var(--ink);
}

.fg-bar-wrap {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #b9382c 0%,
    #e07a38 25%,
    #d4a72c 50%,
    #5fa85b 75%,
    #157347 100%
  );
  margin-bottom: 6px;
}

.fg-marker {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--ink);
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.fg-zones {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.quote-card:hover {
  border-color: var(--border-strong);
}

.quote-card.is-expanded {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.quote-card.is-expanded .quote-name {
  font-size: 15px;
}

.quote-card.is-expanded .quote-mid {
  margin: 4px 0 6px;
}

.quote-card.is-expanded .quote-price {
  font-size: 20px;
}

.quote-card.is-expanded .sparkline {
  height: 92px;
}

.quote-expanded-stats {
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
}

.quote-card.is-expanded .quote-expanded-stats {
  display: grid;
}

.quote-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quote-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.quote-stat-val {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.quote-stat-val.pos {
  color: var(--pos);
}

.quote-stat-val.neg {
  color: var(--neg);
}

.quote-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.quote-name {
  font-size: 13.5px;
  font-weight: 600;
}

.quote-name[data-company-domain],
.source-chip[data-bias],
.live-pill[title],
[data-tooltip] {
  cursor: help;
}

.quote-top-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.quote-prev-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.2;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--neutral-badge);
  color: var(--ink-muted);
  white-space: nowrap;
  cursor: help;
}

.quote-sym {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.quote-mid {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 6px 0 8px;
}

.quote-price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.delta-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 2px 6px;
  border-radius: 4px;
}

.delta-pill.pos {
  background: var(--pos-soft);
  color: var(--pos);
}

.delta-pill.neg {
  background: var(--neg-soft);
  color: var(--neg);
}

.delta-pill.flat {
  background: var(--neutral-badge);
  color: var(--ink-muted);
}

.sparkline-wrap {
  position: relative;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}

.sparkline {
  width: 100%;
  height: 36px;
  display: block;
  overflow: visible;
}

.sparkline polyline,
.spark-guide {
  vector-effect: non-scaling-stroke;
}

.quote-card.is-expanded .sparkline polyline {
  stroke-width: 1.75;
}

.spark-guide {
  stroke: var(--ink-muted);
  stroke-width: 1;
  stroke-dasharray: 2 2;
  opacity: 0;
  pointer-events: none;
}

.spark-close-line {
  stroke: var(--border-strong);
  stroke-width: 1;
  stroke-dasharray: 2 2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.spark-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.75px solid var(--surface);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.quote-card.is-expanded .spark-dot {
  width: 9px;
  height: 9px;
}

.sparkline-wrap.hovering .spark-guide,
.sparkline-wrap.hovering .spark-dot {
  opacity: 1;
}

.spark-tooltip {
  position: absolute;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

[data-theme="dark"] .spark-tooltip,
[data-theme="dark"] .floating-tip {
  background: #0f141c;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
}

.spark-tip-time {
  font-weight: 400;
  opacity: 0.72;
  margin-right: 4px;
}

.sub-block {
  margin-top: 8px;
}

.sub-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.sub-note {
  font-size: 12px;
  color: var(--ink-muted);
}

.sector-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.sector-tile {
  border-radius: var(--radius-sm);
  padding: 14px 13px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.12s ease;
}

.sector-tile:hover {
  transform: translateY(-1px);
}

.sector-sym {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.85;
}

.sector-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.sector-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* ---------- Global Conflicts ---------- */

.conflicts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.conflict-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.conflict-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.conflict-region {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.conflict-card h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  margin-top: 2px;
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.status-badge.escalating {
  background: var(--neg-soft);
  color: var(--neg);
}

.status-badge.elevated {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-badge.stable {
  background: var(--neutral-badge);
  color: var(--ink-secondary);
}

.status-badge.de-escalating {
  background: var(--pos-soft);
  color: var(--pos);
}

.intensity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: var(--surface-subtle);
  border-radius: var(--radius-sm);
}

.intensity-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.intensity-meta strong {
  color: var(--ink);
}

.intensity-spark-wrap {
  width: 110px;
  flex-shrink: 0;
}

.intensity-spark {
  width: 100%;
  height: 28px;
  display: block;
  overflow: visible;
}

.conflict-summary {
  margin: 0;
  font-size: 14px;
  color: var(--ink-secondary);
}

.timeline-list {
  margin: 0;
  padding: 10px 0 0;
  list-style: none;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 7px;
}

.timeline-list li {
  font-size: 13px;
  line-height: 1.4;
}

.timeline-list a {
  color: var(--ink-secondary);
  transition: color 0.15s ease;
}

.timeline-list a:hover {
  color: var(--accent);
}

.timeline-src {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  margin-left: 6px;
}

/* ---------- US Politics ---------- */

.politics-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: start;
}

.polymarket-list,
.policy-list,
.topics-list {
  display: grid;
  gap: 10px;
}

.poly-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: block;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.poly-card:hover {
  border-color: var(--border-strong);
}

.poly-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.poly-q {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.poly-odds {
  text-align: right;
  flex-shrink: 0;
}

.poly-pct {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.poly-bar-track {
  height: 7px;
  background: var(--surface-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 7px;
}

.poly-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.poly-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.policy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
}

.policy-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  margin-bottom: 6px;
}

.policy-title {
  display: block;
  width: 100%;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.policy-title:hover {
  color: var(--accent);
}

.branch-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--ink-muted);
  white-space: nowrap;
}

.policy-summary {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.topics-header {
  margin-top: 22px;
}

.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 15px;
}

.topic-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.topic-name {
  font-size: 14px;
  font-weight: 600;
}

.momentum-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}

.momentum-pill.rising {
  background: var(--accent-soft);
  color: var(--accent);
}

.momentum-pill.steady {
  background: var(--neutral-badge);
  color: var(--ink-secondary);
}

.momentum-pill.cooling {
  background: var(--pos-soft);
  color: var(--pos);
}

.topic-note {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

/* ---------- Positive News ---------- */

.positive-kicker {
  color: var(--pos);
}

.positive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.positive-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--pos);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.positive-card .cat-pill {
  background: var(--pos-soft);
  color: var(--pos);
}

.positive-card h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.positive-grid.is-single .positive-card {
  padding: 20px 24px;
}

.positive-grid.is-single .positive-card h3 {
  font-size: 21px;
}

.positive-card .source-links {
  margin-top: auto;
}

/* ---------- Local News (Collapsible) ---------- */

.collapse-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.collapse-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.collapsible-title {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.collapsible-title:hover {
  color: var(--accent);
}

.collapse-chevron {
  display: inline-block;
  font-size: 11px;
  transition: transform 0.18s ease;
}

.collapse-btn[aria-expanded="true"] .collapse-chevron {
  transform: rotate(180deg);
}

.local-news-body {
  padding-top: 4px;
}

/* ---------- Footer & Skeletons ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--ink-muted);
  font-size: 13.5px;
}

.skeleton-line {
  height: 16px;
  background: var(--surface-subtle);
  border-radius: 4px;
  list-style: none;
}

@media (max-width: 860px) {
  .section-narrative {
    max-width: 100%;
  }

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

  .masthead h1 {
    font-size: 24px;
  }

  .brief-panel {
    padding: 18px;
  }
}

@media (max-width: 680px) {
  .kpi-mobile-toggle {
    display: flex;
  }

  .kpi-wrapper:not(.is-expanded) .kpi-strip {
    display: none;
  }

  .kpi-wrapper.is-expanded .kpi-strip {
    margin-top: 10px;
  }

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

  .quote-card {
    padding: 11px 12px;
  }

  .quote-price {
    font-size: 15px;
  }

  .delta-pill {
    font-size: 11px;
    padding: 2px 5px;
  }
}
