/* ===== TOKENS — Light & Dark via [data-theme] ===== */

:root, [data-theme="light"] {
  /* base */
  --bg:           #FBFAF7;
  --bg-2:         #F4F1EA;
  --bg-3:         #ECE7DB;
  --surface:      #FFFFFF;
  --ink:          #14110B;
  --ink-2:        #3A3326;
  --ink-3:        #6B5F4A;
  --ink-4:        #A39782;
  --rule:         #E0D8C5;
  --rule-soft:    #ECE6D6;

  /* accents — editorial, readable on cream */
  --olive:        #4F8A2E;
  --olive-deep:   #2F5C18;
  --olive-soft:   #8FC25E;
  --mustard:      #E29A1B;
  --mustard-soft: #F2BE5E;
  --terracotta:   #D26229;
  --terracotta-soft: #E89868;
  --umber:        #8E4A20;
  --plum:         #7B3A8C;
  --berry:        #A82A2A;
  --crimson:      #A82A2A;
  --crimson-soft: #C84545;
  --teal:         #167C7C;
  --teal-deep:    #0E5959;
  --sky:          #2D7AD9;
  --indigo:       #2E3D8C;
  --indigo-deep:  #1F2960;

  --accent:       var(--terracotta);
  --accent-deep:  #A04A1B;
  --signal:       var(--crimson);
  --signal-soft:  var(--terracotta-soft);
  --highlight:    var(--mustard);

  /* role for destinations — navy → gold → oxblood (editorial trio) */
  --c-peer:       var(--indigo);
  --c-up:         var(--mustard);
  --c-wish:       var(--crimson);

  /* choropleth stops — pale → deep */
  --map-c0: #C8D2E8;
  --map-c1: #5064A8;
  --map-c2: #B4645A;
  --map-c3: #D88232;
  --map-c4: #942626;

  --shadow-sm: 0 1px 2px rgba(20,17,11,.05);
  --shadow:    0 8px 28px rgba(20,17,11,.08);
  --shadow-lg: 0 20px 60px rgba(20,17,11,.12);

  --sans: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --serif: "Spectral", "Pretendard", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ===== Light palette options ===== */
[data-theme="light"][data-palette="forest"] {
  --c-peer: #4A6B3D;       /* moss green */
  --c-up:   #D8A52B;       /* mustard */
  --c-wish: #B5361F;       /* brick */
  --accent: #B5361F;
  --accent-deep: #8E2614;
  --highlight: #D8A52B;
  --map-c0: #D5DBC2;
  --map-c1: #6B8650;
  --map-c2: #B89947;
  --map-c3: #D87935;
  --map-c4: #9A2A18;
}
[data-theme="light"][data-palette="aubergine"] {
  --c-peer: #5B2A6B;       /* aubergine */
  --c-up:   #E76F5C;       /* coral */
  --c-wish: #B33044;       /* cherry */
  --accent: #E76F5C;
  --accent-deep: #B14A38;
  --highlight: #E76F5C;
  --map-c0: #E0D2E2;
  --map-c1: #7A4490;
  --map-c2: #B85A7A;
  --map-c3: #E76F5C;
  --map-c4: #B33044;
}
[data-theme="light"][data-palette="vintage"] {
  --c-peer: #1F2D5A;       /* deep ink blue */
  --c-up:   #C68522;       /* golden ochre */
  --c-wish: #C13027;       /* vermilion */
  --accent: #C13027;
  --accent-deep: #8E1F18;
  --highlight: #C68522;
  --map-c0: #C8CFDF;
  --map-c1: #3E508A;
  --map-c2: #B0744A;
  --map-c3: #C68522;
  --map-c4: #A82218;
}

[data-theme="dark"] {
  --bg:           #0E0E0C;
  --bg-2:         #16140F;
  --bg-3:         #1F1C16;
  --surface:      #161410;
  --ink:          #F4EFE2;
  --ink-2:        #D8D1BD;
  --ink-3:        #9F9684;
  --ink-4:        #6B6453;
  --rule:         #2D2920;
  --rule-soft:    #221F18;

  --olive:        #9DD46B;
  --olive-deep:   #7CC04E;
  --olive-soft:   #6EAA48;
  --mustard:      #FFC845;
  --mustard-soft: #FFD976;
  --terracotta:   #FF6F3C;
  --terracotta-soft: #FFA383;
  --umber:        #D08C5C;
  --plum:         #C58CD8;
  --berry:        #FF4A6E;
  --crimson:      #FF4A6E;
  --crimson-soft: #FF7B95;
  --teal:         #4FD9C5;
  --teal-deep:    #2BB5A0;
  --sky:          #6BA8FF;
  --indigo:       #8AA4FF;

  --accent:       var(--terracotta);
  --accent-deep:  #FF8054;
  --signal:       var(--crimson);
  --signal-soft:  var(--terracotta-soft);
  --highlight:    var(--mustard);

  --c-peer:       var(--mustard);
  --c-up:         var(--terracotta);
  --c-wish:       var(--crimson);

  /* choropleth — warm spectrum on dark */
  --map-c0: #3A2E1A;
  --map-c1: #FFC845;
  --map-c2: #FF9A4A;
  --map-c3: #FF6F3C;
  --map-c4: #FF4A6E;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 8px 28px rgba(0,0,0,.5);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.65);
}

/* ===== Reset & base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss03","ss02";
  transition: background .4s var(--ease-out), color .4s var(--ease-out);
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== Type utilities ===== */
.mono {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mono.s { font-size: 12px; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.serif.it { font-style: italic; }
.num { font-family: var(--mono); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--accent);
}

/* ===== Shell ===== */
.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.brand-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}
.brand .mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand .mark em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.brand .tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-3);
  border-left: 1px solid var(--rule);
  padding-left: 14px;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.steps { display: flex; align-items: center; gap: 14px; }
.step-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  cursor: default;
  user-select: none;
}
.step-pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rule);
  transition: all .4s var(--ease-out);
}
.step-pill.active { color: var(--ink); }
.step-pill.active .dot { background: var(--accent); transform: scale(1.4); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.step-pill.done { color: var(--ink-3); }
.step-pill.done .dot { background: var(--ink-3); }
.step-sep { width: 22px; height: 1px; background: var(--rule); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px;
  background: var(--surface);
  position: relative;
}
.theme-toggle button {
  width: 28px; height: 28px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  font-size: 14.5px;
  transition: background .25s, color .25s;
}
.theme-toggle button.on { background: var(--ink); color: var(--bg); }
.theme-toggle button:not(.on):hover { color: var(--ink); }
.brand-toggle { flex: 0 0 auto; }

.palette-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg);
}
.palette-picker .pal-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 5px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s var(--ease-out);
}
.palette-picker .pal-chip:hover {
  border-color: var(--rule);
  transform: translateY(-1px);
}
.palette-picker .pal-chip.on {
  border-color: var(--ink);
  background: var(--bg-2);
}
.palette-picker .pal-sw {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.18);
}
@media (max-width: 520px) {
  .palette-picker { display: none; }
}

