:root{
  --bg:#0b0c10;
  --panel:#12141a;
  --panel2:#161a22;
  --text:#eef1f6;
  --muted:#b8c0d0;
  --hair:#2a3140;
  --tile:#101522;
  --tile2:#0f1420;
  --tile-border:#334a92;
  --pos:#8ce99a;
  --neg:#ff8787;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  background:var(--bg);
  color:var(--text);
  padding:24px;
}
.mw-card{
  max-width:1020px;
  margin:auto;
  background:linear-gradient(180deg,var(--panel),var(--panel2));
  border:1px solid var(--hair);
  border-radius:16px;
  padding:20px 22px 18px;
}
.mw-card__kicker{
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--muted);
}
.mw-title{ margin:6px 0 6px; font-size:34px; font-weight:800; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

/* Date picker button + popup */
.mw-today-shortcut{ font-size:12px; padding:4px 10px; margin-right:6px; font-weight:600; letter-spacing:.04em; }
.mw-datepicker-nav{
  flex-shrink:0;
  background:rgba(51,74,146,0.25);
  border:1px solid rgba(148,163,184,0.3);
  border-radius:6px;
  color:rgba(226,232,240,0.7);
  font-size:11px;
  line-height:1;
  padding:4px 7px;
  cursor:pointer;
  transition:background .15s, color .15s;
}
.mw-datepicker-nav:hover:not(:disabled){ background:rgba(51,74,146,0.55); color:#eef1f6; }
.mw-datepicker-nav:disabled{ opacity:1; cursor:default; color:rgba(226,232,240,0.2); background:rgba(51,74,146,0.15); border-color:rgba(148,163,184,0.3); }

.mw-datepicker-btn{
  flex-shrink:0;
  background:rgba(51,74,146,0.35);
  border:1px solid rgba(148,163,184,0.4);
  border-radius:8px;
  color:rgba(226,232,240,0.85);
  font-size:15px;
  line-height:1;
  padding:4px 8px;
  cursor:pointer;
  transition:background .15s;
  vertical-align:middle;
  margin-left:4px;
}
.mw-datepicker-btn:hover{ background:rgba(51,74,146,0.6); }

.mw-datepicker-wrap{ position:relative; display:inline-flex; align-items:center; }
.mw-datepicker-popup{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:200;
  background:var(--panel);
  border:1px solid var(--hair);
  border-radius:12px;
  padding:16px;
  min-width:220px;
  box-shadow:0 8px 32px rgba(0,0,0,.55);
}
.mw-datepicker-popup[hidden]{ display:none; }
.mw-datepicker-popup label{
  display:block;
  font-size:11px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:8px;
}
.mw-datepicker-popup input[type=date]{
  width:100%;
  background:var(--panel2);
  border:1px solid var(--hair);
  border-radius:8px;
  color:var(--text);
  font-size:14px;
  padding:6px 10px;
  outline:none;
  color-scheme:dark;
}
.mw-datepicker-popup input[type=date]:focus{ border-color:#334a92; }
.mw-datepicker-actions{
  display:flex;
  gap:8px;
  margin-top:10px;
}
.mw-datepicker-go{
  flex:1;
  background:#334a92;
  border:none;
  border-radius:7px;
  color:#fff;
  font-size:13px;
  font-weight:600;
  padding:6px 0;
  cursor:pointer;
}
.mw-datepicker-go:hover{ background:#3d5ab5; }
.mw-datepicker-today{
  flex:1;
  background:transparent;
  border:1px solid var(--hair);
  border-radius:7px;
  color:var(--muted);
  font-size:13px;
  padding:6px 0;
  cursor:pointer;
}
.mw-datepicker-today:hover{ border-color:var(--text); color:var(--text); }

/* Historical mode banner */
.mw-meta{ font-size:12px; color:var(--muted); }

.mw-top{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:14px 0 10px; }
.mw-panel{
  border:2px solid var(--tile-border);
  border-radius:14px;
  background:linear-gradient(180deg,var(--tile),var(--tile2));
  padding:14px;
  text-align:center;
}
.state-regime-choppy  .mw-panel__value{color:#f59e0b}
.state-regime-trendy  .mw-panel__value{color:#22c55e}
.state-regime-calm    .mw-panel__value{color:#60a5fa}
.state-regime-squally .mw-panel__value{color:#fb923c}
.state-regime-stormy  .mw-panel__value{color:#ef4444}
.state-regime-fragile .mw-panel__value{color:#facc15}
.state-regime-tense   .mw-panel__value{color:#a78bfa}
.state-risk-low  .mw-panel__value{color:#22c55e}
.state-risk-mid  .mw-panel__value{color:#facc15}
.state-risk-high .mw-panel__value{color:#ef4444}
.mw-panel__kicker{font-size:12px;color:var(--muted);letter-spacing:.10em;text-transform:uppercase}
.mw-panel__value{font-size:26px;font-weight:900;margin-top:8px}
.mw-panel__sub{font-size:12px;color:var(--muted);margin-top:6px}

/* Qual grid — weather conditions (primary read) */
.mw-qual-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:14px 0 4px; }
.mw-qual-tile{
  position:relative;
  border:2px solid var(--tile-border);
  border-radius:14px;
  background:linear-gradient(180deg,var(--tile),var(--tile2));
  padding:16px 12px 14px;
  text-align:center;
}
.mw-qual__label{ font-size:10px; text-transform:uppercase; letter-spacing:.09em; color:var(--muted); }
.mw-qual__value{ font-size:26px; font-weight:900; text-align:center; margin-top:6px; }

/* Signals label — divider before raw metric grid */
.mw-signals-label{ font-size:14px; letter-spacing:.05em; text-transform:uppercase; color:#eef1f6; margin:14px 0 6px; text-align:center; padding:8px 0 4px; }

/* Metric grid — instrument panel (supporting detail) */
.mw-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.mw-metric{ border:2px solid var(--tile-border); border-radius:14px; padding:12px; }
.mw-grid .mw-metric{ padding:10px 12px; }
.mw-grid .mw-metric__label{ font-size:10px; opacity:.65; }
.mw-grid .mw-metric__value{ font-size:20px; font-weight:700; margin-top:4px; }
.mw-grid .mw-metric__hint{ font-size:10px; margin-top:2px; opacity:.6; }
.mw-metric__label{font-size:12px;color:var(--muted)}
.mw-metric__value{font-size:26px;font-weight:800;text-align:right;margin-top:8px}
.mw-metric__hint{font-size:12px;color:var(--muted);text-align:right}
.mw-pos{color:var(--pos)}
.mw-neg{color:var(--neg)}
/* Consistency bands (Option A) */
.mw-cons-high{ color:#22c55e; }   /* >= 85 — High */
.mw-cons-mixed{color:#a3e635; }   /* 72–84 — Mixed */
.mw-cons-low{  color:#facc15; }   /* 60–71 — Low */
.mw-cons-poor{ color:#ef4444; }   /* < 60  — Poor */
.mw-wind-doldrums{     color:#94a3b8; }
.mw-wind-light-air{    color:#93c5fd; }
.mw-wind-variable{     color:#eab308; }
.mw-wind-steady-breeze{color:#f97316; }
.mw-wind-gale{         color:#ef4444; }
.state-ra-frigid .mw-qual__value{color:#7dd3fc}
.state-ra-cold .mw-qual__value{color:#60a5fa}
.state-ra-mild .mw-qual__value{color:#94a3b8}
.state-ra-warm .mw-qual__value{color:#fb923c}
.state-ra-hot .mw-qual__value{color:#f97316}
.state-tr-doldrums .mw-qual__value{color:#ef4444}
.state-tr-light-air .mw-qual__value{color:#fb923c}
.state-tr-variable .mw-qual__value{color:#eab308}
.state-tr-steady-breeze .mw-qual__value{color:#86efac}
.state-tr-gale .mw-qual__value{color:#22c55e}
.state-st-supportive .mw-qual__value{color:#22c55e}
.state-st-intact .mw-qual__value{color:#a3e635}
.state-st-fragile .mw-qual__value{color:#facc15}
.state-st-stressed .mw-qual__value{color:#fb923c}
.state-st-broken .mw-qual__value{color:#ef4444}
.state-vz-high .mw-qual__value{color:#22c55e}
.state-vz-mixed .mw-qual__value{color:#a3e635}
.state-vz-low .mw-qual__value{color:#facc15}
.state-vz-poor .mw-qual__value{color:#ef4444}

.mw-bottom-row{ margin-top:18px; display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.mw-rowhead{ display:flex; justify-content:space-between; align-items:center; gap:10px; }
.mw-rowhead__actions{ display:flex; gap:8px; align-items:center; }

.mw-narrative, .mw-context-card{
  padding:14px 16px;
  border:2px solid var(--tile-border);
  border-radius:14px;
  background:linear-gradient(180deg,var(--tile),var(--tile2));
}
.mw-context-card{ padding:12px 14px; }
.mw-narrative__kicker, .mw-context__kicker, .mw-modal__kicker{
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}
.mw-narrative__body{font-size:14px;line-height:1.6;margin-top:1em}
.mw-narrative__body p{margin:10px 0 0}
.mw-narrative__body p:first-child{margin-top:0}
.mw-narrative__status{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.mw-status-pill{
  display:inline-flex;
  align-items:center;
  border:1px solid var(--hair);
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
  background:rgba(255,255,255,.04);
}
.mw-status-pill--normal{color:#a3e635}
.mw-status-pill--caution{color:#facc15}
.mw-status-pill--warning{color:#fb923c}
.mw-status-pill--alert{color:#ef4444}
.mw-narrative__headline{font-weight:700}

.mw-context__title{ margin-top:6px; font-size:14px; font-weight:750; }
.mw-context__note{ margin-top:10px; font-size:12px; color:var(--muted); }

.mw-compare__row{ display:flex; gap:10px; align-items:center; padding:6px 0; }
.mw-compare__label{ width:120px; font-size:12px; color:var(--muted); }
.mw-compare__items{ display:flex; flex-wrap:wrap; gap:8px; }
.mw-pill{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px; border:1px solid var(--hair);
  font-size:12px; color:var(--text); background:rgba(255,255,255,.03);
}
.mw-up{color:var(--pos)}
.mw-down{color:var(--neg)}
.mw-flat{color:#94a3b8}

/* Buttons */
.mw-btn{
  border:1px solid var(--hair);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:8px 10px;
  border-radius:10px;
  font-size:12px;
  cursor:pointer;
}
.mw-btn:hover{ background:rgba(255,255,255,.07); }
.mw-btn--ghost{ background:transparent; }

/* Modal */
.mw-modal[hidden]{display:none}
.mw-modal{ position:fixed; inset:0; z-index:999; }
.mw-modal__backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.65); }
.mw-modal__panel{
  position:relative;
  max-width:980px;
  margin:32px auto;
  background:linear-gradient(180deg,var(--panel),var(--panel2));
  border:1px solid var(--hair);
  border-radius:16px;
  padding:14px 14px 14px;
  box-shadow:0 18px 80px rgba(0,0,0,.65);
}
.mw-modal__header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:6px 6px 8px;
}
.mw-modal__title{ margin-top:6px; font-size:16px; font-weight:850; }
.mw-modal__actions{ display:flex; gap:10px; align-items:center; }
.mw-modal__note{ margin-top:10px; font-size:12px; color:var(--muted); }

/* Range chips */
.mw-range{ display:flex; align-items:center; gap:6px; }
.mw-chip{
  border:1px solid var(--hair);
  background:rgba(255,255,255,.03);
  color:var(--muted);
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  cursor:pointer;
}
.mw-chip:hover{ background:rgba(255,255,255,.06); }
.mw-chip.is-active{
  color:var(--text);
  border-color:rgba(51,74,146,.9);
  background:rgba(51,74,146,.18);
}
.mw-range__label{ font-size:12px; color:var(--muted); margin-left:2px; }

/* Selector (below chart) */
.mw-selector{
  margin-top:10px;
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:6px 10px;
}
.mw-check{
  display:flex; align-items:center; gap:8px;
  font-size:12px; color:var(--muted); user-select:none;
}
.mw-check input{ transform: translateY(1px); }

/* Graph */
.mw-spark-wrap{ margin-top:10px; position:relative; }
#mw-multi{ width:100%; height:auto; display:block; }



#mw-radar{ width:100%; height:auto; display:block; }


/* Tooltip */
.mw-tooltip{
  position:absolute;
  min-width:220px;
  max-width:320px;
  padding:10px 10px 9px;
  border-radius:12px;
  border:1px solid var(--hair);
  background:rgba(15,20,32,.92);
  backdrop-filter: blur(6px);
  box-shadow:0 16px 60px rgba(0,0,0,.5);
  font-size:12px;
  color:var(--text);
  pointer-events:none;
  z-index:3;
}
.mw-tip__head{ font-weight:800; margin-bottom:8px; color:var(--text); }
.mw-tip__row{ display:flex; align-items:center; gap:8px; margin:4px 0; color:var(--muted); }
.mw-tip__swatch{ width:10px; height:10px; border-radius:3px; display:inline-block; flex:0 0 auto; }
.mw-legend-item{ display:flex; align-items:center; gap:8px; }
.mw-swatch{ width:10px; height:10px; border-radius:3px; display:inline-block; }

/* Footer */
.mw-footer{
  margin-top:14px;
  padding-top:10px;
  border-top:1px solid var(--hair);
  font-size:12px;
  color:var(--muted);
}

@media(max-width:980px){
  .mw-bottom-row{ grid-template-columns:1fr; }
  .mw-modal__panel{ margin:18px; }
}
@media(max-width:860px){
  .mw-top{grid-template-columns:1fr}
  .mw-compare__label{width:110px}
}
@media(max-width:760px){
  .mw-grid{grid-template-columns:1fr}
  .mw-qual-grid{grid-template-columns:1fr}
  .mw-compare__row{align-items:flex-start}
  .mw-selector{grid-template-columns:repeat(2, minmax(0,1fr));}
  .mw-modal__actions{ flex-wrap:wrap; justify-content:flex-end; }
}
@media(max-width:760px){
  .mw-feed-grid{ grid-template-columns:repeat(2,1fr); }
}

/* Annotated narrative tokens */
.mw-annot{
  cursor: help;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.22);
  text-underline-offset: 3px;
}

/* Semantic colors for narrative tokens */
.mw-regime-choppy{ color: var(--regime-choppy); }
.mw-ra-mild{ color: rgba(140,233,154,0.95); }
.mw-ra-constructive{ color: rgba(140,233,154,0.95); }
.mw-ra-balanced{ color: rgba(196,230,120,0.95); }
.mw-ra-cautious{ color: rgba(250,204,21,0.95); }
.mw-ra-defensive{ color: rgba(251,146,60,0.95); }
.mw-tr-still{ color: rgba(233,140,140,0.95); }
.mw-tr-persistent{ color: rgba(140,233,154,0.95); }
.mw-tr-stable{ color: rgba(196,230,120,0.95); }
.mw-tr-fragile{ color: rgba(250,204,21,0.95); }
.mw-tr-weakening{ color: rgba(251,146,60,0.95); }
.mw-tr-broken{ color: rgba(239,68,68,0.95); }
.mw-vz-high{ color: rgba(200,220,255,0.95); }
.mw-vz-mixed{ color: rgba(196,230,120,0.95); }
.mw-vz-low{ color: rgba(250,204,21,0.95); }
.mw-vz-poor{ color: rgba(239,68,68,0.95); }

/* Polarity helpers (for numeric highlights like 17%) */
.mw-good{ color: rgba(140,233,154,0.95); }
.mw-bad{ color: rgba(233,140,140,0.95); }
.mw-neutral{ color: rgba(184,192,208,0.95); }

/* Tooltip (fixed so it won't be clipped by card) */
.mw-tooltip{
  position: fixed;
  display: none;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(12,14,20,0.96);
  color: rgba(236,240,248,0.95);
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  z-index: 99999;
}

/* Regime palette (state → color) */
:root{
  --regime-choppy:    #f59e0b; /* amber */
  --regime-trending:  #22c55e; /* green */
  --regime-calm:      #60a5fa; /* blue */
  --regime-stressed:  #ef4444; /* red */
  --regime-transition:#a78bfa; /* purple */
}

/* Regime token colors */
.mw-regime--choppy{ color: var(--regime-choppy); }
.mw-regime--trending{ color: var(--regime-trending); }
.mw-regime--calm{ color: var(--regime-calm); }
.mw-regime--stressed{ color: var(--regime-stressed); }
.mw-regime--transition{ color: var(--regime-transition); }

.state-regime-choppy .mw-panel__value{ color: var(--regime-choppy); }

/* Info icon button */
.mw-panel, .mw-metric, .mw-narrative, .mw-context-card{ position: relative; }
.mw-info{
  position:absolute;
  top:10px;
  right:10px;
  width:22px;
  height:22px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.75);
  background: rgba(15,23,42,0.35);
  color: rgba(226,232,240,0.9);
  font-weight: 700;
  font-size: 12px;
  line-height: 20px;
  text-align:center;
  cursor:pointer;
}
.mw-info:hover{ border-color: rgba(148,163,184,1.0); background: rgba(30,42,72,0.85); }
.mw-info--inline{
  position:static;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  font-size:11px;
  letter-spacing:normal;
  text-transform:none;
}
.mw-chart-btn{
  position:absolute;
  bottom:8px;
  right:8px;
  width:22px;
  height:22px;
  z-index:2;
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.35);
  background: rgba(15,23,42,0.35);
  color: rgba(226,232,240,0.9);
  font-size: 12px;
  line-height: 20px;
  text-align:center;
  cursor:pointer;
  padding:0;
}
.mw-chart-btn:hover{ border-color: rgba(148,163,184,0.6); }

/* Help modal */
.mw-helpmodal{ display:none; }
.mw-helpmodal.is-open{ display:block; }
.mw-helpmodal__backdrop{
  position:fixed; inset:0; z-index:10000;
  background: rgba(0,0,0,0.55);
}
.mw-helpmodal__dialog{
  position:fixed; z-index:10001;
  left:50%; top:50%;
  transform: translate(-50%,-50%);
  width:min(720px, calc(100vw - 40px));
  border-radius:14px;
  border:1px solid rgba(148,163,184,0.20);
  background: rgba(10,14,22,0.92);
  box-shadow: 0 25px 80px rgba(0,0,0,0.55);
  padding: 14px 16px 12px 16px;
}
.mw-helpmodal__head{
  display:flex; align-items:center; justify-content:space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.mw-helpmodal__title{ font-size: 16px; font-weight: 700; color: rgba(248,250,252,0.95); }
.mw-helpmodal__close{
  border:1px solid rgba(148,163,184,0.30);
  background: rgba(15,23,42,0.35);
  color: rgba(226,232,240,0.9);
  padding: 6px 10px;
  border-radius: 10px;
  cursor:pointer;
}
.mw-helpmodal__body{
  color: rgba(226,232,240,0.88);
  font-size: 13px;
  line-height: 1.35;
}
.mw-helpmodal__foot{
  margin-top: 12px;
  display:flex;
  justify-content:flex-end;
}
/* Warmup period notice popup */
.mw-warmup__backdrop{
  position:fixed; inset:0; z-index:10100;
  background: rgba(0,0,0,0.45);
  display:flex; align-items:center; justify-content:center;
}
.mw-warmup__backdrop.is-hidden{ display:none; }
.mw-warmup__dialog{
  width:min(480px, calc(100vw - 40px));
  border-radius:14px;
  border:1px solid rgba(239,68,68,0.55);
  background: rgba(10,14,22,0.96);
  box-shadow: 0 25px 80px rgba(0,0,0,0.60);
  padding: 22px 24px 18px;
}
.mw-warmup__head{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 10px;
}
.mw-warmup__icon{
  font-size: 20px;
  flex-shrink: 0;
}
.mw-warmup__title{
  font-size: 15px;
  font-weight: 700;
  color: rgba(248,250,252,0.95);
}
.mw-warmup__body{
  font-size: 13px;
  line-height: 1.5;
  color: rgba(226,232,240,0.80);
}
.mw-warmup__foot{
  margin-top: 16px;
  display:flex;
  justify-content:flex-end;
}
.mw-warmup__close{
  border:1px solid rgba(148,163,184,0.30);
  background: rgba(15,23,42,0.50);
  color: rgba(226,232,240,0.9);
  padding: 6px 14px;
  border-radius: 8px;
  cursor:pointer;
  font-size: 12px;
}
.mw-helpmodal__link{
  color: rgba(96,165,250,0.95);
  text-decoration: none;
  border-bottom: 1px solid rgba(96,165,250,0.35);
  padding-bottom: 1px;
}
.mw-helpmodal__link:hover{ border-bottom-color: rgba(96,165,250,0.7); }

/* Updated line labels + inline help */
.mw-updated-label{ color: rgba(148,163,184,0.9); font-weight: 600; }
.mw-updated-help{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:16px;height:16px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.35);
  background: rgba(15,23,42,0.25);
  color: rgba(226,232,240,0.9);
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  cursor: help;
  vertical-align: middle;
}


/* Ensure all info icons show help cursor */
.mw-info,
.mw-info *,
.mw-updated-help,
.mw-updated-help *{
  cursor: help !important;
}


/* Reduce help popup width */
.mw-helpmodal .mw-helpmodal__content,
.mw-helpmodal__content{
  max-width: 480px;
  width: 90%;
}


/* Reduce help popup width (override dialog width) */
.mw-helpmodal__dialog{
  width: min(360px, calc(100vw - 40px));
}


/* Make popup footer link same size as body text */
.mw-helpmodal a,
.mw-helpmodal__link{
  font-size: inherit;
  font-weight: 500;
}


/* Popup: make "Read the full guide" match body text size, and soften link color */
#mw-help-body{
  font-size: 14px;
  line-height: 1.45;
}
#mw-help-link{
  font-size: 14px !important;
  font-weight: 600;
  color: rgba(147, 197, 253, 0.78); /* softened */
  text-decoration: underline;
  text-underline-offset: 3px;
}
#mw-help-link:hover{
  color: rgba(147, 197, 253, 0.92);
}




/* v56: center report title */
.mw-title{ text-align: center; width: 100%; justify-content: center; }


/* Header meta row: Updated (left) + How to Use This (right) */
.mw-meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:10px;
  margin-bottom:18px;
}
.mw-updated-left{
  color: var(--muted, rgba(226,232,240,0.75));
  font-size: 14px;
  line-height: 1.2;
}
@keyframes mw-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.mw-status{
  margin-left: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(226,232,240,0.9);
}
.mw-status.live  { color: #22c55e; animation: mw-blink 1.2s ease-in-out infinite; }
.mw-status.stale { color: #eab308; }
.mw-status.hist  { color: #60a5fa; }
.mw-status.fetch { color: rgba(226,232,240,0.5); }
.mw-data-quality{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.35);
  background: rgba(15,23,42,0.25);
  color: rgba(226,232,240,0.9);
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}
#mwDataQualityStatus.mw-data-quality{
  border-color: rgba(239, 68, 68, 0.8);
  background: rgba(127, 29, 29, 0.22);
  color: #ef4444;
}
.is-hidden{
  display:none !important;
}
.mw-howto-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.35);
  background: rgba(15,23,42,0.25);
  color: rgba(226,232,240,0.9);
  text-decoration:none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  user-select:none;
  white-space:nowrap;
}
.mw-howto-btn:hover{
  border-color: rgba(148,163,184,0.55);
  background: rgba(15,23,42,0.35);
}

.mw-footer-actions{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
  margin:16px 0 8px;
}
.mw-btn--pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 16px;
  border-radius:999px;
  border:1px solid rgba(226,232,240,0.3);
  background:transparent;
  color:#e2e8f0;
  font:inherit;
  font-size:13px;
  cursor:pointer;
  text-decoration:none;
  white-space:nowrap;
  appearance:none;
}
.mw-btn--pill:link,
.mw-btn--pill:visited{ color:#e2e8f0; text-decoration:none; }
.mw-btn--pill:hover{ background:rgba(226,232,240,0.08); color:#e2e8f0; text-decoration:none; }
.mw-disclaimer{
  text-align:center;
  font-size:12px;
  color:#f87171;
  margin-bottom:4px;
}

/* Ensure numeric cards (mw-metric) center-align value and description (hint) */
.mw-metric .mw-metric__value{ text-align:center !important; }
.mw-metric .mw-metric__hint{ text-align:center !important; }

/* Time travel modal: hidden by default */
#mw-tt-modal { display: none; }
#mw-tt-modal.is-open { display: block; }
#mw-tt-modal { position: fixed; inset: 0; z-index: 9999; }

/* News context modal */
#mw-news-modal { display: none; position: fixed; inset: 0; z-index: 9999; }
#mw-news-modal.is-open { display: block; }

/* Signals modal */
#mw-signals-modal { display: none; position: fixed; inset: 0; z-index: 9999; overflow-y: auto; overflow-x: hidden; }
#mw-signals-modal.is-open { display: block; }

/* Time travel action button: inherit the same color context as its container */
.mw-rowhead__actions .mw-action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.35);
  background: rgba(15,23,42,0.25);
  color: rgba(226,232,240,0.9);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  user-select:none;
  white-space:nowrap;
  appearance: none;
}

.mw-rowhead__actions .mw-action-btn:hover{
  border-color: rgba(148,163,184,0.55);
  background: rgba(15,23,42,0.35);
}

/* Context header: keep BOTH buttons in the same row (override any absolute mw-info rules) */
.mw-context-card .mw-rowhead__actions .mw-info{
  position: static !important;
  top: auto !important;
  right: auto !important;
  margin: 0 !important;
}
/* Center the Time Travel modal panel */
#mw-tt-modal .mw-modal__panel{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Time travel: make the table look like a table */
#mw-tt-modal table.mw-table{
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13px;
}

#mw-tt-modal table.mw-table th,
#mw-tt-modal table.mw-table td{
  padding: 6px 10px;
  white-space: nowrap;
  vertical-align: middle;
}

#mw-tt-modal table.mw-table thead th{
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid rgba(148,163,184,0.25);
  color: rgba(226,232,240,0.9);
}

#mw-tt-modal table.mw-table tbody td{
  border-top: 1px solid rgba(148,163,184,0.12);
  color: rgba(226,232,240,0.85);
}

/* Center the arrow columns: Market / Vol / Breadth */
#mw-tt-modal table.mw-table td:nth-child(3),
#mw-tt-modal table.mw-table td:nth-child(4),
#mw-tt-modal table.mw-table td:nth-child(5){
  text-align: center;
}

/* §10b: What This Means For You — advice panel tabs */
.mw-context-card__title{
  font-size:11px;
  font-weight:700;
  letter-spacing:.13em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:10px;
}
.mw-tabs{
  display:flex;
  gap:4px;
  flex-wrap:wrap;
  margin-top:1em;
  margin-bottom:12px;
}
.mw-tab{
  background:rgba(51,74,146,0.18);
  border:1px solid rgba(148,163,184,0.22);
  border-radius:20px;
  color:rgba(226,232,240,0.65);
  font-size:11px;
  font-weight:600;
  letter-spacing:.06em;
  padding:4px 12px;
  cursor:pointer;
  transition:background .15s, color .15s, border-color .15s;
}
.mw-tab:hover{
  background:rgba(51,74,146,0.35);
  color:var(--text);
}
.mw-tab.is-active{
  background:rgba(51,74,146,0.55);
  border-color:rgba(148,163,184,0.55);
  color:var(--text);
}
.mw-advice-text{
  font-size:13px;
  line-height:1.65;
  color:rgba(226,232,240,0.85);
  min-height:60px;
}

/* Signals modal: raw input feed grid (4 cards per row) */
.mw-feed-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin-bottom:16px;
}
.mw-feed-grid .mw-metric{
  padding:10px 12px;
  min-width:0;
}
.mw-feed-grid .mw-metric__label{
  font-size:10px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.65;
  text-align:center;
}
.mw-feed-grid .mw-metric__value{
  font-size:15px;
  font-weight:700;
  margin-top:6px;
  margin-bottom:4px;
  text-align:center;
  color:var(--text);
  font-variant-numeric:tabular-nums;
}
.mw-feed__spark{
  display:block;
  width:50%;
  height:28px;
  overflow:visible;
  margin:0 auto 6px;
}

/* Feed card: value + direction indicator inline */
.mw-feed__valrow{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
}
.mw-feed__dir{
  font-size:11px;
  font-weight:700;
  line-height:1;
  flex-shrink:0;
}
.mw-feed__dir--up   { color:var(--pos); }
.mw-feed__dir--down { color:var(--neg); }
.mw-feed__dir--flat { color:var(--muted); }

/* Signals modal: centered headline kicker */
#mw-signals-modal .mw-modal__header{
  position:relative;
}
#mw-signals-modal .mw-modal__actions{
  position:absolute;
  top:0;
  right:0;
}
#mw-signals-modal .mw-modal__header > div:first-child{
  width:100%;
  text-align:center;
}
#mw-signals-modal .mw-modal__kicker{
  font-size:34px;
  font-weight:800;
  letter-spacing:normal;
  text-transform:none;
  color:var(--text);
}
#mw-signals-modal .mw-modal__title{
  display:none;
}

/* Signals modal: Raw Data subtitle */
.mw-signals-subtitle{
  margin-top:2em;
  margin-bottom:12px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  font-size:22px;
  font-weight:700;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:var(--muted);
}

/* Sankey diagram */
.mw-sankey-wrap{
  margin:8px 0 4px;
  border:1px solid var(--hair);
  border-radius:10px;
  padding:12px 8px;
  background:rgba(255,255,255,0.02);
}
.mw-sankey{
  display:block;
  overflow:visible;
}
