/* Interactive anime.js story layer for pdviz2 test build. Keeps existing data/chart code intact. */
:root {
  --story-glass: rgba(6, 21, 33, .68);
  --story-border: rgba(255,255,255,.16);
  --story-hot: #5de3ff;
  --story-warm: #ffb547;
  --story-deep: #061521;
}

body {
  background:
    radial-gradient(circle at 14% 8%, rgba(93, 227, 255, .18), transparent 24rem),
    radial-gradient(circle at 86% 18%, rgba(255, 181, 71, .12), transparent 22rem),
    linear-gradient(180deg, #061521 0%, #071827 45%, #031018 100%);
}

.topbar.site-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(3, 12, 19, .72);
  border-bottom: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.story-progress {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  z-index: 130;
  background: rgba(255,255,255,.06);
}

.story-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--story-hot), var(--story-warm));
  box-shadow: 0 0 20px rgba(93,227,255,.75);
}

.ambient-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.orb {
  position: absolute;
  display: block;
  width: 16rem;
  height: 16rem;
  border-radius: 999px;
  filter: blur(38px);
  opacity: .28;
  transform: translate3d(0,0,0);
}

.orb-one { left: 8%; top: 18%; background: rgba(93,227,255,.48); }
.orb-two { right: 8%; top: 36%; background: rgba(55,201,139,.34); }
.orb-three { left: 38%; bottom: 4%; background: rgba(255,181,71,.28); }

.story-dock {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 70;
  display: grid;
  gap: 8px;
  width: 158px;
}

.story-dock a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 999px;
  color: rgba(238,248,255,.72);
  text-decoration: none;
  background: rgba(6, 21, 33, .46);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 800;
  transition: transform .22s ease, border-color .22s ease, color .22s ease, background .22s ease;
}

.story-dock a span {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #052132;
  background: rgba(93,227,255,.78);
  font-size: 10px;
}

.story-dock a:hover,
.story-dock a.is-active {
  transform: translateX(-6px);
  color: #fff;
  border-color: rgba(93,227,255,.58);
  background: rgba(12, 45, 67, .82);
}

.hero.interactive-scene {
  min-height: calc(100vh - 78px);
  isolation: isolate;
}

.hero-grid,
.section,
.footer {
  position: relative;
  z-index: 2;
}

.hero-grid {
  min-height: calc(100vh - 120px);
}

.hero-copy h1 {
  text-wrap: balance;
  filter: drop-shadow(0 18px 48px rgba(0,0,0,.25));
}

.hero-actions {
  margin-top: 28px;
}

.story-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -.01em;
  border: 1px solid rgba(255,255,255,.18);
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.story-button.primary {
  background: linear-gradient(135deg, var(--story-hot), #80f2ff);
  color: #052132;
  box-shadow: 0 18px 42px rgba(93,227,255,.22);
}

.story-button.ghost {
  background: rgba(255,255,255,.08);
  color: #eef8ff;
}

.story-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0,0,0,.22);
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: rgba(238,248,255,.72);
  font-weight: 800;
  font-size: 13px;
}

.scroll-cue span {
  width: 22px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  position: relative;
}

.scroll-cue span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--story-hot);
  animation: scrollDot 1.7s ease-in-out infinite;
}

@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

.interactive-scene {
  overflow: clip;
}

.interactive-scene::before {
  content: "";
  position: absolute;
  inset: 10px clamp(8px, 2vw, 28px);
  border-radius: clamp(24px, 4vw, 46px);
  border: 1px solid rgba(255,255,255,.05);
  pointer-events: none;
  opacity: .65;
}

.section.interactive-scene {
  padding-top: clamp(76px, 9vw, 128px);
  padding-bottom: clamp(76px, 9vw, 128px);
}

.dashboard-section.interactive-scene::before,
.household-budget-section.interactive-scene::before {
  border-color: rgba(20,48,66,.08);
}

.kpi-card,
.chart-card,
.lens-card,
.real-life-card,
.household-cost-card,
.pressure-card,
.scenario-card,
.opening-story-card,
.insight-card,
.final-takeaway-card,
.ocean-card,
.map-card,
.country-lens-profile-card,
.country-chain-card,
.budget-pathway-card,
.budget-family-card,
.budget-action-card {
  will-change: transform, opacity;
}

.kpi-card,
.lens-card,
.real-life-card,
.household-cost-card,
.chart-card {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, filter .22s ease;
}

