/* ═══════════════════════════════════════════════════════════
   Conflict Monitor — Styles
   ═══════════════════════════════════════════════════════════

   TYPE SCALE (unified across all verticals)
   ─────────────────────────────────────────
   Page title:      Inter 20px/700
   Section header:  JetBrains Mono 10px/600 uppercase ls:1.2px
   Content title:   Inter 14px/600
   Body text:       Inter 12px/400
   Data values:     JetBrains Mono 16px/600
   Labels/meta:     JetBrains Mono 9px/400 uppercase ls:0.6px
   Badges/tags:     JetBrains Mono 8px/600 uppercase
   Minimum size:    8px (nothing smaller)
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg: #1a1a1a; --sf: #222222; --sf2: #2a2a2a;
  --bg-deep: #0f0f0f;
  --bd: #333333; --bd2: #3d3d3d;
  --tx: #999999; --txd: #666666; --txb: #e0e0e0; --txs: #777777;
  --oc: #111111; --land: #1e1e1e; --ls: #2a2a2a;
  --cr: #DAFA47; --hi: #ef4444; --el: #f97316; --mo: #60a5fa; --lo: #4ade80;
  --gd: rgba(255,255,255,.03);
  --acc: #DAFA47; --acc-dim: rgba(218,250,71,.12);
  --acc-subtle: rgba(218,250,71,.04);
  --acc-hover: rgba(218,250,71,.08);
  --hover-overlay: rgba(255,255,255,.03);
  --hover-overlay-md: rgba(255,255,255,.06);
  --line-subtle: rgba(255,255,255,.04);
  --panel-shadow: none;
}

body.light-mode {
  --bg: #f4f4f5; --sf: #ffffff; --sf2: #e4e4e7;
  --bg-deep: #18181b;
  --bd: #d4d4d8; --bd2: #a1a1aa;
  --tx: #3f3f46; --txd: #71717a; --txb: #18181b; --txs: #71717a;
  --oc: #d4d4d8; --land: #e4e4e7; --ls: #d4d4d8;
  --cr: #2d8a4e; --hi: #dc2626; --el: #d97706; --mo: #2563eb; --lo: #16a34a;
  --gd: rgba(0,0,0,.015);
  --acc: #2d8a4e; --acc-dim: rgba(45,138,78,.12);
  --acc-subtle: rgba(45,138,78,.06);
  --acc-hover: rgba(45,138,78,.10);
  --hover-overlay: rgba(0,0,0,.02);
  --hover-overlay-md: rgba(0,0,0,.04);
  --line-subtle: rgba(0,0,0,.05);
  --panel-shadow: 0 1px 3px rgba(0,0,0,.05);
}

body.light-mode header {
  --bg: #18181b; --sf: #27272a; --sf2: #3f3f46;
  --bd: #3f3f46; --bd2: #52525b;
  --tx: #a1a1aa; --txd: #71717a; --txb: #f4f4f5;
  --cr: #2d8a4e; --acc: #2d8a4e; --acc-dim: rgba(45,138,78,.12);
}
body.light-mode .app-foot {
  --bg: #18181b; --sf: #27272a; --sf2: #3f3f46;
  --bd: #3f3f46; --txd: #71717a;
}
body.light-mode .hd-topbar {
  --bg: #18181b; --sf: #27272a; --sf2: #3f3f46;
  --bd: #3f3f46; --bd2: #52525b;
  --tx: #a1a1aa; --txd: #71717a; --txb: #f4f4f5;
  --cr: #2d8a4e; --acc: #2d8a4e;
}
body.light-mode .hd-topbar .tab {
  color: #a1a1aa;
}
body.light-mode .hd-topbar .tab:hover {
  color: #f4f4f5;
}
body.light-mode .hd-topbar .tab.on {
  color: #111;
}


body.light-mode .hd-detail {
  background: #ffffff;
}
body.light-mode .hd-sidebar {
  background: #ffffff;
}
body.light-mode .hd-patterns-wrap {
  background: #ffffff;
}
body.light-mode .hd-nav-row {
  background: #e4e4e7;
}
body.light-mode .hd-stat-card,
body.light-mode .hd-card {
  background: #ffffff; border-color: #d4d4d8;
}
body.light-mode .hp-kpi {
  background: #ffffff; border-color: #d4d4d8;
}
body.light-mode .hp-panel {
  background: #ffffff; border-color: #d4d4d8;
}

body.light-mode .intro-logo,
body.light-mode .foot-logo { filter: invert(1); }
header .logo img { filter: brightness(0) invert(1); }

body.light-mode .wire-feed { background: #ffffff; }
body.light-mode .w-item:hover { background: #f4f4f5; }
body.light-mode .w-item.w-active { background: #e4e4e7; }
body.light-mode .w-source-text { color: #18181b; }
body.light-mode .wc-source-loc { color: #71717a; }

body.light-mode .hd-nav-btn.active,
body.light-mode .hd-pill.active {
  background: var(--acc); color: #111; 
}
body.light-mode .tab.on {
  background: var(--cr); color: #111; font-weight: 600;
}

body.light-mode .w-deeper { color: var(--acc); border-color: var(--acc); }
body.light-mode .w-deeper:hover { background: var(--acc); color: #fff; }
body.light-mode .w-badge-briefing {
  background: rgba(45,138,78,.08); color: var(--acc);
  border-color: rgba(45,138,78,.2);
}
body.light-mode .w-badge-alert {
  background: rgba(220, 38, 38, .08); color: #dc2626;
  border-color: rgba(220, 38, 38, .2);
}
body.light-mode .w-verified-badge {
  background: rgba(22, 163, 74, .08); color: #16a34a;
  border-color: rgba(22, 163, 74, .2);
}
body.light-mode .w-item-alert { border-left-color: rgba(220, 38, 38, .3); }
body.light-mode .w-item-alert.w-active { border-left-color: #dc2626; }
body.light-mode .w-tag-alert { background: rgba(220, 38, 38, .06); color: #dc2626; border-color: rgba(220, 38, 38, .12); }
body.light-mode .w-bar-alert-empty { background: rgba(0,0,0,.06); }
body.light-mode .w-bar-alert-one { background: rgba(220, 38, 38, calc(var(--bar-intensity, 0.3))); }
body.light-mode .w-bar-alert-two { background: rgba(220, 38, 38, calc(var(--bar-intensity, 0.55))); }
body.light-mode .w-bar-alert-full { background: rgba(220, 38, 38, var(--bar-intensity, 1)); }
body.light-mode .wc-head-alert { color: #dc2626; }
body.light-mode .wc-alert-section { border-left-color: rgba(220, 38, 38, .25); background: rgba(220, 38, 38, .03); }
body.light-mode .wc-alert-section-head { color: #dc2626; }
body.light-mode .wc-cite-source-text { background: rgba(0,0,0,.02); border-left-color: #d4d4d8; }
body.light-mode .wc-source-link a { color: #dc2626; }
body.light-mode .wc-content sup a { color: var(--acc); }
body.light-mode .wc-content h3 { border-bottom-color: rgba(0,0,0,.08); }
body.light-mode .wc-label { color: var(--acc); }
body.light-mode .wc-link:hover { color: var(--acc); }

body.light-mode .cc.on { background: var(--acc-subtle); }
body.light-mode .cc:hover { background: #e4e4e7; }

body.light-mode .w-bar-empty { background: rgba(0,0,0,.06); }
body.light-mode .w-bar-one { background: rgba(45,138,78, calc(var(--bar-intensity, 0.3))); }
body.light-mode .w-bar-two { background: rgba(45,138,78, calc(var(--bar-intensity, 0.55))); }
body.light-mode .w-bar-full { background: rgba(45,138,78, var(--bar-intensity, 1)); }
body.light-mode .w-deeper { animation: deeper-pulse-light 2s ease-in-out infinite; }
body.light-mode .w-deeper:hover { animation: none; }
@keyframes deeper-pulse-light {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(45,138,78, 0); }
  50% { opacity: .7; box-shadow: 0 0 8px 2px rgba(45,138,78, .12); }
}
body.light-mode .hd-bill-row:hover { background: #e4e4e7; }
body.light-mode .hd-bill-row.active { background: var(--acc-subtle); }
body.light-mode .hd-bipartisan-badge { color: #2d8a4e; background: rgba(45,138,78,.08); }

body.light-mode .hp-top-row:hover { background: #e4e4e7; }
body.light-mode .hp-top-row.hp-top-active { background: var(--acc-hover); border-left-color: var(--acc); }
body.light-mode .hp-topic-row:hover { background: #e4e4e7; }
body.light-mode .hp-topic-row.hp-topic-active { background: var(--acc-hover); }

body.light-mode .hp-tag-bi { color: #2d8a4e; background: rgba(45,138,78,.08); }
body.light-mode .hp-tag-dem { color: #1d4ed8; background: rgba(29,78,216,.07); }
body.light-mode .hp-tag-rep { color: #dc2626; background: rgba(220,38,38,.07); }

body.light-mode .hp-legend-gradient {
  background: linear-gradient(90deg, #e4e4e7, rgba(45,138,78,.7));
}

body.light-mode .hp-filter-bar { background: var(--acc); color: #fff; }
body.light-mode .hp-clear-btn { background: rgba(255,255,255,.25); color: #fff; }
body.light-mode .hp-clear-btn:hover { background: rgba(255,255,255,.4); }

body.light-mode .brief-card-head { background: #e4e4e7; color: var(--acc); }

body.light-mode .ki,
body.light-mode .art-card,
body.light-mode .brief-card,
body.light-mode .cht-box {
  box-shadow: var(--panel-shadow);
}

body.light-mode .db-left,
body.light-mode .hd-sidebar,
body.light-mode .wire-cite,
body.light-mode .ctx-panel {
  background: #ffffff;
  box-shadow: 1px 0 4px rgba(0,0,0,.04);
}

body.light-mode .map-tip { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
body.light-mode .map-leg,
body.light-mode .map-stat {
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

body.light-mode .wc-factcheck {
  background: rgba(22,163,74,.04);
  border-color: rgba(22,163,74,.15);
}

body.light-mode .w-sources-ct { background: rgba(45,138,78,.06); color: #2d8a4e; }
body.light-mode .w-verified { background: rgba(22,163,74,.06); color: #16a34a; border-color: rgba(22,163,74,.2); }

body.light-mode .hd-meth-body a { color: var(--acc); }
body.light-mode .hp-methodology a { color: var(--acc); }
body.light-mode .hp-methodology-label { color: var(--txd); }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg); color: var(--tx);
  font-family: 'JetBrains Mono', monospace;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .25s ease, color .25s ease;
}
body.theme-transitioning {
  transition: background-color .25s ease, color .25s ease !important;
}
body.theme-transitioning header,
body.theme-transitioning .intro-tile,
body.theme-transitioning .view,
body.theme-transitioning .vert-app,
body.theme-transitioning .wire-feed,
body.theme-transitioning .hd-topbar,
body.theme-transitioning .app-foot,
body.theme-transitioning #intro {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease !important;
}
button, a, [onclick] {
  touch-action: manipulation;
}

/* ── Subtle animation primitives ── */
@keyframes cmFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes cmFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cmFadeUpSm {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cm-fade-in {
  animation: cmFadeIn .3s ease-out both;
}
.cm-fade-up {
  animation: cmFadeUp .35s ease-out both;
}
.cm-fade-up-sm {
  animation: cmFadeUpSm .25s ease-out both;
}
.cm-stagger-1 { animation-delay: .04s; }
.cm-stagger-2 { animation-delay: .08s; }
.cm-stagger-3 { animation-delay: .12s; }
.cm-stagger-4 { animation-delay: .16s; }
.cm-stagger-5 { animation-delay: .20s; }
.cm-stagger-6 { animation-delay: .24s; }
.cm-stagger-7 { animation-delay: .28s; }
.cm-stagger-8 { animation-delay: .32s; }
.cm-reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s ease-out, transform .4s ease-out;
}
.cm-reveal.cm-visible {
  opacity: 1;
  transform: translateY(0);
}
@keyframes cmSlideIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.cm-slide-in {
  animation: cmSlideIn .3s ease-out both;
}
@keyframes cmVertEnter {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cm-vert-enter {
  animation: cmVertEnter .35s ease-out both;
}

#app, .vert-app { display: flex; flex-direction: column; height: 100vh; }


/* ═══ INTRO PAGE ═══ */

#intro {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg);
  position: relative; overflow: hidden;
}
body:not(.light-mode) #intro {
  --bg: #1a1a1a; --sf: #222222; --sf2: #2a2a2a;
  --bd: #333333; --bd2: #3d3d3d;
  --tx: #999999; --txd: #666666; --txb: #e0e0e0;
  --cr: #DAFA47; --acc: #DAFA47;
  color-scheme: dark;
}
body.light-mode #intro {
  --bg: #f4f4f5; --sf: #ffffff; --sf2: #e4e4e7;
  --bd: #d4d4d8; --bd2: #a1a1aa;
  --tx: #3f3f46; --txd: #71717a; --txb: #18181b;
  --cr: #2d8a4e; --acc: #2d8a4e;
  color-scheme: light;
}
#intro-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
body:not(.light-mode) #intro::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(218,250,71,.03) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(96,165,250,.02) 0%, transparent 60%);
  pointer-events: none;
}
body.light-mode #intro::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(45,138,78,.04) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(37,99,235,.03) 0%, transparent 60%);
  pointer-events: none;
}
.intro-inner {
  position: relative; z-index: 1;
  max-width: 640px; width: 100%; padding: 0 24px;
  text-align: center;
}
.intro-head {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-bottom: 32px;
}
.intro-logo { height: 24px; }
.intro-live {
  font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--txd); border: 1px solid var(--bd); padding: 5px 12px;
  display: flex; align-items: center; gap: 6px;
}
.intro-title {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: 32px; color: var(--txb); letter-spacing: -.5px;
  margin-bottom: 8px;
}
.intro-sub {
  font-size: 12px; color: var(--txd); line-height: 1.6;
  max-width: 400px; margin: 0 auto 36px;
  font-family: 'Inter', sans-serif;
}
.intro-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  text-align: left;
}
.intro-tile-wide { grid-column: 1 / -1; }
a.intro-tile-request {
  text-decoration: none; color: inherit; cursor: pointer;
  border-style: dashed; opacity: 0.6; transition: opacity .2s, border-color .2s, background .2s;
}
a.intro-tile-request:hover { opacity: 1; border-color: var(--cr); background: var(--sf2); }
a.intro-tile-request:hover .tile-arrow { opacity: 1; color: var(--cr); }
.intro-tile {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--sf); border: 1px solid var(--bd);
  transition: border-color .2s, background .2s, transform .2s ease-out, box-shadow .2s ease-out;
  position: relative;
  min-height: 88px;
}
.intro-tile.active {
  cursor: pointer; border-color: var(--bd2);
}
.intro-tile.active:hover {
  background: var(--sf2); border-color: var(--cr);
  transform: translateY(-2px) scale(1.012);
  box-shadow: 0 4px 20px rgba(218, 250, 71, .06);
}
body.light-mode .intro-tile.active:hover {
  box-shadow: 0 4px 20px rgba(45, 138, 78, .08);
}
.intro-tile.active:hover .tile-arrow { opacity: 1; color: var(--cr); }
.tile-icon { font-size: 20px; flex-shrink: 0; }
.tile-info { flex: 1; min-width: 0; }
.tile-name {
  font-family: 'Inter', sans-serif; font-size: 14px;
  font-weight: 600; color: var(--txb);
}
.tile-desc { font-size: 10px; color: var(--txd); margin-top: 2px; line-height: 1.5; font-family: 'Inter', sans-serif; }
.tile-arrow {
  flex-shrink: 0; color: var(--txd); opacity: 0;
  transition: opacity .2s, color .2s;
}
.tile-soon {
  flex-shrink: 0; font-size: 8px; letter-spacing: .8px;
  text-transform: uppercase; color: var(--txd);
  border: 1px solid var(--bd); padding: 2px 6px;
}
.intro-foot {
  margin-top: 32px; font-size: 9px; color: var(--txd);
  letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center;
}

