/* ==========================================================================
   Manasa — Market Watch (GCC financial-intelligence terminal)
   Full rebuild. White-first design system, NO beige. Loads AFTER landing.css
   so its :root token block re-formalizes the palette for this page only.
   Feel: institutional, premium, calm, analytical, trustworthy, GCC-focused.
   Colour semantics: green = positive market move only; red = negative/risk;
   amber = uncertainty / watch / provisional. Direction is NEVER colour-only.
   ========================================================================== */

/* ---- Formalized token system (white-first) ---------------------------- */
:root {
  --background: #FFFFFF;
  --surface-subtle: #F7F8FA;
  --surface-muted: #F1F3F5;
  --text-primary: #17191C;
  --text-secondary: #5E6570;
  --text-tertiary: #7C838D;
  --border: #E2E5E9;
  --border-strong: #CCD1D7;

  --brand-maroon: #8A1538;
  --brand-maroon-dark: #64102B;
  --brand-maroon-soft: #F8EDF1;
  --gold: #B8924B;
  --gold-soft: #F7F1E5;

  --positive: #147D56;
  --positive-soft: #EAF6F1;
  --negative: #B4233A;
  --negative-soft: #FCECEF;
  --warning: #A96905;
  --warning-soft: #FFF5E1;
  --info: #315F86;
  --info-soft: #EDF4FA;

  /* radii — restrained, not "rounded card around everything" */
  --mw-r-sm: 8px;
  --mw-r-md: 12px;
  --mw-r-lg: 16px;

  /* shadows — subtle only */
  --mw-shadow: 0 1px 2px rgba(23,25,28,.05);
  --mw-shadow-raise: 0 6px 24px rgba(23,25,28,.08), 0 1px 3px rgba(23,25,28,.05);

  --mw-maxw: 1320px;
  --mw-header-h: 64px;
  --mw-statusbar-h: 40px;

  /* map/positive-negative aliases used by JS canvas + legacy classes */
  --mw-up: var(--positive);
  --mw-up-bg: var(--positive-soft);
  --mw-down: var(--negative);
  --mw-down-bg: var(--negative-soft);
  --mw-flat: var(--text-tertiary);
  --mw-flat-bg: var(--surface-muted);
}

/* Page-level resets that override the landing base for this terminal look. */
body.mw-body {
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font);
}
html[lang="en"] .lang-ar { display: none !important; }
html[lang="ar"] .lang-en { display: none !important; }

/* Genuine RTL: flip the whole document flow, not just text-align. */
html[dir="rtl"] body.mw-body { direction: rtl; }

.mw-container { width: 100%; max-width: var(--mw-maxw); margin: 0 auto; padding: 0 28px; }
@media (max-width: 900px) { .mw-container { padding: 0 20px; } }
@media (max-width: 560px) { .mw-container { padding: 0 15px; } }

/* Tabular numerals everywhere a number is shown. */
.tnum, .mw-num, .data-value, .chg, td.num, .kpi-value { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* Icon-size default: any inline SVG that has no more-specific size rule renders
   at a sensible 16px instead of ballooning to its container. Full-bleed visuals
   (the schematic map, article crops) carry their own class and override this. */
.mw-body svg { width: 16px; height: 16px; flex: none; }
.mw-body .mw-map { width: 100%; height: auto; }

.mw-section { padding: 56px 0; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--mw-header-h) + var(--mw-statusbar-h) + 12px); }
.mw-section--tight { padding: 36px 0; }
.mw-section--alt { background: var(--surface-subtle); }
@media (max-width: 640px) { .mw-section { padding: 40px 0; } }

.mw-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-maroon);
}
html[dir="rtl"] .mw-eyebrow { letter-spacing: 0; }
.mw-section-head { margin-bottom: 26px; max-width: 74ch; }
.mw-section-head h2 { font-size: 34px; line-height: 1.12; margin-top: 10px; color: var(--text-primary); }
@media (max-width: 900px) { .mw-section-head h2 { font-size: 28px; } }
@media (max-width: 560px) { .mw-section-head h2 { font-size: 24px; } }
.mw-section-head .mw-lede { font-size: 16px; color: var(--text-secondary); margin-top: 12px; max-width: 68ch; line-height: 1.6; }
.mw-section-head .mw-method-link { margin-top: 10px; display: inline-flex; }

/* Fine geometric divider (restrained GCC motif). */
.mw-motif-divider { height: 10px; background-image: repeating-linear-gradient(135deg, var(--border) 0 1px, transparent 1px 9px); opacity: .6; }

/* =========================================================================
   1 · STICKY GLOBAL HEADER + SCROLL-SPY NAV
   ========================================================================= */
.mw-header {
  position: sticky; top: 0; z-index: 100; background: var(--background);
  border-bottom: 1px solid var(--border); height: var(--mw-header-h);
}
.mw-header-inner { display: flex; align-items: center; gap: 18px; height: var(--mw-header-h); }
.mw-lockup { display: flex; align-items: center; gap: 11px; flex: none; }
.mw-lockup .mw-mark { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.mw-lockup .mw-words { display: flex; flex-direction: column; line-height: 1.05; }
.mw-lockup .mw-brand { font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: var(--text-primary); }
.mw-lockup .mw-product { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); }
html[dir="rtl"] .mw-lockup .mw-product { letter-spacing: 0; }

.mw-trial-badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 4px 10px; border-radius: 999px; background: var(--gold-soft);
  color: var(--brand-maroon-dark); border: 1px solid #e7d6ad;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.mw-trial-badge svg { width: 13px; height: 13px; }

.mw-nav { display: flex; align-items: center; gap: 2px; margin: 0 auto; flex-wrap: nowrap; overflow: hidden; }
.mw-nav a {
  font-size: 13.5px; font-weight: 500; color: var(--text-secondary);
  padding: 7px 11px; border-radius: 8px; white-space: nowrap; position: relative;
  transition: color .15s ease, background .15s ease;
}
.mw-nav a:hover { color: var(--text-primary); background: var(--surface-subtle); }
.mw-nav a.is-active { color: var(--brand-maroon); font-weight: 600; }
.mw-nav a.is-active::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -2px; height: 2px; background: var(--brand-maroon); border-radius: 2px; }
@media (max-width: 1160px) { .mw-nav { display: none; } }