.topbar .meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }

/* ===== Page transitions ===== */
.page { flex: 1; position: relative; }
.page-enter { animation: pageIn .55s var(--ease-out) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s var(--ease-out) both; }
@keyframes fadeUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0);} }
.stagger > * { opacity: 0; animation: fadeUp .55s var(--ease-out) forwards; }
.stagger > *:nth-child(1) { animation-delay: .04s; }
.stagger > *:nth-child(2) { animation-delay: .10s; }
.stagger > *:nth-child(3) { animation-delay: .16s; }
.stagger > *:nth-child(4) { animation-delay: .22s; }
.stagger > *:nth-child(5) { animation-delay: .28s; }
.stagger > *:nth-child(6) { animation-delay: .34s; }
.stagger > *:nth-child(7) { animation-delay: .40s; }
.stagger > *:nth-child(8) { animation-delay: .46s; }

/* ============================================================
   STEP 1 — REGION (map-first)
   ============================================================ */
.region {
  display: grid;
  grid-template-columns: 1fr;
  height: calc(100dvh - 71px);
  position: relative;
}
.region-stage {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  background: var(--bg);
}
.region-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: end;
  padding: 32px 44px 22px;
  border-bottom: 1px solid var(--rule);
}
.region-top-l .eyebrow { display: block; margin-bottom: 10px; }
.region-headline {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 8px;
}
.region-sub {
  font-size: 14.5px;
  color: var(--ink-3);
  line-height: 1.6;
  max-width: 60ch;
  margin: 0;
}
.topcard {
  border: 1px solid var(--rule);
  background: var(--bg);
  padding: 14px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.topcard.empty { align-items: flex-start; gap: 4px; padding: 18px 16px; }
.topcard-empty-k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); }
.topcard-empty-v { font-size: 14.5px; color: var(--ink-3); }
.topcard-head { display: flex; align-items: baseline; gap: 10px; }
.topcard-name { font-family: var(--serif); font-size: 22px; letter-spacing: -0.015em; color: var(--ink); }
.topcard-en { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); }
.topcard-row { display: grid; grid-template-columns: 80px 1fr; gap: 10px; align-items: baseline; font-size: 14px; }
.topcard-row .k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); }
.topcard-row .v { color: var(--ink-2); }
.topcard-row .v.num { font-family: var(--serif); font-size: 16px; color: var(--ink); }
.topcard-row .v .d { font-family: var(--mono); font-size: 12.5px; color: var(--terracotta); margin-left: 8px; }
.topcard-cta { margin-top: 6px; align-self: stretch; justify-content: center; }

.region-selection-zone {
  padding: 18px 44px 40px;
  border-top: 1px solid var(--rule);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, var(--bg-2)) 0%, var(--bg) 100%);
}
.region-selection-card {
  border: 1px solid var(--rule);
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  padding: 28px 30px;
  align-items: stretch;
}
.region-selection-empty {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 22px 24px;
  color: var(--ink-3);
  max-width: 720px;
}
.region-selection-empty p {
  margin: 8px 0 0;
  font-size: 15.5px;
  line-height: 1.6;
}
.region-selection-kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.region-selection-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.region-selection-name {
  font-family: var(--serif);
  font-size: 34px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.region-selection-en {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.region-selection-blurb {
  margin: 14px 0 0;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
}
.region-selection-metrics {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
  border-left: 1px solid var(--rule);
  padding-left: 28px;
}
.region-selection-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 15px;
}
.region-selection-row .k {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.region-selection-row .v {
  color: var(--ink-2);
  line-height: 1.6;
}
.region-selection-row .v.num {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.02em;
}
.region-selection-row .v .d {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--terracotta);
  margin-left: 8px;
}
.region-selection-cta {
  margin-top: 8px;
  justify-content: center;
  min-height: 52px;
}

.region-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  height: 100%;
  min-height: 0;
}
.region-grid.one { grid-template-columns: 1fr; }
.map-bottom-row {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 22px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  pointer-events: none;
}
.map-foot-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  background: var(--bg);
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  pointer-events: none;
}
.region-map-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 32px;
  background: var(--bg-2);
  overflow: hidden;
}
.region-map-wrap.big { padding: 16px 24px; }
.region-aside {
  border-left: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-height: 0;
  overflow-y: auto;
}
.aside-head { padding: 18px 22px 10px; }