#intro.exit {
  animation: introOut .4s ease-in forwards;
}
@keyframes introOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.02); }
}


/* ═══ HEADER ═══ */

header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; border-bottom: 1px solid var(--bd);
  background: var(--bg-deep); flex-shrink: 0; z-index: 30;
}
.hl { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hl-top { display: flex; align-items: center; gap: 14px; }
.logo { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 14px; color: var(--txb); }
.logo em { font-style: normal; color: var(--cr); }
.tag {
  font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--txd); padding: 4px 9px; border: 1px solid var(--bd); border-radius: 0;
}
.lv {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; margin-right: 4px; animation: bl 2.4s infinite;
}
@keyframes bl { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.hr { display: flex; align-items: center; gap: 12px; }
.tabs { display: flex; gap: 1px; background: var(--bd); border-radius: 0; overflow: hidden; }
.tab {
  padding: 6px 16px; font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 400; letter-spacing: .4px;
  text-transform: uppercase; border: none; background: var(--sf2);
  color: var(--txd); cursor: pointer; transition: .12s;
}
.tab:hover { color: var(--tx); }
.tab.on { background: var(--cr); color: #111; font-weight: 600; }
.hstat { font-size: 9px; color: var(--txd); }

.theme-toggle {
  width: 28px; height: 28px; border: 1px solid var(--bd2);
  background: transparent; color: var(--txd); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s; flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--tx); color: var(--txb); }
.theme-toggle svg { width: 14px; height: 14px; }

.app-foot {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  padding: 2px 18px; border-top: 1px solid var(--bd);
  background: var(--bg-deep); flex-shrink: 0;
  font-size: 7px; color: var(--txd); letter-spacing: .3px; opacity: .5;
}
.foot-logo { height: 10px; opacity: .7; vertical-align: middle; margin-left: 2px; }
.foot-logo.foot-logo-lg { height: 16px; opacity: .85; margin-left: 4px; margin-right: 2px; }

/* ═══ WIRE FEED ═══ */

#v-wire { display: flex; }
.wire-feed {
  flex: 1; overflow-y: auto; padding-left: 32px;
  border-right: 1px solid var(--bd);
}
.wire-cite {
  width: 320px; flex-shrink: 0; overflow-y: auto;
  padding: 18px; background: var(--sf);
}
.wire-cite-empty, .wire-err {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 12px; color: var(--txd); letter-spacing: .4px;
  font-family: 'Inter', sans-serif;
}
.wire-err { width: 100%; }

.w-sep {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 24px 8px; background: var(--sf);
  border-bottom: 1px solid var(--bd);
  position: sticky; top: 0; z-index: 5;
}
.w-sep-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--acc);
  white-space: nowrap; flex-shrink: 0;
}
.w-sep-line {
  flex: 1; height: 1px; background: var(--bd);
}

.w-item {
  position: relative;
  padding: 18px 24px; border-bottom: 1px solid var(--bd);
  transition: background .12s;
}
.w-item:hover { background: var(--sf); }
.w-item.w-active { background: var(--sf2); }

.w-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px; font-size: 9px; letter-spacing: .5px;
  text-transform: uppercase;
}
.w-ago {
  position: absolute; top: 14px; right: 20px;
  color: var(--txd); font-weight: 500; font-size: 9px;
  letter-spacing: .3px; text-transform: uppercase;
}
.w-src { color: var(--txd); }
.w-time { margin-left: auto; color: var(--txd); }
.w-date-label { color: var(--txd); font-size: 9px; letter-spacing: .3px; margin-left: 6px; }
.w-date-proc { opacity: 0.6; }

.wc-alert-meta { margin-bottom: 16px; }
.wc-alert-headline { font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 700; color: var(--txb); line-height: 1.4; margin-bottom: 10px; }
.wc-alert-score { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wc-alert-score-label { font-size: 9px; letter-spacing: .8px; color: var(--txd); font-weight: 600; }
.wc-alert-score-val { font-size: 10px; color: var(--cr); font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.wc-alert-timestamps { display: flex; flex-wrap: wrap; gap: 12px; }
.wc-alert-ts { font-size: 9px; letter-spacing: .5px; color: var(--txd); font-family: 'JetBrains Mono', monospace; }

.w-title {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--txb); line-height: 1.4; margin-bottom: 8px;
}

.w-body {
  font-family: 'Inter', sans-serif;
  font-size: 12px; line-height: 1.7; color: var(--tx);
  margin-bottom: 10px;
}
.w-body p { margin: 0 0 8px 0; }
.w-body p:last-child { margin-bottom: 0; }
.w-body strong, .w-body b { color: var(--txb); font-weight: 700; }
.w-body ul, .w-body ol {
  padding-left: 20px; margin: 4px 0 10px;
  list-style: disc;
}
.w-body ol { list-style: decimal; }
.w-body li {
  margin-bottom: 5px; line-height: 1.65;
}
.w-body li::marker { color: var(--cr); }

.w-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 9px; letter-spacing: .4px; text-transform: uppercase;
}
.w-tag {
  padding: 2px 7px; background: var(--sf2); color: var(--txd);
  border: 1px solid var(--bd);
}
.w-cite-ct { color: var(--txd); }
.w-deeper {
  margin-left: auto; padding: 3px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: .6px; text-transform: uppercase;
  background: transparent; color: var(--cr); border: 1px solid var(--cr);
  cursor: pointer; transition: .15s;
  animation: deeper-pulse 2s ease-in-out infinite;
}
.w-deeper:hover { background: var(--cr); color: #000; animation: none; }
@keyframes deeper-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(218, 250, 71, 0); }
  50% { opacity: .7; box-shadow: 0 0 8px 2px rgba(218, 250, 71, .15); }
}

/* Alert type badge */
.w-type-badge {
  font-size: 8px; font-weight: 600; letter-spacing: .6px;
  padding: 2px 6px;
}
.w-badge-briefing {
  background: rgba(218, 250, 71, .12); color: var(--cr);
  border: 1px solid rgba(218, 250, 71, .25);
}
.w-badge-alert {
  background: rgba(239, 68, 68, .12); color: #ef4444;
  border: 1px solid rgba(239, 68, 68, .25);
}
.w-verified-badge {
  font-size: 8px; font-weight: 600; letter-spacing: .6px;
  padding: 2px 6px;
  background: rgba(34, 197, 94, .12); color: #22c55e;
  border: 1px solid rgba(34, 197, 94, .25);
}
.w-item-alert { border-left: 2px solid rgba(239, 68, 68, .35); }
.w-item-alert.w-active { border-left-color: #ef4444; }
.w-tag-alert {
  background: rgba(239, 68, 68, .08); color: #ef4444;
  border: 1px solid rgba(239, 68, 68, .15);
}
.w-meter {
  display: inline-flex; align-items: flex-end; gap: 2px;
  height: 12px; vertical-align: middle;
}
.w-bar {
  display: inline-block; width: 3px;
  background: rgba(218, 250, 71, .12);
  transition: height .2s;
  animation: cmBarGrow .4s ease-out both;
  transform-origin: bottom;
}
.w-bar:nth-child(1) { animation-delay: 0s; }
.w-bar:nth-child(2) { animation-delay: .04s; }
.w-bar:nth-child(3) { animation-delay: .08s; }
.w-bar:nth-child(4) { animation-delay: .12s; }
.w-bar:nth-child(5) { animation-delay: .16s; }
@keyframes cmBarGrow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
.w-bar-empty { height: 3px; background: rgba(255,255,255,.08); }
.w-bar-one   { height: 4px;  background: rgba(218, 250, 71, calc(var(--bar-intensity, 0.35))); }
.w-bar-two   { height: 8px;  background: rgba(218, 250, 71, calc(var(--bar-intensity, 0.6))); }
.w-bar-full  { height: 12px; background: rgba(218, 250, 71, var(--bar-intensity, 1)); }
.w-bar-alert-empty { height: 3px; background: rgba(255,255,255,.08); }
.w-bar-alert-one   { height: 4px;  background: rgba(239, 68, 68, calc(var(--bar-intensity, 0.35))); }
.w-bar-alert-two   { height: 8px;  background: rgba(239, 68, 68, calc(var(--bar-intensity, 0.6))); }
.w-bar-alert-full  { height: 12px; background: rgba(239, 68, 68, var(--bar-intensity, 1)); }
.w-sources-ct {
  font-size: 8px; font-weight: 600; letter-spacing: .5px;
  padding: 2px 6px;
  background: rgba(218, 250, 71, .12); color: var(--cr);
}

/* Verified badge */
.w-verified {
  font-size: 8px; font-weight: 600; letter-spacing: .5px;
  padding: 2px 6px;
  background: rgba(34, 197, 94, .12); color: #22c55e;
  border: 1px solid rgba(34, 197, 94, .25);
}

/* Why it matters line */
.w-why {
  font-family: 'Inter', sans-serif;
  font-size: 12px; color: var(--txd); line-height: 1.6;
  margin-top: 4px; padding-left: 10px;
  border-left: 2px solid rgba(239, 68, 68, .25);
  font-style: italic;
}


/* Citation claim/source text */
.wc-claim {
  font-family: 'Inter', sans-serif;
  font-size: 12px; color: var(--txb); line-height: 1.6; margin: 4px 0 3px;
}
.wc-source-text {
  font-family: 'Inter', sans-serif;
  font-size: 12px; color: var(--txb); line-height: 1.5; font-style: italic;
  margin-bottom: 2px;
}
.wc-source-loc {
  font-size: 9px; color: var(--txd); letter-spacing: .3px;
}

/* Why it matters in deep dive panel */
.wc-why-matters {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--bd);
  font-family: 'Inter', sans-serif;
  font-size: 12px; color: var(--tx); line-height: 1.7;
}

/* Fact check panel */
.wc-factcheck {
  margin: 14px 0; padding: 12px;
  background: rgba(34, 197, 94, .04);
  border: 1px solid rgba(34, 197, 94, .12);
}
.wc-factcheck-head {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: #22c55e; margin-bottom: 10px;
}
.wc-checks {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.wc-check {
  font-size: 9px; font-weight: 600; letter-spacing: .3px;
  padding: 2px 8px;
}
.wc-check-pass {
  background: rgba(34, 197, 94, .1); color: #22c55e;
}
.wc-check-fail {
  background: rgba(239, 68, 68, .1); color: #ef4444;
}

/* Alert detail panel */
.wc-head-alert { color: #ef4444; }
.wc-alert-content {
  font-family: 'Inter', sans-serif;
  font-size: 12px; color: var(--txb); line-height: 1.7;
  margin-bottom: 14px;
}
.wc-alert-content p {
  margin: 0 0 8px 0;
}
.wc-alert-content p:last-child {
  margin-bottom: 0;
}
.wc-alert-section {
  margin: 12px 0; padding: 10px 12px;
  border-left: 2px solid rgba(239, 68, 68, .3);
  background: rgba(239, 68, 68, .03);
}
.wc-alert-section-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: #ef4444; margin-bottom: 6px;
}
.wc-alert-section p {
  font-family: 'Inter', sans-serif;
  font-size: 12px; color: var(--txb); line-height: 1.7; margin: 0 0 6px 0;
}
.wc-alert-section p:last-child {
  margin-bottom: 0;
}
.wc-fact-check {
  margin: 14px 0; padding: 12px;
  background: rgba(34, 197, 94, .04);
  border: 1px solid rgba(34, 197, 94, .12);
}
.wc-fc-verified {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600; letter-spacing: .8px;
  color: #22c55e; margin-bottom: 8px;
}
.wc-fc-unverified {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600; letter-spacing: .8px;
  color: #ef4444; margin-bottom: 8px;
}
.wc-fc-checks {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.wc-fc-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 600; letter-spacing: .3px;
  padding: 2px 8px;
}
.wc-fc-pass {
  background: rgba(34, 197, 94, .1); color: #22c55e;
}
.wc-fc-fail {
  background: rgba(239, 68, 68, .1); color: #ef4444;
}
.wc-fc-issues {
  margin-top: 8px;
}
.wc-fc-issue {
  font-family: 'Inter', sans-serif;
  font-size: 11px; color: #ef4444; line-height: 1.5;
  padding: 4px 0;
}
.wc-cite-alert {
  border-left-color: rgba(239, 68, 68, .25);
}
.wc-cite-claim {
  font-family: 'Inter', sans-serif;
  font-size: 12px; color: var(--txb); line-height: 1.6; margin: 4px 0 3px;
}
.wc-cite-source-text {
  font-family: 'Inter', sans-serif;
  font-size: 11px; color: var(--tx); line-height: 1.5;
  font-style: italic; margin: 4px 0;
  padding: 6px 10px; background: rgba(255,255,255,.03);
  border-left: 2px solid var(--bd);
}
.wc-cite-location {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; color: var(--txd); letter-spacing: .3px;
  margin-top: 2px;
}
.wc-source-link {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--bd);
}
.wc-source-link a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: #ef4444; text-decoration: none;
  letter-spacing: .5px;
}
.wc-source-link a:hover { text-decoration: underline; }
.wc-issues {
  margin-top: 8px;
}
.wc-issue {
  font-size: 10px; color: #ef4444; line-height: 1.5; margin-top: 4px;
}