.mw-header-right { display: flex; align-items: center; gap: 10px; flex: none; }
.mw-header-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.mw-header-status .mw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-tertiary); flex: none; }
.mw-header-status.is-open .mw-dot { background: var(--positive); }
.mw-header-status.is-closed .mw-dot { background: var(--text-tertiary); }
.mw-header-status.is-mixed .mw-dot { background: var(--warning); }
@media (max-width: 1000px) { .mw-header-status .mw-hs-label { display: none; } }

.mw-link-safety { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-secondary); padding: 7px 10px; border-radius: 8px; }
.mw-link-safety:hover { background: var(--surface-subtle); color: var(--text-primary); }
.mw-link-safety svg { width: 15px; height: 15px; }
@media (max-width: 760px) { .mw-link-safety .mw-ls-text { display: none; } }

.mw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 9px 16px; border-radius: var(--mw-r-sm); border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease; white-space: nowrap;
}
.mw-btn svg { width: 16px; height: 16px; }
.mw-btn-primary { background: var(--brand-maroon); color: #fff; }
.mw-btn-primary:hover { background: var(--brand-maroon-dark); }
.mw-btn-primary:active { background: var(--brand-maroon-dark); transform: translateY(1px); }
.mw-btn-ghost { background: var(--background); color: var(--text-primary); border-color: var(--border-strong); }
.mw-btn-ghost:hover { border-color: var(--brand-maroon); color: var(--brand-maroon); }
.mw-btn-sm { font-size: 13px; padding: 6px 12px; }
.mw-btn:disabled { opacity: .55; cursor: not-allowed; }

.mw-lang { display: inline-flex; align-items: center; gap: 6px; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-primary); background: var(--background); border: 1px solid var(--border-strong); border-radius: var(--mw-r-sm); padding: 7px 11px; cursor: pointer; }
.mw-lang:hover { border-color: var(--brand-maroon); color: var(--brand-maroon); }
.mw-lang svg { width: 15px; height: 15px; }

.mw-menu-btn { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border-strong); border-radius: var(--mw-r-sm); background: var(--background); cursor: pointer; color: var(--text-primary); }
.mw-menu-btn svg { width: 20px; height: 20px; }
@media (max-width: 1160px) { .mw-menu-btn { display: inline-flex; } }

/* Mobile / side-sheet navigation */
.mw-mobile-nav { position: fixed; inset: 0; z-index: 300; display: none; }
.mw-mobile-nav.open { display: block; }
.mw-mobile-nav .mw-mn-backdrop { position: absolute; inset: 0; background: rgba(23,25,28,.4); }
.mw-mobile-nav .mw-mn-panel {
  position: absolute; inset-inline-end: 0; top: 0; height: 100%; width: min(320px, 86%);
  background: var(--background); box-shadow: var(--mw-shadow-raise);
  display: flex; flex-direction: column; padding: 18px; overflow-y: auto;
  transform: translateX(0);
}
.mw-mn-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mw-mn-close { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: var(--mw-r-sm); background: var(--background); cursor: pointer; color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; }
.mw-mn-panel nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.mw-mn-panel nav a { padding: 12px 12px; border-radius: var(--mw-r-sm); font-size: 15px; font-weight: 500; color: var(--text-primary); }
.mw-mn-panel nav a:hover, .mw-mn-panel nav a.is-active { background: var(--brand-maroon-soft); color: var(--brand-maroon); }
.mw-mn-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }

/* =========================================================================
   2 · MARKET STATUS + UPDATE BAR
   ========================================================================= */
.mw-statusbar { position: sticky; top: var(--mw-header-h); z-index: 90; background: var(--surface-subtle); border-bottom: 1px solid var(--border); }
.mw-statusbar-inner { display: flex; align-items: center; gap: 18px; min-height: var(--mw-statusbar-h); padding: 7px 0; flex-wrap: wrap; }
.mw-sb-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; }
.mw-sb-item b { color: var(--text-primary); font-weight: 600; }
.mw-sb-item svg { width: 14px; height: 14px; color: var(--text-tertiary); }
.mw-sb-sep { width: 1px; height: 16px; background: var(--border-strong); flex: none; }
.mw-sb-state { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.mw-sb-state .mw-dot { width: 7px; height: 7px; border-radius: 50%; }
.mw-sb-state.is-live { background: var(--positive-soft); color: var(--positive); }
.mw-sb-state.is-live .mw-dot { background: var(--positive); }
.mw-sb-state.is-delayed, .mw-sb-state.is-eod, .mw-sb-state.is-estimated { background: var(--warning-soft); color: var(--warning); }
.mw-sb-state.is-delayed .mw-dot, .mw-sb-state.is-eod .mw-dot, .mw-sb-state.is-estimated .mw-dot { background: var(--warning); }
.mw-sb-method { margin-inline-start: auto; }
@media (max-width: 700px) { .mw-sb-method { margin-inline-start: 0; } .mw-sb-sep { display: none; } }

/* =========================================================================
   3 · DAILY INTELLIGENCE HERO (light, WCAG-AA)
   ========================================================================= */
.mw-hero { position: relative; overflow: hidden; }
.mw-hero-geo { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle at 88% 12%, var(--brand-maroon-soft), transparent 42%),
    repeating-linear-gradient(60deg, transparent 0 22px, rgba(138,21,56,.03) 22px 23px); }