.map-svg {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 71px - 160px);
  display: block;
  position: relative;
  z-index: 1;
}
.map-panzoom-shell {
  position: relative;
  width: 100%;
  touch-action: none;
  overscroll-behavior: contain;
}
.map-panzoom-target {
  width: 100%;
  transform-origin: center center;
  will-change: transform;
  transition: transform .18s var(--ease-out);
}
.map-panzoom-shell.zoomed .map-panzoom-target {
  transition-duration: .08s;
}
.map-zoom-reset {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* MAP shapes — choropleth + dim states */
.region-shape {
  fill: var(--bg-3);
  stroke: color-mix(in srgb, var(--ink) 14%, var(--bg));
  stroke-width: 0.95;
  stroke-linejoin: round;
  transition: fill .35s var(--ease-out), stroke .25s var(--ease-out), stroke-width .25s var(--ease-out), filter .35s var(--ease-out);
}
.region-shape.background {
  /* fill set inline by JS via choropleth */
  opacity: 0.56;
  stroke: color-mix(in srgb, var(--ink) 10%, var(--bg));
  stroke-width: 0.85;
}
.region-shape.background:hover {
  opacity: 0.78;
  stroke: color-mix(in srgb, var(--ink) 30%, var(--bg));
  stroke-width: 1.05;
}
[data-theme="dark"] .region-shape { stroke: color-mix(in srgb, var(--bg) 74%, #000); }
[data-theme="dark"] .region-shape.background { opacity: 0.42; stroke: color-mix(in srgb, var(--bg) 68%, #000); }
[data-theme="dark"] .region-shape.background:hover { opacity: 0.6; }

.region-shape.target {
  /* fill set inline by JS via choropleth */
  stroke: color-mix(in srgb, var(--ink) 18%, var(--bg));
  stroke-width: 0.95;
}
.region-shape.target.hover {
  stroke: color-mix(in srgb, var(--ink) 38%, var(--bg));
  stroke-width: 1.35;
  filter: drop-shadow(0 4px 10px rgba(20,17,11,.14));
}
.region-shape.target.selected {
  fill: var(--ink) !important;
  stroke: color-mix(in srgb, var(--bg) 88%, var(--ink));
  stroke-width: 1.85;
  filter: drop-shadow(0 10px 22px rgba(20,17,11,.22));
}
.region-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  fill: var(--ink-4);
  pointer-events: none;
  transition: fill .35s var(--ease-out), font-weight .35s var(--ease-out);
}
.region-label.target { fill: var(--ink-2); font-weight: 500; }
.region-label.selected { fill: var(--bg); }
.map-watermark {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: var(--ink-4);
}
.map-group {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  fill: var(--ink-4);
  pointer-events: none;
  opacity: 0.6;
}
.map-group.seoul { fill: var(--accent); opacity: 0.7; }

/* legend */
.map-legend {
  position: absolute;
  bottom: 22px; left: 28px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-bottom-row > .map-legend,
.map-bottom-row > .map-foot-hint {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  flex: 0 0 auto;
}
.map-bottom-row > .map-foot-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
}
.map-legend .lg-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.map-legend .lg-bar {
  display: flex;
  height: 8px;
  width: 180px;
  border: 1px solid var(--rule);
}
.map-legend .lg-bar > i {
  flex: 1;
  display: block;
}
.map-legend .lg-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
}

.map-detached-inset {
  position: absolute;
  left: 28px;
  top: 18px;
  width: 164px;
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  z-index: 4;
  padding: 12px 12px 10px;
  text-align: left;
}
.map-detached-inset.selected { box-shadow: 0 0 0 1px var(--ink), var(--shadow-sm); }
.map-detached-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.map-detached-name {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: -0.02em;
}
.map-detached-svg {
  width: 100%;
  display: block;
  aspect-ratio: 1.45 / 1;
  border: 1px dashed var(--rule);
  background: var(--bg);
  pointer-events: none;
}
.region-shape.detached {
  stroke: var(--rule);
  stroke-width: .7;
  pointer-events: auto;
}
.map-detached-copy {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-3);
}

/* hover floating card */
.map-tooltip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  min-width: 200px;
  transform: translate(-50%, calc(-100% - 14px));
  opacity: 0;
  transition: opacity .15s var(--ease-out);
}
.map-tooltip.on { opacity: 1; }
.map-tooltip .tt-name {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -0.015em;
}
.map-tooltip .tt-name em { font-style: italic; color: var(--accent); }
.map-tooltip .tt-row {
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 8px;
}
.map-tooltip .tt-row .v { color: var(--ink); font-weight: 500; }
.map-tooltip .tt-blurb {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.map-tooltip .tt-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 10px;
}
.map-tooltip .tt-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.map-tooltip.unavail .tt-status { color: var(--ink-4); }
.map-tooltip.unavail .tt-status::before { background: var(--ink-4); }

.region-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 20px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.region-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: padding-left .35s var(--ease-out), color .35s, background .25s;
}
.region-row .idx { font-family: var(--mono); font-size: 12px; color: var(--ink-4); }
.region-row .nm { font-family: var(--serif); font-size: 18px; letter-spacing: -0.01em; }
.region-row .meta { font-family: var(--mono); font-size: 12px; color: var(--ink-4); letter-spacing: 0.12em; text-transform: uppercase; }
.region-row:hover, .region-row.linked-hover { padding-left: 8px; }
.region-row:hover .nm, .region-row.linked-hover .nm { color: var(--accent); }
.region-row.selected .nm { color: var(--accent); font-style: italic; }
.region-row.selected .idx { color: var(--accent); }
.region-row.disabled { cursor: not-allowed; opacity: 0.45; }
.region-row.disabled:hover { padding-left: 0; }
.region-row.disabled:hover .nm { color: inherit; }

.region-cta {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  transition: background .25s, transform .25s var(--ease-out), opacity .25s;
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-primary[disabled], .btn-primary.disabled { background: var(--ink-4); cursor: not-allowed; opacity: .55; transform: none; }
.btn-primary .arr { font-family: var(--serif); font-size: 16px; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 0;
  transition: color .25s, gap .25s var(--ease-out);
}
.btn-ghost:hover { color: var(--ink); gap: 14px; }

.region-snapshot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  min-height: 220px;
}
.snap-name {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.02em;
}
.snap-name .em { font-style: italic; color: var(--accent); }
.snap-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  font-size: 14px;
  align-items: baseline;
}
.snap-row .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.snap-row .v { color: var(--ink-2); line-height: 1.55; }
.snap-row .v.num { color: var(--ink); }
.snap-empty {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-4);
  font-size: 16px;
  line-height: 1.5;
}

/* ============================================================
   STEP 2 — PERSONA
   ============================================================ */
.persona-page {
  padding: 56px 56px 96px;
  max-width: 1480px;
  margin: 0 auto;
}
.persona-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 28px;
  margin-bottom: 40px;
}
.persona-head h1 {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 24ch;
}
.persona-head h1 em { font-style: italic; color: var(--accent); }
.persona-head .ctx {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.persona-head .ctx .pin {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent);
  font-size: 12.5px;
}
.persona-head .ctx .pin::before {
  content:""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.persona-card {
  position: relative;
  padding: 26px 24px 24px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  background: var(--surface);
  text-align: left;
  transition: transform .35s var(--ease-out), background .35s var(--ease-out), box-shadow .35s var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
  overflow: hidden;
}
.persona-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0 solid var(--accent);
  pointer-events: none;
  transition: border-width .25s var(--ease-out);
}
.persona-card:hover {
  z-index: 2;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.persona-card.selected {
  background: var(--ink);
  color: var(--bg);
  z-index: 3;
}
.persona-card.selected::after { border-width: 0; }
.persona-card.selected .pc-name { color: var(--bg); }
.persona-card.selected .pc-line { color: var(--mustard); }
.persona-card.selected .pc-tag { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 25%, transparent); }
.persona-card.selected .pc-num { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.persona-card.selected .pc-quote { color: color-mix(in srgb, var(--bg) 80%, transparent); }
.persona-card.selected .pc-quote::before { background: var(--mustard); }
.persona-card.selected .pc-meter .seg { background: color-mix(in srgb, var(--bg) 25%, transparent); }
.persona-card.selected .pc-meter .seg.on { background: var(--mustard); }
.persona-card.selected .pc-meter .lab { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.persona-card.dim { opacity: 0.42; transform: scale(0.98); }
.persona-card.dim:hover { transform: scale(0.98) translateY(-2px); }

.persona-card .pc-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-4);
}
.persona-card .pc-portrait {
  width: 110px;
  height: 110px;
  position: relative;
  margin: 4px 0 8px;
}
.persona-card .pc-portrait svg { width: 100%; height: 100%; display: block; }
.persona-card .pc-portrait-emoji {
  width: 110px;
  height: 110px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 8px;
  position: relative;
  overflow: hidden;
}
.persona-card .pc-portrait-emoji::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 60%);
  pointer-events: none;
}
.persona-card .pc-portrait-emoji .glyph {
  font-size: 64px;
  line-height: 1;
  filter: saturate(1.05);
}