/* Citation panel */
.wc-head {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--txd); margin-bottom: 16px;
}
.wc-title {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--txb); line-height: 1.45; margin-bottom: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--bd);
}
.wc-content {
  font-family: 'Inter', sans-serif;
  font-size: 12px; line-height: 1.7; color: var(--tx); margin-bottom: 20px;
}
.wc-content h3 {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600;
  letter-spacing: .5px; color: var(--txb); margin: 18px 0 8px;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.wc-content h3:first-child { margin-top: 0; }
.wc-content h4 {
  font-size: 12px; font-weight: 600; color: var(--txb); margin: 14px 0 6px;
}
.wc-content p { margin-bottom: 10px; }
.wc-content p:last-child { margin-bottom: 0; }
.wc-content strong, .wc-content b {
  color: var(--txb); font-weight: 700; font-size: 12.5px;
}
.wc-content ul, .wc-content ol {
  padding-left: 20px; margin: 6px 0 14px;
  list-style: disc;
}
.wc-content ol { list-style: decimal; }
.wc-content li {
  margin-bottom: 8px; line-height: 1.7;
  padding-left: 4px;
}
.wc-content li::marker {
  color: var(--cr);
}
.wc-content sup a { color: var(--cr); text-decoration: none; font-size: 9px; font-weight: 600; }
.wc-content sup a:hover { text-decoration: underline; }
.wc-typing::after {
  content: '\u258C'; color: var(--cr); animation: blink .6s step-end infinite;
  font-weight: 400;
}
@keyframes blink { 50% { opacity: 0; } }
.wc-deeper-section {
  margin: 16px 0; border-top: 1px solid var(--bd);
}
.wc-deeper-toggle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--cr);
  padding: 10px 0; cursor: pointer; list-style: none;
  user-select: none;
}
.wc-deeper-toggle::-webkit-details-marker { display: none; }
.wc-deeper-toggle::before {
  content: '\25B6'; margin-right: 6px; font-size: 7px;
  display: inline-block; transition: transform .15s;
}
details[open] > .wc-deeper-toggle::before {
  transform: rotate(90deg);
}
.wc-deeper-body {
  padding-top: 6px;
}
.wc-sources-head {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--txd); margin-bottom: 14px;
  padding-top: 14px; border-top: 1px solid var(--bd);
}
.wc-cite {
  margin-bottom: 18px; padding-bottom: 18px;
  border-bottom: 1px solid var(--bd);
}
.wc-label {
  font-size: 10px; font-weight: 600; letter-spacing: .6px;
  color: var(--cr); margin-bottom: 8px; text-transform: uppercase;
}
.wc-domain {
  font-size: 12px; color: var(--txd); margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
}
.wc-link {
  font-size: 10px; color: var(--tx); text-decoration: none;
  letter-spacing: .3px; transition: color .12s;
}
.wc-link:hover { color: var(--cr); }
.wc-none {
  font-size: 12px; color: var(--txd); margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
}
.wc-clear {
  padding: 6px 16px; font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: .6px; text-transform: uppercase;
  border: 1px solid var(--bd); background: var(--sf2);
  color: var(--txd); cursor: pointer; transition: .12s;
}
.wc-clear:hover { color: var(--tx); border-color: var(--tx); }


/* ═══ VIEWS ═══ */

.bod { display: flex; flex: 1; overflow: hidden; position: relative; }
.view {
  position: absolute; inset: 0; display: flex;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  overflow-y: auto;
}
.view.active { opacity: 1; pointer-events: all; }


/* ═══ LIVE MAP ═══ */
#map-wrap {
  display: flex; flex: 1; position: relative; overflow: hidden;
}
#map-pane {
  flex: 1; position: relative; overflow: hidden; background: var(--oc);
}
#lmap { display: block; width: 100%; height: 100%; }
.land { fill: var(--land); stroke: var(--ls); stroke-width: .4; }
.grat { fill: none; stroke: var(--ls); stroke-width: .3; opacity: .25; }

.evt-dot { cursor: pointer; transition: opacity .15s; }
.evt-dot.selected { stroke: #fff; stroke-width: 2; opacity: 1 !important; }

.evt-ring {
  opacity: 0; pointer-events: none;
  animation: ringPulse var(--ring-dur, 4s) ease-out var(--ring-delay, 0s) infinite;
}
@keyframes ringPulse {
  0%   { r: var(--ring-r0, 3); opacity: .45; }
  100% { r: var(--ring-r1, 12); opacity: 0; }
}

.ctx-panel {
  width: 0; overflow: hidden; transition: width .25s; border-left: 1px solid var(--bd);
  background: var(--sf); display: flex; flex-direction: column;
}
.ctx-panel.open { width: 360px; }
.ctx-head { padding: 14px 18px; border-bottom: 1px solid var(--bd); }
.ctx-close {
  background: none; border: 1px solid var(--bd); color: var(--txd);
  font-size: 9px; padding: 3px 10px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
}
.ctx-close:hover { color: var(--tx); border-color: var(--tx); }
.ctx-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 18px; margin-top: 8px; color: var(--txb); }
.ctx-sub { font-size: 9px; color: var(--txd); margin-top: 4px; }
.ctx-summary { padding: 12px 18px; border-bottom: 1px solid var(--bd); }
.ctx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ctx-field { }
.ctx-fl { font-size: 9px; color: var(--txd); text-transform: uppercase; letter-spacing: .08em; }
.ctx-fv { font-size: 16px; font-weight: 700; margin-top: 2px; }
.ctx-mentions-head {
  padding: 10px 18px; font-size: 10px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--txd); border-bottom: 1px solid var(--bd);
}
.ctx-mentions-scroll { flex: 1; overflow-y: auto; padding: 10px 18px; display: flex; flex-direction: column; gap: 6px; }

.ctx-article-card {
  display: block; padding: 10px 12px;
  background: var(--hover-overlay); border: 1px solid var(--bd);
  text-decoration: none; transition: background .15s, border-color .15s;
  cursor: pointer;
}
.ctx-article-card:hover {
  background: var(--acc-hover); border-color: var(--acc-dim);
}
.ctx-article-title {
  font-size: 11px; font-weight: 500; line-height: 1.5;
  color: var(--tx);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ctx-article-source {
  font-size: 9px; color: var(--txd); margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .03em; text-transform: uppercase;
}

.map-tip {
  position: absolute; pointer-events: none; background: var(--sf);
  border: 1px solid var(--bd); padding: 8px 12px;
  opacity: 0; transition: opacity .15s; z-index: 10;
  max-width: 260px; box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.map-tip.sh { opacity: 1; }

.zc { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.zb {
  width: 28px; height: 28px; background: var(--sf); border: 1px solid var(--bd);
  color: var(--tx); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
}
.zb:hover { background: var(--sf2); }

.map-leg {
  position: absolute; bottom: 12px; left: 12px; background: var(--sf);
  border: 1px solid var(--bd); padding: 10px 14px;
  font-size: 10px; z-index: 5;
}
.ml-t { color: var(--txd); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; font-size: 9px; }
.ml-r { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; color: var(--tx); }
.ml-d { width: 8px; height: 8px; border-radius: 50%; }

.map-stat {
  position: absolute; bottom: 12px; right: 12px; background: var(--sf);
  border: 1px solid var(--bd); padding: 8px 12px;
  font-size: 9px; color: var(--txd); z-index: 5;
}

/* ═══ DASHBOARD ═══ */

.db-left {
  width: 380px; border-right: 1px solid var(--bd);
  display: flex; flex-direction: column; background: var(--sf); flex-shrink: 0;
}
.db-lh {
  padding: 12px 14px 8px; border-bottom: 1px solid var(--bd);
  display: flex; justify-content: space-between; align-items: center;
}
.db-lt { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--txd); }
.db-ls { flex: 1; overflow-y: auto; }
.db-ls::-webkit-scrollbar { width: 3px; }
.db-ls::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 0; }

/* Country cards */
.cc {
  display: flex; align-items: center; padding: 10px 14px; gap: 10px;
  border-bottom: 1px solid var(--bd); cursor: pointer;
  transition: .12s; border-left: 2px solid transparent;
}
.cc:hover { background: var(--sf2); }
.cc.on { background: var(--acc-subtle); }
.cc-r { font-size: 9px; color: var(--txd); width: 16px; text-align: center; flex-shrink: 0; }
.cc-f { width: 28px; height: 20px; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cc-i { flex: 1; min-width: 0; }
.cc-n { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; color: var(--txb); }
.cc-u { font-size: 9px; color: var(--txd); margin-top: 1px; }
.cc-spark { width: 48px; height: 18px; flex-shrink: 0; opacity: .7; }
.cc-t { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.badge {
  font-size: 8px; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase; padding: 2px 5px; border-radius: 0;
}
.idx { font-size: 16px; font-weight: 600; font-family: 'JetBrains Mono', monospace; }

/* Detail panel */
.db-right {
  flex: 1; overflow-y: auto; background: var(--bg);
  display: flex; flex-direction: column;
}
.db-right::-webkit-scrollbar { width: 3px; }
.db-right::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 0; }

.dp-h {
  padding: 18px 22px 14px; border-bottom: 1px solid var(--bd);
  flex-shrink: 0; background: var(--bg); position: sticky; top: 0; z-index: 5;
}
.dp-row { display: flex; align-items: center; gap: 14px; }
.dp-fl { display: flex; align-items: center; }
.dp-nm { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 20px; color: var(--txb); }
.dp-sub { font-size: 10px; color: var(--txd); margin-top: 2px; line-height: 1.6; }
.dp-body { padding: 0 22px 28px; }

.dt-method {
  margin-top: 16px;
  padding: 8px 12px;
  background: var(--sf);
  border: 1px solid var(--bd);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.dt-method-label {
  font: 600 8px/1 'JetBrains Mono', monospace;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--txd);
  white-space: nowrap;
  flex-shrink: 0;
}
.dt-method-text {
  font: 400 9px/1.5 'Inter', sans-serif;
  color: var(--txd);
}

.kg { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 16px; }
.kg.kg-2 { grid-template-columns: repeat(2,1fr); }
.ki { background: var(--sf); border: 1px solid var(--bd); border-radius: 0; padding: 10px 12px; }
.kl { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--txd); margin-bottom: 2px; }
.kv { font-size: 16px; font-weight: 600; font-family: 'JetBrains Mono', monospace; }

.sec { margin-top: 20px; }
.sec-t {
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--txd); margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.sec-t::after {
  content: ''; flex: 1; height: 1px; background: var(--bd);
}

.tc { width: 100%; border-collapse: collapse; margin-top: 6px; }
.tc th {
  text-align: left; font-size: 9px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--txd); padding: 4px 8px; border-bottom: 1px solid var(--bd);
  font-weight: 400;
}
.tc td { padding: 5px 8px; font-size: 12px; border-bottom: 1px solid var(--bd); color: var(--tx); font-family: 'Inter', sans-serif; }
.tc tr:last-child td { border-bottom: none; }

/* Charts */
.cht { margin-top: 10px; display: flex; gap: 8px; }
.cht-box {
  flex: 1; background: var(--sf); border: 1px solid var(--bd);
  padding: 10px 12px; display: flex; flex-direction: column;
}
.cht-head {
  font-size: 9px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--txd); margin-bottom: 8px;
}
.cht-cv { flex: 1; min-height: 90px; }
.cht-foot { display: flex; justify-content: space-between; font-size: 8px; color: var(--txd); margin-top: 4px; }

/* Articles */
.art-list { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.art-card {
  display: flex; flex-direction: column; gap: 5px;
  padding: 10px 14px 10px 16px;
  border: 1px solid var(--bd); border-left: 2px solid var(--bd2);
  background: var(--sf);
  transition: border-color .15s, background .15s;
  cursor: pointer; text-decoration: none;
}
.art-card:hover { border-left-color: var(--acc); background: var(--sf2); }
.art-top {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.art-src {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 500;
  letter-spacing: .4px; text-transform: uppercase; color: var(--txd);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px;
}
.art-time {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--txd);
  white-space: nowrap; flex-shrink: 0;
}
.art-hl-row {
  display: flex; align-items: flex-start; gap: 8px;
}
.art-hl {
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--txb); line-height: 1.45; flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.art-ext {
  flex-shrink: 0; color: var(--txd); padding: 2px;
  opacity: 0; transition: opacity .15s, color .15s;
}
.art-card:hover .art-ext { opacity: 1; }
.art-ext:hover { color: var(--acc); }
.art-meta {
  display: flex; gap: 12px; align-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--txd);
}
.art-meta span { display: flex; align-items: center; gap: 3px; }
.art-tone-val { font-weight: 600; }