.kpi-card:hover,
.lens-card:hover,
.real-life-card:hover,
.household-cost-card:hover,
.chart-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 62px rgba(12,45,67,.20);
}

.chain-flow {
  perspective: 900px;
}

.chain-step {
  transform-style: preserve-3d;
}

.chain-step.is-current {
  outline: 2px solid rgba(93,227,255,.7);
  box-shadow: 0 0 0 8px rgba(93,227,255,.09), 0 16px 36px rgba(0,0,0,.2);
}

.chain-arrow.is-current {
  color: var(--story-hot);
  text-shadow: 0 0 18px rgba(93,227,255,.85);
}

.map-card,
.ocean-card,
.opening-story-card,
.scenario-card,
.household-budget-card,
.country-lens-profile-card,
.country-chain-card,
.final-takeaway-card {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.chart-focus-rail {
  position: sticky;
  top: 92px;
  z-index: 20;
  background: rgba(243,248,251,.82);
  border: 1px solid rgba(20,48,66,.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.interactive-hint {
  display: inline-flex;
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(57,189,248,.12);
  color: #28647e !important;
  font-weight: 900;
  font-size: 13px;
}

body.chart-focus-open {
  overflow: hidden;
}

.chart-card.is-expanded {
  position: fixed;
  z-index: 160;
  inset: 72px clamp(14px, 5vw, 70px) 28px;
  min-height: auto;
  overflow: auto;
  border-color: rgba(93,227,255,.62);
  box-shadow: 0 36px 110px rgba(0,0,0,.44);
  transform: none !important;
}

.chart-card.is-expanded canvas {
  max-height: min(58vh, 560px);
}

.chart-focus-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(1, 9, 14, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.chart-card::after {
  content: "Click to focus";
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: rgba(40,100,126,.62);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.chart-card {
  position: relative;
  cursor: zoom-in;
}

.chart-card:hover::after {
  opacity: 1;
}

.chart-card.is-expanded {
  cursor: zoom-out;
}

.chart-card.is-expanded::after {
  content: "Press Esc or click outside to close";
  opacity: 1;
}

.country-lens-pill,
.country-menu-option,
.focus-step {
  transition: transform .18s ease, box-shadow .18s ease;
}

.country-lens-pill:hover,
.country-menu-option:hover,
.focus-step:hover {
  transform: translateY(-2px);
}

.real-life-grid,
.country-evidence-grid,
.chart-grid,
.kpi-grid,
.household-cost-grid {
  perspective: 1200px;
}

.final-takeaway-section {
  min-height: 90vh;
  display: grid;
  align-items: center;
}

@media (max-width: 1180px) {
  .story-dock { display: none; }
}

@media (max-width: 1100px) {
  .evidence-counter-tile {
    min-height: 132px;
  }
}

@media (max-width: 760px) {
  .story-progress { height: 3px; }
  .ambient-orbs { display: none; }
  .hero.interactive-scene { min-height: auto; }
  .hero-grid { min-height: auto; }
  .section.interactive-scene { padding-top: 64px; padding-bottom: 64px; }
  .chart-focus-rail { position: relative; top: auto; }
  .chart-card.is-expanded { inset: 64px 10px 14px; }
  .interactive-hint { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
  .ambient-orbs { display: none; }
}

/* pdviz2 refinement v2: keep the cool layer, but remove layout obstruction. */
:root {
  --story-topbar-height: 72px;
}

html {
  scroll-padding-top: calc(var(--story-topbar-height) + 18px);
}

/* The floating rail was covering chart and country-lens content. Keep it as compact step dots only. */
.story-dock {
  right: 10px;
  width: 46px;
  gap: 7px;
  pointer-events: none;
}

.story-dock a {
  width: 42px;
  min-height: 42px;
  padding: 0;
  justify-content: center;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  pointer-events: auto;
  background: rgba(6, 21, 33, .34);
}

.story-dock a span {
  min-width: 28px;
  height: 28px;
  font-size: 10px;
}

.story-dock a:hover,
.story-dock a.is-active {
  transform: translateX(-3px);
}

.story-dock a::after {
  content: attr(aria-label);
}

@media (max-width: 1500px) {
  .story-dock { display: none; }
}

/* Reduce the oversized scrollytelling gaps seen between sections. */
.section.interactive-scene {
  padding-top: clamp(58px, 6vw, 92px);
  padding-bottom: clamp(58px, 6vw, 92px);
}

.map-lens-transition.section.interactive-scene {
  padding-top: clamp(42px, 4vw, 68px);
  padding-bottom: clamp(42px, 4vw, 68px);
}

.map-section.section.interactive-scene {
  padding-bottom: clamp(48px, 5vw, 76px);
}

/* Do not clip fixed overlays or animated content. This fixes the graph focus issue. */
.interactive-scene {
  overflow: visible;
}

/* Hero chain: show all five steps clearly in one readable pathway on desktop. */
@media (min-width: 1181px) {
  body .hero .hero-panel .ocean-card.chain-card,
  body .hero .hero-panel .chain-card,
  body .hero .hero-grid .ocean-card.chain-card {
    width: min(100%, 980px) !important;
    max-width: 100% !important;
    min-width: 720px !important;
    min-height: 460px !important;
  }

  body .hero .hero-panel .ocean-card.chain-card .chain-card-title,
  body .hero .hero-panel .chain-card .chain-card-title {
    width: min(76%, 720px) !important;
    max-width: 76% !important;
    margin: clamp(30px, 3vw, 46px) 0 clamp(22px, 2.2vw, 34px) !important;
  }

  body .hero .hero-panel .chain-flow,
  .hero .chain-flow {
    display: grid !important;
    grid-template-columns: minmax(92px, 1fr) 22px minmax(92px, 1fr) 22px minmax(92px, 1fr) 22px minmax(92px, 1fr) 22px minmax(110px, 1.1fr) !important;
    gap: 8px !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  body .hero .hero-panel .chain-step,
  body .hero .hero-panel .chain-step.cost,
  .hero .chain-flow .chain-step.cost {
    grid-column: auto !important;
    min-height: 74px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  body .hero .hero-panel .chain-arrow,
  .hero .chain-arrow {
    display: grid !important;
    place-items: center !important;
    min-height: 74px !important;
  }
}

/* Chart focus overlay. The active card is moved to body by JS, so it is never trapped under the backdrop. */
body.chart-focus-open {
  overflow: hidden;
}

.chart-focus-placeholder {
  min-height: 430px;
  border-radius: 24px;
  border: 2px dashed rgba(40,100,126,.22);
  background: rgba(255,255,255,.38);
}

body > .chart-card.is-expanded {
  position: fixed !important;
  z-index: 240 !important;
  inset: 86px clamp(18px, 5vw, 86px) 30px !important;
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  max-height: calc(100vh - 116px) !important;
  overflow: auto !important;
  cursor: zoom-out;
  border-color: rgba(93,227,255,.72) !important;
  box-shadow: 0 36px 110px rgba(0,0,0,.48) !important;
  transform: none !important;
}

body > .chart-card.is-expanded canvas {
  height: min(58vh, 560px) !important;
  max-height: min(58vh, 560px) !important;
}

.chart-focus-backdrop {
  z-index: 220;
  background: rgba(1, 9, 14, .62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body.chart-focus-open .topbar.site-nav {
  z-index: 260;
}

@media (max-width: 760px) {
  .section.interactive-scene { padding-top: 54px; padding-bottom: 54px; }
  body > .chart-card.is-expanded {
    inset: 72px 10px 14px !important;
    max-height: calc(100vh - 86px) !important;
  }
  body > .chart-card.is-expanded canvas {
    height: 50vh !important;
    max-height: 50vh !important;
  }
}


/* pdviz2 refinement v3: remove the floating chapter dots. They looked good in isolation,
   but in the full page they repeated beside every section and distracted from the evidence. */
.story-dock { display: none !important; }

.top-nav a.is-active,
.top-nav a:hover {
  border-color: rgba(93,227,255,.58);
  background: rgba(12,45,67,.84);
  color: #fff;
}

/* Keep full-page screenshots and long scroll reading cleaner. */
.section.interactive-scene + .section.interactive-scene {
  border-top: 1px solid rgba(255,255,255,.04);
}

/* Focused charts should sit clearly above the page without feeling like a broken blur state. */
.chart-focus-backdrop {
  background: rgba(1, 9, 14, .56) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

.chart-card.is-expanded {
  background: #fff !important;
  z-index: 220 !important;
}

.chart-focus-backdrop {
  z-index: 210 !important;
}

@media (min-width: 1181px) {
  .top-nav a {
    white-space: nowrap;
  }
}


/* pdviz2 refinement v4: restore right-side story rail as compact dots that expand only on hover/focus. */
.story-dock {
  position: fixed !important;
  right: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 95 !important;
  display: grid !important;
  gap: 8px !important;
  width: 46px !important;
  pointer-events: none !important;
}

.story-dock a {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  padding: 6px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  color: rgba(238,248,255,.92) !important;
  text-decoration: none !important;
  background: rgba(6, 21, 33, .58) !important;
  border: 1px solid rgba(93,227,255,.38) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.18) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  pointer-events: auto !important;
  transition: width .24s ease, max-width .24s ease, transform .24s ease, background .24s ease, border-color .24s ease, box-shadow .24s ease !important;
}

.story-dock a span {
  flex: 0 0 28px !important;
  display: grid !important;
  place-items: center !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 50% !important;
  color: #052132 !important;
  background: rgba(93,227,255,.86) !important;
  font-size: 10px !important;
  font-weight: 950 !important;
  letter-spacing: .02em !important;
}

.story-dock a strong {
  display: inline-block !important;
  opacity: 0 !important;
  transform: translateX(-8px) !important;
  transition: opacity .18s ease .06s, transform .18s ease .06s !important;
}

.story-dock a::after { content: none !important; }

.story-dock a:hover,
.story-dock a:focus-visible,
.story-dock a.is-active {
  width: 148px !important;
  max-width: 148px !important;
  transform: translateX(-102px) !important;
  color: #fff !important;
  border-color: rgba(93,227,255,.75) !important;
  background: rgba(12,45,67,.88) !important;
  box-shadow: 0 18px 42px rgba(0,0,0,.28), 0 0 22px rgba(93,227,255,.18) !important;
}

.story-dock a:hover strong,
.story-dock a:focus-visible strong,
.story-dock a.is-active strong {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* Keep the rail useful but out of the way on smaller screens. */
@media (max-width: 1180px) {
  .story-dock { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .story-dock a,
  .story-dock a strong { transition: none !important; }
}

/* pdviz2 refinement v5: active rail item should highlight but collapse unless hovered/focused. */
.story-dock a.is-active:not(:hover):not(:focus-visible) {
  width: 42px !important;
  max-width: 42px !important;
  transform: translateX(0) !important;
  background: rgba(6, 21, 33, .66) !important;
  border-color: rgba(93,227,255,.78) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.18), 0 0 0 3px rgba(93,227,255,.08) !important;
}

.story-dock a.is-active:not(:hover):not(:focus-visible) strong {
  opacity: 0 !important;
  transform: translateX(-8px) !important;
}

.story-dock a.is-active:not(:hover):not(:focus-visible) span {
  background: rgba(93,227,255,.96) !important;
}

.story-dock a:hover,
.story-dock a:focus-visible {
  width: 148px !important;
  max-width: 148px !important;
  transform: translateX(-102px) !important;
}

.story-dock a:hover strong,
.story-dock a:focus-visible strong {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* pdviz2 refinement v6: mobile and tablet polish for the anime.js scrollytelling build. */
@media (max-width: 1180px) {
  body {
    overflow-x: hidden !important;
  }

  body > .topbar.site-nav {
    z-index: 100000 !important;
  }

  .section.interactive-scene {
    padding-top: clamp(44px, 7vw, 72px) !important;
    padding-bottom: clamp(44px, 7vw, 72px) !important;
  }

  .interactive-scene::before {
    inset: 8px 10px !important;
    border-radius: 26px !important;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding-left: clamp(16px, 4vw, 32px) !important;
    padding-right: clamp(16px, 4vw, 32px) !important;
  }

  .hero-copy h1 {
    font-size: clamp(44px, 9.8vw, 86px) !important;
    line-height: .94 !important;
    letter-spacing: -0.055em !important;
  }

  .hero-copy .subtitle,
  .hero-copy .hero-bridge {
    max-width: 760px !important;
  }

  .hero-panel {
    width: 100% !important;
  }

  .hero .ocean-card.chain-card,
  .hero .chain-card.animated-chain {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: clamp(20px, 4vw, 34px) !important;
  }

  .hero .chain-card-title {
    font-size: clamp(30px, 6vw, 54px) !important;
    line-height: 1 !important;
    max-width: 820px !important;
  }

  .hero .chain-flow {
    display: grid !important;
    grid-template-columns: 1fr 28px 1fr 28px 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .hero .chain-flow .chain-step {
    min-height: 82px !important;
    min-width: 0 !important;
  }

  .hero .chain-flow .chain-arrow {
    display: grid !important;
    place-items: center !important;
    min-height: 82px !important;
  }

  .hero .chain-flow .chain-step.food,
  .hero .chain-flow .chain-step.cost {
    grid-column: auto !important;
  }

  .map-section .story-layout,
  .story-layout {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .pacific-map-card.actual-map-panel,
  .actual-map-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 360px !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
  }

  .actual-map-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .map-country-dot,
  .island-point {
    width: clamp(28px, 4.3vw, 42px) !important;
    height: clamp(28px, 4.3vw, 42px) !important;
    font-size: clamp(10px, 1.5vw, 14px) !important;
  }

  .chart-grid,
  .country-evidence-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .chart-card,
  .chart-grid > .chart-card,
  .chart-grid > .chart-card.large,
  .chart-grid > .chart-card.large.full,
  .chart-grid > .chart-card.wide {
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 420px !important;
  }

  .chart-card canvas {
    min-height: 280px !important;
    max-height: 360px !important;
  }

  .chart-focus-rail {
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .chart-focus-rail > *,
  .evidence-tabs,
  .country-pressure-badges,
  .story-chain,
  .country-lens-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }

  .country-lens-intro,
  .country-lens-main-grid,
  .country-lens-detail-grid,
  .png-lens-grid,
  .country-signal-grid,
  .planning-grid,
  .final-takeaway-grid {
    grid-template-columns: 1fr !important;
  }

  .country-mini-chain,
  .final-takeaway-section .takeaway-chain,
  .takeaway-chain {
    grid-template-columns: 1fr !important;
    overflow-x: visible !important;
  }

  .country-mini-chain i,
  .takeaway-chain > i,
  .final-takeaway-section .takeaway-chain i {
    width: 2px !important;
    height: 24px !important;
    justify-self: center !important;
    transform: none !important;
  }

  .country-mini-chain i::after,
  .takeaway-chain > i::after,
  .final-takeaway-section .takeaway-chain i::after {
    content: "↓" !important;
    position: static !important;
    display: grid !important;
    place-items: center !important;
    width: 24px !important;
    height: 24px !important;
    margin-left: -11px !important;
    color: rgba(93,227,255,.95) !important;
    background: transparent !important;
    transform: none !important;
  }
}

@media (max-width: 760px) {
  :root {
    --story-topbar-height: 72px;
  }

  body {
    padding-top: var(--story-topbar-height) !important;
  }

  body > .topbar.site-nav {
    height: var(--story-topbar-height) !important;
    min-height: var(--story-topbar-height) !important;
    padding: 10px 14px !important;
  }

  .story-progress {
    top: 0 !important;
    z-index: 100003 !important;
  }

  .hero.interactive-scene {
    min-height: auto !important;
  }

  .hero-grid {
    padding-top: 18px !important;
    padding-bottom: 42px !important;
    gap: 20px !important;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 13.5vw, 64px) !important;
    line-height: .92 !important;
  }

  .hero-copy .subtitle {
    font-size: 17px !important;
    line-height: 1.45 !important;
  }

  .hero-copy .hero-bridge {
    font-size: 15px !important;
    line-height: 1.55 !important;
  }

  .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 20px !important;
  }

  .story-button {
    width: 100% !important;
    min-height: 44px !important;
  }

  .scroll-cue {
    margin-top: 16px !important;
  }

  .hero .chain-card-head,
  .takeaway-chain-title,
  .mini-chain-title {
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .hero .chain-flow {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .hero .chain-flow .chain-step {
    min-height: 64px !important;
  }

  .hero .chain-flow .chain-arrow {
    min-height: 20px !important;
    transform: rotate(90deg) !important;
  }

  .chain-bottom-row {
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .section-heading h2,
  .story-copy h2,
  .real-life-header h2,
  .insight-card h2,
  .opening-story-card h2,
  .final-takeaway-copy h2 {
    font-size: clamp(30px, 9.6vw, 48px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.04em !important;
  }

  .kpi-grid,
  .household-cost-grid,
  .real-life-grid,
  .png-lens-grid,
  .country-signal-grid,
  .planning-grid {
    grid-template-columns: 1fr !important;
  }

  .pacific-map-card.actual-map-panel,
  .actual-map-panel {
    min-height: 300px !important;
    aspect-ratio: 1.18 / 1 !important;
    border-radius: 22px !important;
  }

  .actual-map-image {
    object-position: center center !important;
  }

  .map-country-dot,
  .island-point {
    width: 28px !important;
    height: 28px !important;
    font-size: 9px !important;
    box-shadow: 0 8px 18px rgba(0,0,0,.28) !important;
  }

  .chart-card,
  .chart-grid > .chart-card,
  .chart-grid > .chart-card.large,
  .chart-grid > .chart-card.large.full,
  .chart-grid > .chart-card.wide {
    min-height: 380px !important;
    padding: 18px !important;
    cursor: default !important;
  }

  .chart-card canvas {
    min-height: 250px !important;
    max-height: 320px !important;
  }

  .chart-card::after,
  .interactive-hint {
    display: none !important;
  }

  .chart-focus-backdrop,
  .chart-focus-placeholder {
    display: none !important;
  }

  body > .chart-card.is-expanded,
  .chart-card.is-expanded {
    position: relative !important;
    inset: auto !important;
    z-index: auto !important;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: inherit !important;
  }

  .country-lens-tabs,
  .country-pressure-badges,
  .story-chain {
    padding-bottom: 8px !important;
  }

  .country-lens-pill,
  .story-chain span,
  .country-pressure-badges span,
  .focus-step,
  .chart-focus-rail a,
  .chart-focus-rail button {
    flex: 0 0 auto !important;
  }

  .country-lens-profile-card,
  .country-chain-card,
  .country-detail-card,
  .lens-card,
  .real-life-card,
  .opening-story-card,
  .insight-card,
  .final-takeaway-card,
  .takeaway-chain-card {
    border-radius: 22px !important;
  }

  .final-takeaway-section {
    min-height: auto !important;
  }
}

@media (max-width: 520px) {
  .hero-grid,
  .section,
  .map-section .story-layout,
  .final-takeaway-grid,
  .planning-grid {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  body > .topbar.site-nav .brand {
    font-size: 11px !important;
    letter-spacing: .07em !important;
  }

  .section.interactive-scene {
    padding-top: 42px !important;
    padding-bottom: 42px !important;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 14.5vw, 56px) !important;
  }

  .hero .ocean-card.chain-card,
  .hero .chain-card.animated-chain,
  .chart-card,
  .country-lens-profile-card,
  .country-chain-card,
  .opening-story-card,
  .insight-card,
  .takeaway-chain-card {
    padding: 16px !important;
  }

  .pacific-map-card.actual-map-panel,
  .actual-map-panel {
    min-height: 260px !important;
  }

  .chart-card canvas {
    min-height: 230px !important;
  }
}

/* v10 Svelte hero pressure-chain layout fix */
.svelte-hero-panel {
  align-self: stretch;
  display: flex;
  min-width: 0;
}

.svelte-pressure-chain-mount {
  width: 100%;
  min-width: 0;
  display: flex;
}

.svelte-pressure-chain-mount > .svelte-pressure-card {
  width: 100%;
}

.hero .svelte-pressure-card .chain-card-title {
  max-width: 900px !important;
}

@media (min-width: 1181px) {
  .hero-grid {
    grid-template-columns: minmax(430px, .82fr) minmax(620px, 1.18fr);
    align-items: center;
  }
}

@media (max-width: 1180px) {
  .svelte-hero-panel,
  .svelte-pressure-chain-mount {
    width: 100%;
  }
}


/* v10 Svelte hero cleanup: keep pressure field inside the hero card */
.hero,
.svelte-hero-panel,
.svelte-pressure-chain-mount {
  overflow: hidden;
}

.svelte-hero-panel {
  border-radius: 34px;
}

.svelte-pressure-chain-mount > .svelte-pressure-card {
  max-height: 100%;
}


/* v11 Svelte hero cleanup: center scroll cue and prevent legacy ocean-card line field from touching the Svelte component. */
.hero-wide-scroll-cue {
  grid-column: 1 / -1;
  justify-self: center;
  justify-content: center;
  margin: clamp(.4rem, 1.1vw, .75rem) auto 0;
  text-align: center;
}

.svelte-pressure-chain-mount .svelte-pressure-card::after,
.svelte-pressure-chain-mount .svelte-pressure-card::before,
.svelte-pressure-card.ocean-card::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 1180px) {
  .hero-wide-scroll-cue {
    margin-top: .85rem;
  }
}

/* v12 hero top-title safety: keep the hero eyebrow clear of the sticky top bar when returning to the page top. */
.hero.interactive-scene {
  scroll-margin-top: calc(var(--story-topbar-height) + 18px);
}

.hero-grid {
  padding-top: max(24px, clamp(24px, 3.2vw, 52px)) !important;
}

.hero-copy .eyebrow {
  display: block;
  margin-top: 0 !important;
  padding-top: 2px;
  line-height: 1.25;
}

@media (min-width: 1181px) {
  .hero-grid {
    min-height: calc(100vh - var(--story-topbar-height));
    align-content: center;
  }
}

@media (max-width: 760px) {
  .hero-grid {
    padding-top: 26px !important;
  }
}

/* v13 Evidence base signal scanner. Inspired by the timer panel feel, but uses data-signal pulses instead of timers. */
.kpi-section {
  position: relative;
  overflow: clip;
}

.evidence-signal-console {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: clamp(16px, 2vw, 28px);
  align-items: center;
  margin: clamp(18px, 2.4vw, 30px) 0 clamp(20px, 2.8vw, 34px);
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(93, 227, 255, .22);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 28%, rgba(93, 227, 255, .16), transparent 15rem),
    linear-gradient(135deg, rgba(11, 43, 62, .72), rgba(4, 18, 29, .78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 22px 62px rgba(0,0,0,.16);
  isolation: isolate;
}

.evidence-signal-console::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  background: linear-gradient(90deg, transparent, rgba(93,227,255,.11), transparent);
  transform: translateX(-70%);
  opacity: .75;
  pointer-events: none;
  z-index: -1;
}

.evidence-console-header {
  display: grid;
  gap: 6px;
}

.console-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(93,227,255,.13);
  border: 1px solid rgba(93,227,255,.25);
  color: #79edff;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 1000;
}

#evidenceConsoleLabel {
  color: #f3fbff;
  font-size: clamp(24px, 3vw, 42px);
  line-height: .95;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.evidence-wave {
  position: relative;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 14px);
  padding: 18px clamp(14px, 2vw, 24px);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(3, 14, 22, .42);
  border: 1px solid rgba(255,255,255,.08);
}

.evidence-wave::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, rgba(93,227,255,.12), rgba(93,227,255,.72), rgba(255,181,71,.55), rgba(93,227,255,.12));
  transform: translateY(-50%);
  box-shadow: 0 0 18px rgba(93,227,255,.36);
}

.evidence-wave span {
  position: relative;
  display: block;
  flex: 1 1 0;
  height: 18px;
  min-width: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(93,227,255,.9), rgba(93,227,255,.18));
  box-shadow: 0 0 22px rgba(93,227,255,.24);
  transform-origin: center;
}

.evidence-signal-steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.evidence-signal-steps span {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 999px;
  color: rgba(238,248,255,.78);
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  transition: color .22s ease, background .22s ease, border-color .22s ease, transform .22s ease;
}

.evidence-signal-steps span::before {
  content: "";
  position: absolute;
  left: 12px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(93,227,255,.35);
  box-shadow: 0 0 0 rgba(93,227,255,0);
}

.evidence-signal-steps span.is-active {
  color: #052132;
  background: linear-gradient(135deg, rgba(93,227,255,.95), rgba(255,226,139,.88));
  border-color: rgba(255,255,255,.54);
  transform: translateY(-2px);
}

.evidence-signal-steps span.is-active::before {
  background: #052132;
  box-shadow: 0 0 18px rgba(93,227,255,.95);
}

.evidence-kpi-grid .kpi-card {
  position: relative;
  overflow: hidden;
}

.evidence-kpi-grid .kpi-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(93,227,255,.16) 44%, rgba(255,255,255,.22) 50%, transparent 58%);
  transform: translateX(-120%);
  pointer-events: none;
}

.evidence-kpi-grid .kpi-card.is-signal-active {
  border-color: rgba(93,227,255,.7) !important;
  box-shadow: 0 18px 48px rgba(93,227,255,.18), inset 0 0 0 1px rgba(93,227,255,.18);
}

@media (max-width: 900px) {
  .evidence-signal-console {
    grid-template-columns: 1fr;
  }
  .evidence-signal-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .evidence-signal-steps span:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .evidence-signal-console {
    border-radius: 20px;
    padding: 14px;
  }
  .evidence-wave {
    min-height: 56px;
  }
  .evidence-signal-steps {
    grid-template-columns: 1fr;
  }
  .evidence-signal-steps span:last-child {
    grid-column: auto;
  }
}

.evidence-signal-console.is-scanning::before {
  animation: evidenceConsoleSweep 1.35s ease-in-out both;
}

.evidence-kpi-grid .kpi-card.is-signal-active::after {
  animation: evidenceKpiShine .95s ease both;
}

@keyframes evidenceConsoleSweep {
  0% { transform: translateX(-80%); opacity: 0; }
  18% { opacity: .85; }
  100% { transform: translateX(80%); opacity: 0; }
}

@keyframes evidenceKpiShine {
  0% { transform: translateX(-120%); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}


/* v17 Evidence counter scan. Smooth glowing globe marker and cleaner looping motion. */
.evidence-counter-console {
  display: block;
  overflow: hidden;
}

.evidence-counter-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.2vw, 18px);
  align-items: stretch;
  padding: clamp(18px, 1.7vw, 24px);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 50%, rgba(93, 227, 255, .16), transparent 12rem),
    linear-gradient(135deg, rgba(2, 16, 26, .72), rgba(4, 21, 33, .94));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  overflow: hidden;
}

.evidence-counter-track::before {
  content: none;
}

.evidence-counter-tile {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 152px;
  padding: clamp(14px, 1.5vw, 20px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  color: #eefaff;
  text-align: left;
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.evidence-counter-tile:hover,
.evidence-counter-tile:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(93,227,255,.58);
  outline: none;
}

.evidence-counter-tile .counter-index {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(93,227,255,.11);
  color: #8df2ff;
  font-weight: 1000;
  font-size: 12px;
}

.evidence-counter-tile strong {
  display: block;
  color: #f5fbff;
  font-size: clamp(32px, 3.4vw, 54px);
  line-height: .92;
  letter-spacing: -.055em;
  font-weight: 1000;
}

.evidence-counter-tile small {
  color: rgba(219, 240, 248, .76);
  font-weight: 900;
  line-height: 1.25;
}

.evidence-counter-tile.is-active {
  color: #062134;
  background: linear-gradient(135deg, rgba(93,227,255,.98), rgba(255,226,139,.9));
  border-color: rgba(255,255,255,.62);
  box-shadow: 0 20px 52px rgba(93,227,255,.2), 0 0 0 1px rgba(255,255,255,.2) inset;
}

.evidence-counter-tile.is-active .counter-index {
  background: rgba(5,31,48,.9);
  color: #77f2ff;
}

.evidence-counter-tile.is-active strong,
.evidence-counter-tile.is-active small {
  color: #062134;
}

.evidence-counter-tile.is-complete:not(.is-active) {
  border-color: rgba(93,227,255,.32);
  background: linear-gradient(145deg, rgba(93,227,255,.11), rgba(255,255,255,.035));
}

.evidence-counter-progress {
  position: relative;
  grid-column: 1 / -1;
  height: 32px;
  margin-top: 6px;
  pointer-events: none;
  z-index: 1;
}

.evidence-counter-progress::before {
  content: "";
  position: absolute;
  left: clamp(22px, 2.2vw, 30px);
  right: clamp(22px, 2.2vw, 30px);
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(93,227,255,.18), rgba(93,227,255,.42), rgba(255,218,128,.26));
  opacity: .78;
  box-shadow: 0 0 18px rgba(93,227,255,.22);
}

.evidence-counter-progress span {
  position: absolute;
  left: 0;
  top: 50%;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.95) 0 10%, rgba(146,246,255,.98) 12% 26%, rgba(46,177,230,.96) 27% 58%, rgba(3,48,93,.98) 59% 100%);
  box-shadow: 0 0 0 8px rgba(93,227,255,.08), 0 0 34px rgba(93,227,255,.66);
  transition: filter .2s ease;
  overflow: visible;
}

.evidence-counter-progress span::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 55%, rgba(185,244,255,.22) 56% 58%, transparent 59%),
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(219,249,255,.26) 5px 6px, transparent 6px 11px),
    repeating-linear-gradient(180deg, transparent 0 6px, rgba(219,249,255,.2) 6px 7px, transparent 7px 13px);
  opacity: .95;
  animation: evidenceGlobeSpin 2.2s linear infinite;
}

.evidence-counter-progress span::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgba(93,227,255,.42);
  animation: evidenceCounterPulse 1.1s ease-in-out infinite;
}

@keyframes evidenceGlobeSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes evidenceCounterPulse {
  0%, 100% {
    opacity: .38;
    transform: scale(.82);
  }
  50% {
    opacity: .9;
    transform: scale(1.08);
  }
}

@media (max-width: 760px) {
  .evidence-counter-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evidence-counter-tile {
    min-height: 112px;
  }
}

@media (max-width: 480px) {
  .evidence-counter-track {
    grid-template-columns: 1fr;
  }

  .evidence-counter-tile {
    min-height: 96px;
  }

  .evidence-counter-progress {
    height: 24px;
  }
}