.persona-card .pc-name {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.15;
}
.persona-card .pc-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  line-height: 1.45;
}
.persona-card .pc-quote {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  position: relative;
  padding-left: 12px;
}
.persona-card .pc-quote::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 2px; background: var(--mustard);
}
.persona-card .pc-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.persona-card .pc-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 4px 9px;
}

/* desire meter at bottom */
.pc-meter {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
  display: flex;
  align-items: center;
  gap: 12px;
}
.pc-meter .lab {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex: 1;
}
.pc-meter .segs {
  display: flex; gap: 3px;
}
.pc-meter .seg {
  width: 16px; height: 6px;
  background: var(--rule);
  transition: background .3s var(--ease-out);
}
.pc-meter .seg.on { background: var(--accent); }
.persona-card .pc-check {
  position: absolute;
  top: 14px; right: 14px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  transition: all .3s var(--ease-out);
}
.persona-card.selected .pc-check {
  background: var(--mustard);
  border-color: var(--mustard);
}
.persona-card.selected .pc-check::after {
  content: "";
  width: 6px; height: 10px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translate(-1px,-1px);
}

.persona-foot {
  position: sticky;
  bottom: 0;
  margin: 48px -56px 0;
  padding: 20px 56px;
  background: linear-gradient(to top, var(--bg) 70%, color-mix(in srgb, var(--bg) 0%, transparent));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.persona-foot .selected-readout {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink-3);
}
.persona-foot .selected-readout em { font-style: italic; color: var(--accent); }
.persona-foot .selected-readout strong { font-weight: 500; color: var(--ink); }

/* ============================================================
   STEP 3 — REPORT
   ============================================================ */
.report {
  padding: 0 0 80px;
  max-width: 1480px;
  margin: 0 auto;
}
.report-masthead {
  padding: 44px 56px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: end;
  border-bottom: 1px solid var(--rule);
}
.report-masthead .vol {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.report-masthead h1 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.report-masthead h1 em { font-style: italic; color: var(--accent); }
.report-masthead .lede {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink-3);
  max-width: 56ch;
  line-height: 1.65;
}

.report-id {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: right;
}
.report-id .row { display: flex; align-items: center; gap: 10px; }
.report-id .pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--ink);
}
.report-id .pill .em { font-size: 15px; }
.report-id .pill .lab { font-family: var(--serif); font-style: italic; font-size: 14.5px; letter-spacing: 0; text-transform: none; color: var(--ink); }

.report-section { padding: 40px 56px 0; }
.report-section .section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.report-section h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.report-section h2 em { font-style: italic; color: var(--accent); }