/* ── Shimmer skeleton system ── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skel {
  background: linear-gradient(90deg, var(--sf2) 25%, var(--sf) 50%, var(--sf2) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 2px;
}
.skel-line     { height: 10px; margin-bottom: 6px; }
.skel-line-sm  { height: 8px; margin-bottom: 5px; }
.skel-bar      { height: 16px; margin-bottom: 8px; }
.skel-block    { height: 10px; margin-bottom: 6px; }
.skel-card     { height: 56px; margin-bottom: 6px; border-radius: 2px; }
.skel-row      { height: 32px; margin-bottom: 4px; }
.skel-circle   { border-radius: 50%; }
.skel-chart    { height: 120px; margin-bottom: 8px; border-radius: 2px; }
body.light-mode .skel {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 800px 100%;
}

/* Briefing */
.brief-loading {
  padding: 16px 0;
}
.brief-skel {
  height: 10px; margin-bottom: 6px; border-radius: 0;
  background: linear-gradient(90deg, var(--sf2) 25%, var(--sf) 50%, var(--sf2) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
body.light-mode .brief-skel {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 800px 100%;
}
.brief-skel:nth-child(1) { width: 90%; }
.brief-skel:nth-child(2) { width: 75%; }
.brief-skel:nth-child(3) { width: 85%; }
.brief-skel:nth-child(4) { width: 60%; }

.brief-sections {
  display: flex; flex-direction: column; gap: 10px;
}
.brief-card {
  border: 1px solid var(--bd); overflow: hidden;
  background: var(--sf);
}
.brief-card-head {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--acc);
  padding: 8px 14px; background: var(--sf2); border-bottom: 1px solid var(--bd);
}
.brief-card-body {
  padding: 12px 14px; font-size: 12px; line-height: 1.75; color: var(--tx);
  font-family: 'Inter', sans-serif;
}
.brief-card-body strong { color: var(--txb); font-weight: 600; }
.brief-para { margin: 0 0 8px; }
.brief-para:last-child { margin-bottom: 0; }
.brief-subhead {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600;
  color: var(--txb); margin: 10px 0 6px;
  text-transform: uppercase; letter-spacing: .5px;
}
.brief-li {
  display: flex; gap: 10px; padding: 6px 0;
  border-top: 1px solid var(--bd); align-items: flex-start;
}
.brief-li:first-child { border-top: none; }
.brief-li-dot {
  flex-shrink: 0; width: 5px; height: 5px; margin-top: 6px;
  background: var(--cr); border-radius: 0;
}
.brief-cite {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px; font-weight: 600; color: var(--acc);
  letter-spacing: .02em;
}
.brief-src {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 600; color: var(--acc);
  letter-spacing: .02em;
}


/* ═══ BRIEFING META BAR ═══ */
.bm-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; font-size: 9px; color: var(--txd);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .04em; border-bottom: 1px solid var(--bd);
}
.bm-chip {
  display: inline-block; padding: 1px 6px;
  background: rgba(218,250,71,0.12); color: var(--acc);
  font-size: 8px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
}
.bm-sep { color: var(--bd); }

/* ═══ BRIEFING REFRESH NOTICE ═══ */
.briefing-refresh-notice {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin-bottom: 10px;
  background: var(--acc-hover); border: 1px solid var(--acc-dim);
  font-size: 10px; color: var(--acc);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .3px;
}
.refresh-pulse {
  display: inline-block; width: 6px; height: 6px;
  background: var(--acc); border-radius: 0;
  animation: refreshPulse 1.2s ease-in-out infinite;
}
@keyframes refreshPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ═══ STATUS / ERROR ═══ */

.status-msg { padding: 20px; text-align: center; color: var(--txd); font-size: 10px; line-height: 1.8; }
.status-msg b { color: var(--tx); }
.err-msg { color: var(--hi); }


/* ═══ VERTICAL EMPTY STATES ═══ */

.vert-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; width: 100%; padding: 40px 24px; text-align: center;
}
.vert-empty-icon {
  color: var(--txd); margin-bottom: 20px; opacity: .4;
}
.vert-empty-title {
  font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 600;
  color: var(--txb); margin-bottom: 10px; letter-spacing: .3px;
}
.vert-empty-sub {
  font-size: 12px; color: var(--txd); max-width: 360px; line-height: 1.7;
  font-family: 'Inter', sans-serif;
}


/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ─── INTRO PAGE ─── */
  .intro-inner { padding: 0 12px; }
  .intro-title { font-size: 22px; }
  .intro-sub { font-size: 10px; margin-bottom: 20px; }
  .intro-grid { grid-template-columns: 1fr; gap: 8px; }
  .intro-tile { padding: 14px 14px; gap: 12px; min-height: 64px; }
  .tile-arrow { opacity: .5; }
  .tile-desc { font-size: 10px; }
  .intro-head { margin-bottom: 16px; }
  .intro-foot { padding: 8px 12px; font-size: 8px; }

  /* ─── HEADER ─── */
  header {
    flex-direction: column; align-items: stretch;
    padding: 8px 12px; gap: 6px;
  }
  .hl { width: 100%; }
  .hl-top { justify-content: space-between; }
  .hr { width: 100%; justify-content: space-between; }
  .hstat { font-size: 8px; display: none; }
  .tag { font-size: 8px; letter-spacing: 1px; padding: 3px 6px; }
  .tabs {
    width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; flex-wrap: nowrap;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: 0 0 auto; text-align: center;
    padding: 10px 12px; font-size: 9px; min-height: 44px;
    display: flex; align-items: center; justify-content: center;
  }

  /* ─── FOOTER ─── */
  .app-foot { padding: 4px 12px; font-size: 8px; }

  /* ─── BOD / VIEWS ─── */
  .bod { flex-direction: column; }

  /* ─── WIRE FEED ─── */
  #v-wire,
  #v-health-wire,
  #v-energy-wire,
  #v-tech-wire {
    flex-direction: column;
  }
  .wire-feed {
    flex: 1; padding-left: 0; border-right: none;
    overflow-y: auto;
  }
  .wire-cite {
    width: 100%; position: fixed; bottom: 0; left: 0; right: 0;
    max-height: 60vh; z-index: 50;
    border-top: 2px solid var(--bd2);
    box-shadow: 0 -10px 40px rgba(0,0,0,.4);
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
  }
  .wire-cite.mob-open {
    transform: translateY(0);
  }
  .wire-cite-empty { display: none; }

  .w-item { padding: 14px 12px; }
  .w-title { font-size: 13px; line-height: 1.4; }
  .w-body { font-size: 11px; line-height: 1.5; }
  .w-foot { font-size: 8px; flex-wrap: wrap; gap: 4px; }
  .w-deeper { font-size: 9px; padding: 6px 12px; min-height: 36px; }
  .w-sep { font-size: 8px; padding: 6px 12px; }

  /* ─── DASHBOARD (mobile full-screen navigation) ─── */
  #v-dash { flex-direction: column; position: relative; }
  .db-left {
    width: 100%; height: 100%; border-right: none;
    border-bottom: none;
  }
  .db-right {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 20; background: var(--bg);
    display: none; flex-direction: column; min-height: 0;
  }
  .db-right.mob-detail-open {
    display: flex;
  }
  .mob-back {
    display: flex; align-items: center; gap: 6px;
    padding: 12px 14px; border-bottom: 1px solid var(--bd);
    background: var(--sf); cursor: pointer; border: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: .8px; text-transform: uppercase;
    color: var(--txd); width: 100%; min-height: 44px;
  }
  .mob-back:hover { color: var(--tx); }
  .mob-back svg { width: 14px; height: 14px; flex-shrink: 0; }
  .dp-h { padding: 14px 14px 10px; }
  .dp-nm { font-size: 16px; }
  .dp-body { padding: 0 14px 20px; }
  .kg { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .kg.kg-2 { grid-template-columns: 1fr; }
  .kv { font-size: 15px; }
  .ki { font-size: 8px; }
  .cc { padding: 10px 12px; min-height: 48px; gap: 8px; }
  .cc-r { font-size: 10px; width: 18px; }
  .cc-f { width: 24px; height: 24px; }
  .cc-n { font-size: 12px; }
  .cc-u { font-size: 9px; }
  .cc-spark { width: 50px !important; }
  .cc-t .badge { font-size: 7px; padding: 2px 5px; }
  .cc-t .idx { font-size: 11px; }

  .art-card { padding: 10px 10px 10px 13px; min-height: 44px; }
  .art-hl { font-size: 12px; line-height: 1.4; }
  .art-src { max-width: 120px; font-size: 8px; }

  /* ─── LIVE MAP ─── */
  #map-wrap { flex-direction: column; }
  .ctx-panel {
    width: 100% !important; height: 0; border-left: none;
    border-top: 1px solid var(--bd);
    transition: height .3s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
  }
  .ctx-panel.open { width: 100% !important; height: 50vh; }
  #map-pane { flex: 1; min-height: 45vh; max-height: 55vh; }
  .map-leg { padding: 6px 8px; bottom: 6px; left: 6px; font-size: 8px; }
  .map-leg .ml-t:last-child { display: none; }
  .map-stat { padding: 6px 8px; font-size: 8px; bottom: 6px; right: 6px; }
  .zc { top: 6px; right: 6px; }
  .zc button { min-width: 36px; min-height: 36px; }
  .cp-art { padding: 8px 10px; min-height: 44px; }
  .cp-art-hl { font-size: 11px; }

  /* ─── CITATION PANEL MOBILE CLOSE ─── */
  .wc-mob-close {
    display: block; position: sticky; top: 0; z-index: 2;
    width: 100%; padding: 10px; text-align: center;
    background: var(--sf); border-bottom: 1px solid var(--bd);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: .6px; text-transform: uppercase;
    color: var(--txd); cursor: pointer; border: none;
    min-height: 44px;
  }
  .wc-mob-close:hover { color: var(--tx); }

  /* ─── GLOBAL MOBILE UTILITIES ─── */
  .topbar-nav {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar-nav::-webkit-scrollbar { display: none; }
  .topbar-nav .tab {
    min-height: 44px; padding: 10px 12px;
    flex: 0 0 auto; white-space: nowrap;
  }
}

@media (min-width: 769px) {
  .wc-mob-close { display: none; }
  .mob-back { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   HEALTH POLICY TRACKER
   ═══════════════════════════════════════════════════════════ */

.hd-wrap {
  display: flex; flex-direction: column; flex: 1; min-height: 0;
  background: var(--bg); color: var(--tx);
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
}

.hd-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 18px; border-bottom: 1px solid var(--bd);
  background: var(--bg-deep); flex-wrap: wrap; gap: 6px;
}
.hd-topbar-left { display: flex; align-items: center; gap: 10px; }
.hd-topbar-label {
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--txd); font-weight: 400;
}
.hd-nav-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; background: var(--bd);
}
#hd-status { font-size: 9px; color: var(--txd); letter-spacing: .3px; padding-right: 12px; white-space: nowrap; }

#hd-nav {
  display: flex; gap: 1px;
  overflow: hidden; padding: 0; flex-shrink: 0;
}
.hd-nav-btn {
  padding: 6px 16px; border: none;
  background: var(--sf2); color: var(--txd);
  font-size: 10px; letter-spacing: .4px; font-weight: 400;
  text-transform: uppercase;
  cursor: pointer; font-family: 'JetBrains Mono', monospace;
  transition: .12s;
}
.hd-nav-btn:hover { color: var(--tx); }
.hd-nav-btn.active {
  background: var(--cr); color: #111; font-weight: 600;
}

.hd-dashboard {
  display: grid; grid-template-columns: 600px 1fr;
  flex: 1; min-height: 0;
}
.hd-sidebar {
  border-right: 1px solid var(--bd); background: var(--sf);
  overflow-y: auto; display: flex; flex-direction: column;
}
.hd-sidebar::-webkit-scrollbar { width: 3px; }
.hd-sidebar::-webkit-scrollbar-thumb { background: var(--bd2); }
.hd-sidebar-header {
  padding: 12px 14px 8px; border-bottom: 1px solid var(--bd);
  display: flex; justify-content: space-between; align-items: center;
}
.hd-sidebar-title {
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--txd);
}
.hd-sidebar-count {
  font-size: 10px; color: var(--txd);
}
.hd-topic-bar {
  padding: 6px 14px; border-bottom: 1px solid var(--bd);
  display: flex; gap: 1px; flex-wrap: wrap;
  background: var(--bd);
}
.hd-pill {
  padding: 4px 10px;
  border: none; background: var(--sf2);
  color: var(--txd); font-size: 9px; font-weight: 400;
  cursor: pointer; font-family: 'JetBrains Mono', monospace;
  letter-spacing: .4px; text-transform: uppercase;
  transition: .12s;
}
.hd-pill:hover { color: var(--tx); }
.hd-pill.active {
  background: var(--cr); color: #111; font-weight: 600;
}

.hd-bill-list { flex: 1; overflow-y: auto; }
.hd-bill-colhead {
  display: grid; grid-template-columns: 42px 1fr 70px 90px;
  gap: 6px; padding: 6px 14px; align-items: center;
  border-bottom: 1px solid var(--bd);
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  letter-spacing: .6px; color: var(--txd); text-transform: uppercase;
  position: sticky; top: 0; background: var(--sf); z-index: 2;
}
.hd-bill-row {
  display: grid; grid-template-columns: 42px 1fr 70px 90px;
  gap: 6px; padding: 7px 14px; align-items: center;
  border-bottom: 1px solid var(--bd); cursor: pointer;
  transition: background .12s; border-left: 2px solid transparent;
  font-family: 'JetBrains Mono', monospace;
}
.hd-bill-row:hover { background: var(--sf2); }
.hd-bill-row.active { background: var(--acc-subtle); }
.hd-col-st {
  font-size: 12px; font-weight: 700; color: var(--txb);
  text-align: center;
}
.hd-col-id {
  font-size: 11px; font-weight: 600; color: var(--txd);
  overflow: hidden; min-width: 0;
}
.hd-col-id-line {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hd-col-title {
  font-size: 10px; font-weight: 400; color: var(--txd); opacity: .7;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 1px; font-family: 'Inter', sans-serif;
}
.hd-col-upd {
  font-size: 10px; font-weight: 600; text-align: right;
  white-space: nowrap;
}
.hd-col-upd-fresh { color: var(--acc); }
.hd-col-stg { text-align: right; }
.hd-stg-badge {
  font-size: 8px; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase; padding: 2px 6px;
  white-space: nowrap;
}

.hd-detail {
  overflow-y: auto; padding: 18px 22px; background: var(--bg);
  position: relative;
}
.hd-detail::-webkit-scrollbar { width: 3px; }
.hd-detail::-webkit-scrollbar-thumb { background: var(--bd2); }
.hd-detail-close {
  display: none; position: sticky; top: 0; z-index: 2;
  width: 100%; padding: 8px; text-align: center;
  background: var(--sf); border: none; border-bottom: 1px solid var(--bd);
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  letter-spacing: .6px; text-transform: uppercase;
  color: var(--txd); cursor: pointer;
}
.hd-detail-close:hover { color: var(--tx); }
.hd-detail-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.hd-detail-state-badge {
  width: 44px; height: 40px;
  background: var(--sf2); border: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--txb);
}
.hd-detail-header-info { flex: 1; }
.hd-detail-jurisdiction {
  font-family: 'Inter', sans-serif; font-size: 20px; font-weight: 700;
  color: var(--txb); line-height: 1.15;
}
.hd-detail-header-meta {
  display: flex; align-items: center; gap: 8px; margin-top: 3px;
  flex-wrap: wrap; font-size: 10px; color: var(--txd);
}
.hd-detail-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px; margin-bottom: 16px;
}
.hd-stat-card {
  background: var(--sf); border: 1px solid var(--bd);
  padding: 10px 12px;
}
.hd-stat-label {
  font-size: 9px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--txd); margin-bottom: 2px;
}
.hd-stat-value {
  font-size: 16px; font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.hd-detail-ident-row {
  font-size: 11px; display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; margin-bottom: 4px;
}
.hd-detail-ident { font-size: 12px; font-weight: 600; }
.hd-detail-title {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--txb); line-height: 1.45; margin-bottom: 16px;
}