.mw-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 44px; align-items: center; }
@media (max-width: 960px) { .mw-hero-grid { grid-template-columns: 1fr; gap: 30px; } }
.mw-hero h1 { font-size: 52px; line-height: 1.06; letter-spacing: -.02em; margin-top: 14px; color: var(--text-primary); }
@media (max-width: 1100px) { .mw-hero h1 { font-size: 42px; } }
@media (max-width: 640px) { .mw-hero h1 { font-size: 32px; } }
html[dir="rtl"] .mw-hero h1 { letter-spacing: 0; line-height: 1.3; }
.mw-hero-sub { font-size: 18px; line-height: 1.55; color: var(--text-secondary); margin-top: 16px; max-width: 54ch; }
.mw-hero-conclusion {
  margin-top: 22px; padding: 18px 20px; border-radius: var(--mw-r-md);
  background: var(--positive-soft); border: 1px solid #bfe3d2; border-inline-start: 4px solid var(--positive);
  display: flex; gap: 12px; align-items: flex-start;
}
.mw-hero-conclusion.is-neutral { background: var(--info-soft); border-color: #cfe0ee; border-inline-start-color: var(--info); }
.mw-hero-conclusion.is-watch { background: var(--warning-soft); border-color: #f0dfb0; border-inline-start-color: var(--warning); }
.mw-hero-conclusion .hc-ic { width: 22px; height: 22px; flex: none; color: var(--positive); margin-top: 2px; }
.mw-hero-conclusion.is-neutral .hc-ic { color: var(--info); }
.mw-hero-conclusion.is-watch .hc-ic { color: var(--warning); }
.mw-hc-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 4px; display: block; }
html[dir="rtl"] .mw-hc-label { letter-spacing: 0; }
.mw-hc-text { font-size: 16.5px; line-height: 1.55; color: var(--text-primary); }
.mw-hero-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 16px; font-size: 12.5px; color: var(--text-tertiary); }
.mw-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* Hero impact heatmap (right rail) */
.mw-heatmap { position: relative; background: var(--background); border: 1px solid var(--border); border-radius: var(--mw-r-lg); padding: 18px; box-shadow: var(--mw-shadow-raise); }
.mw-heatmap-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.mw-heatmap-head h3 { font-size: 14px; color: var(--text-primary); }
.mw-heatmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 420px) { .mw-heatmap-grid { grid-template-columns: repeat(2, 1fr); } }
.mw-hm-cell { border: 1px solid var(--border); border-radius: var(--mw-r-sm); padding: 10px 11px; background: var(--surface-subtle); cursor: pointer; text-align: start; display: flex; flex-direction: column; gap: 3px; transition: border-color .15s ease, box-shadow .15s ease; }
.mw-hm-cell:hover, .mw-hm-cell:focus-visible { border-color: var(--brand-maroon); box-shadow: var(--mw-shadow); }
.mw-hm-country { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.mw-hm-move { font-size: 15px; font-weight: 700; }
.mw-hm-cell .mw-hm-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.mw-hm-cell.impact-elevated { border-inline-start: 3px solid var(--negative); }
.mw-hm-cell.impact-moderate { border-inline-start: 3px solid var(--warning); }
.mw-hm-cell.impact-low { border-inline-start: 3px solid var(--positive); }
.mw-heatmap-foot { margin-top: 12px; font-size: 11.5px; color: var(--text-tertiary); display: flex; align-items: center; gap: 6px; }

/* Global unavailable banner */
.mw-unavailable { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 14px 16px; border-radius: var(--mw-r-md); background: var(--warning-soft); border: 1px solid #f0dfb0; color: var(--text-primary); font-size: 14px; }
.mw-unavailable svg { width: 18px; height: 18px; flex: none; color: var(--warning); margin-top: 1px; }

/* =========================================================================
   Shared: change badge, confidence badge, data-status badge, source popover
   ========================================================================= */
.chg { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.chg svg { width: 13px; height: 13px; flex: none; }
.chg-up { color: var(--positive); background: var(--positive-soft); }
.chg-down { color: var(--negative); background: var(--negative-soft); }
.chg-flat { color: var(--text-tertiary); background: var(--surface-muted); }

.conf-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: help; border: 1px solid transparent; }
.conf-badge svg { width: 12px; height: 12px; }
.conf-confirmed { color: var(--positive); background: var(--positive-soft); border-color: #bfe3d2; }
.conf-probable { color: var(--info); background: var(--info-soft); border-color: #cfe0ee; }
.conf-early { color: var(--warning); background: var(--warning-soft); border-color: #f0dfb0; }
.conf-none { color: var(--text-secondary); background: var(--surface-muted); border-color: var(--border); }
.conf-insufficient { color: var(--brand-maroon); background: var(--brand-maroon-soft); border-color: #e9cdd7; }

.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.status-live { color: var(--positive); background: var(--positive-soft); }
.status-delayed, .status-estimated, .status-scraped, .status-eod { color: var(--warning); background: var(--warning-soft); }
.status-licensed { color: var(--info); background: var(--info-soft); }
.status-missing { color: var(--text-tertiary); background: var(--surface-muted); }

.src-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.src-badge:hover { border-color: var(--brand-maroon); color: var(--brand-maroon); }
.src-badge svg { width: 12px; height: 12px; }

.mw-source-pop { position: fixed; z-index: 400; width: min(320px, calc(100vw - 24px)); background: var(--background); border: 1px solid var(--border-strong); border-radius: var(--mw-r-md); box-shadow: var(--mw-shadow-raise); padding: 14px 16px; font-size: 13px; }
.mw-source-pop[hidden] { display: none; }
.mw-source-pop h4 { font-size: 13px; margin-bottom: 8px; color: var(--text-primary); }
.mw-source-pop dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.mw-source-pop dt { color: var(--text-tertiary); font-size: 12px; }
.mw-source-pop dd { margin: 0; color: var(--text-primary); font-size: 12px; text-align: end; }
.mw-source-pop a { color: var(--brand-maroon); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; }
.mw-source-pop a svg { width: 12px; height: 12px; }

.mw-preview-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--info); background: var(--info-soft); border: 1px solid #cfe0ee; border-radius: 6px; padding: 2px 8px; }
.mw-preview-badge svg { width: 12px; height: 12px; }

.stale-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 5px; background: var(--warning-soft); color: var(--warning); white-space: nowrap; }
.stale-tag svg { width: 11px; height: 11px; }
.mw-asof { font-size: 11.5px; color: var(--text-tertiary); font-weight: 600; }
.mw-na { color: var(--text-tertiary); font-style: normal; }

/* Tooltip (definitional, keyboard/hover) */
.mw-tip { position: relative; border-bottom: 1px dotted var(--border-strong); cursor: help; }

/* =========================================================================
   4 · WHAT CHANGED STRIP
   ========================================================================= */
.mw-changed-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--mw-r-md); overflow: hidden; background: var(--background); }
.mw-changed-item { padding: 16px 18px; border-inline-start: 1px solid var(--border); display: flex; flex-direction: column; gap: 7px; }
.mw-changed-item:first-child { border-inline-start: none; }
@media (max-width: 720px) { .mw-changed-item { border-inline-start: none; border-top: 1px solid var(--border); } .mw-changed-item:first-child { border-top: none; } }
.mw-ci-top { display: flex; align-items: center; gap: 8px; }
.mw-ci-dir { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mw-ci-dir svg { width: 15px; height: 15px; }
.mw-ci-dir.up { background: var(--positive-soft); color: var(--positive); }
.mw-ci-dir.down { background: var(--negative-soft); color: var(--negative); }
.mw-ci-dir.flat { background: var(--surface-muted); color: var(--text-tertiary); }
.mw-ci-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.mw-ci-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.mw-ci-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }

/* =========================================================================
   Period + sort control bar
   ========================================================================= */
.mw-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.mw-segmented { display: inline-flex; background: var(--surface-muted); border-radius: var(--mw-r-sm); padding: 3px; gap: 2px; }
.mw-segmented button { font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); background: transparent; border: none; border-radius: 6px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.mw-segmented button.is-active { background: var(--background); color: var(--brand-maroon); box-shadow: var(--mw-shadow); }
.mw-select-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-secondary); }
.mw-select { font-family: inherit; font-size: 13px; color: var(--text-primary); background: var(--background); border: 1px solid var(--border-strong); border-radius: var(--mw-r-sm); padding: 7px 30px 7px 11px; cursor: pointer;
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E6570' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; }
html[dir="rtl"] .mw-select { padding: 7px 11px 7px 30px; background-position: left 9px center; }

/* =========================================================================
   5 · GCC MARKET OVERVIEW CARDS
   ========================================================================= */
.mw-market-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (min-width: 1500px) { .mw-market-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 1000px) { .mw-market-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mw-market-grid { grid-template-columns: 1fr; } }
.mw-market-card { border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--background); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--mw-shadow); }
.mw-market-card .mc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mc-country { display: flex; align-items: center; gap: 8px; }
.mc-flag { width: 22px; height: 16px; border-radius: 3px; border: 1px solid var(--border); object-fit: cover; flex: none; background: var(--surface-muted); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.mc-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.mc-exch { font-size: 11.5px; color: var(--text-tertiary); }
.mc-impact { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; }
html[dir="rtl"] .mc-impact { letter-spacing: 0; }
.mc-impact.low { color: var(--positive); background: var(--positive-soft); }
.mc-impact.moderate { color: var(--warning); background: var(--warning-soft); }
.mc-impact.elevated { color: var(--negative); background: var(--negative-soft); }
.mc-values { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mc-level { font-size: 26px; font-weight: 800; color: var(--text-primary); letter-spacing: -.01em; }
.mc-abs { font-size: 12px; color: var(--text-secondary); }
.mc-spark { height: 44px; margin: 2px 0; position: relative; }
.mc-spark canvas { width: 100% !important; height: 100% !important; }
.mc-spark-empty { height: 44px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text-tertiary); background: var(--surface-subtle); border-radius: 6px; }
.mc-periods { display: flex; gap: 8px; font-size: 11.5px; color: var(--text-secondary); }
.mc-periods span b { color: var(--text-primary); font-weight: 700; }
.mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.mc-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-secondary); }
.mc-status .mw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-tertiary); }
.mc-status.is-open .mw-dot { background: var(--positive); }
.mc-view { font-size: 12.5px; font-weight: 600; color: var(--brand-maroon); display: inline-flex; align-items: center; gap: 4px; background: none; border: none; cursor: pointer; font-family: inherit; padding: 0; }
.mc-view:hover { text-decoration: underline; }
.mc-view svg { width: 13px; height: 13px; }