/* ── Mini map showing 3 destinations ── */
.minimap-frame {
  margin-top: 8px;
  margin-bottom: 28px;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.minimap-panzoom-shell {
  position: relative;
  width: 100%;
  touch-action: none;
  overscroll-behavior: contain;
}
.minimap-panzoom-target {
  width: 100%;
  transform-origin: center center;
  will-change: transform;
  transition: transform .16s var(--ease-out);
}
.minimap-panzoom-shell.zoomed .minimap-panzoom-target {
  transition-duration: .08s;
}
.minimap-zoom-reset {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.minimap-frame svg { display: block; width: 100%; height: auto; }
.mm-shape { fill: var(--bg-3); stroke: var(--rule); stroke-width: 0.5; }
[data-theme="dark"] .mm-shape { stroke: #2A2620; fill: #181612; }
.mm-shape.origin { fill: var(--ink); }
.mm-line {
  stroke-width: 1.4;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 5 5;
  animation: dashflow 28s linear infinite;
}
.mm-line.peer { stroke: var(--c-peer); }
.mm-line.up   { stroke: var(--c-up); }
.mm-line.wish { stroke: var(--c-wish); }
@keyframes dashflow { to { stroke-dashoffset: -800; } }
.mm-dot { stroke-width: 2; cursor: pointer; transition: r .3s var(--ease-out), stroke-width .25s var(--ease-out); }
.mm-dot.peer { fill: var(--c-peer); stroke: var(--bg); }
.mm-dot.up   { fill: var(--c-up); stroke: var(--bg); }
.mm-dot.wish { fill: var(--c-wish); stroke: var(--bg); }
.mm-dot.active { stroke-width: 4; }
.mm-origin {
  fill: var(--ink);
  stroke: var(--bg);
  stroke-width: 3;
}
.mm-origin-ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  opacity: .35;
  animation: mmpulse 2.4s var(--ease-out) infinite;
}
@keyframes mmpulse { 0% { r: 8; opacity:.45 } 100% { r: 30; opacity:0 } }
.mm-label {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: -0.01em;
  text-transform: none;
  fill: var(--ink-2);
  stroke: color-mix(in srgb, var(--bg-2) 92%, white 8%);
  paint-order: stroke fill;
  stroke-linejoin: round;
  pointer-events: none;
}
.mm-label.origin { fill: var(--ink); font-weight: 700; font-size: 12.5px; }
.mm-label.active { fill: var(--ink); font-weight: 700; }

/* destinations row */
.dests {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.dest {
  position: relative;
  padding: 28px 28px 24px;
  border-right: 1px solid var(--rule);
  cursor: pointer;
  transition: background .35s var(--ease-out);
  display: flex; flex-direction: column; gap: 14px;
  min-height: 280px;
  text-align: left;
  background: var(--surface);
}
.dest:last-child { border-right: 0; }
.dest:hover { background: var(--bg-2); }
.dest.active { background: var(--ink); color: var(--bg); }
.dest.active .d-name { color: var(--bg); }
.dest.active .d-cat { color: var(--mustard); }
.dest.active .d-desc { color: color-mix(in srgb, var(--bg) 80%, transparent); }
.dest.active .d-score-num { color: var(--bg); }
.dest.active .d-score-lab { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.dest.active .d-role { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.dest.active .d-bar { background: color-mix(in srgb, var(--bg) 15%, transparent); }
.dest.active .d-bar-fill { background: var(--mustard); }

.d-role {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 10px;
}
.d-role .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mustard); }
.d-role.peer .dot { background: var(--c-peer); }
.d-role.up .dot { background: var(--c-up); }
.d-role.wish .dot { background: var(--c-wish); }

.d-name {
  font-family: var(--serif);
  font-size: 40px;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-top: 6px;
  color: var(--ink);
}
.d-name em { font-style: italic; }
.d-cat {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  color: var(--accent);
}
.d-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  flex: 1;
}
.d-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
  margin-top: auto;
}
.dest.active .d-score { border-color: color-mix(in srgb, var(--bg) 25%, transparent); }
.d-score-num {
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-feature-settings: "tnum";
}
.d-score-num .denom {
  font-size: 15px;
  color: var(--ink-3);
  font-family: var(--mono);
  letter-spacing: 0;
  margin-left: 4px;
}
.d-score-lab {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.d-bar {
  height: 3px; background: var(--rule); border-radius: 2px;
  overflow: hidden;
}
.d-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width .8s var(--ease-out);
}

/* detail */
.detail {
  margin: 36px 56px 0;
  border: 1px solid var(--rule);
  background: var(--surface);
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 480px;
  position: relative;
  overflow: hidden;
}
.detail::before {
  content:""; position:absolute; left:279px; top:0; bottom:0; width:1px; background: var(--rule);
}
.detail-key {
  background: var(--bg-2);
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 22px;
  position: relative;
}
.detail-key .num-mark {
  font-family: var(--serif);
  font-size: 96px;
  line-height: 0.85;
  color: var(--accent);
  letter-spacing: -0.04em;
}
.detail-key .num-mark .denom {
  font-size: 22px;
  color: var(--ink-3);
  font-family: var(--mono);
  letter-spacing: 0;
  margin-left: 6px;
}
.detail-key .label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.detail-key .name-big {
  font-family: var(--serif);
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.detail-key .name-big em { font-style: italic; color: var(--accent); }
.detail-key .gloss {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.55;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  margin-top: auto;
}
.detail-key .gloss-q {
  font-family: var(--serif);
  font-size: 36px;
  color: var(--accent);
  line-height: 0.5;
  margin-bottom: 6px;
}

.detail-body {
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.metric {
  padding: 18px 20px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 8px;
}
.metric .lab {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.metric .row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.metric .v {
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}
.metric .v.up { color: var(--terracotta); }
.metric .v.down { color: var(--olive); }
.metric .delta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
}
.metric .bar {
  height: 4px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.metric .bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent);
  transition: width .8s var(--ease-out);
}
.metric .bar-fill.coral { background: var(--terracotta); }
.metric .bar-fill.olive { background: var(--olive); }
.metric .bar-fill.gold { background: var(--mustard); }
.metric .micro {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

/* C5 — price gap dual-bar (full width spanning) */
.pricegap-block {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 28px 28px 32px;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 32px;
  align-items: start;
}
.pg-col-bars { justify-content: flex-start; gap: 4px; }
.pg-col-info { padding-top: 4px; }
.pg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pg-legend { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); display: inline-flex; align-items: center; gap: 6px; }
.pg-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 2px; }
.pg-legend .sw.sw-origin { background: var(--ink); }
.pg-legend .sw.sw-dest { background: var(--terracotta); }
.pg-desc { color: var(--ink-3); font-size: 14.5px; line-height: 1.6; margin: 8px 0 0; max-width: 36ch; }
.pg-desc strong { color: var(--ink); }
.pg-col {
  display: flex; flex-direction: column; gap: 10px;
}
.pg-col .pg-lab {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pg-col .pg-val {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.02em;
}
.pg-col .pg-val .unit { font-family: var(--mono); font-size: 13.5px; color: var(--ink-3); margin-left: 5px; }
.pg-vchart {
  margin-top: 18px;
  padding-top: 44px;
}
.pg-vbars {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 26px;
  align-items: end;
  min-height: 280px;
  position: relative;
  padding-top: 26px;
}
.pg-vcol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}
.pg-vtrack {
  position: relative;
  width: 100%;
  max-width: 132px;
  height: 220px;
  background: var(--bg);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.pg-vfill {
  width: 100%;
  height: 0;
  background: var(--ink);
  transition: height .8s var(--ease-out);
}
.pg-vfill.is-dest { background: linear-gradient(180deg, var(--terracotta-soft), var(--terracotta)); }
.pg-vfill.is-origin { background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 78%, var(--bg-2)), var(--ink)); }
.pg-vvalue {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
  position: relative;
  z-index: 3;
  background: color-mix(in srgb, var(--bg-2) 94%, transparent);
  padding: 0 8px;
}
.pg-vname {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}
.pg-vmeta {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--terracotta);
  text-transform: uppercase;
}
.pg-vlimit {
  position: absolute;
  left: 6px;
  right: 6px;
  pointer-events: none;
  z-index: 2;
}
.pg-vlimit-line {
  display: block;
  width: 100%;
  border-top: 1px dashed var(--terracotta);
}
.pg-vlimit-label {
  position: absolute;
  right: 0;
  top: -24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--terracotta);
  text-transform: uppercase;
  background: color-mix(in srgb, var(--bg-2) 94%, transparent);
  padding: 0 0 0 8px;
}

@media (max-width: 1320px) {
  .pricegap-block {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .pg-col-info {
    padding-top: 0;
    border-top: 1px solid var(--rule);
    padding-top: 18px;
  }
  .pg-desc {
    max-width: 48ch;
  }
}


/* C4 — Desire vs Mobility scatter */
.scatter-block {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 24px 26px 18px;
  border: 1px solid var(--rule);
  background: var(--bg-2);
}
.scatter-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.scatter-head h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.015em;
}
.scatter-head h4 em { font-style: italic; color: var(--accent); }
.scatter-desktop { display: block; }
.scatter-mobile { display: none; }
.scatter-svg {
  width: 100%;
  display: block;
  height: 480px;
}
.scatter-svg .scatter-plane {
  fill: color-mix(in srgb, var(--bg) 76%, var(--bg-2));
  stroke: var(--rule-soft);
}
.scatter-svg .axis-line { stroke: var(--rule); stroke-width: 1; }
.scatter-svg .axis-mid  { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 4 5; }
.scatter-svg .quad-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--ink-3);
  font-weight: 500;
  opacity: 0.72;
}
.scatter-svg .axis-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--ink-2);
  font-weight: 500;
}
.scatter-svg .pt {
  cursor: pointer;
  transition: r .3s var(--ease-out), stroke-width .25s;
}
.scatter-svg .pt-shadow { fill: var(--rule); }
.scatter-svg .pt-name {
  font-family: var(--serif);
  font-size: 16px;
  fill: var(--ink-2);
  pointer-events: none;
  font-weight: 500;
}
.scatter-svg .pt-name.passive {
  font-size: 14px;
  fill: var(--ink-3);
}
.scatter-svg .pt-name.active { fill: var(--bg); font-weight: 600; font-size: 16px; }