.hd-card {
  background: var(--sf); border: 1px solid var(--bd);
  padding: 14px 16px; margin-bottom: 8px;
}
.hd-card-summary { border-left: 2px solid var(--cr); }
.hd-card-label {
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--txd); font-weight: 400; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.hd-card-label::after {
  content: ''; flex: 1; height: 1px; background: var(--bd);
}
.hd-card-text {
  font-size: 12px; color: var(--tx); line-height: 1.7;
  font-family: 'Inter', sans-serif;
}
.hd-timeline { position: relative; padding-left: 14px; }
.hd-timeline::before {
  content: ''; position: absolute; left: 3px; top: 6px; bottom: 6px;
  width: 1px; background: var(--bd);
}
.hd-dev-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 6px 0; position: relative;
  font-size: 11px; line-height: 1.5; color: var(--tx);
}
.hd-dev-dot {
  width: 7px; height: 7px;
  margin-top: 4px; flex-shrink: 0;
  position: absolute; left: -14px;
  border: 1px solid var(--bd); background: var(--bg);
  z-index: 1;
}
.hd-dev-dot-latest {
  border-color: transparent;
}
.hd-dev-date {
  font-size: 10px; color: var(--txd); flex-shrink: 0;
  width: 76px; padding-top: 1px;
  font-family: 'JetBrains Mono', monospace;
}
.hd-dev-desc {
  flex: 1; min-width: 0;
  font-family: 'Inter', sans-serif; font-size: 12px;
  color: var(--tx); line-height: 1.5;
}
.hd-dev-item:last-child .hd-dev-desc {
  color: var(--txb); font-weight: 600;
}
.hd-disclosure {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  color: var(--txd);
  line-height: 1.4;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--bd);
  opacity: 0.7;
}
.hd-sponsor-parties {
  display: flex; gap: 12px; margin-bottom: 10px; align-items: center;
}
.hd-bipartisan-badge {
  font-size: 8px; letter-spacing: .5px; font-weight: 600;
  color: var(--cr); padding: 2px 6px;
  background: var(--acc-dim);
}
.hd-party-bar {
  display: flex; height: 3px;
  overflow: hidden; margin-bottom: 10px;
}
.hd-sponsor-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
}
.hd-sponsor-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; padding: 2px 0;
  font-family: 'Inter', sans-serif; color: var(--tx);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hd-sponsor-dot {
  width: 4px; height: 4px; border-radius: 50%; flex-shrink: 0;
}
.hd-sponsor-primary { color: var(--txb); font-weight: 600; }
.hd-sponsor-star { font-size: 8px; color: var(--cr); }
.hd-detail-footer {
  font-size: 10px; color: var(--txd); padding-top: 10px; margin-top: 6px;
  border-top: 1px solid var(--bd); letter-spacing: .3px;
}

.hd-empty {
  color: var(--txd); padding: 40px 20px; text-align: center;
  font-size: 11px; letter-spacing: .4px;
}

/* ── Methodology ── */
.hd-methodology {
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--bd);
}
.hd-meth-label {
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--txd); font-weight: 400; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.hd-meth-label::after {
  content: ''; flex: 1; height: 1px; background: var(--bd);
}
.hd-meth-body {
  font-size: 11px; line-height: 1.7; color: var(--txd);
  font-family: 'Inter', sans-serif;
}
.hd-meth-body p {
  margin-bottom: 6px;
}
.hd-meth-body strong {
  color: var(--tx); font-weight: 600;
}
.hd-meth-body a {
  color: var(--cr); text-decoration: none;
}
.hd-meth-body a:hover { text-decoration: underline; }

/* ── Patterns View ── */
.hd-patterns-wrap { height: 100%; overflow-y: auto; padding: 20px; }
.hp-empty { padding: 24px; text-align: center; color: var(--txd); font-size: 11px; }

.hp-filter-bar {
  background: var(--acc); color: #111;
  padding: 6px 14px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  letter-spacing: .3px;
}
.hp-clear-btn {
  background: rgba(0,0,0,.2); color: #111; border: none;
  padding: 4px 10px; font-size: 10px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase; cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
}
.hp-clear-btn:hover { background: rgba(0,0,0,.35); }


.hp-main-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  max-width: 1200px; margin: 0 auto;
}
.hp-col-map { display: flex; flex-direction: column; gap: 14px; }
.hp-col-data { display: flex; flex-direction: column; gap: 14px; }

.hp-panel {
  background: var(--sf); border: 1px solid var(--bd); overflow: hidden;
}
.hp-panel-head {
  padding: 10px 14px; border-bottom: 1px solid var(--bd);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 4px;
}
.hp-panel-title {
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700;
  color: var(--txb); text-transform: uppercase; letter-spacing: .5px;
}
.hp-panel-sub { font-size: 10px; color: var(--txd); }

.hp-map-wrap { padding: 8px; min-height: 260px; }
.hp-map-wrap svg { display: block; width: 100%; }
.hp-state-path { transition: stroke-width .15s, stroke .15s; }
.hp-state-path:hover { stroke-width: 1.5; stroke: var(--txb); }

.hp-legend-bar { display: flex; align-items: center; gap: 6px; padding: 8px 14px; }
.hp-legend-label { font-size: 9px; color: var(--txd); text-transform: uppercase; letter-spacing: .5px; }
.hp-legend-gradient {
  flex: 1; height: 6px;
  background: linear-gradient(90deg, var(--sf2), rgba(218,250,71,.8));
  border: 1px solid var(--bd);
}
.hp-legend-steps {
  display: flex; gap: 0; padding: 6px 14px 10px;
}
.hp-legend-step {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.hp-legend-swatch { width: 100%; height: 6px; }
.hp-legend-num { font-size: 8px; color: var(--txd); font-family: 'JetBrains Mono', monospace; }

/* Top States */
.hp-top-list { padding: 6px 0; }
.hp-top-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; transition: background .15s; cursor: pointer;
}
.hp-top-row:hover { background: var(--sf2); }
.hp-top-row.hp-top-active { background: var(--acc-hover); border-left: 2px solid var(--acc); }
.hp-top-rank {
  font-size: 9px; color: var(--txd); width: 14px; text-align: right;
  font-family: 'JetBrains Mono', monospace; flex-shrink: 0;
}
.hp-top-name {
  font-size: 12px; color: var(--txb); flex-shrink: 0; width: 100px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hp-top-bar-wrap {
  flex: 1; height: 8px; background: var(--sf2); overflow: hidden;
}
.hp-top-bar {
  height: 100%; background: var(--acc); opacity: .6;
  transition: width .3s;
}
.hp-top-count {
  font-size: 12px; font-weight: 700; color: var(--txb);
  width: 24px; text-align: right; flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.hp-top-bp {
  font-size: 9px; color: var(--acc); font-weight: 700;
  flex-shrink: 0; letter-spacing: .3px;
}

/* Topic Bars */
.hp-topics-list { padding: 4px 0; }
.hp-topic-row {
  padding: 10px 14px; cursor: pointer; transition: background .15s;
  border-bottom: 1px solid var(--bd);
}
.hp-topic-row:last-child { border-bottom: none; }
.hp-topic-row:hover { background: var(--sf2); }
.hp-topic-row.hp-topic-active { background: var(--acc-hover); }
.hp-topic-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 5px;
}
.hp-topic-dot {
  width: 8px; height: 8px; flex-shrink: 0;
}
.hp-topic-name {
  font-size: 12px; font-weight: 600; color: var(--txb); flex: 1;
}
.hp-topic-count {
  font-size: 14px; font-weight: 700; color: var(--txb);
  font-family: 'JetBrains Mono', monospace;
}
.hp-topic-bar-row { margin-bottom: 5px; }
.hp-topic-bar-track {
  height: 6px; background: var(--sf2); overflow: hidden; width: 100%;
}
.hp-topic-bar-fill {
  height: 100%; transition: width .3s; opacity: .7;
}
.hp-topic-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.hp-topic-tag {
  font-size: 9px; font-weight: 600; padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace; letter-spacing: .3px;
}
.hp-tag-bi { color: var(--acc); background: var(--acc-dim); }
.hp-tag-dem { color: #60a5fa; background: rgba(96,165,250,.1); }
.hp-tag-rep { color: #f87171; background: rgba(248,113,113,.1); }

/* Activity Timeline */
.hp-activity-chart { padding: 12px 14px; }
.hp-act-bars {
  display: flex; align-items: flex-end; gap: 3px;
  height: 100px; padding-bottom: 18px; position: relative;
}
.hp-act-col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 4px;
}
.hp-act-bar {
  width: 100%; min-height: 2px; transition: height .3s;
}
.hp-act-week {
  font-size: 8px; color: var(--txd); font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.hp-act-summary {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; border-top: 1px solid var(--bd); margin-top: 4px;
}
.hp-act-total {
  font-size: 11px; color: var(--txb); font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.hp-act-trend {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px;
}
.hp-trend-up { color: var(--acc); }
.hp-trend-down { color: var(--txd); }

.hp-methodology {
  font-size: 11px; line-height: 1.6; color: var(--txd);
  border-top: 1px solid var(--bd);
  padding: 12px 16px;
  margin-top: 12px;
  font-family: 'Inter', sans-serif;
}
.hp-methodology-label {
  font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--txs); font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.hp-methodology a { color: var(--txs); text-decoration: underline; }
.hp-methodology a:hover { color: var(--tx); }

/* ── Health Dashboard Mobile ── */
@media (max-width: 768px) {
  /* Nav buttons — larger touch targets */
  .hd-nav-btn {
    padding: 10px 20px;
    font-size: 10px;
    min-height: 44px;
  }
  #hd-status { font-size: 8px; padding-right: 8px; }

  /* Topic filter pills — 44px touch targets */
  .hd-topic-bar {
    padding: 6px 10px;
    gap: 4px;
  }
  .hd-pill {
    padding: 8px 12px;
    font-size: 9px;
    min-height: 36px;
    display: flex;
    align-items: center;
  }

  /* Dashboard layout */
  .hd-dashboard { grid-template-columns: 1fr; }
  .hd-sidebar {
    flex: 1;
    min-height: 0;
    border-right: none;
    border-bottom: none;
  }

  /* Bill list — hide column header, card-style rows */
  .hd-bill-colhead { display: none; }
  .hd-bill-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding: 12px 14px;
    min-height: 52px;
  }
  .hd-col-st {
    font-size: 13px;
    width: auto;
    margin-right: 4px;
  }
  .hd-col-id {
    flex: 1;
    min-width: 0;
  }
  .hd-col-id-line { font-size: 11px; }
  .hd-col-title {
    width: 100%;
    order: 4;
    margin-top: 2px;
    font-size: 10px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .hd-col-upd {
    font-size: 10px;
    text-align: right;
    order: 3;
  }
  .hd-col-stg {
    order: 3;
    text-align: right;
  }
  .hd-stg-badge {
    font-size: 8px;
    padding: 3px 8px;
  }

  /* Detail panel — full screen overlay */
  .hd-detail {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100; transform: translateX(100%);
    transition: transform .25s ease;
    padding: 0;
    pointer-events: none;
  }
  .hd-detail.mob-open { transform: translateX(0); pointer-events: auto; }
  .hd-detail-close {
    display: block;
    min-height: 44px;
    font-size: 10px;
    padding: 12px;
  }
  .hd-detail-scroll { padding: 16px; }
  .hd-detail-stats { grid-template-columns: 1fr; }
  .hd-detail-jurisdiction { font-size: 18px; }
  .hd-sponsor-grid { grid-template-columns: 1fr; }

  /* Timeline items — stack date above description on narrow screens */
  .hd-dev-item {
    flex-wrap: wrap;
    gap: 2px 10px;
  }
  .hd-dev-date {
    width: auto;
    font-size: 9px;
  }
  .hd-dev-desc {
    width: 100%;
    font-size: 11px;
  }

  /* Methodology */
  .hd-meth-body {
    font-size: 10px;
  }

  /* ── Patterns View Mobile ── */
  .hd-patterns-wrap { padding: 12px; }

  /* Filter bar — touch-friendly */
  .hp-filter-bar {
    padding: 10px 14px;
    font-size: 12px;
    min-height: 44px;
  }
  .hp-clear-btn {
    padding: 8px 14px;
    font-size: 10px;
    min-height: 36px;
  }

  /* Single column layout */
  .hp-main-grid { grid-template-columns: 1fr; }

  /* Map — larger for better tap targets */
  .hp-map-wrap {
    min-height: 220px;
    padding: 4px;
  }
  .hp-panel-head {
    padding: 10px 12px;
  }
  .hp-panel-title {
    font-size: 12px;
  }
  .hp-panel-sub {
    font-size: 10px;
  }

  /* Top States — taller rows, full width names */
  .hp-top-row {
    padding: 10px 12px;
    min-height: 44px;
    gap: 6px;
  }
  .hp-top-name {
    width: auto;
    flex: 0 1 auto;
    max-width: 120px;
    font-size: 12px;
  }
  .hp-top-bar-wrap {
    flex: 1;
    min-width: 40px;
    height: 10px;
  }
  .hp-top-count {
    font-size: 12px;
    width: auto;
  }
  .hp-top-bp {
    font-size: 9px;
  }
  .hp-top-rank {
    font-size: 10px;
  }

  /* Topic Bars — more padding, bigger touch targets */
  .hp-topic-row {
    padding: 12px 12px;
    min-height: 60px;
  }
  .hp-topic-name {
    font-size: 12px;
  }
  .hp-topic-count {
    font-size: 15px;
  }
  .hp-topic-dot {
    width: 10px;
    height: 10px;
  }
  .hp-topic-meta {
    gap: 6px;
  }
  .hp-topic-tag {
    font-size: 10px;
    padding: 2px 8px;
  }

  /* Activity Timeline — bigger bars */
  .hp-act-bars {
    gap: 2px;
    height: 90px;
  }
  .hp-act-week {
    font-size: 6px;
  }
  .hp-act-total {
    font-size: 11px;
  }
  .hp-act-trend {
    font-size: 10px;
  }

  /* Methodology */
  .hp-methodology {
    font-size: 11px;
    padding: 12px;
    line-height: 1.7;
  }
}

/* ===== AI LAB TRACKER ===== */
.al-dashboard {
  padding: 0 28px 24px;
  max-width: 1160px;
  margin: 0 auto;
}

/* ── Header ── */
.al-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--bd);
}
.al-hdr-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.al-hdr-brand b {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--txb);
  letter-spacing: -.2px;
}
.al-hdr-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  color: var(--txd);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--bd);
}
.al-hdr-right {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--txd);
  letter-spacing: .3px;
  line-height: 1.5;
}