/* =========================================================================
   6 · CONFLICT TRANSMISSION DIAGRAM
   ========================================================================= */
.mw-transmission { display: flex; flex-direction: column; gap: 0; }
.mw-tr-stage { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--border); position: relative; }
.mw-tr-stage:first-child { border-top: none; }
@media (max-width: 720px) { .mw-tr-stage { grid-template-columns: 1fr; gap: 8px; } }
.mw-tr-label { display: flex; align-items: flex-start; gap: 12px; }
.mw-tr-num { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-maroon-soft); color: var(--brand-maroon); font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mw-tr-stage-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.mw-tr-stage-name small { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-tertiary); margin-top: 2px; }
.mw-tr-evidence { font-size: 14px; color: var(--text-secondary); line-height: 1.55; }
.mw-tr-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.mw-tr-arrow { display: flex; justify-content: center; color: var(--border-strong); }
.mw-tr-arrow svg { width: 18px; height: 18px; }

/* =========================================================================
   7 · TIMELINE + ANALYTICAL MAP
   ========================================================================= */
.mw-timeline-map { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 960px) { .mw-timeline-map { grid-template-columns: 1fr; } }
.mw-timeline { display: flex; flex-direction: column; }
.mw-tl-event { display: grid; grid-template-columns: 20px 1fr; gap: 14px; padding-bottom: 20px; position: relative; }
.mw-tl-rail { display: flex; flex-direction: column; align-items: center; }
.mw-tl-dot { width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--background); background: var(--text-tertiary); box-shadow: 0 0 0 1px var(--border-strong); margin-top: 3px; flex: none; }
.mw-tl-dot.escalating { background: var(--negative); }
.mw-tl-dot.stable { background: var(--positive); }
.mw-tl-dot.monitoring { background: var(--warning); }
.mw-tl-dot.resolved { background: var(--info); }
.mw-tl-line { width: 2px; flex: 1; background: var(--border); margin-top: 3px; }
.mw-tl-body { border: 1px solid var(--border); border-radius: var(--mw-r-md); padding: 13px 15px; background: var(--background); box-shadow: var(--mw-shadow); cursor: pointer; }
.mw-tl-body:hover { border-color: var(--brand-maroon); }
.mw-tl-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 11.5px; color: var(--text-tertiary); margin-bottom: 5px; }
.mw-tl-title { font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.mw-tl-resp { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.mw-tl-resp b { color: var(--text-primary); }

.mw-map-wrap { position: sticky; top: calc(var(--mw-header-h) + var(--mw-statusbar-h) + 16px); border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--surface-subtle); padding: 16px; }
.mw-map-wrap h3 { font-size: 14px; margin-bottom: 12px; }
.mw-map { width: 100%; height: auto; display: block; }
.mw-map-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 11.5px; color: var(--text-secondary); }
.mw-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mw-map-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* =========================================================================
   8 · COUNTRY IMPACT RANKING
   ========================================================================= */
