/* /stories/where-america-buys-sneakers: map tour + explorer. Loaded after /style.css and story.css. */
.story-map { --tiff-fill: #81d8d0; --warm-fill: #f4c430; --ink-d: #0e2627; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.map-hero-pair figure { margin: 0; }
.map-hero-pair img { width: 100%; height: auto; aspect-ratio: 7 / 5; object-fit: contain; background: #fff; }
.map-hero-pair figcaption { font-size: .82rem; font-weight: 600; color: var(--ink2); margin-top: 2px; }

/* ---------- shared map drawing ---------- */
.map-box svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.map-box .st { stroke: #fff; stroke-width: .8; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .35s ease; }
.map-box .st:hover, .map-box .st.hover { stroke: var(--ink-d); stroke-width: 1.6; }
.map-box .st.sel { stroke: var(--ink-d); stroke-width: 2.6; }
.map-box .st:focus { outline: none; }
.map-box .st:focus-visible { stroke: var(--ink-d); stroke-width: 3; }
.map-box .st.dim { opacity: .45; }
.map-box .city { stroke: var(--ink-d); stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .35s ease; }
.map-box .city.sel, .map-box .city.hl { stroke-width: 2.6; }
.map-box .city:focus { outline: none; }
.map-box .city:focus-visible { stroke-width: 3.2; }
.map-box .city-ring { fill: none; stroke: #f4c430; stroke-width: 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-box .hit { fill: transparent; stroke: none; cursor: pointer; }
.map-box .lab { font-family: 'Source Sans 3', system-ui, sans-serif; font-weight: 700; text-anchor: middle; pointer-events: none;
  paint-order: stroke; stroke-linejoin: round; }
.map-box .lab.dark { fill: #0e2627; stroke: rgba(255, 255, 255, .85); }
.map-box .lab.light { fill: #fff; stroke: rgba(14, 38, 39, .55); }
.map-box .clab { font-family: 'Source Sans 3', system-ui, sans-serif; font-weight: 700; fill: #0e2627; paint-order: stroke;
  stroke: #fff; stroke-linejoin: round; pointer-events: none; }
.map-box .nation { fill: none; stroke: #b9c7c7; stroke-width: .8; vector-effect: non-scaling-stroke; pointer-events: none; }

/* legend */
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: .85rem; color: var(--ink2); }
.lg-ramp { display: inline-flex; flex-direction: column; gap: 2px; }
.lg-ramp .bar { width: 180px; height: 10px; border-radius: 2px; border: 1px solid #dfe7e7; }
.lg-ramp .ticks { display: flex; justify-content: space-between; font-size: .76rem; color: var(--ink3); width: 180px; }
.lg-sw { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink3); }
.lg-sw i { width: 14px; height: 10px; display: inline-block; border: 1px solid #c9d4d4; border-radius: 2px; }
.lg-sw i.none { background: repeating-linear-gradient(45deg, #f1f4f4 0 3px, #c9d4d4 3px 4px); }
.lg-sw i.few { background: #f7f9f9; border-style: dashed; }
.lg-sw i.dot { border-radius: 50%; width: 11px; height: 11px; background: #fff; border-color: #0e2627; }
.spark { display: inline-flex; flex-direction: column; gap: 2px; font-size: .76rem; color: var(--ink3); }
.spark svg { display: block; }

/* tour: the map fills the sticky panel */
.map-scrolly .chart-box.map-box { min-height: 0; }
.map-scrolly .chart-legend { min-height: 2.2em; }

/* ---------- explorer ---------- */
.mx { max-width: 1360px; margin: 3rem auto 0; padding: 0 24px; scroll-margin-top: calc(var(--hdr, 64px) + 8px); }
.mx-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0; color: var(--ink); letter-spacing: -.01em; }
.mx-dek { color: var(--ink2); margin: .3rem 0 1rem; font-size: 1.02rem; }
.mx-controls { border-top: 1px solid var(--ink); padding-top: 12px; }
.mx-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.mx-tab { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid #c9d4d4; background: #fff; color: var(--ink);
  font: 600 .98rem 'Source Sans 3', system-ui, sans-serif; cursor: pointer; }
.mx-tab:hover { border-color: var(--teal); }
.mx-tab[aria-selected="true"] { background: var(--tiff-fill); border-color: var(--tiff-fill); color: #0c2422; }
.mx-tab:focus-visible, .mx-w:focus-visible, .mx-share:focus-visible, .mx-go:focus-visible, .mx-reset:focus-visible, .mx-close:focus-visible,
.mx-pick select:focus-visible, .mx-search input:focus-visible { outline: 3px solid #0e2627; outline-offset: 2px; }
.mx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mx-seg { display: inline-flex; border: 1px solid #c9d4d4; border-radius: 999px; overflow: hidden; }
.mx-w { min-height: 44px; padding: 0 14px; border: 0; background: #fff; color: var(--ink); font: 600 .92rem 'Source Sans 3', system-ui, sans-serif; cursor: pointer; }
.mx-w + .mx-w { border-left: 1px solid #c9d4d4; }
.mx-w[aria-pressed="true"] { background: var(--teal); color: #fff; }
.mx-seg[hidden] { display: none; }
.mx-pick select { min-height: 44px; border: 1px solid #c9d4d4; border-radius: 10px; padding: 0 10px; background: #fff; color: var(--ink);
  font: 600 .95rem 'Source Sans 3', system-ui, sans-serif; max-width: 100%; }
.mx-pick[hidden] { display: none; }
.mx-search { display: flex; gap: 6px; flex: 1 1 260px; min-width: 0; }
.mx-search input { flex: 1 1 auto; min-width: 0; min-height: 44px; border: 1px solid #c9d4d4; border-radius: 10px; padding: 0 12px;
  font: 1rem 'Source Sans 3', system-ui, sans-serif; color: var(--ink); background: #fff; }
.mx-go, .mx-share, .mx-reset { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--teal); background: #fff; color: var(--teal);
  font: 700 .92rem 'Source Sans 3', system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.mx-go { background: var(--teal); color: #fff; }
.mx-share.ok { background: var(--warm-fill); border-color: var(--warm-fill); color: #1c2426; }
.mx-window { font-size: .86rem; color: var(--ink3); margin: 8px 0 0; line-height: 1.45; }
.mx-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; margin-top: 10px; align-items: start; }
.mx-mapwrap { position: relative; }
.mx-map { width: 100%; aspect-ratio: 975 / 610; }
.mx-reset { position: absolute; top: 6px; right: 6px; z-index: 3; }
.mx-reset[hidden] { display: none; }
.mx-legend { margin-top: 6px; }
.mx-tip { position: absolute; z-index: 4; pointer-events: none; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 22px rgba(12, 36, 34, .12);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.4; color: var(--ink); max-width: 250px; }
.mx-tip b { font-family: var(--serif); font-weight: 600; font-size: 15px; display: block; }
.mx-tip .t-sub { color: var(--ink3); }
.mx-panel { border: 1px solid var(--line); border-radius: 14px; background: #fff; position: sticky; top: calc(var(--hdr, 64px) + 12px);
  max-height: calc(100vh - var(--hdr, 64px) - 24px); overflow: auto; overscroll-behavior: contain; }
.mx-panel-body { padding: 16px 18px 18px; }
.mx-sheet-bar { display: none; }
.mx-loading { color: var(--ink3); }

/* panel content */
.pl-kick { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin: 0; }
.pl-h { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; line-height: 1.15; margin: 2px 0 2px; color: var(--ink); }
.pl-sub { font-size: .86rem; color: var(--ink3); margin: 0 0 12px; }
.pl-sec { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }
.pl-sec h3 { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); margin: 0 0 8px; }
.pl-focus { background: #f4f9f9; border: 1px solid #cfeae6; border-radius: 10px; padding: 10px 12px; font-size: .95rem; color: var(--ink); line-height: 1.45; }
.pl-focus .big { font-family: var(--serif); font-size: 1.7rem; color: var(--teal); display: block; line-height: 1.1; }
.pl-sig { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; }
.pl-sig img, .pl-item img { width: 100%; height: auto; aspect-ratio: 7 / 5; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.pl-sig .nm { font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; color: var(--ink); display: block; }
.pl-sig .ds { font-size: .88rem; color: var(--ink2); line-height: 1.4; display: block; margin-top: 3px; }
.pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pl-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.pl-item .nm { font-weight: 600; font-size: .92rem; color: var(--ink); line-height: 1.25; display: block; }
.pl-item .ds { font-size: .8rem; color: var(--ink3); display: block; }
.badge { display: inline-block; font-weight: 700; font-size: .88rem; padding: 3px 8px; border-radius: 999px; background: var(--tiff-fill); color: #0c2422; white-space: nowrap; }
.badge.warm { background: var(--warm-fill); color: #1c2426; }
.badge.plain { background: #eef3f3; color: var(--ink2); }
.pl-bars { display: grid; gap: 6px; }
.pl-bar { display: grid; grid-template-columns: 92px minmax(0, 1fr) 52px; gap: 8px; align-items: center; font-size: .84rem; color: var(--ink2); }
.pl-bar .tr { position: relative; height: 10px; background: #eef3f3; border-radius: 2px; }
.pl-bar .fi { position: absolute; left: 0; top: 0; bottom: 0; background: var(--teal); border-radius: 2px; }
.pl-bar .us { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-d); }
.pl-bar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.pl-bar.on { color: var(--ink); font-weight: 700; }
.pl-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--teal); text-decoration: none; }
.pl-link:hover { text-decoration: underline; }
.pl-fine { font-size: .78rem; color: var(--ink3); line-height: 1.45; margin: 10px 0 0; }
.pl-empty { font-size: .92rem; color: var(--ink2); }
.pl-places { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-places button { min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid #c9d4d4; background: #fff; color: var(--ink);
  font: 600 .88rem 'Source Sans 3', system-ui, sans-serif; cursor: pointer; }
.pl-places button:hover { border-color: var(--teal); }

/* FAQ */
.faqs { display: grid; gap: 8px; }
.faq { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: #fff; }
.faq summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--ink); }
.faq p { margin: 0 0 12px; }

/* ---------- phones: map full width, details in a bottom sheet ---------- */
@media (max-width: 899px) {
  .mx { padding: 0 16px; margin-top: 2rem; }
  .mx-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .mx-tab { padding: 0 8px; font-size: .92rem; }
  .mx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .mx-seg { grid-column: 1 / -1; justify-self: start; }
  .mx-pick { grid-column: 1 / -1; }
  .mx-pick select { width: 100%; }
  .mx-search { grid-column: 1 / 2; flex: none; }
  .mx-share { grid-column: 2 / 3; padding: 0 12px; }
  .mx-body { display: block; }
  .mx-reset { top: 4px; right: 4px; min-height: 44px; padding: 0 12px; font-size: .85rem; }
  .mx-panel { position: static; max-height: none; margin-top: 12px; }
  .mx-panel.sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; max-height: 60vh; max-height: 60svh;
    border-radius: 16px 16px 0 0; border-bottom: 0; box-shadow: 0 -10px 40px rgba(12, 36, 34, .22); animation: sheet-up .28s ease-out; }
  .mx-panel.sheet .mx-sheet-bar { display: flex; position: sticky; top: 0; background: #fff; justify-content: center; align-items: center;
    height: 44px; border-bottom: 1px solid var(--line); z-index: 1; }
  .mx-grip { width: 40px; height: 4px; border-radius: 4px; background: #c9d4d4; }
  .mx-close { position: absolute; right: 6px; top: 0; width: 44px; height: 44px; border: 0; background: none; font-size: 1.7rem; line-height: 1; color: var(--ink); cursor: pointer; }
  .mx-tip { display: none !important; }
  .pl-sig { grid-template-columns: 104px minmax(0, 1fr); }
  .map-box .lab { display: none; }
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .map-box .st, .map-box .city { transition: none; }
  .mx-panel.sheet { animation: none; }
}
.pl-inline { border: 0; background: none; padding: 0; min-height: 44px; color: var(--teal); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.map-scrolly .step-photos { grid-template-columns: minmax(0, 170px); }
.map-legend { border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; }
@media (max-width: 899px) {
  .map-scrolly .chart-sub { display: none; }
  .map-scrolly .chart-title { font-size: .95rem; }
  .map-scrolly .chart-legend { gap: 2px 10px; font-size: .74rem; min-height: 0; margin-top: 4px; }
  .map-scrolly .lg-ramp .bar, .map-scrolly .lg-ramp .ticks { width: 120px; }
  .map-scrolly .lg-sw.c-sw { display: none; }
  .map-scrolly .scrolly-graphic { height: 48vh; height: 48svh; min-height: 290px; }
}
@media (max-width: 899px) {
  .map-scrolly .step-card { opacity: 0; }
  .map-scrolly .step.active .step-card { opacity: 1; }
}