/* ── Nav ── */
.al-nav {
  display: flex;
  gap: 2px;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-x: auto;
  margin-left: -28px;
  margin-right: -28px;
  padding-left: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--bd);
  margin-bottom: 18px;
}
.al-nav-btn {
  padding: 9px 14px;
  border: none;
  background: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .4px;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--txd);
  transition: .15s;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.al-nav-btn:hover { color: var(--tx); background: var(--sf); }
.al-nav-btn.on {
  background: var(--acc);
  color: #111;
  font-weight: 600;
}
.al-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.al-co-logo {
  display: inline-block;
  flex-shrink: 0;
  object-fit: contain;
  filter: invert(1);
  transition: filter .15s;
}
.al-nav-btn.on .al-co-logo {
  filter: none;
}
body.light-mode .al-co-logo {
  filter: none;
}
body.light-mode .al-nav-btn.on .al-co-logo {
  filter: invert(1);
}
body.light-mode header .al-co-logo {
  filter: invert(1);
}

/* ── Pages ── */
.al-page { display: none; padding-top: 0; }
.al-page:first-of-type { display: block; }
@keyframes alPageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.al-page.al-enter { animation: alPageIn .25s ease-out both; }

/* ── Layer KPI strip ── */
.al-layer-strip {
  display: flex;
  gap: 0;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--bd);
}
.al-layer-item {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  position: relative;
}
.al-layer-item + .al-layer-item { border-left: 1px solid var(--bd); }
.al-li-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1;
}
.al-li-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  color: var(--txd);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 3px;
}
.al-li-delta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  margin-top: 2px;
}

/* ── Two-column layout ── */
.al-ov-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  height: calc(100vh - 90px);
}
.al-ov-main {
  border-right: 1px solid var(--bd);
  padding-right: 20px;
  overflow-y: auto;
}
.al-ov-side {
  padding-left: 20px;
  padding-top: 6px;
  overflow-y: auto;
}

/* ── Section header (ruled) ── */
.al-sec-h {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--txd);
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--bd);
  margin-bottom: 4px;
}

/* ── Root container fill ── */
#ai-lab-root { width: 100%; }

/* ── Strategic Focus Index rows ── */
.al-sfi-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--bd);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  transition: background .08s;
}
.al-sfi-method {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--txd);
  margin: 18px 0 8px;
  line-height: 1.5;
  opacity: 0.7;
  border-top: 1px solid var(--bd);
  padding-top: 14px;
}
.al-sfi-method-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--tx);
  opacity: 0.9;
  margin-bottom: 8px;
}
.al-sfi-method p {
  margin: 0 0 6px;
}
.al-sfi-method p:last-of-type {
  margin-bottom: 0;
}
.al-sfi-method-copy {
  margin-top: 8px;
  font-size: 9px;
  opacity: 0.5;
}
.al-sfi-hdr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--txd);
  border-bottom: 1px solid var(--bd);
  padding-bottom: 3px;
  margin-bottom: 2px;
}
.al-sfi-hdr > * {
  font-size: 9px !important;
  font-weight: 500 !important;
  color: var(--txd) !important;
}
.al-sfi-hdr:hover {
  background: transparent;
}
.al-sfi-row:hover {
  background: var(--sf);
}
.al-sfi-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tx);
  min-width: 140px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.al-cat-icon {
  opacity: 0.55;
  flex-shrink: 0;
}
.al-sfi-layer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: .3px;
}
.al-sfi-spark {
  width: 90px;
  flex-shrink: 0;
}
.al-spark-wrap {
  overflow: visible;
}
.al-pulse-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: alPulse 2s ease-out infinite;
}
@keyframes alPulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70% { box-shadow: 0 0 0 4px transparent; opacity: 1; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}
.al-sfi-delta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  width: 48px;
  text-align: right;
  flex-shrink: 0;
}
.al-sfi-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--txd);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}
.al-sfi-v {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Company dots in SFI table ── */
.al-tbl-co {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}
.al-co-dot-sm {
  width: 5px;
  height: 12px;
  flex-shrink: 0;
}
.al-co-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Category Focus Heatmap ── */
.al-cf-wrap { margin-top: 20px; }
.al-cf-tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.al-cf-tbl th {
  padding: 5px 6px;
  text-align: center;
  font-weight: 500;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--txd);
  border-bottom: 1px solid var(--bd);
  white-space: nowrap;
}
.al-cf-tbl th:first-child {
  text-align: left;
  min-width: 130px;
}
.al-cf-tbl td {
  padding: 4px 6px;
  text-align: center;
  border-bottom: 1px solid var(--bd);
  color: var(--tx);
}
.al-cf-tbl td:first-child {
  text-align: left;
  color: var(--tx);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.al-cf-tbl tr:hover td { background: var(--sf); }
.al-cf-cell {
  font-weight: 600;
  font-size: 10px;
}
.al-cf-cell.hot { color: var(--acc); }
.al-cf-cell.warm { color: var(--txb); }
.al-cf-cell.cool { color: var(--txd); }
.al-cf-cell.zero { color: var(--bd); }
.al-cf-co-hdr {
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: center;
}
.al-cf-co-hdr img { border-radius: 0; }
body.light-mode .al-cf-tbl tr:hover td { background: var(--sf); }

/* ── Sidebar sections ── */
.al-side-sec {
  padding: 10px 0;
  border-bottom: 1px solid var(--bd);
}
.al-side-sec:last-child { border-bottom: none; }

/* ── Signal items (ruled list) ── */
.al-sig {
  padding: 6px 0;
  border-bottom: 1px solid var(--bd);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.45;
}
.al-sig:last-child { border-bottom: none; }
.al-sig-top {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 1px;
}
.al-sig-ts {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  color: var(--txd);
  flex-shrink: 0;
}
.al-sig-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  color: var(--txd);
  flex-shrink: 0;
}
.al-sig-d {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  margin-left: auto;
  flex-shrink: 0;
}
.al-sig-body {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--tx);
}
.al-sig-body b { font-weight: 600; color: var(--txb); }
.al-sig-detail {
  font-family: 'JetBrains Mono', monospace;
  color: var(--txd);
  font-size: 9px;
  letter-spacing: .4px;
  margin-top: 1px;
  line-height: 1.4;
}

/* ── Trend items (ruled list) ── */
.al-trend {
  padding: 7px 0;
  border-bottom: 1px solid var(--bd);
}
.al-trend:last-child { border-bottom: none; }
.al-trend-q {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--txb);
  line-height: 1.35;
}
.al-trend-p {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--txd);
  margin-top: 2px;
  line-height: 1.45;
}

/* ── Company rows in sidebar ── */
.al-co-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid var(--bd);
  cursor: pointer;
}
.al-co-row:last-child { border-bottom: none; }
.al-co-row:hover .al-co-nm { color: var(--txb); }
.al-co-nm {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 12px;
  flex: 1;
  transition: .1s;
  color: var(--tx);
}
.al-co-bar-sm {
  display: flex;
  height: 3px;
  width: 46px;
  overflow: hidden;
  background: var(--bd);
}
.al-co-bar-sm div { min-width: 1px; }
.al-co-n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--txd);
}

/* ── Profile page ── */
.al-prof { padding: 0 16px; margin: 0; }
.al-prof-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 0 12px;
  margin: 0;
  border-bottom: 1px solid var(--bd);
}
.al-prof-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.al-prof-name {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--txb);
}
.al-latest-card {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 0 16px 10px; padding: 7px 10px;
  background: var(--acc-subtle);
  border-left: 2px solid var(--acc);
  transition: background .2s;
  cursor: pointer;
}
.al-latest-card:hover {
  background: var(--acc-hover);
}
.al-latest-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px; font-weight: 700;
  letter-spacing: 1.2px; color: var(--acc);
  text-transform: uppercase; flex-shrink: 0;
}
.al-latest-pulse {
  display: inline-block; width: 5px; height: 5px;
  background: var(--acc);
  animation: latestPulse 1.8s ease-in-out infinite;
}
@keyframes latestPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.al-latest-headline {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 500;
  color: var(--txb);
}
.al-latest-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; color: var(--txd);
  letter-spacing: .03em;
}
.al-latest-sep {
  margin: 0 4px; opacity: 0.4;
}
.al-prof-stats {
  display: flex;
  gap: 20px;
}
.al-ps-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--txb);
}
.al-ps-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  color: var(--txd);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-top: 2px;
}

.al-prof-layer {
  display: flex;
  height: 5px;
  overflow: hidden;
  background: var(--bd);
  margin: 10px 0;
}
.al-prof-layer div { min-width: 1px; }

.al-prof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 20px;
}
.al-prof-sec { min-width: 0; }

.al-prof-bar-wrap {
  flex: 1;
  height: 5px;
  background: var(--bd);
  overflow: hidden;
  min-width: 40px;
}
.al-prof-bar {
  height: 100%;
  transition: width .3s;
}

.al-prof-sig {
  padding: 4px 0;
  border-bottom: 1px solid var(--bd);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
}
.al-prof-sig:last-child { border-bottom: none; }

/* ── Article index in profile ── */
.al-art-sec { margin-top: 16px; }
.al-art-grp { margin-bottom: 14px; }
.al-art-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--txd);
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--bd);
}
.al-art-i {
  padding: 6px 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid var(--line-subtle);
  transition: background .15s;
}
.al-art-i:hover {
  background: var(--hover-overlay);
}
.al-art-i:last-child { border-bottom: none; }
.al-art-d {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--txd);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 72px;
}
.al-art-a {
  font-family: 'Inter', sans-serif;
  color: var(--tx);
  text-decoration: none;
  transition: color .15s;
  flex: 1;
}
.al-art-a:hover {
  color: var(--txb);
}
.al-art-src {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: var(--txd);
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.7;
}

/* ── Empty ── */
.al-empty {
  text-align: center;
  padding: 20px;
  color: var(--txd);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
}