.dm-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.dm-tab {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 12px 10px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 18px;
}
.dm-tab.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.dm-tab-role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.dm-tab.active .dm-tab-role { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.dm-tab-name {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: -0.02em;
}
.dm-active-card {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dm-active-card.peer { box-shadow: inset 4px 0 0 var(--c-peer); }
.dm-active-card.up { box-shadow: inset 4px 0 0 var(--c-up); }
.dm-active-card.wish { box-shadow: inset 4px 0 0 var(--c-wish); }
.dm-active-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}
.dm-active-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.dm-active-name {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.03em;
  margin-top: 6px;
}
.dm-active-score {
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.dm-active-score span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-4);
  margin-left: 4px;
}
.dm-active-copy {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.6;
}
.dm-active-bars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: end;
}
.dm-active-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.dm-active-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.dm-active-track {
  width: 100%;
  max-width: 120px;
  height: 160px;
  border: 1px solid var(--rule);
  background: var(--bg);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.dm-active-fill {
  width: 100%;
  height: 0;
  transition: height .7s var(--ease-out);
}
.dm-active-fill.desire { background: linear-gradient(180deg, var(--terracotta-soft), var(--terracotta)); }
.dm-active-fill.mobility { background: linear-gradient(180deg, var(--olive-soft), var(--olive)); }
.dm-active-value {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.02em;
}
.dm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.dm-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 12px 14px;
  text-align: left;
}
.dm-row.active {
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.dm-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 17px;
}
.dm-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.dm-row-dot.peer { background: var(--c-peer); }
.dm-row-dot.up { background: var(--c-up); }
.dm-row-dot.wish { background: var(--c-wish); }
.dm-row-tracks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dm-row-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-2);
  overflow: hidden;
}
.dm-row-fill {
  height: 100%;
  border-radius: inherit;
}
.dm-row-fill.desire { background: var(--terracotta); }
.dm-row-fill.mobility { background: var(--olive); }

.narrative { padding-top: 4px; }
.narrative h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.015em;
}
.narrative h3 em { font-style: italic; color: var(--accent); }
.narrative p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 64ch;
  text-wrap: pretty;
}
.narrative p .hl {
  background: linear-gradient(to top, color-mix(in srgb, var(--mustard) 32%, transparent) 0 38%, transparent 38% 100%);
  padding: 0 2px;
}

.quote-pull {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  margin: 6px 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}
.quote-pull .qmark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 56px;
  color: var(--accent);
  line-height: 0.5;
  padding-top: 14px;
}
.quote-pull blockquote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.quote-pull cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.reverse-audience {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.reverse-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}
.reverse-head h3 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.reverse-head h3 em { font-style: italic; color: var(--accent); }
.reverse-copy {
  margin: 0;
  max-width: 42ch;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-3);
}
.reverse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.reverse-role {
  border: 1px solid var(--rule);
  background: var(--bg-2);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.reverse-role-head h4 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.reverse-role-head p {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
}
.reverse-role-kicker,
.reverse-origin-lab {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.reverse-role-total {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.reverse-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reverse-persona {
  border-top: 1px dashed var(--rule);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reverse-persona:first-child {
  border-top: 0;
  padding-top: 0;
}
.reverse-persona-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.reverse-persona-id {
  display: flex;
  gap: 10px;
  align-items: start;
}
.reverse-persona-emoji {
  font-size: 20px;
  line-height: 1;
}
.reverse-persona-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.reverse-persona-tagline {
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-3);
}
.reverse-persona-score {
  text-align: right;
  flex-shrink: 0;
}
.reverse-persona-score strong {
  display: block;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.reverse-persona-score span {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.reverse-origin-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reverse-origin-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.reverse-origin-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.detail-fade { animation: fadeUp .5s var(--ease-out) both; }

.report-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 56px 0;
  margin-top: 40px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.report-about-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .25s var(--ease-out), border-color .25s var(--ease-out);
}
.report-about-link:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 26%, transparent);
}

/* ============================================================
   ABOUT PROJECT
   ============================================================ */
.about-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 0 88px;
}
.about-shell {
  padding: 40px 56px 0;
}
.about-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.about-hero h1 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 54px;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.about-hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.about-hero-copy {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 48ch;
  text-wrap: pretty;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 32px;
}
.about-card {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.about-card.about-lead,
.about-card.about-legal {
  grid-column: 1 / -1;
}
.about-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.about-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.about-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.72;
  color: var(--ink-2);
  text-wrap: pretty;
}
.about-card strong {
  color: var(--ink);
  font-weight: 600;
}
.about-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-2);
  line-height: 1.65;
}
.about-link {
  align-self: flex-start;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  padding-bottom: 4px;
}
.about-link:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 22%, transparent);
}
.about-legal-note {
  margin-top: 6px !important;
  font-family: var(--mono);
  font-size: 12px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4) !important;
}
.about-made-by-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.about-avatar {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--rule);
}
.about-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--mustard) 18%, var(--surface)), transparent 58%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, white), var(--bg-2));
}
.about-avatar-glyph {
  font-size: 48px;
  line-height: 1;
  filter: saturate(1.05);
}
@media (max-width: 520px) {
  .about-made-by-row { gap: 16px; }
  .about-avatar { width: 80px; height: 80px; border-radius: 12px; }
  .about-avatar-glyph { font-size: 34px; }
}
.about-foot {
  display: flex;
  justify-content: flex-start;
  padding-top: 28px;
  margin-top: 28px;
  border-top: 1px solid var(--rule);
}

