/* Pheme — broadsheet editorial news briefing styles */
:root {
  --paper: #E9E2D3;
  --paper-alt: #DDD3C0;
  --surface: #F7F1E7;
  --ink: #2E2A24;
  --ink-body: #4B443B;
  --ink-muted: #6F675C;
  --blue: #2F5D50;
  --blue-hover: #24473D;
  --rule: #CBBEAA;
  --rule-soft: #DED4C4;
  --page-gutter: clamp(16px, 1.6vw, 28px);
  --display: 'Playfair Display', 'Newsreader', Georgia, 'Times New Roman', serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }
a:hover { color: var(--blue-hover); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.noscript { padding: 32px; font-family: var(--serif); }

.wrap {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

/* ---------- Masthead & Topic Bar ---------- */
.masthead-wrap {
  background: var(--paper);
  position: relative;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 0 14px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
}

.brand-logo {
  width: clamp(34px, 3.6vw, 44px);
  height: clamp(34px, 3.6vw, 44px);
  border-radius: 50%;
  flex: none;
  display: block;
}

.topbar-date {
  justify-self: center;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.topbar-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.search-toggle {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.search-toggle:hover,
.search-toggle.on {
  background: var(--paper-alt);
  color: var(--blue);
}

.vsep {
  width: 1px;
  height: 20px;
  background: var(--rule);
}

.nav-link {
  border: 0;
  background: transparent;
  padding: 6px 2px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
.nav-link:hover,
.nav-link.on {
  color: var(--blue);
}

.badge-count {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--paper-alt);
  color: var(--ink-muted);
}
.nav-link.on .badge-count {
  background: #DFE9DF;
  color: var(--blue);
}

/* Horizontal Topic Strip */
.topicbar {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.topicbar-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
}

.topic-tabs {
  display: flex;
  align-items: stretch;
  gap: clamp(18px, 2.8vw, 34px);
  overflow-x: auto;
  scrollbar-width: none;
}
.topic-tabs::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  border: 0;
  background: transparent;
  padding: 13px 0 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.tab:hover { color: var(--blue); }
.tab.on { color: var(--blue); }
.tab.on::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--blue);
}

.topic-utility {
  display: inline-flex;
  align-items: stretch;
  gap: 18px;
  flex: none;
}

.tab-subtle {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
}
.tab-subtle:hover,
.tab-subtle.on {
  color: var(--blue);
}

/* Expandable inline search */
.search-drawer {
  border-bottom: 1px solid var(--rule);
  background: var(--paper-alt);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  padding: 6px 0;
}
.search-form input::placeholder { color: var(--ink-muted); }
.search-form input:focus-visible { outline: none; }

.search-clear {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
}
.search-clear:hover { color: var(--ink); }

/* ---------- Main Canvas ---------- */
.page-main {
  padding-top: 28px;
  padding-bottom: 32px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0;
}

.kicker-meta {
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink-muted);
}

/* Hero Broadsheet Grid (Matches Reference Mockup) */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.hero-lead {
  padding-right: clamp(20px, 3vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-figure {
  display: block;
  margin: 0 0 4px;
  overflow: hidden;
  background: #DED4C4;
}
.hero-figure-btn {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  overflow: hidden;
}
.hero-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.hero-figure-btn:hover img {
  transform: scale(1.015);
}

.lead-hl {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.lead-summary {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.46;
  color: var(--ink-body);
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: 4px;
}

.compare-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1.5px solid var(--blue);
  border-radius: 6px;
  background: transparent;
  color: var(--blue);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.compare-btn:hover {
  background: var(--blue);
  color: #FFFFFF;
}

.save-link {
  border: 0;
  background: transparent;
  padding: 8px 4px;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.save-link:hover { color: var(--ink); }

/* Story card icon toolbar */
.story-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin-top: 2px;
}
.hero-actions .story-tools { margin-top: 0; }
.tool-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tool-btn:hover { background: rgba(21, 23, 28, 0.06); color: var(--ink); }
.tool-btn.on { color: var(--blue); }
.tool-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tool-count {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.save-link.on { color: var(--blue); font-weight: 600; }

.lead-cov {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

/* Right Featured Column */
.hero-side {
  border-left: 1px solid var(--rule);
  padding-left: clamp(20px, 3vw, 34px);
  display: flex;
  flex-direction: column;
}

.side-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 24px;
}
.side-item + .side-item {
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.side-item:last-child {
  padding-bottom: 4px;
}

.side-hl {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(23px, 2.3vw, 29px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.side-summary {
  margin: 0;
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.48;
  color: var(--ink-body);
}

.storybtn {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.storybtn:hover {
  color: var(--blue);
}

.inline-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.textlink {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
}
.textlink:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Below-the-Fold Edition Grid ---------- */
.section-rule {
  margin: 40px 0 24px;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-rule h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
}

.section-rule span {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-muted);
}

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

.grid-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.grid-item:nth-child(3n),
.grid-item:last-child {
  border-right: 0;
}
.grid-item:nth-child(3n + 1) {
  padding-left: 0;
}
.grid-item:nth-child(3n) {
  padding-right: 0;
}

.grid-hl {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.grid-summary {
  margin: 0;
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.48;
  color: var(--ink-body);
}

.grid-cov {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ---------- Coverage Bar & Leaning Badges ---------- */
.covbar {
  display: flex;
  gap: 2px;
  height: 6px;
  width: 100%;
  max-width: 180px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--rule-soft);
}
.covbar.full { max-width: none; height: 10px; }
.seg { display: block; min-width: 6px; }
.covtext {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.35;
}

.dotlg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.c-L { background: #1E3A8A; }
.c-LL { background: #93C5FD; }
.c-C { background: #9CA3AF; }
.c-LR { background: #FDBA74; }
.c-R { background: #9A3412; }
.c-S { background: #2DD4BF; }
.c-O { background: #E5E7EB; box-shadow: inset 0 0 0 1px #C9C6BD; }

.lean {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.lb-L { background: #1E3A8A; color: #FFFFFF; }
.lb-LL { background: #DBEAFE; color: #1E3A8A; }
.lb-C { background: #E5E7EB; color: #1F2937; }
.lb-LR { background: #FFEDD5; color: #9A3412; }
.lb-R { background: #9A3412; color: #FFFFFF; }
.lb-S { background: #CCFBF1; color: #115E59; }
.lb-P { background: #EDE9FE; color: #5B21B6; }
.lb-NR, .lb-NC { background: #FFFFFF; color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--rule); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-body);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- World Map Panel (Broadsheet Geotagged Atlas) ---------- */
.world-panel {
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}
.world-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.world-panel h1,
.world-panel h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.world-sub {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-body);
}

.map-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.map-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
}

.map-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.map-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.map-pill:hover { border-color: var(--ink); }
.map-pill.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

.map-region-btn {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
}
.map-region-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.tdot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.tdot-uk { background: #4C459C; }
.tdot-world { background: #1B3AB8; }
.tdot-science { background: #0F766E; }
.tdot-tech { background: #6D28D9; }
.tdot-business { background: #B45309; }
.tdot-finance { background: #166534; }

.world-map {
  height: clamp(340px, 50vw, 520px);
  border: 1px solid var(--rule);
  background: #D8D8CE;
  z-index: 0;
}
.world-map[hidden] { display: none; }
.world-map .leaflet-tile-pane {
  filter: sepia(55%) saturate(65%) brightness(1.02) contrast(93%);
}

/* Custom Broadsheet Map Markers & Clusters */
.geo-marker-wrap {
  background: transparent !important;
  border: 0 !important;
}

.geo-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1.5px solid #FFFFFF;
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(18, 19, 22, 0.28);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.geo-tag:hover {
  transform: translate(-50%, -56%) scale(1.04);
  box-shadow: 0 4px 14px rgba(18, 19, 22, 0.38);
}
.geo-tag-uk { background: #4C459C; }
.geo-tag-world { background: #1B3AB8; }
.geo-tag-science { background: #0F766E; }
.geo-tag-tech { background: #6D28D9; }
.geo-tag-business { background: #B45309; }
.geo-tag-finance { background: #166534; }
.geo-tag-city {
  font-weight: 500;
  opacity: 0.9;
}

.geo-cluster {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 2px solid #FFFFFF;
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(18, 19, 22, 0.34);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.geo-cluster:hover {
  background: var(--blue);
  transform: translate(-50%, -56%) scale(1.05);
}
.geo-cluster-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.geo-cluster-dots .tdot {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75);
}
.geo-cluster-hint {
  font-weight: 500;
  font-size: 11px;
  opacity: 0.85;
}

/* Broadsheet Leaflet Popup */
.world-map .leaflet-popup-content-wrapper {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(18, 19, 22, 0.22);
}
.world-map .leaflet-popup-tip {
  background: var(--paper);
}
.map-popup {
  min-width: 220px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-popup-kicker {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.map-popup-title {
  margin: 0;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.22;
  color: var(--ink);
}
.map-popup-meta {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.map-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-muted);
}

.world-locations {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}
.world-locations li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--rule-soft);
}
.world-loc-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.world-loc-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.world-loc-link {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.28;
}
.world-loc-link:hover { color: var(--blue); text-decoration: underline; }
.world-loc-pinbtn {
  flex: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: transparent;
  padding: 4px 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
}
.world-loc-pinbtn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ---------- Editorial Footer Band (Digest, Methodology, Followed) ---------- */
.editorial-band {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 3px double var(--ink);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.band-col {
  padding: 0 26px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.band-col:first-child { padding-left: 0; }
.band-col:last-child { padding-right: 0; border-right: 0; }

.band-col h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue);
}

.digest-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.48;
  color: var(--ink-body);
}

.algo {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-body);
}

.small {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-muted);
}

.papers-list {
  display: flex;
  flex-direction: column;
}

.paper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-top: 1px solid var(--rule-soft);
  background: transparent;
  padding: 8px 0;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
}
.paper-row:first-child { border-top: 0; }
.paper-row:hover { color: var(--blue); }

.outline-sm {
  align-self: flex-start;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: transparent;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.outline-sm:hover { border-color: var(--ink); }

/* ---------- Native Reader Themes & Focus Mode ---------- */
body.reader-theme-white {
  --paper: #FFFFFF;
  --paper-alt: #F4F4F2;
  --surface: #F7F1E7;
  --rule: #E2E0D8;
  --rule-soft: #ECEAE3;
}
body.reader-theme-sepia {
  --paper: #F4ECD8;
  --paper-alt: #EAE0C8;
  --surface: #F8F2E3;
  --ink: #241D14;
  --ink-body: #352B1E;
  --ink-muted: #6C5D49;
  --rule: #D9CCB2;
  --rule-soft: #E5DAC2;
}
body.reader-theme-night {
  --paper: #13151A;
  --paper-alt: #1C1F27;
  --surface: #1A1D24;
  --ink: #EEEDE8;
  --ink-body: #CECDC7;
  --ink-muted: #8E95A4;
  --blue: #7B9BFF;
  --blue-hover: #A0B8FF;
  --rule: #2A2F3A;
  --rule-soft: #222630;
}
body.reader-theme-night .darkbtn {
  background: #EEEDE8;
  color: #13151A;
}
body.reader-theme-night .darkbtn:hover {
  background: #FFFFFF;
  color: #13151A;
}
body.reader-theme-night .compare-btn:hover {
  color: #13151A;
}

body.reader-focus .masthead-wrap,
body.reader-focus .footer {
  display: none;
}
body.reader-focus .page-main {
  padding-top: 12px;
}

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 70;
  background: transparent;
  pointer-events: none;
}
.read-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--blue);
  transition: width 0.08s linear;
}

/* ---------- Reader & Coverage Comparison View ---------- */
.reader {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-margin-top: 16px;
}
.reader.measure-wide {
  max-width: 860px;
}

.reader-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  margin: -10px 0 2px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.reader-tools {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rtool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.rtool:hover { border-color: var(--ink); }
.rtool.on {
  border-color: var(--blue);
  background: var(--blue);
  color: #FFFFFF;
}
body.reader-theme-night .rtool.on {
  color: #13151A;
}

.read-time {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-muted);
  padding-right: 4px;
}

.aa-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 45;
  width: 300px;
  max-width: calc(100vw - 32px);
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.aa-group { display: flex; flex-direction: column; gap: 7px; }
.aa-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.aa-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.aa-row.two { grid-template-columns: repeat(2, 1fr); }
.aa-opt {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
}
.aa-opt:hover { border-color: var(--ink); }
.aa-opt.on {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
  color: var(--blue);
}
.swatch-newsprint { background: #FAF8F4 !important; color: #121316 !important; }
.swatch-white { background: #FFFFFF !important; color: #121316 !important; }
.swatch-sepia { background: #F4ECD8 !important; color: #241D14 !important; }
.swatch-night { background: #13151A !important; color: #EEEDE8 !important; }

.loc-chip {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.loc-chip:hover { color: var(--blue); }

.backbtn {
  align-self: flex-start;
  border: 0;
  background: transparent;
  padding: 6px 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}
.backbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

.reader h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.09;
  letter-spacing: -0.02em;
}

.standfirst {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-body);
}

.reader-photo { margin: 4px 0; }
.reader-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.reader-caption {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-muted);
}

/* Sesame-inspired Natural Voice Narration Player */
.voice-player {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--rule);
  background: linear-gradient(135deg, rgba(101, 80, 185, 0.06), rgba(93, 148, 128, 0.07));
  font-family: var(--sans);
}
body.reader-theme-night .voice-player {
  background: linear-gradient(135deg, rgba(126, 160, 255, 0.10), rgba(110, 180, 152, 0.08));
}
.voice-player-note {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.voice-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #5B9A82;
  flex: none;
}
.voice-status {
  margin: 0;
  flex: 1;
  font-size: 13px;
  color: var(--ink-body);
}
.voice-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.voice-play-btn {
  width: 42px;
  height: 42px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(101, 80, 185, 0.25);
  transition: transform 0.16s ease, box-shadow 0.2s ease, background-color 0.15s ease;
}
.voice-play-btn:hover {
  transform: scale(1.04);
  background: var(--blue-hover);
}
.voice-player.is-playing .voice-play-btn {
  animation: voice-breathe 2.4s ease-in-out infinite;
}
.voice-player.is-loading .voice-play-btn {
  opacity: 0.72;
}
@keyframes voice-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91, 154, 130, 0.36), 0 4px 14px rgba(101, 80, 185, 0.24); }
  50% { box-shadow: 0 0 0 8px rgba(91, 154, 130, 0), 0 4px 16px rgba(101, 80, 185, 0.30); }
}
.voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  flex: none;
}
.voice-wave span {
  display: block;
  width: 3px;
  height: 6px;
  border-radius: 99px;
  background: #5B9A82;
  opacity: 0.5;
  transition: height 0.2s ease, opacity 0.2s ease;
}
.voice-player.is-playing .voice-wave span {
  opacity: 0.95;
  animation: voice-eq 1.15s ease-in-out infinite;
}
.voice-player.is-playing .voice-wave span:nth-child(2) { animation-delay: 0.18s; }
.voice-player.is-playing .voice-wave span:nth-child(3) { animation-delay: 0.36s; }
.voice-player.is-playing .voice-wave span:nth-child(4) { animation-delay: 0.14s; }
.voice-player.is-playing .voice-wave span:nth-child(5) { animation-delay: 0.28s; }
@keyframes voice-eq {
  0%, 100% { height: 5px; }
  45% { height: 20px; }
  75% { height: 11px; }
}
.voice-track {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.voice-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.voice-name {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}
.voice-name small {
  font-size: 11.5px;
  font-weight: 450;
  color: var(--ink-muted);
}
.voice-time {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
}
.voice-scrub {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--blue) 0%, var(--blue) var(--progress, 0%), var(--rule) var(--progress, 0%), var(--rule) 100%);
  cursor: pointer;
}
.voice-scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--surface, #FFFFFF);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.voice-scrub::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--surface, #FFFFFF);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.voice-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}
.voice-skip-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.voice-chip {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface, var(--paper));
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.voice-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.voice-switcher {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface, var(--paper));
  gap: 2px;
}
.voice-pill {
  min-height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
}
.voice-pill:hover { color: var(--ink); }
.voice-pill.on {
  background: var(--blue);
  color: #FFFFFF;
}
.voice-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
.voice-close:hover {
  background: var(--paper-alt);
  color: var(--ink);
}
@media (prefers-reduced-motion: reduce) {
  .voice-player.is-playing .voice-play-btn,
  .voice-player.is-playing .voice-wave span {
    animation: none;
  }
}

.reader-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.72;
  color: var(--ink-body);
}
.reader.font-sans .reader-body,
.reader.font-sans .standfirst,
.reader.font-sans .points {
  font-family: var(--sans);
}
.reader.size-sm .reader-body { font-size: 16.5px; line-height: 1.66; }
.reader.size-md .reader-body { font-size: 19px; line-height: 1.72; }
.reader.size-lg .reader-body { font-size: 21.5px; line-height: 1.74; }
.reader.size-xl .reader-body { font-size: 24px; line-height: 1.72; }

.reader-para {
  position: relative;
  margin: 0;
  padding: 4px 8px 4px 12px;
  margin-left: -12px;
  border-left: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.reader-para:hover { border-left-color: var(--rule); }
.reader-para.hl-on {
  background: rgba(245, 197, 66, 0.22);
  border-left-color: #C88A00;
}
body.reader-theme-night .reader-para.hl-on {
  background: rgba(245, 197, 66, 0.16);
  border-left-color: #E3B341;
}
.reader-para.speaking {
  background: rgba(27, 58, 184, 0.10);
  border-left-color: var(--blue);
}
.reader.font-serif .reader-para:first-child::first-letter {
  float: left;
  font-family: var(--display);
  font-size: 3.1em;
  line-height: 0.86;
  font-weight: 800;
  padding-right: 9px;
  padding-top: 4px;
  color: var(--ink);
}

.reader-hint {
  margin: -8px 0 0;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.takeaways-box {
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--blue);
  background: var(--paper-alt);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.takeaways-box h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.cov-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cov-tab {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
}
.cov-tab:hover { border-color: var(--ink); }
.cov-tab.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.cov-outlet-col {
  flex: 1;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cov-outlet-hl {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-body);
}
.cov-outlet-hl-link {
  padding: 0 !important;
  font-weight: 400 !important;
  color: var(--ink-body);
}
.cov-outlet-hl-link:hover {
  color: var(--blue);
}
.source-inline-link {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.source-context-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.story-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}
.pager-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: transparent;
  padding: 12px 14px;
  text-align: left;
  color: var(--ink);
}
.pager-btn.next { text-align: right; align-items: flex-end; }
.pager-btn:hover { border-color: var(--blue); }
.pager-dir {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
}
.pager-title {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.rsection {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.rsection h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.points {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-body);
}

.covlist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.covlist li {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--rule-soft);
}
.covlist .name {
  flex: 1;
  min-width: 150px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}
.covlist a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 4px;
}
.covlist a:hover { text-decoration: underline; }

.rfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.darkbtn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 6px;
  border: 0;
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.darkbtn:hover { background: #2A2D35; color: #FFFFFF; }

.more-link {
  border: 0;
  border-top: 1px solid var(--rule-soft);
  background: transparent;
  padding: 12px 0;
  text-align: left;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}
.more-link:first-child { border-top: 0; }
.more-link:hover { color: var(--blue); }

/* ---------- Newspapers View & Saved View ---------- */
.page-head {
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.page-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.1;
}
.page-head p {
  margin: 6px 0 0;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.chip {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }

.paper-sheet {
  padding-top: 24px;
  border-top: 3px double var(--ink);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.paper-masthead {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.paper-masthead h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 800;
  line-height: 1.05;
}
.paper-dateline {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.notice {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--rule);
  background: var(--paper-alt);
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-body);
}

/* ---------- Settings Dialog ---------- */
.settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(18, 19, 22, 0.35);
}

.settings {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 50;
  width: 440px;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 22px 60px rgba(18, 19, 22, 0.2);
  overflow: hidden;
}

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
}
.settings-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
}

.settings-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 8px 12px;
}
.settings-search input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
}
.settings-search input:focus-visible { outline: none; }

.srclist { list-style: none; margin: 0; padding: 0; }
.srclist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--rule-soft);
}
.mono {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  background: var(--paper-alt);
  color: var(--blue);
}
.addbtn {
  min-height: 34px;
  min-width: 76px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
}
.addbtn:hover { border-color: var(--ink); }
.addbtn.on { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }

.settings-foot {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid var(--rule);
}

.footer {
  border-top: 1px solid var(--rule);
  padding: 18px 0 36px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-muted);
}

/* ---------- Header widgets and menus ---------- */
.masthead-time { display: block; text-align: center; margin-top: 2px; font-family: var(--sans); font-size: 11px; color: var(--ink-muted); }
.header-clock { font-family: var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.settings-toggle { font-size: 14px; color: var(--ink-muted); }

.market-strip { padding: 10px 0 12px; border-top: 1px solid var(--rule-soft); }
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.market-widget { min-width: 0; padding: 0 20px; border-left: 1px solid var(--rule); }
.market-widget:first-child { padding-left: 0; border-left: 0; }
.market-widget:last-child { padding-right: 0; }
.market-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.market-heading h2 { margin: 0; font-family: var(--sans); font-size: 12px; font-weight: 600; }
.market-heading h2 span { display: block; color: var(--ink-muted); font-size: 10px; font-weight: 400; }
.market-heading .header-clock { font-size: 11px; color: var(--ink-muted); }
tv-mini-chart { display: block; width: 100%; height: 126px; }
.market-fallback { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 6px; background: var(--paper-alt); padding: 14px; font: 12px/1.5 var(--sans); color: var(--ink-muted); }
.market-unavailable { display: none; }
.market-data-unavailable .market-loading { display: none; }
.market-data-unavailable .market-unavailable { display: inline; }
.market-note { display: flex; justify-content: flex-end; align-items: baseline; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; font: 10px/1.5 var(--sans); color: var(--ink-muted); }
.market-note a { color: inherit; }
.market-note button { border: 0; background: transparent; padding: 0 0 0 8px; color: var(--blue); font: inherit; text-decoration: underline; }

.header-menu { position: relative; }
.menu-toggle { display: inline-flex; align-items: center; gap: 5px; }
.menu-toggle > span { font-family: var(--sans); font-size: 14px; }
.header-dropdown { position: absolute; right: 0; top: calc(100% + 1px); z-index: 30; width: min(400px, calc(100vw - 2 * var(--page-gutter))); max-height: min(560px, 65vh); overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--rule); background: var(--paper); box-shadow: 0 14px 36px #12131618; }
.header-dropdown h2 { margin: 0; font: 700 12px/1.5 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.header-dropdown .digest-list { font-size: 17px; }
.header-dropdown .algo { font-size: 13px; }
.dropdown-paper-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.source-context { padding: 20px; border-left: 3px solid var(--blue); background: var(--paper-alt); display: flex; flex-direction: column; gap: 8px; }
.source-context .kicker { margin: 0; }
.source-context h2 { margin: 0; font: 600 22px/1.25 var(--serif); }

.widget-settings { margin: 0; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 12px; }
.widget-settings legend, .settings-section-title { margin: 0 0 10px; padding: 0; font: 600 14px/1.5 var(--sans); }
.settings-section-title { margin-bottom: 0; }
.widget-choice { display: flex; gap: 10px; align-items: center; cursor: pointer; font: 14px/1.4 var(--sans); }
.widget-choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); flex: none; }
.widget-choice small { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 11px; }

/* ---------- Responsive ---------- */
@media (min-width: 641px) and (max-width: 960px) {
  .topicbar-inner { flex-wrap: wrap; gap: 0; }
  .topic-tabs { flex: 1 1 100%; }
  .topic-utility { flex: 1 1 100%; justify-content: flex-end; border-top: 1px solid var(--rule-soft); }
}
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero-lead { padding-right: 0; }
  .hero-side {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 24px;
  }
  .edition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-item { border-right: 0; padding: 18px 0; }
  .grid-item:nth-child(odd) { padding-right: 20px; border-right: 1px solid var(--rule); }
  .grid-item:nth-child(even) { padding-left: 20px; }
  .editorial-band {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .band-col {
    padding: 0 0 24px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .band-col:last-child { border-bottom: 0; padding-bottom: 0; }
}

@media (max-width: 640px) {
  .topbar {
    grid-template-columns: auto 1fr;
    row-gap: 4px;
    padding: 14px 0 10px;
  }
  .topbar-date {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    font-size: 13.5px;
    color: var(--ink-muted);
    display: flex;
    align-items: baseline;
    gap: 12px;
  }
  .masthead-time { display: inline; text-align: left; }
  .topbar-actions { gap: 10px; }
  .market-grid { grid-auto-flow: column; grid-auto-columns: minmax(240px, 80%); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
  .market-widget { scroll-snap-align: start; padding: 0 16px; }
  .market-widget:last-child { padding-right: 0; }
  .market-note { justify-content: flex-start; }
  .page-main { padding-top: 30px; padding-bottom: 40px; }
  .topicbar-inner {
    flex-direction: column;
    gap: 0;
  }
  .topic-utility {
    border-top: 1px solid var(--rule-soft);
    padding: 2px 0;
    justify-content: space-between;
  }
  .header-menu { position: static; }
  .topicbar-inner { position: relative; }
  .header-dropdown { left: var(--page-gutter); right: var(--page-gutter); width: auto; padding: 20px; }
  .edition-grid {
    grid-template-columns: 1fr;
  }
  .grid-item:nth-child(odd),
  .grid-item:nth-child(even) {
    padding: 18px 0;
    border-right: 0;
  }
  .world-locations {
    grid-template-columns: 1fr;
  }
  .story-pager {
    grid-template-columns: 1fr;
  }
  .aa-popover {
    right: -8px;
  }
  .settings {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 24px);
  }
}