/* ─── CSS variables for up/down colors ─── */
.al-dashboard { --up: #059669; --dn: #dc2626; }
body.light-mode .al-dashboard { --up: #059669; --dn: #dc2626; }

/* ─── AI Lab Light Mode ─── */
body.light-mode .al-nav { background: var(--bg); border-bottom-color: var(--bd); }
body.light-mode .al-nav-btn { background: var(--bg); color: var(--txd); }
body.light-mode .al-nav-btn:hover { color: var(--tx); background: var(--sf); }
body.light-mode .al-nav-btn.on { background: var(--acc); color: #fff; }
body.light-mode .al-sfi-row:hover { background: var(--sf2); }
body.light-mode .al-co-row:hover { background: var(--sf2); }
body.light-mode .al-latest-card { background: var(--acc-subtle); border-left-color: var(--acc); }
body.light-mode .al-latest-card:hover { background: var(--acc-hover); }
body.light-mode .al-art-i:hover { background: var(--hover-overlay); }
body.light-mode .al-sig { border-bottom-color: var(--bd); }
body.light-mode .al-trend { border-bottom-color: var(--bd); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .al-dashboard { padding: 0 12px 24px; }
  .al-nav { margin-left: -12px; margin-right: -12px; padding-left: 12px; }
  .al-ov-grid { grid-template-columns: 1fr; }
  .al-ov-main { border-right: none; padding-right: 0; }
  .al-ov-side { padding-left: 0; }
  .al-prof-grid { grid-template-columns: 1fr; }
  .al-prof-head { flex-direction: column; gap: 10px; }
  .al-hdr { flex-direction: column; align-items: flex-start; gap: 6px; }
  .al-hdr-right { text-align: left; }
  .al-layer-strip { flex-wrap: wrap; }
  .al-layer-item { min-width: 50%; }
  .al-sfi-row { flex-wrap: nowrap; gap: 2px; }
  .al-sfi-name { min-width: 0; flex: 1; }
  .al-sfi-spark { width: 80px; }
}
@media (max-width: 768px) {
  .al-dashboard { padding: 0 10px 24px; }
  .al-hdr { padding: 10px 0; }
  .al-hdr-left { font-size: 16px; }
  .al-nav { margin-left: -10px; margin-right: -10px; padding-left: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .al-nav-btn { padding: 10px 12px; font-size: 9px; min-height: 44px; white-space: nowrap; }
  .al-ov-grid { grid-template-columns: 1fr; height: auto; }
  .al-ov-main { border-right: none; padding-right: 0; overflow-y: visible; }
  .al-ov-side { padding-left: 0; overflow-y: visible; border-top: 1px solid var(--bd); padding-top: 10px; margin-top: 10px; }
  .al-layer-strip { flex-wrap: wrap; }
  .al-layer-item { min-width: 50%; flex: none; width: 50%; border-left: none !important; }
  .al-layer-item:nth-child(odd) { border-right: 1px solid var(--bd); }
  .al-layer-item:nth-child(n+3) { border-top: 1px solid var(--bd); padding-top: 8px; margin-top: 4px; }
  .al-sfi-row { flex-wrap: nowrap; gap: 4px; padding: 6px; }
  .al-sfi-name { min-width: 0; font-size: 10px; flex: 1; }
  .al-sfi-spark { width: 50px; }
  .al-sfi-pct, .al-sfi-delta, .al-sfi-v { font-size: 9px; }
  .al-prof-grid { grid-template-columns: 1fr; gap: 16px; }
  .al-prof-head { flex-direction: column; gap: 8px; }
  .al-prof-name { font-size: 18px; }
  .al-prof-stats { gap: 14px; }
  .al-co-row { padding: 6px 0; min-height: 44px; }
  .al-sig { padding: 8px 0; }
  .al-trend { padding: 8px 0; }
  .al-cf-tbl { font-size: 9px; }
  .al-cf-tbl th { font-size: 8px; padding: 4px 3px; }
  .al-cf-tbl td { padding: 3px 3px; }
  .al-cf-cell { font-size: 9px; }
  .al-cf-tbl th:first-child { min-width: 90px; }
}

/* ═══════════════════════════════════════════════════════════
   EIA Energy Dashboard
   Matches site design language: sharp corners, JetBrains Mono
   data font, Inter body, CSS var colors, .w-sep section headers
   ═══════════════════════════════════════════════════════════ */
.eia-dash {
  padding: 18px 28px 24px;
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

/* ─ Section headers ─ matches .w-sep pattern ─ */
.eia-section-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.eia-section-label {
  font: 600 9px/1 'JetBrains Mono', monospace;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--acc);
  white-space: nowrap;
  flex-shrink: 0;
}
.eia-section-line {
  flex: 1;
  height: 1px;
  background: var(--bd);
}

/* ─ Lede ─ */
.eia-lede {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--sf);
  border: 1px solid var(--bd);
  font: 400 11px/1.5 'Inter', sans-serif;
  color: var(--tx);
}
.eia-lede-text { flex: 1; }
.eia-demo-badge {
  font: 600 8px/1 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #f59e0b22;
  color: #f59e0b;
  padding: 3px 8px;
  border: 1px solid #f59e0b44;
  white-space: nowrap;
}

/* ─ KPI ticker row ─ matches .ki/.kv pattern (16px values) ─ */
.eia-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.eia-kpi {
  background: var(--sf);
  border: 1px solid var(--bd);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 2px solid var(--kpi-accent, var(--acc));
}
.eia-kpi-label {
  font: 600 9px/1 'JetBrains Mono', monospace;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--txd);
}
.eia-kpi-val {
  font: 600 16px/1.2 'JetBrains Mono', monospace;
  color: var(--txb);
}
.eia-kpi-unit {
  font-size: 9px;
  font-weight: 400;
  color: var(--txd);
  margin-left: 3px;
}
.eia-kpi-delta {
  font: 500 10px/1 'JetBrains Mono', monospace;
  color: var(--tx);
}
.eia-kpi-up { color: var(--lo); }
.eia-kpi-dn { color: var(--hi); }
.eia-kpi-flat { color: var(--txd); }
.eia-kpi-arrow { font-size: 8px; }
.eia-kpi-source {
  font: 400 8px/1 'JetBrains Mono', monospace;
  color: var(--txd);
  margin-top: 2px;
  letter-spacing: 0.4px;
}

/* ─ Alerts / Signals ─ matches .art-card left-border pattern ─ */
.eia-alerts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.eia-alert {
  padding: 10px 14px 10px 16px;
  border: 1px solid var(--bd);
  border-left: 2px solid var(--bd2);
  background: var(--sf);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.eia-alert-crit {
  border-left-color: var(--hi);
  background: rgba(239,68,68,0.04);
}
.eia-alert-high {
  border-left-color: var(--el);
  background: rgba(249,115,22,0.03);
}
.eia-alert-med {
  border-left-color: #eab308;
  background: rgba(234,179,8,0.03);
}
.eia-alert-sev {
  font: 600 8px/1 'JetBrains Mono', monospace;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.eia-alert-crit .eia-alert-sev { color: var(--hi); }
.eia-alert-high .eia-alert-sev { color: var(--el); }
.eia-alert-med .eia-alert-sev { color: #eab308; }
.eia-alert-title {
  font: 600 12px/1.3 'Inter', sans-serif;
  color: var(--txb);
}
.eia-alert-body {
  font: 400 11px/1.4 'Inter', sans-serif;
  color: var(--tx);
}
.eia-alert-tag {
  font: 600 8px/1 'JetBrains Mono', monospace;
  letter-spacing: 0.6px;
  color: var(--txd);
  margin-top: 2px;
}

/* ─ Charts ─ */
.eia-charts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.eia-charts-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.eia-charts-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.eia-chart-panel {
  background: var(--sf);
  border: 1px solid var(--bd);
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.eia-chart-hdr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.eia-chart-title {
  font: 600 9px/1 'JetBrains Mono', monospace;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--txd);
}
.eia-chart-unit {
  font: 400 9px/1 'JetBrains Mono', monospace;
  color: var(--txd);
}
.eia-chart-panel canvas {
  width: 100%;
  display: block;
}
.eia-chart-lead canvas { height: 190px; }
.eia-chart-sec canvas { height: 150px; }

/* ─ Insights ─ */
.eia-insights {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.eia-insight {
  padding: 10px 14px;
  background: var(--sf);
  border: 1px solid var(--bd);
}
.eia-insight-text {
  font: 400 11px/1.5 'Inter', sans-serif;
  color: var(--tx);
}

/* ─ Meta footer ─ */
.eia-meta {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  font: 400 9px/1 'JetBrains Mono', monospace;
  color: var(--txd);
  padding-top: 4px;
  padding-bottom: 12px;
  letter-spacing: 0.4px;
}
.eia-meta-warn { color: var(--el); }

.eia-error {
  padding: 40px 20px;
  text-align: center;
  font: 400 12px/1.5 'Inter', sans-serif;
  color: var(--hi);
}

/* Skeleton states */
.eia-skel {
  background: var(--sf);
  border: 1px solid var(--bd);
  animation: eiaPulse 1.5s ease-in-out infinite;
}
@keyframes eiaPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}
.eia-skel-lede { height: 38px; }
.eia-skel-kpi { height: 90px; }
.eia-skel-alert { height: 65px; }
.eia-skel-chart { height: 230px; }
.eia-skel-chart-sm { height: 190px; }

/* ─── Light mode ─── */
body.light-mode .eia-alert-crit { background: rgba(220,38,38,0.04); }
body.light-mode .eia-alert-high { background: rgba(234,88,12,0.04); }
body.light-mode .eia-alert-med  { background: rgba(202,138,4,0.04); }

/* ─── Mobile ─── */
@media (max-width: 768px) {
  .eia-dash { padding: 12px; gap: 10px; }
  .eia-kpis { grid-template-columns: repeat(2, 1fr); }
  .eia-kpi:last-child { grid-column: span 2; }
  .eia-charts-lead { grid-template-columns: 1fr; }
  .eia-charts-secondary { grid-template-columns: 1fr; }
  .eia-meta { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .eia-kpis { grid-template-columns: 1fr; }
  .eia-kpi:last-child { grid-column: span 1; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .eia-kpis { grid-template-columns: repeat(3, 1fr); }
  .eia-charts-secondary { grid-template-columns: repeat(2, 1fr); }
}

/* ── GCTI Dashboard (Global Cybersecurity Threat Index) ── */
/* Uses global app variables: --bg, --bd, --tx, --txb, --txd, --sf, --acc */

#gcti-root {
  width: 100%;
  padding: 0 28px 24px;
  max-width: 1160px;
  margin: 0 auto;
}

.gcti-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
}
.gcti-main {
  border-right: 1px solid var(--bd);
  padding-right: 20px;
  overflow-y: auto;
}
.gcti-sidebar {
  padding-left: 20px;
  padding-top: 6px;
  overflow-y: auto;
}

.gcti-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--txd);
  text-transform: uppercase;
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--bd);
  margin-bottom: 4px;
}
.gcti-sub {
  font-weight: 400;
  font-size: 8px;
  color: var(--txd);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.gcti-section {
  margin-bottom: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bd);
}

.gcti-src-badge {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--txd);
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 0;
  padding: 1px 4px;
  letter-spacing: 0.5px;
}

.gcti-vol-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  padding-top: 10px;
}
.gcti-vol-col {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gcti-vol-num {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--txd);
  margin-bottom: 3px;
  font-weight: 600;
}
.gcti-vol-bar {
  width: 100%;
  border-radius: 0;
  margin-bottom: 4px;
  position: relative;
}
.gcti-vol-nsrc {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--txd);
  white-space: nowrap;
}
.gcti-vol-wk {
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 16px;
}
.gcti-vol-range {
  font-size: 7px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--txd);
}
.gcti-legend {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--txd);
}
.gcti-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 0;
  margin-right: 4px;
  vertical-align: middle;
}

.gcti-tfi-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.gcti-tfi-table td {
  text-align: left;
}
.gcti-tfi-table thead td {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  color: var(--txd);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 6px 0;
}
.gcti-tfi-table tbody tr {
  border-bottom: 1px solid var(--bd);
  transition: background .08s;
}
.gcti-tfi-table tbody tr:hover {
  background: var(--sf);
}
.gcti-tfi-cat {
  padding: 3px 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--tx);
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}
.gcti-tfi-cat svg { flex-shrink: 0; }
.gcti-num {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.gcti-wk-range {
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  color: var(--txd);
  padding: 2px 4px 0;
  letter-spacing: 0;
}

.gcti-vendor-row {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  border-bottom: 1px solid var(--bd);
  gap: 8px;
  transition: background .08s;
}
.gcti-vendor-row:hover { background: var(--sf); }
.gcti-vendor-name {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--tx);
  width: 30%;
  text-align: left;
}
.gcti-vendor-bar-bg {
  height: 6px;
  background: var(--bd);
  border-radius: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0;
}
.gcti-vendor-bar {
  height: 100%;
  border-radius: 0;
}
.gcti-vendor-cnt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--txb);
  font-weight: 600;
  width: 28px;
  text-align: right;
}
.gcti-vendor-src {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--txd);
  width: 40px;
  text-align: right;
}

.gcti-matrix-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: fixed;
}
.gcti-matrix-table thead td {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: var(--txd);
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 8px 4px 10px;
  vertical-align: bottom;
  border-bottom: 1px solid var(--bd);
}
.gcti-matrix-table thead td:first-child { padding-left: 6px; }
.gcti-matrix-hdr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.gcti-matrix-table tbody tr {
  border-bottom: 1px solid var(--bd);
  transition: background .08s;
}
.gcti-matrix-table tbody tr:hover { background: var(--sf); }
.gcti-matrix-cat {
  padding: 5px 6px;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: var(--tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.gcti-matrix-cat span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gcti-matrix-table tbody td {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 5px 2px;
}
.gcti-mname {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: var(--txd);
  line-height: 1.1;
}

.gcti-methodology {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--bd);
  border-bottom: none;
}
.gcti-method-text {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--txd);
  line-height: 1.7;
}
.gcti-method-text p { margin: 0 0 10px; }
.gcti-hl {
  color: var(--tx);
  font-weight: 600;
}

.gcti-score-box {
  text-align: center;
  margin-bottom: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--bd);
}
.gcti-score-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  line-height: 1;
}
.gcti-score-bar {
  width: 100%;
  height: 4px;
  background: var(--bd);
  border-radius: 0;
  margin-top: 8px;
}
.gcti-score-fill {
  height: 4px;
  background: linear-gradient(90deg, #22c55e, #f59e0b, #ef4444);
  border-radius: 0;
}
.gcti-score-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  margin-top: 6px;
  letter-spacing: 1.4px;
  text-align: center;
}
.gcti-score-detail {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--txd);
  margin-top: 4px;
  text-align: center;
}

.gcti-sev-trend { margin-top: 12px; }
.gcti-sev-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.gcti-sev-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  width: 40px;
}
.gcti-sev-wk-labels {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px;
  color: var(--txd);
  margin-top: 4px;
  padding-left: 48px;
}
.gcti-sev-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 0;
  flex-shrink: 0;
}

.gcti-shift {
  padding: 6px 0;
  border-bottom: 1px solid var(--bd);
}
.gcti-shift:last-of-type { border-bottom: none; }
.gcti-shift-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.gcti-shift-head span:first-child {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
}
.gcti-shift-delta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
}
.gcti-shift-detail {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--txd);
  margin-top: 2px;
  line-height: 1.4;
}

.gcti-signal {
  padding: 6px 0;
  border-bottom: 1px solid var(--bd);
}
.gcti-signal:last-child { border-bottom: none; }
.gcti-signal-hot .gcti-signal-delta {
  color: #ef4444;
}
.gcti-signal-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.gcti-signal-d {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--txd);
}
.gcti-signal-src {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--txd);
}
.gcti-signal-delta {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: #f59e0b;
}
.gcti-signal-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--txb);
  font-weight: 500;
}
.gcti-signal-sub {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--txd);
  margin-top: 1px;
}

.gcti-src-title {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--txb);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gcti-latest-box {
  background: var(--sf);
  padding: 8px 12px;
  margin: 8px 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--bd);
}
.gcti-latest-badge {
  background: var(--acc);
  color: #111;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  letter-spacing: 1px;
}
.gcti-latest-title {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--tx);
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gcti-latest-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--txd);
}

.gcti-tfi-row {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  border-bottom: 1px solid var(--bd);
  gap: 6px;
  transition: background .08s;
}
.gcti-tfi-row:hover { background: var(--sf); }
.gcti-tfi-icon { width: 18px; display: flex; align-items: center; justify-content: center; }
.gcti-tfi-name { flex: 1; font-family: 'Inter', sans-serif; font-size: 12px; text-align: left; }
.gcti-tfi-spark { width: 64px; display: flex; align-items: center; justify-content: center; }
.gcti-tfi-share { font-family: 'JetBrains Mono', monospace; font-size: 10px; width: 30px; text-align: right; }
.gcti-tfi-val { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; width: 40px; text-align: right; }
.gcti-tfi-status { font-family: 'JetBrains Mono', monospace; font-size: 8px; width: 44px; text-align: left; }