.snap-row .v .delta-up { color: var(--terracotta); margin-left: 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .region-top { grid-template-columns: 1fr; padding: 24px 28px 18px; }
  .region-grid { grid-template-columns: 1fr 240px; }
  .region-selection-zone { padding: 18px 28px 34px; }
  .region-selection-card { grid-template-columns: 1fr; }
  .region-selection-metrics { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 20px; }
  .persona-page { padding: 36px 28px 80px; }
  .report-masthead, .report-section, .report-foot { padding-left: 28px; padding-right: 28px; }
  .detail { margin-left: 28px; margin-right: 28px; grid-template-columns: 1fr; min-height: auto; }
  .detail::before { display: none; }
  .detail-key { padding: 28px 32px; border-bottom: 1px solid var(--rule); }
  .detail-key .num-mark { font-size: 80px; }
  .report-masthead h1 { font-size: 44px; }
  .reverse-grid { grid-template-columns: 1fr; }
  .reverse-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .topbar { padding: 16px 20px; flex-wrap: wrap; gap: 12px; }
  .topnav {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
  }
  .brand-main { gap: 12px; }
  .steps {
    width: 100%;
    order: 1;
  }
  .topbar .meta { display: none; }
  .brand .tag { display: none; }

  .region { height: auto; }
  .region-top { grid-template-columns: 1fr; padding: 22px 18px; gap: 16px; }
  .region-grid { grid-template-columns: 1fr; height: auto; }
  .region-selection-zone { padding: 14px 18px 28px; }
  .region-selection-card { padding: 22px 20px; }
  .region-selection-name { font-size: 30px; }
  .region-selection-blurb { font-size: 15.5px; }
  .region-aside { border-left: 0; border-top: 1px solid var(--rule); }
  .region-headline { font-size: 34px; line-height: 1.18; }
  .region-sub { font-size: 17px; }
  .region-map-wrap {
    padding: 16px 10px 86px;
    min-height: 420px;
    align-items: stretch;
  }
  .map-detached-inset { left: 14px; top: 14px; width: 96px; padding: 8px 8px 7px; }
  .map-detached-head { justify-content: center; }
  .map-detached-name { font-size: 13px; }
  .map-tooltip { display: none; }
  .map-legend {
    gap: 5px;
    max-width: 148px;
    padding: 8px 10px;
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(10px);
  }
  .map-legend .lg-title {
    font-size: 10px;
    letter-spacing: 0.14em;
  }
  .map-legend .lg-bar { width: min(148px, 38vw); height: 6px; }
  .map-legend .lg-scale { font-size: 9.5px; }
  .map-foot-hint {
    max-width: calc(100% - 28px);
    font-size: 10px;
    letter-spacing: 0.08em;
    padding: 6px 10px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }
  .map-bottom-row {
    left: 14px;
    right: 14px;
    bottom: 16px;
  }

  .persona-head { grid-template-columns: 1fr; align-items: start; }
  .persona-head .ctx { align-items: flex-start; }
  .persona-head h1 { font-size: 34px; line-height: 1.18; }
  .persona-grid { grid-template-columns: repeat(2, 1fr); }
  .persona-foot { margin: 32px -28px 0; padding: 16px 28px; flex-wrap: wrap; }
  .persona-card .pc-name { font-size: 20px; }
  .persona-card .pc-line { font-size: 16px; }
  .persona-card .pc-quote { font-size: 15px; }

  .report-masthead { grid-template-columns: 1fr; }
  .report-masthead h1 { font-size: 42px; line-height: 1.1; }
  .report-masthead .lede { font-size: 17px; }
  .report-id {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 14px;
    text-align: left;
  }
  .report-id .row { gap: 8px; }
  .report-id .pill {
    max-width: 100%;
    flex-wrap: wrap;
  }
  .minimap-frame {
    margin-top: 2px;
    margin-bottom: 18px;
  }
  .minimap-zoom-reset {
    right: 10px;
    bottom: 10px;
    padding: 8px 10px;
    font-size: 9px;
  }
  .dests {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 0 6px;
    border-top: 0;
    border-bottom: 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .dest {
    flex: 0 0 min(76vw, 300px);
    border: 1px solid var(--rule);
    min-height: 220px;
    border-bottom: 1px solid var(--rule);
    scroll-snap-align: start;
  }
  .dest:last-child { border-bottom: 1px solid var(--rule); }
  .d-name { font-size: 36px; }
  .d-desc { font-size: 17px; }
  .detail { grid-template-columns: 1fr; min-height: auto; }
  .detail::before { display: none; }
  .detail-key { padding: 24px 20px; }
  .detail-body { padding: 24px 20px; gap: 22px; }
  .detail-key .num-mark { font-size: 72px; }
  .detail-key .name-big { font-size: 30px; }
  .detail-key .gloss { font-size: 17px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric .v { font-size: 30px; }
  .metric .lab { font-size: 13px; }
  .metric .micro { font-size: 14px; }
  .pricegap-block { grid-template-columns: 1fr; padding: 22px 20px; gap: 22px; }
  .pg-val { font-size: 30px !important; }
  .pg-desc { font-size: 15.5px; }
  .pg-lab { font-size: 13px; }
  .pg-vbars { min-height: 240px; }
  .pg-vtrack { max-width: 116px; height: 190px; }
  .scatter-desktop { display: none; }
  .scatter-mobile { display: block; }
  .pull { font-size: 22px; }
  .section-head h2 { font-size: 30px; }
  .section-head .kicker { font-size: 13px; }
  .report-section .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .report-section { padding: 32px 20px 0; }
  .report-foot {
    padding: 24px 20px;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .reverse-head h3 { font-size: 26px; }
  .reverse-role-head h4 { font-size: 22px; }
  .reverse-copy { max-width: none; }
  .narrative h3 { font-size: 22px; }
  .narrative p { font-size: 16.5px; line-height: 1.7; }
  .about-shell { padding: 28px 20px 0; }
  .about-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
  }
  .about-hero h1 { font-size: 42px; line-height: 1.08; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .persona-head {
    padding-bottom: 18px;
    margin-bottom: 24px;
  }
  .persona-head .ctx { display: none; }
  .persona-grid {
    display: flex;
    overflow-x: auto;
    border-top: 0;
    border-left: 0;
    gap: 12px;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .topbar {
    padding: 14px 14px 12px;
    gap: 10px;
  }
  .topnav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .steps {
    gap: 8px;
    width: 100%;
    justify-content: flex-start;
  }
  .brand {
    gap: 6px;
    width: 100%;
  }
  .brand-main {
    gap: 10px;
    align-items: center;
  }
  .brand .mark {
    font-size: 20px;
    line-height: 1.12;
    white-space: normal;
    flex: 1 1 auto;
  }
  .brand-toggle {
    margin-left: auto;
  }
  .theme-toggle {
    padding: 4px;
    gap: 4px;
  }
  .theme-toggle button {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
  .topbar .meta { display: none; }
  .brand .tag { display: none; }
  .step-pill span:not(.dot) { display: none; }
  .step-sep { width: 14px; }

  .region-top { padding: 18px 14px; }
  .region-headline { font-size: 28px; }
  .region-sub { font-size: 16px; }
  .region-map-wrap {
    min-height: 360px;
    padding: 10px 8px 110px;
  }
  .region-selection-zone { padding: 12px 14px 24px; }
  .region-selection-card { padding: 18px 16px; gap: 18px; }
  .region-selection-name { font-size: 26px; }
  .region-selection-row { grid-template-columns: 74px 1fr; gap: 10px; }
  .region-selection-row .v.num { font-size: 22px; }
  .region-selection-cta { width: 100%; }
  .map-detached-inset {
    width: 58px;
    padding: 5px;
    top: 14px;
    left: 10px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
  }
  .map-detached-head { margin-bottom: 3px; }
  .map-detached-svg { aspect-ratio: 1 / 1; }
  .map-detached-name { font-size: 10px; }
  .map-detached-copy { display: none; }
  .map-panzoom-shell { cursor: grab; }
  .map-panzoom-shell.zoomed { cursor: grabbing; }
  .map-legend {
    max-width: 122px;
    padding: 7px 8px;
    gap: 4px;
    z-index: 4;
  }
  .map-legend .lg-title {
    font-size: 9px;
  }
  .map-legend .lg-bar {
    width: 104px;
    height: 5px;
  }
  .map-legend .lg-scale {
    font-size: 8.5px;
  }
  .map-foot-hint {
    max-width: 152px;
    font-size: 8.5px;
    padding: 6px 8px;
    white-space: normal;
    line-height: 1.35;
    text-align: center;
    z-index: 4;
  }
  .map-bottom-row {
    left: 10px;
    right: 10px;
    bottom: 12px;
    gap: 10px;
  }
  .map-zoom-reset {
    right: 10px;
    bottom: 66px;
    padding: 8px 11px;
    font-size: 9.5px;
  }

  .persona-page { padding: 24px 14px 80px; }
  .persona-head h1 { font-size: 28px; }
  .persona-card {
    flex: 0 0 82vw;
    min-height: 300px;
    padding: 18px 16px 18px;
    border: 1px solid var(--rule);
    scroll-snap-align: start;
  }
  .persona-card .pc-num { font-size: 10.5px; }
  .persona-card .pc-portrait,
  .persona-card .pc-portrait-emoji {
    width: 84px;
    height: 84px;
    margin: 2px 0 4px;
  }
  .persona-card .pc-portrait-emoji .glyph { font-size: 48px; }
  .persona-card .pc-name { font-size: 18px; }
  .persona-card .pc-line {
    font-size: 14px;
    line-height: 1.35;
    min-height: 0;
  }
  .persona-card .pc-quote {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13.5px;
    line-height: 1.5;
    padding-left: 10px;
  }
  .persona-card .pc-tags { gap: 5px; }
  .persona-card .pc-tag {
    font-size: 10px;
    padding: 4px 8px;
  }
  .pc-meter {
    padding-top: 10px;
    gap: 8px;
  }
  .pc-meter .lab {
    font-size: 10px;
    flex: 0 0 auto;
  }
  .pc-meter .seg {
    width: 12px;
    height: 5px;
  }
  .persona-foot {
    margin: 24px -14px 0;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    gap: 10px;
  }
  .persona-foot .selected-readout {
    font-size: 14.5px;
    width: 100%;
  }
  .persona-foot .selected-readout span {
    display: inline;
  }
  .persona-foot > div {
    width: 100%;
    justify-content: space-between;
  }
  .persona-foot .btn-ghost {
    font-size: 10.5px;
    letter-spacing: 0.1em;
  }
  .persona-foot .btn-primary {
    min-width: 148px;
    justify-content: center;
    padding: 12px 16px;
  }

  .report-masthead { padding: 24px 16px 18px; gap: 18px; }
  .report-masthead h1 { font-size: 32px; }
  .report-masthead .lede {
    font-size: 14.5px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 10px;
  }
  .report-id {
    gap: 8px;
    font-size: 10.5px;
    letter-spacing: 0.12em;
  }
  .report-id .row {
    width: 100%;
    flex-wrap: wrap;
  }
  .report-id .row:last-child { display: none; }
  .report-id .pill { padding: 5px 10px; }
  .report-section { padding: 28px 14px 0; }
  .section-head {
    margin-bottom: 12px;
    align-items: end;
  }
  .section-head h2 { font-size: 24px; }
  .section-head .kicker { font-size: 12.5px; }
  .minimap-frame { margin-bottom: 14px; }
  .mm-label { font-size: 10px; }
  .minimap-zoom-reset { font-size: 8.5px; }
  .dests { gap: 10px; padding-bottom: 4px; }
  .dest {
    flex-basis: 82vw;
    min-height: 196px;
    padding: 18px 18px 16px;
  }
  .d-role { font-size: 10.5px; padding: 4px 8px; }
  .d-name { font-size: 28px; }
  .d-cat { font-size: 14px; }
  .d-desc { font-size: 14.5px; line-height: 1.5; }
  .d-score-num { font-size: 32px; }
  .d-score-lab { font-size: 10px; }
  .detail-key, .detail-body { padding: 20px 16px; }
  .detail-key .num-mark { font-size: 60px; }
  .detail-key .name-big { font-size: 26px; }
  .detail-key .gloss {
    display: none;
  }
  .detail-key { gap: 14px; }
  .metric .v { font-size: 26px; }
  .metric .lab { font-size: 12.5px; }
  .metric { padding: 14px 14px; gap: 6px; }
  .metric .micro {
    font-size: 12.5px;
    line-height: 1.45;
  }
  .pricegap-block { padding: 18px 14px; }
  .pg-vbars { gap: 14px; min-height: 220px; }
  .pg-vtrack { max-width: 92px; height: 170px; }
  .pg-vvalue { font-size: 18px; }
  .pg-vname, .pg-vmeta { font-size: 10px; }
  .pg-val { font-size: 26px !important; }
  .pg-desc { font-size: 15px; }
  .pg-lab { font-size: 12px; }
  .pg-vlimit-label { font-size: 10px; top: -16px; }
  .scatter-head .mono { display: none; }
  .dm-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .dm-tab { padding: 10px 12px; }
  .dm-tab-role { font-size: 9px; }
  .dm-tab-name { font-size: 17px; }
  .dm-active-name { font-size: 24px; }
  .dm-active-card { padding: 16px 14px 18px; }
  .dm-active-bars { gap: 12px; }
  .dm-active-track { max-width: 100%; height: 132px; }
  .dm-row { grid-template-columns: 92px 1fr; padding: 11px 12px; }
  .dm-row-title { font-size: 15px; }
  .pull { font-size: 20px; }
  .pull cite { font-size: 12px; }
  .narrative h3 { font-size: 20px; }
  .narrative p { font-size: 14.5px; line-height: 1.65; }
  .quote-pull { display: none; }
  .reverse-role { padding: 16px 14px; }
  .reverse-persona-name { font-size: 18px; }
  .reverse-persona-tagline { font-size: 13px; }
  .reverse-persona-score strong { font-size: 22px; }
  .report-foot {
    font-size: 11px;
    gap: 8px;
    flex-direction: column;
  }
  .report-about-link { font-size: 10.5px; }
  .report-foot .btn-ghost:last-child { display: none; }
  .about-shell { padding: 22px 14px 0; }
  .about-hero h1 { font-size: 32px; }
  .about-hero-copy { font-size: 14.5px; line-height: 1.68; }
  .about-card { padding: 18px 16px 20px; }
  .about-card h2 { font-size: 22px; }
  .about-card p,
  .about-list { font-size: 14px; line-height: 1.65; }
  .about-link { font-size: 10.5px; }
}