.mw-rank-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 860px) { .mw-rank-list { grid-template-columns: 1fr; } }
.mw-rank-card { border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--background); box-shadow: var(--mw-shadow); overflow: hidden; }
.mw-rank-card.top { border-color: var(--brand-maroon); }
.rc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.rc-rank { width: 34px; height: 34px; border-radius: 8px; background: var(--brand-maroon); color: #fff; font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mw-rank-card:not(.top) .rc-rank { background: var(--surface-muted); color: var(--text-secondary); }
.rc-head-main { flex: 1; min-width: 0; }
.rc-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.rc-sub { font-size: 12px; color: var(--text-tertiary); }
.rc-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.rc-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.rc-block { }
.rc-block-label { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 4px; }
html[dir="rtl"] .rc-block-label { letter-spacing: 0; }
.rc-block-text { font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.rc-block-text b { color: var(--text-primary); }
.rc-trading { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-secondary); }
.rc-trading b { color: var(--text-primary); }
.rc-drivers { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-driver { font-size: 11.5px; color: var(--text-primary); background: var(--surface-muted); border-radius: 5px; padding: 3px 9px; }
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.rc-sources { font-size: 11.5px; color: var(--text-tertiary); }

/* Breadth bar */
.mw-breadth { display: flex; flex-direction: column; gap: 6px; }
.mw-breadth-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-muted); border: 1px solid var(--border); }
.mw-breadth-bar .bb-adv { background: var(--positive); }
.mw-breadth-bar .bb-unch { background: var(--text-tertiary); opacity: .4; }
.mw-breadth-bar .bb-dec { background: var(--negative); }
.mw-breadth-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--text-secondary); }
.mw-breadth-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mw-breadth-legend i { width: 8px; height: 8px; border-radius: 50%; }
.bl-adv i { background: var(--positive); } .bl-unch i { background: var(--text-tertiary); opacity: .5; } .bl-dec i { background: var(--negative); }

/* =========================================================================
   9 · ENERGY / SHIPPING / SAFE-HAVEN
   ========================================================================= */
.mw-energy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.mw-commodity { border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--background); padding: 14px 16px; box-shadow: var(--mw-shadow); display: flex; flex-direction: column; gap: 8px; }
.mw-commodity.gold { border-color: #e7d6ad; background: linear-gradient(180deg, var(--gold-soft), var(--background) 72%); }
.cm-name { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); }
.cm-price { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.cm-unit { font-size: 11px; font-weight: 600; color: var(--text-tertiary); margin-inline-start: 4px; }
.cm-spark { height: 34px; position: relative; }
.cm-spark canvas { width: 100% !important; height: 100% !important; }
.cm-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mw-shipping { margin-top: 22px; border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--surface-subtle); padding: 20px 22px; }
.mw-shipping h3 { font-size: 16px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.mw-shipping h3 svg { width: 18px; height: 18px; color: var(--brand-maroon); }
.mw-shipping-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 14px; }
.mw-ship-metric { }
.mw-ship-metric .sm-label { font-size: 11.5px; color: var(--text-tertiary); }
.mw-ship-metric .sm-value { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-top: 2px; }
.mw-ship-line { font-size: 14px; color: var(--text-secondary); line-height: 1.55; margin-top: 12px; }
.mw-ship-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

/* =========================================================================
   10-12 · FED / RATES / PEGS · PEG-PRESSURE · CDS (shared tables + charts)
   ========================================================================= */
.mw-fed-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.mw-kpi { border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--background); padding: 15px 17px; box-shadow: var(--mw-shadow); }
.kpi-label { font-size: 11.5px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .04em; }
html[dir="rtl"] .kpi-label { letter-spacing: 0; }
.kpi-value { font-size: 22px; font-weight: 800; color: var(--text-primary); margin-top: 6px; }
.kpi-sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.mw-fed-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .mw-fed-cols { grid-template-columns: 1fr; } }

/* FedWatch probability chart */
.mw-prob-chart { border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--background); padding: 18px 20px; box-shadow: var(--mw-shadow); }
.mw-prob-chart h3 { font-size: 14px; margin-bottom: 4px; }
.mw-prob-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.mw-prob-row { display: grid; grid-template-columns: 130px 1fr 48px; gap: 12px; align-items: center; }
@media (max-width: 480px) { .mw-prob-row { grid-template-columns: 96px 1fr 42px; gap: 8px; } }
.mw-prob-name { font-size: 13px; color: var(--text-primary); font-weight: 600; }
.mw-prob-track { height: 22px; background: var(--surface-muted); border-radius: 6px; overflow: hidden; position: relative; }
.mw-prob-fill { height: 100%; background: var(--info); border-radius: 6px; }
.mw-prob-fill.hold { background: var(--info); }
.mw-prob-fill.cut { background: var(--positive); }
.mw-prob-fill.hike { background: var(--negative); }
.mw-prob-val { font-size: 13px; font-weight: 700; color: var(--text-primary); text-align: end; }

/* Why-it-matters panel + flow visual */
.mw-why { border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--surface-subtle); padding: 18px 20px; }
.mw-why h3 { font-size: 14px; margin-bottom: 8px; }
.mw-why p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }
.mw-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; }
.mw-flow-node { font-size: 12px; font-weight: 600; color: var(--text-primary); background: var(--background); border: 1px solid var(--border-strong); border-radius: 6px; padding: 6px 10px; }
.mw-flow-arrow { color: var(--text-tertiary); }
.mw-flow-arrow svg { width: 14px; height: 14px; }