.gcti-catfocus-row {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  border-bottom: 1px solid var(--bd);
  gap: 8px;
  transition: background .08s;
}
.gcti-catfocus-row:hover { background: var(--sf); }
.gcti-catfocus-icon { width: 18px; display: flex; align-items: center; justify-content: center; }
.gcti-catfocus-name { flex: 1; font-family: 'Inter', sans-serif; font-size: 12px; text-align: left; }
.gcti-catfocus-bar-bg { width: 56px; height: 5px; background: var(--bd); border-radius: 0; overflow: hidden; }
.gcti-catfocus-bar { height: 100%; border-radius: 0; }
.gcti-catfocus-pct { font-family: 'JetBrains Mono', monospace; font-size: 11px; width: 36px; text-align: right; }

a.gcti-link-row {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.gcti-link-row:hover { background: var(--sf); }
a.gcti-latest-box:hover .gcti-latest-title { color: var(--acc); }
.gcti-article {
  display: flex;
  padding: 4px 6px;
  border-bottom: 1px solid var(--bd);
  align-items: baseline;
  gap: 10px;
  transition: background .08s;
}
.gcti-article:hover { background: var(--sf); }
a.gcti-article:hover .gcti-article-title { color: var(--acc); }
.gcti-article-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--txd);
  width: 46px;
  flex-shrink: 0;
}
.gcti-article-title {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--tx);
  flex: 1;
}

.gcti-src-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  color: var(--txb);
  line-height: 1;
}
.gcti-layer-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.gcti-layer-name {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--tx);
  width: 130px;
}
.gcti-layer-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--bd);
  border-radius: 0;
  overflow: hidden;
}
.gcti-layer-bar {
  height: 100%;
  border-radius: 0;
}
.gcti-layer-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--txd);
  width: 32px;
  text-align: right;
}
.gcti-topvendor {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  border-bottom: 1px solid var(--bd);
}
.gcti-topvendor:last-child { border-bottom: none; }
.gcti-topvendor span:first-child { color: var(--tx); }
.gcti-topvendor-cnt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--txd);
}

.gcti-page { animation: alPageIn .25s ease-out both; margin-top: 4px; }

.gcti-tooltip {
  position: fixed;
  z-index: 9999;
  background: var(--sf);
  border: 1px solid var(--bd);
  padding: 6px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--txb);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  max-width: 220px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.gcti-tooltip.show { opacity: 1; }

.gcti-gauge-wrap {
  position: relative;
  width: 100%;
  margin-top: 8px;
}
.gcti-gauge {
  display: flex;
  height: 6px;
  width: 100%;
  overflow: hidden;
}
.gcti-gauge-seg {
  height: 100%;
}
.gcti-gauge-marker {
  position: absolute;
  top: -12px;
  font-size: 10px;
  line-height: 1;
  transform: translateX(-50%);
  color: var(--txb);
}

#gcti-root .al-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#gcti-root .al-nav::-webkit-scrollbar { display: none; }
#gcti-root .al-nav .al-nav-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

body.light-mode .gcti-vol-bar { opacity: 0.85; }
body.light-mode .gcti-score-num { filter: saturate(0.85); }
body.light-mode .gcti-sev-pill { filter: saturate(0.9) brightness(0.95); }
body.light-mode .gcti-signal-hot .gcti-signal-delta { color: #dc2626; }

@media (max-width: 900px) {
  .gcti-grid { grid-template-columns: 1fr; }
  .gcti-sidebar { border-top: 1px solid var(--bd); padding-left: 0; padding-top: 20px; border-left: none; }
  .gcti-main { border-right: none; padding-right: 0; }
  #gcti-root { padding: 0 12px 32px; }
  .gcti-vol-chart { overflow-x: auto; min-width: 0; }
  .gcti-tfi-table { font-size: 11px; }
  .gcti-matrix-table { min-width: 500px; }
  #gcti-root .al-nav { padding: 0 8px; }
}

/* ── GCTI Mobile (768px) ── */
@media (max-width: 768px) {
  #gcti-root { padding: 0 8px 24px; }
  #gcti-root .al-nav {
    margin-left: -8px; margin-right: -8px; padding: 0 8px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  #gcti-root .al-nav::-webkit-scrollbar { display: none; }
  #gcti-root .al-nav .al-nav-btn {
    min-height: 44px; padding: 10px 12px; font-size: 9px;
  }
  .gcti-grid { grid-template-columns: 1fr; height: auto; }
  .gcti-main { border-right: none; padding-right: 0; overflow-y: visible; }
  .gcti-sidebar {
    padding-left: 0; padding-top: 16px; margin-top: 12px;
    border-top: 1px solid var(--bd); overflow-y: visible;
  }
  .gcti-vol-chart {
    gap: 3px; height: 80px; overflow-x: auto;
    -webkit-overflow-scrolling: touch; padding-bottom: 4px;
  }
  .gcti-vol-num { font-size: 9px; }
  .gcti-vol-wk { font-size: 8px; margin-top: 14px; }
  .gcti-vol-range { font-size: 6px; }
  .gcti-vol-nsrc { font-size: 7px; }
  .gcti-legend { gap: 10px; font-size: 8px; flex-wrap: wrap; }
  .gcti-tfi-table { font-size: 10px; }
  .gcti-tfi-table thead td { font-size: 7px; letter-spacing: 1px; padding: 4px 0; }
  .gcti-tfi-cat { font-size: 11px; padding: 4px 4px; gap: 4px; }
  .gcti-tfi-cat svg { width: 12px; height: 12px; }
  .gcti-num { font-size: 11px; }
  .gcti-tfi-row { padding: 5px 4px; gap: 4px; min-height: 38px; }
  .gcti-tfi-icon { width: 14px; }
  .gcti-tfi-icon svg { width: 12px; height: 12px; }
  .gcti-tfi-name { font-size: 11px; }
  .gcti-tfi-spark { width: 44px; }
  .gcti-tfi-share { font-size: 9px; width: 26px; }
  .gcti-tfi-val { font-size: 11px; width: 36px; }
  .gcti-tfi-status { font-size: 7px; width: 36px; }
  .gcti-vendor-row { padding: 5px 4px; gap: 6px; min-height: 36px; flex-wrap: wrap; }
  .gcti-vendor-name { width: 40%; font-size: 11px; }
  .gcti-vendor-bar-bg { flex: 1; min-width: 60px; }
  .gcti-vendor-cnt { font-size: 11px; width: 24px; }
  .gcti-vendor-src { font-size: 8px; width: 36px; }
  .gcti-matrix-table { min-width: 480px; }
  .gcti-matrix-table thead td { font-size: 7px; padding: 6px 2px 8px; }
  .gcti-matrix-cat { font-size: 10px; padding: 4px 4px; }
  .gcti-matrix-table tbody td { font-size: 10px; padding: 4px 1px; }
  .gcti-mname { font-size: 7px; }
  .gcti-score-num { font-size: 36px; }
  .gcti-score-box { padding: 12px 0; margin-bottom: 14px; }
  .gcti-score-label { font-size: 8px; }
  .gcti-score-detail { font-size: 8px; }
  .gcti-sev-lbl { font-size: 8px; width: 36px; }
  .gcti-sev-pill { font-size: 8px; padding: 1px 4px; }
  .gcti-sev-wk-labels { font-size: 6px; padding-left: 44px; }
  .gcti-shift { padding: 5px 0; }
  .gcti-shift-head span:first-child { font-size: 10px; }
  .gcti-shift-delta { font-size: 9px; }
  .gcti-shift-detail { font-size: 9px; }
  .gcti-signal { padding: 5px 0; }
  .gcti-signal-label { font-size: 11px; }
  .gcti-signal-sub { font-size: 9px; }
  .gcti-signal-d { font-size: 8px; }
  .gcti-signal-src { font-size: 8px; }
  .gcti-signal-delta { font-size: 8px; }
  .gcti-src-title { font-size: 16px; gap: 6px; }
  .gcti-src-count { font-size: 26px; }
  .gcti-layer-name { font-size: 10px; width: 100px; }
  .gcti-layer-pct { font-size: 9px; }
  .gcti-latest-box { padding: 6px 10px; gap: 6px; flex-wrap: wrap; }
  .gcti-latest-badge { font-size: 8px; }
  .gcti-latest-title { font-size: 11px; white-space: normal; }
  .gcti-latest-date { font-size: 9px; }
  .gcti-article { padding: 5px 4px; gap: 6px; min-height: 36px; }
  .gcti-article-date { font-size: 9px; width: 40px; }
  .gcti-article-title { font-size: 11px; }
  .gcti-catfocus-row { padding: 5px 4px; gap: 6px; min-height: 36px; }
  .gcti-catfocus-name { font-size: 11px; }
  .gcti-catfocus-pct { font-size: 10px; }
  .gcti-topvendor { font-size: 10px; padding: 4px 0; }
  .gcti-topvendor-cnt { font-size: 9px; }
  .gcti-method-text { font-size: 9px; }
  .gcti-methodology { margin-top: 24px; padding-top: 14px; }
}

/* ── GCTI Small Phone (480px) ── */
@media (max-width: 480px) {
  .gcti-vol-chart { height: 64px; gap: 2px; }
  .gcti-vol-num { font-size: 8px; }
  .gcti-tfi-spark { width: 36px; }
  .gcti-tfi-share { display: none; }
  .gcti-tfi-status { width: 30px; font-size: 6px; }
  .gcti-vendor-name { width: 35%; font-size: 10px; }
  .gcti-vendor-src { display: none; }
  .gcti-matrix-table { min-width: 400px; }
  .gcti-score-num { font-size: 30px; }
  .gcti-layer-name { width: 80px; font-size: 9px; }
}

/* ════════════════════════════════════════════════════════
   GFSTI — Global Food Safety Threat Index
   Reuses al- classes from AI Lab for visual consistency.
   Only GFSTI-specific overrides below.
   ════════════════════════════════════════════════════════ */

#gfsti-root { width: 100%; }
.gf-dashboard { padding: 0 28px 24px; max-width: 1160px; margin: 0 auto; }

.gf-haz-detail {
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--bd);
  animation: alPageIn .2s ease-out both;
}

@media (max-width: 768px) {
  .gf-dashboard { padding: 0 10px 16px; }
}
@media (max-width: 480px) {
  .gf-dashboard { padding: 0 6px 12px; }
}

/* ════════════════════════════════════════════════════════
   Gate — Password Modal
   ════════════════════════════════════════════════════════ */

#gate-overlay {
  position: fixed; inset: 0;
  z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,8,.88);
  backdrop-filter: blur(32px) saturate(1.2);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
  opacity: 0;
  transition: opacity .45s cubic-bezier(.4,0,.2,1);
}
#gate-overlay.gate-overlay-exit {
  opacity: 0;
  transition: opacity .4s cubic-bezier(.4,0,.2,1);
}

.gate-card {
  display: flex; flex-direction: column; align-items: center;
  width: 360px; max-width: 90vw;
  padding: 44px 36px 38px;
  border-radius: 14px;
  background: linear-gradient(168deg, var(--sf) 0%, var(--bg) 100%);
  border: 1px solid var(--bd);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 24px 80px rgba(0,0,0,.55),
    0 8px 24px rgba(0,0,0,.3);
  animation: gateIn .55s cubic-bezier(.16,1,.3,1) both;
  transition: opacity .3s ease, transform .3s ease;
}
.gate-card-exit {
  opacity: 0 !important;
  transform: translateY(-10px) scale(1.02) !important;
  transition: opacity .28s cubic-bezier(.4,0,1,1), transform .28s cubic-bezier(.4,0,1,1) !important;
}
@keyframes gateIn {
  from { opacity: 0; transform: translateY(16px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gate-logo-wrap {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.gate-logo {
  height: 32px;
  filter: brightness(1.05);
}
.gate-divider {
  width: 36px; height: 1px;
  background: var(--bd);
  margin-bottom: 20px;
}

.gate-title {
  font-family: var(--sans);
  font-size: 19px; font-weight: 700;
  color: var(--txb);
  margin-bottom: 6px;
  letter-spacing: -.025em;
}
.gate-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tx);
  margin-bottom: 30px;
}

.gate-input-wrap {
  display: flex;
  width: 100%;
  border: 1px solid var(--bd);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0,0,0,.15);
  transition: border-color .2s, box-shadow .2s;
}
.gate-input-wrap:focus-within {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-dim);
}
.gate-input {
  flex: 1;
  border: none; outline: none;
  background: transparent;
  color: var(--txb);
  font-family: var(--mono);
  font-size: 13px;
  padding: 13px 16px;
  letter-spacing: .04em;
}
.gate-input::placeholder {
  color: var(--txd);
  font-size: 11px;
  letter-spacing: .08em;
}
.gate-btn {
  display: flex; align-items: center; justify-content: center;
  width: 46px;
  border: none; cursor: pointer;
  background: var(--acc);
  color: #111;
  transition: opacity .15s, transform .1s;
}
.gate-btn:hover { opacity: .88; }
.gate-btn:active { opacity: .7; transform: scale(.95); }

.gate-error {
  height: 18px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: #ef4444;
  transition: opacity .2s;
}

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-6px); }
  30%, 60%, 90% { transform: translateX(6px); }
}
.gate-shake { animation: gateShake .45s ease; }

body.light-mode .gate-card {
  background: linear-gradient(168deg, #ffffff 0%, #f4f4f5 100%);
  box-shadow:
    0 0 0 1px rgba(0,0,0,.06),
    0 24px 80px rgba(0,0,0,.12),
    0 8px 24px rgba(0,0,0,.06);
}
body.light-mode .gate-logo {
  filter: invert(1) brightness(0.2);
}
body.light-mode .gate-input-wrap {
  background: rgba(0,0,0,.03);
}

@media (max-width: 480px) {
  .gate-card { padding: 36px 24px 30px; width: 320px; }
  .gate-title { font-size: 17px; }
  .gate-logo { height: 26px; }
}
