/* ═══ Assessment — region ═══════════════════════════════════════════
   Analysis regional profile, Analysis mobile, Region tab.

   Part 8 of 9 of what was one 3,418-line static/css/pages/assessment.css
   (audit C3). LOAD ORDER IS LOAD-BEARING -- for CSS the cascade IS the
   behaviour, so two rules of equal specificity are decided by which came
   last. templates/base.html links them in exactly this sequence:

     shell -> panels -> tree -> overview -> tabs -> routes -> mobile -> region -> demand

   Moving a rule between these files, or reordering the links, can change
   rendering even though nothing was edited. tests/test_css_split.py holds
   the order and the byte content.
   ═══════════════════════════════════════════════════════════════ */

/* ── Analysis 탭 · Regional Profile (redesign 2026-07-22) ───────────────
   spec: docs/AOI_PROFILE_SPEC.md. 3-column: outlets · seasonal · output.
   Report typography (sans, no mono small font); subtle elevation. */
.aoi-prof{
  --pf-accent:var(--acc); --pf-teal:var(--cat-lng); --pf-amber:var(--cat-oil); --pf-pink:var(--cat-pink);
  --pf-supply:var(--cat-db); --pf-demand:var(--cat-gas); --pf-inv:var(--cat-oil);
  --pf-good:var(--ok); --pf-warn:var(--warn); --pf-risk:var(--err);
  --pf-grid:color-mix(in srgb, var(--t2) 45%, transparent);
  --pf-tick:var(--t2);
  --pf-band:color-mix(in srgb, var(--cat-gas) 15%, transparent);
  --pf-inv-band:color-mix(in srgb, var(--cat-oil) 16%, transparent);
  --pf-peer:color-mix(in srgb, var(--t2) 70%, transparent);
  --pf-bdr:var(--bdr); --pf-t2:var(--t2);
  display:grid; grid-template-columns:minmax(0,2fr) minmax(0,8fr);
  gap:20px; align-items:stretch; font-size:var(--fs-sm); min-height:100%;
}
@media (max-width:1180px){ .aoi-prof{ grid-template-columns:1fr; } }
#aoiAnalysisContent{ height:100%; }
/* Analysis is a fit-to-screen dashboard (no scroll target) — trim the BOTTOM
   tab padding to give the charts more vertical room. Top padding stays at the
   shared --aoi-tab-pad so the content start line matches every other tab. */
#aoiAnalysisContent .aoi-econ-wrap{ padding-bottom:12px; }
.aoi-prof-col{ min-width:0; }
.aoi-prof-outlets{ border-right:1px solid var(--bdr); padding-right:var(--space-2xl); }
.aoi-prof .aoi-rpt-sec-title{ margin-bottom:14px; }
.aoi-prof-bullets{ list-style:none; margin:0 0 var(--space-2xl); padding:0; }
.aoi-prof-bullets li{ position:relative; padding:0 0 var(--space-md) var(--space-2xl); font-size:var(--fs-body); color:var(--t2); line-height:1.5; }
.aoi-prof-bullets li::before{ content:''; position:absolute; left:2px; top:7px; width:5px; height:5px; border-radius:50%; background:var(--acc); }
.aoi-prof-bullets b{ color:var(--t1); font-weight:600; }
.aoi-prof-refhead{ font-size:var(--fs-micro); font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--t2); border-top:1px solid var(--bdr); padding-top:var(--space-xl); margin:var(--space-xs) 0 var(--space-md); display:flex; justify-content:space-between; align-items:baseline; }
.aoi-prof-refhead span{ font-weight:400; text-transform:none; letter-spacing:0; }
.aoi-prof-ref-h{ font-size:var(--fs-micro); font-weight:600; color:var(--t2); margin:var(--space-xl) 0 3px; display:flex; justify-content:space-between; align-items:baseline; }
.aoi-prof-ref-h span{ font-size:var(--fs-micro); font-weight:400; color:var(--t2); }
.aoi-prof-status,.aoi-prof-empty{ color:var(--t2); padding:22px var(--space-md); font-size:var(--fs-caption); }
.aoi-prof-empty{ padding:var(--space-xl) var(--space-xs); }
.aoi-prof-h{ font-size:var(--fs-micro); font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--t2); margin:0 0 9px; }
/* outlet list */
.aoi-prof-orow{ background:color-mix(in srgb, var(--t2) 10%, transparent); border-radius:var(--radius); padding:var(--space-md) var(--space-lg); margin-bottom:7px;
  cursor:pointer; box-shadow:0 1px 2px rgba(20,28,40,.05);
  border:1px solid transparent; transition:border-color .12s,background .12s; }
.aoi-prof-orow:hover{ border-color:color-mix(in srgb,var(--t2) 60%,transparent); }
.aoi-prof-orow.sel{ border-color:var(--pf-accent); background:color-mix(in srgb,var(--pf-accent) 12%,transparent); }
.aoi-prof-orow.pin{ border-color:var(--pf-demand); }
.aoi-prof-orow-t{ display:flex; justify-content:space-between; align-items:center; gap:var(--space-sm); }
.aoi-prof-oname{ font-weight:600; }
.aoi-prof-pin{ display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px;
  flex:none; border:1px solid color-mix(in srgb,var(--t2) 60%,transparent); border-radius:var(--radius);
  background:var(--surface); color:var(--t2); cursor:pointer; padding:0; }