/* Shared tables */
.mw-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--background); box-shadow: var(--mw-shadow); }
.mw-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.mw-table thead th { text-align: start; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-tertiary); padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-subtle); white-space: nowrap; }
html[dir="rtl"] .mw-table thead th { letter-spacing: 0; }
.mw-table th.num, .mw-table td.num { text-align: end; font-variant-numeric: tabular-nums; }
.mw-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: middle; }
.mw-table tbody tr:last-child td { border-bottom: none; }
.mw-table tbody tr:hover { background: var(--surface-subtle); }
.mw-table .cell-country { font-weight: 700; color: var(--text-primary); }
.mw-table .cell-country .mc-flag { margin-inline-end: 8px; vertical-align: middle; }
.th-sortable { cursor: pointer; user-select: none; }
.th-sortable:hover { color: var(--brand-maroon); }
.th-sortable[data-sorted]::after { content: "▾"; margin-inline-start: 5px; font-size: 9px; opacity: .8; }
.th-sortable[data-asc="true"]::after { content: "▴"; }
.mw-table .data-big { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.cds-row-clickable { cursor: pointer; }

/* Peg-pressure dot/range plot */
.mw-peg-plot { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--background); box-shadow: var(--mw-shadow); overflow: hidden; }
.mw-peg-row { display: grid; grid-template-columns: 120px 1fr 150px; gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--border); }
.mw-peg-row:first-child { border-top: none; }
@media (max-width: 720px) { .mw-peg-row { grid-template-columns: 96px 1fr; } .mw-peg-meta { grid-column: 1 / -1; } }
.mw-peg-country { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.mw-peg-scale { position: relative; height: 30px; }
.mw-peg-axis { position: absolute; inset-inline: 0; top: 50%; height: 2px; background: var(--surface-muted); border-radius: 2px; }
.mw-peg-zero { position: absolute; top: 4px; bottom: 4px; width: 2px; background: var(--border-strong); }
.mw-peg-zero::after { content: "0"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 9px; color: var(--text-tertiary); }
.mw-peg-band { position: absolute; top: 50%; transform: translateY(-50%); height: 12px; background: var(--info-soft); border-radius: 6px; }
.mw-peg-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 14px; height: 14px; border-radius: 50%; background: var(--info); border: 2px solid var(--background); box-shadow: 0 0 0 1px var(--info); }
.mw-peg-scale-labels { position: absolute; inset-inline: 0; bottom: -12px; display: flex; justify-content: space-between; font-size: 9px; color: var(--text-tertiary); }
.mw-peg-meta { font-size: 12px; color: var(--text-secondary); text-align: end; }
html[dir="rtl"] .mw-peg-meta { text-align: start; }
.mw-peg-meta .mw-na { font-size: 12px; }

/* Sovereign CDS lollipop chart */
.mw-cds-chart { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--background); padding: 18px 20px; box-shadow: var(--mw-shadow); }
.mw-cds-lolli { display: grid; grid-template-columns: 110px 1fr 70px; gap: 12px; align-items: center; }
@media (max-width: 480px) { .mw-cds-lolli { grid-template-columns: 84px 1fr 56px; gap: 8px; } }
.mw-cds-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.mw-cds-line { position: relative; height: 16px; }
.mw-cds-stem { position: absolute; top: 50%; transform: translateY(-50%); height: 3px; background: var(--info); border-radius: 3px; }
.mw-cds-head { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 13px; height: 13px; border-radius: 50%; background: var(--info); }
.mw-cds-head.elevated { background: var(--warning); } .mw-cds-stem.elevated { background: var(--warning); }
.mw-cds-head.high { background: var(--negative); } .mw-cds-stem.high { background: var(--negative); }
.mw-cds-bp { font-size: 13px; font-weight: 700; color: var(--text-primary); text-align: end; }
.mw-class { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px; }
.mw-class.low, .mw-class.normal { color: var(--positive); background: var(--positive-soft); }
.mw-class.elevated { color: var(--warning); background: var(--warning-soft); }
.mw-class.high, .mw-class.stressed { color: var(--negative); background: var(--negative-soft); }

.mw-cds-spark { width: 96px; height: 26px; }
.mw-cds-spark canvas { width: 100% !important; height: 100% !important; }

.mw-note { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-top: 14px; }
.mw-footnotes { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--text-tertiary); }

/* =========================================================================
   13 · ISLAMIC vs CONVENTIONAL comparison chart
   ========================================================================= */
.mw-ivc { border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--background); box-shadow: var(--mw-shadow); overflow: hidden; }
.mw-ivc-head, .mw-ivc-row { display: grid; grid-template-columns: 150px 1fr 1fr 80px 80px; gap: 12px; align-items: center; padding: 12px 16px; }
@media (max-width: 760px) { .mw-ivc-head, .mw-ivc-row { grid-template-columns: 110px 1fr 1fr; } .ivc-c-hide { display: none; } }
.mw-ivc-head { background: var(--surface-subtle); border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-tertiary); }
html[dir="rtl"] .mw-ivc-head { letter-spacing: 0; }
.mw-ivc-row { border-top: 1px solid var(--border); }
.mw-ivc-row:first-of-type { border-top: none; }
.ivc-cat { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.ivc-bars { }
.ivc-bar-line { display: flex; align-items: center; gap: 8px; }
.ivc-bar-line + .ivc-bar-line { margin-top: 5px; }
.ivc-bar-tag { font-size: 10.5px; width: 34px; color: var(--text-tertiary); flex: none; }
.ivc-bar-track { flex: 1; height: 8px; background: var(--surface-muted); border-radius: 4px; overflow: hidden; }
.ivc-bar-fill { height: 100%; border-radius: 4px; }
.ivc-bar-fill.pos { background: var(--positive); } .ivc-bar-fill.neg { background: var(--negative); }
.ivc-bar-val { font-size: 12px; font-weight: 700; width: 46px; text-align: end; flex: none; }
.ivc-diff { font-size: 13px; font-weight: 700; color: var(--text-primary); }

/* =========================================================================
   14 · MARKET CALENDAR
   ========================================================================= */
.mw-cal-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mw-cal-filter { font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.mw-cal-filter.is-active { background: var(--brand-maroon); color: #fff; border-color: var(--brand-maroon); }
.mw-cal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .mw-cal-grid { grid-template-columns: 1fr; } }
.mw-cal-item { display: flex; gap: 14px; border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--background); padding: 13px 15px; box-shadow: var(--mw-shadow); }
.cal-datebox { text-align: center; flex: none; min-width: 52px; }
.cal-day { font-size: 20px; font-weight: 800; color: var(--brand-maroon); line-height: 1; }
.cal-mon { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-tertiary); letter-spacing: .04em; }
html[dir="rtl"] .cal-mon { letter-spacing: 0; }
.cal-main { min-width: 0; flex: 1; }
.cal-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.cal-kind { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-maroon); background: var(--brand-maroon-soft); border-radius: 4px; padding: 2px 7px; }
html[dir="rtl"] .cal-kind { letter-spacing: 0; }
.cal-imp { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.cal-imp.high { color: var(--negative); background: var(--negative-soft); }
.cal-imp.med { color: var(--warning); background: var(--warning-soft); }
.cal-imp.low { color: var(--text-secondary); background: var(--surface-muted); }
.cal-title { font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.cal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 12px; color: var(--text-tertiary); }
.cal-action { font-family: inherit; font-size: 12px; font-weight: 600; color: var(--brand-maroon); background: none; border: none; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.cal-action svg { width: 13px; height: 13px; }

/* =========================================================================
   15 · INTELLIGENCE ARTICLES (editorial)
   ========================================================================= */
.mw-articles { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .mw-articles { grid-template-columns: 1fr; } }
.mw-article-secondary { display: grid; gap: 14px; }
.mw-article { border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--background); box-shadow: var(--mw-shadow); overflow: hidden; display: flex; flex-direction: column; }
.mw-article.featured .art-crop { height: 190px; }
.art-crop { height: 120px; background: var(--surface-muted); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.art-crop .art-geo { position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(circle at 30% 30%, var(--brand-maroon-soft), transparent 50%), repeating-linear-gradient(45deg, transparent 0 14px, rgba(138,21,56,.05) 14px 15px); }
.art-crop svg { width: 40px; height: 40px; color: var(--brand-maroon); opacity: .5; position: relative; }
.art-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.art-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.art-topic { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--brand-maroon); }
html[dir="rtl"] .art-topic { letter-spacing: 0; }
.art-headline { font-size: 17px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.mw-article.featured .art-headline { font-size: 22px; }
.art-summary { font-size: 14px; color: var(--text-secondary); line-height: 1.55; max-width: 68ch; }
.art-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--text-tertiary); }
.art-read { font-size: 13px; font-weight: 600; color: var(--brand-maroon); display: inline-flex; align-items: center; gap: 5px; }
.art-read svg { width: 14px; height: 14px; }
.art-changed { font-size: 10.5px; font-weight: 700; color: var(--warning); background: var(--warning-soft); border-radius: 4px; padding: 1px 6px; }