.aoi-prof-pin:hover{ color:var(--t0); }
.aoi-prof-pin.on{ background:var(--pf-demand); border-color:var(--pf-demand); color:#fff; }
.aoi-prof-ostat{ display:flex; gap:var(--space-xl); font-size:var(--fs-micro); color:var(--t2); margin-top:var(--space-xs); }
.aoi-prof-ostat b{ color:var(--t0); font-weight:600; }
/* redesigned outlet rail (single flex row: tick · name · basis) */
.aoi-prof-colh{ display:flex; justify-content:space-between; font-size:var(--fs-xs); text-transform:uppercase;
  letter-spacing:.05em; color:var(--t2); padding:0 var(--space-lg) var(--space-sm); }
.aoi-prof-orow{ display:flex; align-items:center; gap:9px; }
.aoi-prof-tick{ width:6px; height:6px; border-radius:50%; background:var(--pf-peer); flex:none; }
.aoi-prof-orow.sel .aoi-prof-tick{ background:var(--pf-accent); }
.aoi-prof-orow.ref .aoi-prof-tick{ background:transparent; border:1.5px solid var(--pf-tick); }
.aoi-prof-orow .aoi-prof-oname{ color:var(--t1); font-weight:500; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.aoi-prof-orow.sel .aoi-prof-oname{ color:var(--pf-accent); font-weight:600; }
.aoi-prof-bs{ font-size:var(--fs-micro); color:var(--t2); flex:none; font-variant-numeric:tabular-nums; }
/* captions, dividers, hover tooltip */
.aoi-prof-cap{ font-size:var(--fs-micro); color:var(--t2); line-height:1.4; margin:4px 0 0; }
.aoi-prof-cap b{ color:var(--t0); font-weight:600; }
.aoi-prof-hair{ height:1px; background:var(--bdr); border:0; margin:14px 0 10px; }
/* tooltip lives on document.body (outside .aoi-prof token scope) → self-contained hex colors,
   not var() tokens. Solid dark reads well over both light and dark pages. */
.aoi-prof-tip{ position:fixed; pointer-events:none; z-index:var(--z-toast); background:#222b38; color:#eef1f6;
  font-size:var(--fs-micro); font-weight:500; padding:7px var(--space-lg); border-radius:8px; opacity:0; transition:opacity .08s;
  white-space:nowrap; box-shadow:0 6px 20px rgba(0,0,0,.38); border:1px solid rgba(255,255,255,.12); }
.aoi-prof-tip b{ color:#7fb0ff; font-weight:600; }
.aoi-prof-tip .tt-t{ font-weight:600; color:#7fb0ff; padding-bottom:var(--space-xs); margin-bottom:var(--space-xs);
  border-bottom:1px solid rgba(255,255,255,.16); }
.aoi-prof-tip .tt-r{ display:flex; justify-content:space-between; gap:var(--space-2xl); line-height:1.55; }
.aoi-prof-tip .tt-r span{ color:rgba(238,241,246,.66); }
.aoi-prof-tip .tt-r b{ color:#eef1f6; font-weight:600; font-variant-numeric:tabular-nums; }
/* analysis area = hero (selected outlet headline) + 2-col charts */
/* Hero typography rides the report's fluid --rpt-* scale (not the fixed --fs-*
   tokens) so the KPI band + synthesis line shrink with the rest of the report
   on smaller / lower-res screens instead of staying oversized and pushing the
   charts below the fold. Vertical spacing is fluid for the same reason. */
.aoi-prof-analysis{ min-width:0; display:flex; flex-direction:column; gap:clamp(10px, 1.1vw, 22px); padding:0 24px; }
.aoi-prof-hero-top{ display:flex; justify-content:space-between; align-items:center; gap:var(--space-xl); margin-bottom:3px; }
.aoi-prof-hero-title{ display:flex; align-items:baseline; gap:11px; min-width:0; }
.aoi-prof-hero-name{ font-family:var(--font-sans); font-size:var(--rpt-sec); font-weight:600; letter-spacing:-.01em; color:var(--t1); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.aoi-prof-hero .aoi-prof-verdict{ display:inline-flex; align-items:center; flex:none; font-size:var(--fs-caption); font-weight:600; padding:5px var(--space-xl); border-radius:20px; white-space:nowrap; }
.aoi-prof-hero-body{ display:flex; align-items:center; gap:clamp(16px, 1.6vw, 26px); padding:clamp(8px, 0.6vw, 14px) 20px; border-radius:12px;
  background:color-mix(in srgb, color-mix(in srgb, var(--pf-accent) 32%, var(--t2)) 9%, transparent); }
.aoi-prof-stats{ display:flex; gap:clamp(16px, 1.6vw, 28px); flex:none; }
.aoi-prof-stat .l{ font-size:var(--fs-xs); text-transform:uppercase; letter-spacing:.06em; color:var(--t2); margin-bottom:2px; }
.aoi-prof-stat .v{ font-size:clamp(16px, 0.45vw + 5px, 21px); line-height:1.1; font-weight:600; color:var(--t1); letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
.aoi-prof-stat .sub{ font-size:var(--fs-micro); color:var(--t2); margin-top:1px; font-variant-numeric:tabular-nums; }
.aoi-prof-synth{ flex:1; min-width:0; display:flex; align-items:center; min-height:clamp(30px, 2.2vw, 44px); padding-left:26px; border-left:1px solid color-mix(in srgb, var(--t2) 32%, transparent); font-size:var(--rpt-lg); font-weight:500; line-height:1.45; color:var(--pf-accent); }
.aoi-prof-charts{ display:grid; grid-template-columns:1fr 1fr; gap:0; min-width:0; }
@media (max-width:1180px){ .aoi-prof-charts{ grid-template-columns:1fr; } .aoi-prof-chartcol{ padding:0 !important; border:0 !important; } }
.aoi-prof-chartcol{ min-width:0; padding:0 44px; }
.aoi-prof-chartcol:first-child{ padding-left:0; border-right:1px solid var(--bdr); }
.aoi-prof-chartcol:last-child{ padding-right:0; }
.aoi-prof-eyebrow{ font-size:var(--rpt-sec); font-weight:600; letter-spacing:-.005em; color:var(--emph-red);
  padding-bottom:6px; margin-bottom:8px; border-bottom:1px solid var(--bdr); }
.aoi-prof-charts .aoi-prof-ch-h{ font-size:var(--fs-base); font-weight:600; color:var(--t1); }
.aoi-prof-charts .aoi-prof-ch-h span{ font-size:var(--fs-micro); font-weight:400; }

/* Short-screen compact mode — on limited-height viewports (small laptops, low
   resolutions) squeeze the hero + inter-chart whitespace so the whole Analysis
   fits without scrolling, WITHOUT shrinking the charts (which are already small
   at those widths). Tall screens skip this and stay comfortable. */
@media (max-height: 820px){
  #aoiAnalysisContent .aoi-econ-wrap{ padding-bottom:6px; }   /* top stays = other tabs */
  .aoi-prof-analysis{ gap:6px; }
  .aoi-prof-hero-body{ padding-top:5px; padding-bottom:5px; }
  .aoi-prof-synth{ line-height:1.32; min-height:0; }
  .aoi-prof-hair{ margin:6px 0; }
  .aoi-prof-ch-h{ margin-top:3px; }
  .aoi-prof-eyebrow{ margin-bottom:6px; padding-bottom:5px; }
}

/* ── Analysis · mobile (≤900px, matches isMobileAoi) ────────────────
   Outlet rail → horizontal filter chips (no big "Outlet options" title);
   right below sits the selected-outlet header + period toggle. Hero then
   stacks KPI cards over the synthesis take, and the two chart groups sit
   one under the other (charts already collapse to 1 col ≤1200). */
@media (max-width:900px){
  .aoi-prof{ gap:14px; }
  /* outlet section = compact horizontal filter bar */
  .aoi-prof-outlets{ border-right:0; padding-right:0; }
  .aoi-prof-outlets .aoi-rpt-sec-title,
  .aoi-prof-outlets .aoi-prof-colh,
  .aoi-prof-outlets #pfResolved{ display:none; }
  #pfOutlets{ display:flex; gap:7px; overflow-x:auto; padding:1px 0 var(--space-sm);
    -webkit-overflow-scrolling:touch; scrollbar-width:none; }
  #pfOutlets::-webkit-scrollbar{ display:none; }
  /* compact filter chips — sized like the Overview operator picker, not big buttons */
  #pfOutlets .aoi-prof-orow{ flex:none; margin-bottom:0; padding:3px 9px; gap:5px; font-size:var(--fs-xs); }
  #pfOutlets .aoi-prof-oname{ flex:none; overflow:visible; white-space:nowrap; font-size:var(--fs-xs); }
  #pfOutlets .aoi-prof-tick{ width:5px; height:5px; }
  #pfOutlets .aoi-prof-bs{ font-size:var(--fs-2xs); }
  /* analysis column flush + tighter */
  .aoi-prof-analysis{ padding:0; gap:22px; }
  .aoi-prof-hero-top{ flex-wrap:wrap; row-gap:9px; margin-bottom:var(--space-2xs); }
  /* hub name and its verdict badge stack on two lines so neither is truncated */
  .aoi-prof-hero-title{ flex-direction:column; align-items:flex-start; gap:5px; flex:1 1 100%; min-width:0; }
  .aoi-prof-hero-name{ font-size:var(--fs-lg); white-space:normal; overflow:visible; text-overflow:clip; }
  .aoi-prof-hero .aoi-prof-verdict{ white-space:normal; max-width:100%; }
  /* KPI cards stacked above the synthesis take */
  .aoi-prof-hero-body{ flex-direction:column; align-items:stretch; gap:13px; padding:14px var(--space-2xl); }
  .aoi-prof-stats{ gap:var(--space-md); justify-content:space-between; }
  .aoi-prof-stat .v{ font-size:var(--fs-lg); }
  .aoi-prof-synth{ padding:13px 0 0; border-left:0; min-height:0; font-size:var(--fs-md);
    border-top:1px solid color-mix(in srgb, var(--t2) 32%, transparent); }
  /* the two chart groups stacked with breathing room */
  .aoi-prof-charts{ gap:26px; }
}
.aoi-prof-cmpbar{ display:flex; justify-content:space-between; align-items:center; gap:var(--space-md);
  margin-top:var(--space-2xs); font-size:var(--fs-micro); color:var(--t2); }
.aoi-prof-btn{ font:inherit; font-size:var(--fs-micro); font-weight:600; color:var(--t0);
  background:var(--surface); border:1px solid color-mix(in srgb,var(--t2) 60%,transparent);
  border-radius:var(--radius); padding:var(--space-xs) var(--space-md); cursor:pointer; }
.aoi-prof-btn:hover{ background:var(--bg1); }
.aoi-prof-note{ margin-top:var(--space-xl); font-size:var(--fs-micro); line-height:1.5; color:var(--t2); }

/* seasonal controls + charts */
.aoi-prof-tools{ display:flex; justify-content:space-between; gap:var(--space-md); flex-wrap:wrap; margin-bottom:var(--space-xl); }
.aoi-prof-seg{ display:inline-flex; background:var(--surface); border-radius:var(--radius); padding:var(--space-2xs); gap:var(--space-2xs); }
.aoi-prof-seg button{ font:inherit; font-size:var(--fs-micro); font-weight:600; color:var(--t2);
  background:transparent; border:0; padding:var(--space-xs) var(--space-md); border-radius:var(--radius); cursor:pointer; }
.aoi-prof-seg button.on{ background:var(--pf-accent); color:#fff; box-shadow:0 1px 2px rgba(20,28,40,.1); }
.aoi-prof-seg button:disabled{ opacity:.4; cursor:default; }
.aoi-prof-kstats{ display:flex; gap:9px; margin-bottom:var(--space-xl); }
.aoi-prof-kstats>div{ flex:1; background:var(--surface); border-radius:var(--radius); padding:var(--space-sm) var(--space-md); }
.aoi-prof-kstats .kl{ font-size:var(--fs-micro); color:var(--t2); }
.aoi-prof-kstats .kv{ font-size:var(--fs-lg); font-weight:600; margin-top:1px; }
.aoi-prof-ch-h{ font-size:var(--fs-caption); font-weight:600; color:var(--t0); margin:7px 0 var(--space-2xs);
  display:flex; justify-content:flex-start; align-items:baseline; gap:var(--space-md); }
.aoi-prof-ch-h span{ font-size:var(--fs-micro); font-weight:400; color:var(--t2); }
.aoi-prof-legend{ display:flex; gap:14px; font-size:var(--fs-micro); color:var(--t2); margin-top:5px; flex-wrap:wrap; }
.aoi-prof-legend span{ display:inline-flex; align-items:center; gap:5px; }
.aoi-prof-legend i{ width:10px; height:10px; border-radius:2px; display:inline-block; }

/* analysis output */
.aoi-prof-verdict{ display:flex; align-items:center; gap:7px; font-size:var(--fs-body); font-weight:600;
  padding:var(--space-md) var(--space-lg); border-radius:var(--radius); margin-bottom:13px; }
.aoi-prof-verdict.good{ background:color-mix(in srgb,var(--pf-good) 14%,transparent); color:var(--pf-good); }
.aoi-prof-verdict.warn{ background:color-mix(in srgb,var(--pf-warn) 15%,transparent); color:var(--pf-warn); }
.aoi-prof-verdict.risk{ background:color-mix(in srgb,var(--pf-risk) 14%,transparent); color:var(--pf-risk); }
.aoi-prof-block{ margin-bottom:14px; }
.aoi-prof-block .bh{ font-size:var(--fs-micro); font-weight:600; letter-spacing:.04em; text-transform:uppercase;
  color:var(--t2); margin-bottom:7px; display:flex; justify-content:space-between; align-items:baseline; }
.aoi-prof-block .bh span{ font-size:var(--fs-micro); font-weight:400; text-transform:none; letter-spacing:0; color:var(--t2); }
.aoi-prof-block .kvr{ display:flex; justify-content:space-between; align-items:baseline; gap:var(--space-md);
  padding:var(--space-xs) 0; border-bottom:1px solid color-mix(in srgb,var(--t2) 30%,transparent); font-size:var(--fs-body); color:var(--t2); }
.aoi-prof-block .kvr:last-child{ border-bottom:0; }
.aoi-prof-block .kvr b{ color:var(--t0); font-weight:600; }
.aoi-prof-hint{ font-size:var(--fs-micro); color:var(--t2); margin-top:var(--space-sm); line-height:1.4; }
.aoi-prof-meter{ margin:9px 0; }
.aoi-prof-meter .ml{ display:flex; justify-content:space-between; font-size:var(--fs-micro); color:var(--t2); margin-bottom:var(--space-xs); }
.aoi-prof-meter .ml span:last-child{ font-weight:600; color:var(--t0); }
.aoi-prof-meter .trk{ height:6px; background:var(--surface); border-radius:4px; overflow:hidden; }
.aoi-prof-meter .fil{ height:100%; border-radius:4px; }
.aoi-prof-pill{ font-size:var(--fs-xs); font-weight:600; padding:var(--space-2xs) var(--space-sm); border-radius:20px; margin-left:var(--space-2xs); }
.aoi-prof-pill.good{ background:color-mix(in srgb,var(--pf-good) 16%,transparent); color:var(--pf-good); }
.aoi-prof-pill.warn{ background:color-mix(in srgb,var(--pf-warn) 18%,transparent); color:var(--pf-warn); }
.aoi-prof-narr{ font-size:var(--fs-body); color:var(--t2); line-height:1.6; background:var(--surface);
  border-radius:var(--radius); padding:var(--space-lg) var(--space-xl); }
.aoi-prof-narr b{ color:var(--t0); font-weight:600; }

/* ── Region 탭 · 지역 스냅샷 (3단: 데이터 · 유출입 · 뉴스) ─────────────────
   Left = region data charts, Middle = gas flow/offtake (수요처·inflow),
   Right = news & events + 1~2줄 해석. Accent-bar first title only;
   report typography, subtle elevation, no hard borders. */
#aoiRegionContent{ height:100%; }              /* height chain: panel → .aoi-rgn */
.aoi-rgn{
  --rgn-supply:var(--cat-db); --rgn-storage:var(--cat-lng); --rgn-demand:var(--cat-gas);
  --rgn-grid:color-mix(in srgb, var(--t2) 45%, transparent); --rgn-tick:var(--t2);
  /* 0 = the visuals size themselves from their width; 1 = they fill the height the
     column gives them. Read by the JS that draws them, set by the desktop block
     further down — see the comment there. */
  --rgn-fill:0;
  display:flex; flex-direction:column; gap:var(--space-2xl); height:100%; min-height:0;
  padding:var(--aoi-tab-pad);
}
.aoi-rgn-titlesec .aoi-rpt-sec-title{ margin:0; }

/* Basin blurb — one line "Name | tagline" on a subtle accent-tinted panel
   (Analysis hero tone); text aligns with the title's "R" (past the 5px accent
   bar + gap), +10px below the title. */
.aoi-rgn-basin{ margin-top:2px;                       /* was -8px → +10px gap under the title */
  padding:var(--space-lg) var(--space-xl) var(--space-lg) calc(5px + var(--space-xl));
  border-radius:12px; line-height:1.55;
  background:color-mix(in srgb, color-mix(in srgb, var(--acc) 32%, var(--t2)) 9%, transparent); }
.aoi-rgn-basin-name{ font-size:var(--fs-md); font-weight:600; color:var(--t0); }
.aoi-rgn-basin-sep{ color:color-mix(in srgb, var(--t2) 55%, transparent); margin:0 var(--space-lg); font-weight:300; }
.aoi-rgn-basin-tag{ font-size:var(--fs-base); color:var(--t2); }

/* 3-column workspace: data · flow · news. Collapses to a single column.
   Body only (title + basin stay flush) gets the same L/R inset as the Analysis
   content column (.aoi-prof-analysis padding:0 24px). */
.aoi-rgn-grid, .aoi-rgn-status{ padding-left:24px; padding-right:24px; }
.aoi-rgn-grid{
  display:grid; align-items:stretch; flex:1 1 auto; min-height:0;
  /* row-gap stays tight (for the 2-row wrap ≤1180); column-gap is generous so the
     Region-data and Gas-flow columns read as clearly separate sections. The gap is a
     shared var so the News divider's padding-left can match it exactly — that keeps
     the vertical hairline centred in the channel (equal whitespace on both sides). */
  --rgn-colgap:clamp(28px, 3vw, 52px);
  /* Flow↔News channel is deliberately tighter than the Data↔Flow gap so the News
     column reads ~10% wider — the extra width is taken from this gap only (News is
     pulled left into it via a negative margin), leaving the other tracks/gap alone. */
  --rgn-news-gap:clamp(18px, 2vw, 34px);
  row-gap:var(--space-2xl); column-gap:var(--rgn-colgap);
  /* Region-data narrower, Gas-flow wider (~10% shifted from left → middle). */
  grid-template-columns:minmax(0,.95fr) minmax(0,1.1fr) minmax(0,.85fr);
}
@media (max-width:1180px){ .aoi-rgn-grid{ grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); } }
/* Mobile (matches isMobileAoi = 900px): the 3-col grid becomes a horizontal
   swipe carousel — Region data · Gas flow · News, one section per swipe — with
   the shared .rtc-dot pager below. Each section scrolls internally so the tall
   news feed doesn't stretch the shorter sections. */
@media (max-width:900px){
  /* Fill the viewport below the masthead + tab bar (only that height is fixed;
     the basin blurb + dots are auto-absorbed, so shrinking them just gives the
     sections more room). */
  .aoi-rgn{ height:calc(100dvh - 200px); padding-top:var(--space-md); gap:var(--space-lg); }
  .aoi-rgn-titlesec{ display:none; }             /* drop the "Region Snapshot" title on phones */
  /* Tighter basin blurb: smaller type, TIGHT leading (the wrapped tagline lines
     sit close), and a slimmer box. */
  .aoi-rgn-basin{ margin-top:0; margin-bottom:5px; padding:6px var(--space-lg); line-height:1.22; }
  .aoi-rgn-basin-name{ font-size:var(--fs-sm); line-height:1.22; }  /* ~2–3px smaller than desktop */
  .aoi-rgn-basin-tag { font-size:var(--fs-xs); line-height:1.22; }
  .aoi-rgn-status{ padding-left:0; padding-right:0; }

  /* The 3-col grid → a horizontal swipe carousel that flex-fills the remainder.
     margin-bottom lifts the section content off the dots (and, since the grid is
     flex:1, shrinks the visible article area by the same amount). */
  .aoi-rgn-grid{
    flex:1; min-height:0; height:auto; margin-bottom:14px;
    display:flex; flex-direction:row; gap:0;
    padding-left:0; padding-right:0;
    overflow-x:auto; scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain;
    scrollbar-width:none;
  }
  .aoi-rgn-grid::-webkit-scrollbar{ display:none; }
  .aoi-rgn-grid > .aoi-rgn-col{
    flex:0 0 100%; min-width:0; scroll-snap-align:start;
    height:100%; overflow-y:auto; padding:0 var(--space-md);
  }
  .aoi-rgn .aoi-rgn-dots{ display:flex; justify-content:center; gap:5px; padding:9px 0 8px; }  /* bottom pad lifts the dots clear of the edge */

  /* These override desktop base rules that sit LATER in the file, so they carry a
     .aoi-rgn prefix to win on specificity (not source order). */
  /* [1,2] chart subtitle → just the unit (drop the descriptive lead). */
  .aoi-rgn .aoi-rgn-unit-desc{ display:none; }
  /* [3,4] with the lead gone, keep title · unit · legend on ONE line. */
  .aoi-rgn .aoi-rgn-chart-h{ flex-wrap:nowrap; gap:var(--space-sm); }
  .aoi-rgn .aoi-rgn-leg{ flex-wrap:nowrap; gap:var(--space-sm); }
  .aoi-rgn .aoi-rgn-leg span{ white-space:nowrap; }
  /* [5,6,7] The real gap between a section title and its first content is the
     COLUMN's flex gap (var(--space-2xl) ≈ 16px), not the heading margin. Tighten
     that to 9px and zero the heading margins so the flex gap is the single, uniform
     spacer — "Region data" → Production ends up ~10px tighter. */
  .aoi-rgn .aoi-rgn-col{ gap:9px; }
  .aoi-rgn .aoi-rgn-colh,
  .aoi-rgn .aoi-rgn-datahead,
  .aoi-rgn .aoi-rgn-newshead{ margin-bottom:0; }
  .aoi-rgn .aoi-rgn-chart{ gap:3px; }
  .aoi-rgn .aoi-rgn-plot{ margin-top:2px; }
}
.aoi-rgn-col{ min-width:0; min-height:0; display:flex; flex-direction:column; gap:var(--space-2xl); }
/* Data/flow columns fit the row; scroll internally only if a short viewport clips
   them (the news feed below is the primary scroller). */
.aoi-rgn-data, .aoi-rgn-flow{ overflow-y:auto; }
/* News column divider: stretch the column to the full row height and draw the
   hairline as a ::before so it can be inset equally (var(--space-2xl)) top and
   bottom instead of ending at the news content — the line reads as a full-height
   channel rule. padding-left matches --rgn-colgap so the rule sits centred. */
.aoi-rgn-news{ position:relative; align-self:stretch; padding-left:var(--rgn-news-gap);
  margin-left:calc(var(--rgn-news-gap) - var(--rgn-colgap)); }
.aoi-rgn-news::before{ content:""; position:absolute; left:0; top:var(--space-2xl); bottom:var(--space-2xl);
  width:1px; background:var(--bdr); }
@media (max-width:1180px){
  .aoi-rgn-news{ align-self:auto; padding-left:0; margin-left:0; }
  .aoi-rgn-news::before{ display:none; }
}
/* Match the Analysis "Seasonality & volatility" heading (.aoi-prof-eyebrow)
   exactly — size, colour, and the hairline divider that gives each column a
   clear section break. */
.aoi-rgn-colh{ font-size:var(--rpt-sec); font-weight:600; letter-spacing:-.005em;
  color:var(--emph-red); margin:0 0 13px; padding-bottom:9px;
  border-bottom:1px solid var(--bdr); }
/* Region-data header row: title + the 1Y/3Y/5Y window picker share one line, and
   the section hairline moves to the row (colh loses its own so it isn't doubled). */
/* The window picker is pulled out of the header's height math (absolute) so the
   datahead box is exactly title-line + 9px — identical to the plain .aoi-rgn-colh
   in the other columns — keeping all three section hairlines on one line at every
   viewport width (the clamp()'d title would otherwise flip taller/shorter than the
   picker as the width changes). The picker is centred on the title line. */
.aoi-rgn-datahead{ position:relative; margin:0 0 13px; padding-bottom:9px; border-bottom:1px solid var(--bdr); }
.aoi-rgn-colh-plain{ margin:0; padding:0; border-bottom:0; }
/* .aoi-prof-seg's selected state uses --pf-accent, which is only defined inside
   .aoi-prof — supply it here so the reused control's "on" pill fills correctly. */
.aoi-rgn-datahead .aoi-prof-seg{ position:absolute; right:0; top:0; bottom:9px;
  align-items:center; flex:none; --pf-accent:var(--acc); }

/* Left · region-data charts (inline SVG). Title + unit mirror the Analysis
   charts (.aoi-prof-ch-h): bold title, unit inline in a lighter span. */
.aoi-rgn-chart{ display:flex; flex-direction:column; gap:var(--space-sm); }
.aoi-rgn-chart-h{ font-size:var(--fs-base); font-weight:600; color:var(--t1);
  display:flex; align-items:baseline; gap:var(--space-md); }
.aoi-rgn-chart-h .aoi-rgn-unit{ font-size:var(--fs-micro); font-weight:400; color:var(--t2); }
/* Production ↔ Rigs: the switch IS the title. The active view is the heading;
   the other sits beside it in the muted weight, so the control adds no box, no
   border and no second focal point to a card that already has a legend. */
.aoi-rgn-swap{ display:inline-flex; align-items:baseline; gap:var(--space-sm); }
.aoi-rgn-swap button{ font:inherit; font-size:inherit; font-weight:500; color:var(--t2);
  background:none; border:0; padding:0; cursor:pointer; letter-spacing:inherit; }
.aoi-rgn-swap button+button{ padding-left:var(--space-sm); border-left:1px solid var(--bdr); }
.aoi-rgn-swap button:hover{ color:var(--t1); }
.aoi-rgn-swap button.on{ color:var(--t1); font-weight:600; cursor:default; }
/* --focus-ring is a box-shadow value, not an outline one. */
.aoi-rgn-swap button:focus-visible{ outline:none; box-shadow:var(--focus-ring);
  border-radius:3px; }
.aoi-rgn-plot{ margin-top:var(--space-xs); }
/* per-chart legend, pushed to the header's right edge */
.aoi-rgn-leg{ margin-left:auto; display:flex; gap:var(--space-md); font-size:var(--rpt-s);
  font-weight:500; color:var(--t2); }
.aoi-rgn-leg span{ display:inline-flex; align-items:center; gap:5px; }
.aoi-rgn-leg i{ width:10px; height:3px; border-radius:2px; flex:none; }
.aoi-rgn-empty{ font-size:var(--rpt-b); color:var(--t2); padding:var(--space-2xl) var(--space-md); }
/* dashed placeholder (middle/right + left fallback) */
.aoi-rgn-ph{ display:flex; align-items:center; justify-content:center;
  border-radius:var(--radius); background:var(--surface);
  border:1px dashed color-mix(in srgb,var(--t2) 40%,transparent);
  font-size:var(--fs-caption); color:var(--t2); text-align:center; padding:var(--space-md); }
.aoi-rgn-data .aoi-rgn-ph{ min-height:132px; }

/* ── A TALLER WINDOW MAKES TALLER CHARTS, NOT A TALLER GAP ───────────────────
   Both charts and the flow map were sized from their WIDTH alone (a 175–220px
   band for Production, 105–140 for Storage, ~0.94×W for the map). The column
   they sit in stretches to the tab, so height went into empty space underneath
   them — conspicuous next to the news column, which has always stretched.

   DESKTOP ONLY, and --rgn-fill is the contract that says so: >1180px is where
   .aoi-rgn is height:100% and the grid is bounded, so there is a definite height
   to divide. The tablet stack (901–1180: .aoi-rgn height:auto) and the phone
   carousel are content-height, and the JS reads this property to keep the
   width-driven bands there (assessment-page.js: _rgnFills).

   flex-basis:0 + min-height:0 on the plots is what makes the measurement safe:
   each box's height is then purely layout-driven, so the SVG drawn INTO it can
   never feed back into its size. The chart min-heights are the old floors — a
   short window scrolls the column (overflow-y:auto above) rather than crushing
   the charts — and the 1.55:1 grow weights keep the ratio the fixed bands had. */
@media (min-width:1181px){
  .aoi-rgn{ --rgn-fill:1; }
  /* 5:5, WITH AIR BETWEEN THEM. The 1.55:1 split was carried over from the old
     fixed bands (220:140), where it was a consequence of the caps rather than a
     judgement; at full height it read as one chart and one strip. Production and
     Storage answer the same question about the same region and take the same room.
     The extra margin separates the two CHARTS only -- the column's own 16px gap
     still sets "Region data" off from the first one -- so the production x-axis
     labels no longer sit directly on the storage title. */
  .aoi-rgn-data .aoi-rgn-chart{ flex:1 1 0; min-height:150px; }
  .aoi-rgn-data .aoi-rgn-chart.storage{ margin-top:var(--space-2xl); }
  .aoi-rgn-data .aoi-rgn-plot{ flex:1 1 0; min-height:0; overflow:hidden; }
  /* THE MAP KEEPS A SHAPE; the charts are what absorb the height. Filling the
     column outright made a portrait map of a landscape subject — the crop widens
     with the frame, so a tall frame bought latitude nobody asked for and pushed
     the basin's egress fan into a narrow band. 6:4 is the frame the map was
     designed at. The mount is still the flex column (the legend and footer sit
     under the map, and the leftover height stays below them); the map itself is
     sized by its ratio, and CAN shrink if a short window leaves less than that.
     No inline height is written here -- see _flowDraw. */
  .aoi-rgn-flow .aoi-rgn-flowmount{ display:flex; flex-direction:column;
    flex:1 1 0; min-height:240px; }
  .aoi-rgn-flow .aoi-flowmap{ flex:0 1 auto; aspect-ratio:6/4; min-height:0; }
}

/* Middle · gas flow & offtake — cropped real-geography map + egress arrows (v2).
   SELF-THEMED: default tokens = app dark theme (body has no .light class);
   body.light overrides to light. Never inherits app surface tokens (--card is a
   fixed dark value here) — that once caused dark chips on a light page. */
.aoi-rgn-flow{                                   /* dark (app default) */
  --flow-sea:#0e141c; --flow-land:#1b2331; --flow-line:#2b3543; --flow-frame:#28313e;
  --flow-label:#54606f; --flow-node:#eef2f7; --flow-node-tx:#0d1116; --flow-node-ring:rgba(0,0,0,.55);
  --flow-chip-tx:#e9eff7; --flow-chip-mag:#8b95a4; --flow-muted:#8b95a4;
  --flow-halo:rgba(8,12,18,.92); --flow-stream:rgba(255,255,255,.9);
  --flow-shadow:rgba(0,0,0,.5); --flow-star:#e0a34a; }
body.light .aoi-rgn-flow{                        /* light */
  --flow-sea:#e9eef5; --flow-land:#f7f9fc; --flow-line:#dde4ec; --flow-frame:#e0e6ee;
  --flow-label:#b2bbc7; --flow-node:#1f2937; --flow-node-tx:#fff; --flow-node-ring:rgba(255,255,255,.92);
  --flow-chip-tx:#18202b; --flow-chip-mag:#727c8a; --flow-muted:#727c8a;
  --flow-halo:rgba(255,255,255,.95); --flow-stream:rgba(255,255,255,1);
  --flow-shadow:rgba(20,28,40,.16); --flow-star:#b95f27; }
.aoi-rgn-flow .aoi-rgn-ph{ min-height:196px; }
.aoi-flow-ph{ min-height:240px; }

.aoi-flowmap{ position:relative; width:100%; }
.aoi-flow-svg{ display:block; width:100%; height:100%; overflow:visible; }
.aoi-flow-sea{ fill:var(--flow-sea); }
.aoi-flow-land path{ fill:var(--flow-land); stroke:var(--flow-line); stroke-width:.7;
  stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.aoi-flow-slabel{ fill:var(--flow-label); font-size:8px; font-weight:600;
  letter-spacing:.2em; text-anchor:middle; pointer-events:none; }
.aoi-flow-frame{ fill:none; stroke:var(--flow-frame); stroke-width:1; }

/* --- arrows: tapered ribbon + detached chevron, soft bloom underneath --- */
.aoi-flow-bloom{ filter:blur(6px); opacity:.38; }
.aoi-flow-band, .aoi-flow-head{ shape-rendering:geometricPrecision; }
.aoi-flow-head{ filter:drop-shadow(0 1px 2px var(--flow-shadow)); }

/* --- motion: the whole arrow carries a travelling light sweep --- */
.aoi-flow-sheen{ pointer-events:none; mix-blend-mode:plus-lighter; }
body.light .aoi-flow-sheen{ mix-blend-mode:normal; opacity:.9; }
@media (prefers-reduced-motion: reduce){ .aoi-flow-sheen{ opacity:0; } }

.aoi-flow-pulse{ fill:none; stroke:var(--flow-node); stroke-width:1.1;
  transform-box:fill-box; transform-origin:center; animation:aoiFlowPing 3.2s ease-out infinite; }
@keyframes aoiFlowPing{ 0%{ transform:scale(.7); opacity:.5; } 65%,100%{ transform:scale(2.9); opacity:0; } }
@media (prefers-reduced-motion: reduce){ .aoi-flow-pulse{ animation:none; opacity:.25; } }
.aoi-flow-node{ fill:var(--flow-node); stroke:var(--flow-node-ring); stroke-width:1.4; }

/* --- labels: no pills. hairline rule + haloed type --- */
.aoi-flow-origin,.aoi-flow-chip{ position:absolute; transform:translate(-50%,-50%); }
.aoi-flow-origin{ z-index:3; white-space:nowrap; }
.aoi-flow-origin-n{ display:inline-block; transform:translateY(-17px);
  background:var(--flow-node); color:var(--flow-node-tx); font-size:9px; font-weight:700;
  text-transform:uppercase; letter-spacing:.07em; padding:2.5px 7px; border-radius:4px;
  box-shadow:0 2px 7px var(--flow-shadow); }
.aoi-flow-chip{ z-index:2; display:flex; flex-direction:column; gap:1px; }
.aoi-flow-chip.al{ align-items:flex-start; text-align:left; }
.aoi-flow-chip.ar{ align-items:flex-end; text-align:right; }
.aoi-flow-chip.ac{ align-items:center; text-align:center; }
.aoi-flow-chip-r{ width:15px; height:2px; border-radius:2px; opacity:.95; margin-bottom:2.5px; }
.aoi-flow-chip-l{ font-size:10px; font-weight:600; line-height:1.16; letter-spacing:-.008em;
  color:var(--flow-chip-tx); text-shadow:0 0 3px var(--flow-halo),0 0 7px var(--flow-halo),0 1px 2px var(--flow-halo); }
.aoi-flow-chip-m{ font-size:8.5px; font-weight:600; line-height:1.2; letter-spacing:.015em;
  font-variant-numeric:tabular-nums; color:var(--flow-chip-mag);
  text-shadow:0 0 3px var(--flow-halo),0 0 7px var(--flow-halo); }
.aoi-flow-chip-m i{ color:var(--flow-star); font-style:normal; }
.aoi-flow-local{ margin-top:8px; font-size:10px; line-height:1.45; color:var(--flow-muted); }

.aoi-flow-legend{ display:flex; flex-wrap:wrap; gap:5px 11px; margin-top:9px; }
.aoi-flow-legend span{ display:inline-flex; align-items:center; gap:5px; font-size:10px; color:var(--flow-muted); }
.aoi-flow-legend i{ width:7px; height:7px; border-radius:99px; flex:none; }
.aoi-flow-foot{ margin-top:5px; font-size:9.5px; color:var(--flow-muted); opacity:.85; }
.aoi-flow-foot i{ color:var(--flow-star); font-style:normal; }

/* Right · news pulse + feed */
.aoi-rgn-pulse{ background:color-mix(in srgb,var(--acc) 9%,transparent);
  border-radius:var(--radius); padding:var(--space-lg) var(--space-xl); }
.aoi-rgn-pulse-h{ font-size:var(--rpt-s); font-weight:600; letter-spacing:.05em;
  text-transform:uppercase; color:var(--acc); margin-bottom:var(--space-sm); }
.aoi-rgn-pulse-t{ font-size:var(--rpt-lg); color:var(--t1); line-height:1.55; }
/* The headline list scrolls WITHIN its own area (not the whole page), so the
   masthead/toggle stay put. overscroll-behavior:contain stops the scroll from
   chaining to the page at the ends. Unbounded on mobile (columns stack). */
.aoi-rgn-feed{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column;
  flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.aoi-rgn-feed::-webkit-scrollbar{ width:8px; }
.aoi-rgn-feed::-webkit-scrollbar-thumb{ background:var(--bdr); border-radius:4px; }
/* Tablet ONLY (901–1180px): columns stack, page scrolls normally (no bounded
   panel). Phones (≤900) get the swipe carousel instead — see the max-width:900
   block above — so this must NOT touch them. */
@media (min-width:901px) and (max-width:1180px){
  .aoi-rgn{ height:auto; }
  .aoi-rgn-grid{ flex:none; }
  .aoi-rgn-feed{ flex:none; overflow:visible; }
  .aoi-rgn-data, .aoi-rgn-flow{ overflow:visible; }
}
.aoi-rgn-item{ padding:var(--space-lg) 0; border-bottom:1px solid var(--bdr); }
.aoi-rgn-item:last-child{ border-bottom:0; }
.aoi-rgn-item-t{ font-size:var(--rpt-lg); font-weight:600; color:var(--t1); line-height:1.35; }
.aoi-rgn-item-m{ font-size:var(--rpt-s); color:var(--t2); margin-top:var(--space-2xs); display:flex; align-items:center; gap:var(--space-sm); }
/* Whole item is clickable → KEY-POINTS popover (feed) or the source (web). */
.aoi-rgn-item-click{ cursor:pointer; }
.aoi-rgn-item-click:hover .aoi-rgn-item-t{ color:var(--acc); }
.aoi-rgn-item-web{ font-size:var(--rpt-2xs,10px); color:var(--acc); text-transform:uppercase; letter-spacing:.04em;
  border:1px solid color-mix(in srgb,var(--acc) 40%,transparent); border-radius:4px; padding:0 5px; }
.aoi-rgn-item-empty{ color:var(--t2); font-weight:400; font-size:var(--rpt-b); }
/* News header: title + KO/EN toggle on one line, matching the Region-data head. */
.aoi-rgn-newshead{ display:flex; align-items:baseline; justify-content:space-between; gap:var(--space-md);
  margin:0 0 13px; padding-bottom:9px; border-bottom:1px solid var(--bdr); }
/* The AOI language switch uses the shared .lang-toggle (base.css: Barlow font,
   black active pill) like every other page. Here it just pins to the right end
   of the section tab bar. */
.aoi-sec-lang{ margin-left:auto; flex:none; }
/* The masthead language switch + the Region swipe dots are MOBILE-ONLY — on
   desktop the toggle lives in the tab bar and Region is a static 3-col grid. */
.aoi-mast-lang{ display:none; }
.aoi-rgn-dots{ display:none; }

/* News KEY-POINTS popover (Dashboard-style) — floats beside the clicked item. */
/* The popover lives on <body>, OUTSIDE the report's token scope, so it carries
   its OWN light/dark tokens (like the Dashboard's .art-pop) — otherwise --card/
   --t1/--rpt-* don't resolve here and it renders dark-in-light + oversized. */
.aoi-rgn-pop{
  --pop-bg:#1e222c; --pop-fg:#e9ecf3; --pop-muted:#8b93a7; --pop-rule:#2f3542; --pop-acc:#7db4ff;
  position:fixed; z-index:var(--z-popover); width:min(360px,88vw); display:none;
  background:var(--pop-bg); color:var(--pop-fg);
  border:1px solid var(--pop-rule); border-radius:8px;
  box-shadow:0 16px 42px rgba(0,0,0,.34); padding:13px 16px; }
body.light .aoi-rgn-pop{
  --pop-bg:#ffffff; --pop-fg:#1a1a1a; --pop-muted:#7a7a7a; --pop-rule:#e3e3e3; --pop-acc:#1d4e74;
  box-shadow:0 14px 40px rgba(20,28,40,.16); }
.aoi-rgn-pop.show{ display:block; }
.aoi-rgn-pop-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.aoi-rgn-pop-h{ font-family:var(--font-sans); font-size:11px; font-weight:700; letter-spacing:.08em; color:var(--pop-muted); }
.aoi-rgn-pop-act{ display:inline-flex; align-items:center; gap:6px; flex:none; }
.aoi-rgn-pop-open, .aoi-rgn-pop-x{ display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px;
  border:1px solid var(--pop-rule); border-radius:6px; background:none; color:var(--pop-muted); cursor:pointer; text-decoration:none; font-size:12px; }
.aoi-rgn-pop-open:hover, .aoi-rgn-pop-x:hover{ color:var(--pop-acc); border-color:var(--pop-acc); }
.aoi-rgn-pop-list{ list-style:disc; margin:0; padding-left:18px; display:flex; flex-direction:column; gap:7px; }
/* Same size as the summary/pulse (--rpt-lg), inlined because that token isn't in
   scope on the body-level popover. */
.aoi-rgn-pop-list li{ font-family:var(--font-sans); font-size:clamp(12.5px, 0.5vw + 3.2px, 16px); line-height:1.5; color:var(--pop-fg); }

.aoi-rgn-status{ font-size:var(--rpt-s); color:var(--t2); padding-top:var(--space-sm); }