/* =========================================================================
   16 · SUBSCRIPTION (single full form)
   ========================================================================= */
.mw-subscribe { background: var(--surface-subtle); }
.mw-sub-card { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; max-width: 1000px; margin: 0 auto; }
@media (max-width: 820px) { .mw-sub-card { grid-template-columns: 1fr; gap: 24px; } }
.mw-sub-copy h2 { font-size: 30px; line-height: 1.14; }
@media (max-width: 560px) { .mw-sub-copy h2 { font-size: 24px; } }
.mw-sub-copy p { font-size: 15.5px; color: var(--text-secondary); line-height: 1.6; margin-top: 12px; max-width: 46ch; }
.mw-sub-points { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 9px; }
.mw-sub-points li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--text-secondary); }
.mw-sub-points svg { width: 16px; height: 16px; color: var(--positive); flex: none; margin-top: 2px; }
.mw-sub-form { background: var(--background); border: 1px solid var(--border); border-radius: var(--mw-r-lg); padding: 24px; box-shadow: var(--mw-shadow-raise); }
.mw-field { margin-bottom: 16px; }
.mw-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 7px; }
.mw-input { width: 100%; font-family: inherit; font-size: 15px; color: var(--text-primary); background: var(--background); border: 1.5px solid var(--border-strong); border-radius: var(--mw-r-sm); padding: 11px 14px; transition: border-color .15s ease; }
.mw-input:focus { outline: none; border-color: var(--brand-maroon); }
.mw-radio-group { display: flex; flex-direction: column; gap: 8px; }
.mw-radio { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-primary); padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--mw-r-sm); cursor: pointer; }
.mw-radio:has(input:checked) { border-color: var(--brand-maroon); background: var(--brand-maroon-soft); }
.mw-radio input { accent-color: var(--brand-maroon); }
.mw-seg-inline { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--mw-r-sm); overflow: hidden; }
.mw-seg-inline label { display: inline-flex; margin: 0; }
.mw-seg-inline label input { position: absolute; opacity: 0; }
.mw-seg-inline label span { padding: 9px 16px; font-size: 13.5px; font-weight: 600; color: var(--text-secondary); cursor: pointer; }
.mw-seg-inline label:has(input:checked) span { background: var(--brand-maroon); color: #fff; }
.mw-sub-submit { width: 100%; margin-top: 4px; }
.mw-sub-fine { font-size: 11.5px; color: var(--text-tertiary); margin-top: 12px; line-height: 1.5; }
.mw-sub-fine a { color: var(--brand-maroon); font-weight: 600; }
.mw-form-msg { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-top: 14px; padding: 11px 13px; border-radius: var(--mw-r-sm); }
.mw-form-msg svg { width: 16px; height: 16px; flex: none; }
.mw-form-msg.ok { background: var(--positive-soft); color: var(--positive); }
.mw-form-msg.err { background: var(--negative-soft); color: var(--negative); }
.mw-form-msg[hidden] { display: none; }

/* Compact inline "get the daily digest" action (earlier in page) */
.mw-digest-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; border: 1px solid var(--border); border-radius: var(--mw-r-md); background: var(--brand-maroon-soft); padding: 14px 18px; }
.mw-digest-inline p { font-size: 14px; font-weight: 600; color: var(--brand-maroon-dark); }

/* =========================================================================
   17 · FOOTER
   ========================================================================= */
.mw-footer { background: var(--text-primary); color: #C9CDD3; padding: 44px 0 26px; margin-top: 0; }
.mw-footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px) { .mw-footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (max-width: 480px) { .mw-footer-cols { grid-template-columns: 1fr; } }
.mw-footer .ft-brand-lockup { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mw-footer .ft-brand-lockup img { width: 30px; height: 30px; border-radius: 7px; }
.mw-footer .ft-brand-name { font-size: 15px; font-weight: 800; color: #fff; }
.mw-footer .ft-desc { font-size: 13px; line-height: 1.6; color: #9CA3AC; max-width: 34ch; }
.mw-footer h4 { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7C838D; margin-bottom: 12px; }
html[dir="rtl"] .mw-footer h4 { letter-spacing: 0; }
.mw-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.mw-footer ul a { font-size: 13.5px; color: #C9CDD3; }
.mw-footer ul a:hover { color: #fff; }
.mw-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 32px; padding-top: 20px; border-top: 1px solid #2C2F34; font-size: 12px; color: #7C838D; }
.mw-footer-bottom a { color: #9CA3AC; }
.mw-footer-bottom a:hover { color: #fff; }
.mw-footer-bottom .ft-sep { color: #4A4E54; }
.mw-footer-lang { margin-inline-start: auto; }

/* =========================================================================
   DRAWERS + MODALS (country detail, methodology, chart)
   ========================================================================= */
.mw-drawer { position: fixed; inset: 0; z-index: 350; display: none; }
.mw-drawer.open { display: block; }
.mw-drawer .dr-backdrop { position: absolute; inset: 0; background: rgba(23,25,28,.45); }
.mw-drawer .dr-panel { position: absolute; inset-inline-end: 0; top: 0; height: 100%; width: min(560px, 100%); background: var(--background); box-shadow: var(--mw-shadow-raise); overflow-y: auto; padding: 24px; }
.dr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.dr-head h3 { font-size: 20px; color: var(--text-primary); }
.dr-close { width: 40px; height: 40px; flex: none; border: 1px solid var(--border); background: var(--background); border-radius: var(--mw-r-sm); cursor: pointer; color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; }
.dr-close:hover { border-color: var(--brand-maroon); color: var(--brand-maroon); }
.dr-close svg { width: 18px; height: 18px; }
.dr-section { margin-top: 20px; }
.dr-section h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-tertiary); margin-bottom: 10px; }
html[dir="rtl"] .dr-section h4 { letter-spacing: 0; }
.dr-canvas-wrap { position: relative; height: 240px; margin: 8px 0; }

.chart-modal { position: fixed; inset: 0; z-index: 360; display: flex; align-items: center; justify-content: center; padding: 20px; }
.chart-modal[hidden] { display: none; }
.cm-backdrop { position: absolute; inset: 0; background: rgba(23,25,28,.45); }
.cm-panel { position: relative; width: min(760px, 100%); max-height: 88vh; overflow: auto; background: var(--background); border-radius: var(--mw-r-lg); box-shadow: var(--mw-shadow-raise); padding: 22px 24px; }
.cm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cm-title { font-size: 18px; color: var(--text-primary); }
.cm-close { width: 38px; height: 38px; flex: none; border: 1px solid var(--border); background: var(--background); border-radius: var(--mw-r-sm); cursor: pointer; color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; }
.cm-close:hover { border-color: var(--brand-maroon); color: var(--brand-maroon); }
.cm-close svg { width: 18px; height: 18px; }
.cm-sub { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }
.cm-sub:empty { display: none; }
.cm-canvas-wrap { position: relative; height: 340px; margin: 16px 0 10px; }
@media (max-width: 560px) { .cm-canvas-wrap { height: 260px; } }
.cm-state { padding: 40px 10px; text-align: center; color: var(--text-secondary); font-size: 14px; }
.cm-state[hidden] { display: none; }
.cm-foot { font-size: 12px; color: var(--text-tertiary); }
.cm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.cm-table th, .cm-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); text-align: end; }
.cm-table th:first-child, .cm-table td:first-child { text-align: start; }

/* =========================================================================
   EMPTY / LOADING / SKELETON states
   ========================================================================= */
.mw-empty { border: 1px dashed var(--border-strong); border-radius: var(--mw-r-md); background: var(--surface-subtle); padding: 26px 22px; text-align: center; color: var(--text-secondary); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mw-empty svg { width: 26px; height: 26px; color: var(--text-tertiary); }
.mw-empty p { font-size: 14px; max-width: 46ch; }
.mw-skel { background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface-subtle) 37%, var(--surface-muted) 63%); background-size: 400% 100%; animation: mw-shimmer 1.4s ease infinite; border-radius: 6px; }
@keyframes mw-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .mw-skel { animation: none; } }
.mw-skel-card { height: 180px; border-radius: var(--mw-r-md); }
.mw-skel-line { height: 12px; margin: 6px 0; }

/* Back to top */
.mw-to-top { position: fixed; inset-block-end: 22px; inset-inline-end: 22px; z-index: 80; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-maroon); color: #fff; border: none; cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: var(--mw-shadow-raise); }
.mw-to-top.show { display: inline-flex; }
.mw-to-top svg { width: 20px; height: 20px; }

/* Skip link (reuse landing, ensure visible) */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 500; background: var(--brand-maroon); color: #fff; padding: 10px 16px; border-radius: var(--mw-r-sm); transition: top .15s ease; }
.skip-link:focus { top: 12px; }
html[dir="rtl"] .skip-link { left: auto; right: 12px; }

/* Focus visibility */
:focus-visible { outline: 2px solid var(--brand-maroon); outline-offset: 2px; border-radius: 4px; }

/* =========================================================================
   PRINT / PDF (A4-friendly report)
   ========================================================================= */
@media print {
  @page { size: A4; margin: 16mm 14mm; }
  body.mw-body { background: #fff; color: #000; font-size: 11pt; }
  .mw-header, .mw-statusbar, .mw-to-top, .mw-menu-btn, .mw-mobile-nav,
  .mw-controls, .mw-cal-filters, .mw-lang, .mw-nav, .mw-digest-inline,
  .mc-view, .mc-spark, .cm-panel, .chart-modal, .mw-drawer,
  .mw-hero-actions, .mw-source-pop, .art-read, .cal-action, .mw-sub-form,
  .mw-hero-geo, .art-geo { display: none !important; }
  .mw-section { border: none; padding: 8pt 0; break-inside: avoid; }
  .mw-market-card, .mw-rank-card, .mw-commodity, .mw-table-wrap, .mw-article,
  .mw-tl-body, .mw-kpi, .mw-ivc, .mw-cal-item, .mw-peg-plot, .mw-cds-chart {
    break-inside: avoid; box-shadow: none; border: 1px solid #999;
  }
  .mw-table thead { display: table-header-group; }
  .mw-print-only { display: block !important; }
  .mw-print-cover { text-align: center; padding-top: 20mm; break-after: page; }
  .mw-print-cover h1 { font-size: 24pt; }
  .mw-print-summary { break-after: page; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; word-break: break-all; }
  .src-badge, .conf-badge, .status-badge { border: 1px solid #999; }
}
.mw-print-only { display: none; }
