/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #060d1a;
  --bg2:     #0d1b2e;
  --bg3:     #132038;
  --text:    #e2eeff;
  --muted:   #6b85a6;
  --accent:  #22d3ee;
  --red:     #ef4444;
  --border:  rgba(255,255,255,0.07);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

em { font-style: italic; color: var(--accent); }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── HERO ── */
#hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(to bottom, #060d1a 80%, var(--bg2) 100%);
}

#hero-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(6,13,26,0.85) 0%, rgba(6,13,26,0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 820px;
}

.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.8rem;
  display: block;
}

#hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1.6rem;
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.75;
}

.scroll-cue {
  font-family: 'Space Mono', monospace;
  color: var(--muted);
  font-size: 1.2rem;
  animation: bounce 2.4s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%       { transform: translateY(7px); opacity: 1; }
}

/* ── MAP SCROLL ── */
#map-scroll {
  display: flex;
  position: relative;
}

#map-sticky-panel {
  position: sticky;
  top: 0;
  width: 58%;
  height: 100vh;
  border-right: 1px solid var(--border);
}

#leaflet-map {
  width: 100%;
  height: 100%;
}

#map-steps {
  width: 42%;
}

.map-step {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 3rem 3rem 3rem 2.5rem;
}

.map-step .step-content {
  max-width: 380px;
  opacity: 0.3;
  transition: opacity 0.35s;
}

.pacific-scroll-group { position: relative; }

.pacific-scroll-group .map-step {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: unset;
  z-index: 1;
}

.para-trigger { min-height: 40vh; }

.step-fig {
  margin-top: 1rem;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.step-fig img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 180px;
}

.step-fig figcaption {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  padding: 0.4rem 0.6rem;
  background: var(--bg3);
}

.para-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.para-reveal.visible {
  opacity: 1;
  transform: none;
}

.map-step.is-active .step-content {
  opacity: 1;
}

/* ── SHARED STEP STYLES ── */
.step-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
  display: block;
}

.step-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.9rem;
}

.step-content p {
  color: var(--muted);
  font-size: 0.93rem;
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

/* ── STUDY BANNER ── */
#study-banner {
  min-height: 100vh;
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg2) 30%, var(--bg2) 70%, var(--bg) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 3rem;
  text-align: center;
}

.banner-beats {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.banner-sub {
  font-family: 'Playfair Display', serif;
  font-style: normal;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ── TREATMENTS ── */
#treatments {
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg2) 8%, var(--bg2) 92%, var(--bg) 100%);
  padding: 6rem 3rem;
  text-align: center;
}

.section-header {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--muted);
  font-size: 0.9rem;
}

.treatment-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* All cards same size — 2 of 6 columns each */
.tcard { grid-column: span 2; }

/* Center the two control cards by starting at column 2 */
.tcard:nth-child(1) { grid-column: 2 / span 2; }
.tcard:nth-child(2) { grid-column: 4 / span 2; }

.tcard-img {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tcard:hover .tcard-img {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.5);
}

.tci-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.0) 100%);
}

.tci-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  padding-top: 0.4rem;
}

.trow-label {
  grid-column: 1 / -1;
  margin-top: 1.5rem;
  padding: 0.6rem 0 0.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

.tcard-label {
  padding: 0 0.2rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tcard-code {
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.tcard-name {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.3;
  font-weight: 500;
}

/* ── DATA SCROLLYTELLING ── */
#data-scroll-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding: 1.2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.4s;
}

#data-scroll-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
}

/* ── DATA SCROLLYTELLING ── */

#data-scroll {
  display: flex;
  position: relative;
  background: var(--bg);
}

#data-chart-panel {
  position: sticky;
  top: 0;
  width: 58%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2rem 2.5rem 3.5rem;
  border-right: 1px solid var(--border);
}

#data-chart-header {
  margin-bottom: 0.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dc-section {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.dc-title {
  font-family: 'Playfair Display', serif;
  font-style: normal;
  font-size: 1.4rem;
  color: #fff;
}

.dc-sub {
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

#data-chart {
  width: 100%;
  flex: 1;
  max-height: 70vh;
  overflow: visible;
}

#data-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.2rem;
  margin-top: 0.75rem;
}

.legend-label {
  width: 100%;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

#data-steps {
  width: 42%;
}

#data-steps .step {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 3rem 3rem 3rem 2.5rem;
}

#data-steps .step .step-content {
  max-width: 380px;
  opacity: 0.3;
  transition: opacity 0.35s;
}

#data-steps .step.is-active .step-content {
  opacity: 1;
}

/* ── LEGEND ── */
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
}

.legend-swatch {
  width: 20px;
  height: 2.5px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── D3 CHART ELEMENTS ── */
.axis path, .axis line { stroke: rgba(255,255,255,0.08); }
.axis text {
  fill: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
}

.treatment-line { fill: none; stroke-width: 2px; }
.data-dot {}

/* ── SANDBOX ── */
#sandbox {
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg2) 6%, var(--bg2) 100%);
  padding: 6rem 3rem;
}

.sandbox-header {
  max-width: 700px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.sandbox-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.sandbox-header p {
  color: var(--muted);
  font-size: 0.9rem;
}

.sandbox-controls {
  max-width: 800px;
  margin: 0 auto 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ctrl-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 60px;
  flex-shrink: 0;
}

.ctrl-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  letter-spacing: 0.04em;
}

.pill:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
  color: var(--text);
}

.pill.active {
  background: rgba(34,211,238,0.12);
  border-color: rgba(34,211,238,0.5);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(34,211,238,0.15);
}

.tpill.active {
  background: color-mix(in srgb, var(--pc) 14%, transparent);
  border-color: color-mix(in srgb, var(--pc) 60%, transparent);
  color: var(--pc);
  font-weight: 600;
  box-shadow: 0 0 10px color-mix(in srgb, var(--pc) 25%, transparent);
}

#sandbox-chart {
  display: block;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: visible;
}

#sandbox-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.2rem;
  margin: 0.75rem auto 0;
  max-width: 800px;
}

/* ── COMMUNITY ── */
#community-section {
  background: var(--bg2);
  padding: 6rem 3rem;
}

.community-inner { max-width: 1000px; margin: 0 auto; }

.comm-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 4.5rem;
}

.comm-slider-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.slider-track-wrap {
  position: relative;
  flex: 1;
}

.bleach-zone-label {
  position: absolute;
  right: 5%;
  top: calc(100% + 5px);
  transform: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ef4444;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.85;
}

#date-slider {
  width: 100%;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--bg3) 75%, rgba(239,68,68,0.55) 75%);
  outline: none;
  cursor: pointer;
}

#date-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
  transition: background 0.2s;
}

#date-slider.bleaching::-webkit-slider-thumb {
  background: #ef4444;
}

#date-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
  transition: background 0.2s;
}

#date-slider.bleaching::-moz-range-thumb {
  background: #ef4444;
}

#slider-date-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  min-width: 160px;
}

#community-chart { display: block; width: 100%; overflow: visible; }

#community-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin-top: 1rem;
  justify-content: center;
  max-width: 610px;
  margin-left: auto;
  margin-right: auto;
}

/* ── METHODS ── */
#methods {
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg2) 8%, var(--bg2) 92%, var(--bg) 100%);
  padding: 6rem 3rem;
  text-align: center;
}

.methods-inner {
  max-width: 680px;
  margin: 0 auto;
}

#methods h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 3rem;
}

.methods-points {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: left;
}

.methods-point {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.methods-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  flex-shrink: 0;
  width: 2.5rem;
  text-align: right;
}

.methods-point p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  padding-top: 0.4rem;
}

.methods-fig {
  margin-top: 1.2rem;
  border-radius: 8px;
  overflow: hidden;
}

.methods-fig img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

/* ── CONCLUSION FIGURE ── */
.conc-fig {
  margin: 0.5rem 0 1rem;
}

.conc-fig img {
  width: 100%;
  display: block;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.conc-fig figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
}

/* ── CONCLUSION ── */
#conclusion {
  background: linear-gradient(to bottom, var(--bg2) 0%, var(--bg) 10%);
  padding: 5rem 3rem 4rem;
}

.conclusion-inner {
  max-width: 780px;
  margin: 0 auto;
}

#conclusion h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 3rem;
}

.conc-points {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.conc-point {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.conc-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  flex-shrink: 0;
  min-width: 48px;
}

.conc-text {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.conc-text strong {
  color: #fff;
  font-weight: 600;
}

/* ── TOOLTIP ── */
#chart-tooltip {
  position: fixed;
  z-index: 500;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}

#chart-tooltip.visible { opacity: 1; }

.tt-treatment {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}

.tt-date { color: var(--muted); font-size: 0.72rem; }
.tt-val  { color: #fff; }

/* ── LIGHTBOX ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

#lightbox.open {
  display: flex;
}

#lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  cursor: zoom-out;
}

#lightbox-img {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
  object-fit: contain;
}

#lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  z-index: 2;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

#lightbox-close:hover {
  background: rgba(255,255,255,0.25);
}

.expandable {
  cursor: zoom-in;
}

/* ── FOOTER ── */
footer {
  background: var(--bg2);
  padding: 1.5rem 3rem;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

footer div {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.8;
}

footer strong { color: var(--text); }

.footer-note {
  font-size: 0.72rem;
  color: rgba(107,133,166,0.6);
}

.footer-ack {
  font-size: 0.72rem;
  color: rgba(107,133,166,0.6);
  max-width: 620px;
  line-height: 1.7;
}

footer code {
  font-family: 'Space Mono', monospace;
  color: var(--accent);
  background: var(--bg3);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.65rem;
}

/* ── LEAFLET ── */
.leaflet-container { background: #0a1628 !important; }

#map-scale {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.scale-bar {
  width: 187px;
  height: 2px;
  background: #fff;
  opacity: 0.7;
  border-left: 2px solid #fff;
  border-right: 2px solid #fff;
}

.scale-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.palmyra-marker {
  position: relative;
  width: 12px;
  height: 12px;
}

.palmyra-marker .dot {
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px #000, 0 0 10px var(--accent);
  z-index: 2;
}

.palmyra-marker .ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  animation: pulse-ring 2.2s ease-out infinite;
}

.palmyra-marker .ring2 {
  animation-delay: 1.1s;
}

@keyframes pulse-ring {
  0%   { inset: 0px;   opacity: 0.7; }
  100% { inset: -27px; opacity: 0; }
}
.wreck-marker {
  position: relative;
  font-size: 52px;
  color: #FFD600;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255,214,0,0.7));
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: scale(0.6) translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  -webkit-text-stroke: 2px #000;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.wreck-marker.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.wreck-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #FFD600;
  opacity: 0;
  animation: wreck-ring 2.4s ease-out infinite;
  pointer-events: none;
}

.wp2 { animation-delay: 1.2s; }

@keyframes wreck-ring {
  0%   { width: 52px;  height: 52px;  opacity: 0.7; }
  100% { width: 110px; height: 110px; opacity: 0; }
}

.wreck-label {
  white-space: nowrap;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.9;
  pointer-events: none;
  margin-top: 4px;
  -webkit-text-stroke: 0px #000;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.palmyra-label {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.9;
  pointer-events: none;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  #map-scroll, #data-scroll { flex-direction: column; }

  #map-sticky-panel {
    position: sticky;
    top: 0;
    width: 100%;
    height: 45vh;
    border-right: none;
    border-bottom: none;
    z-index: 15;
  }

  #map-steps, #data-steps { width: 100%; }
  .map-step, #data-steps .step {
    min-height: 80vh;
    padding: 0 1.5rem;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .map-step .step-content {
    position: sticky;
    top: 47vh;
    z-index: 9;
    background: rgba(6,13,26,0.92);
    border-radius: 8px;
    padding: 1rem 1rem 1.5rem;
  }


  #data-steps .step .step-content {
    position: sticky;
    top: 65vh;
    z-index: 9;
    background: rgba(6,13,26,0.92);
    border-radius: 8px;
    padding: 1rem 1rem 1.5rem;
  }

  .map-step .step-content,
  #data-steps .step .step-content {
    opacity: 0 !important;
    transition: opacity 0.35s;
  }

  .map-step.is-active .step-content,
  #data-steps .step.is-active .step-content {
    opacity: 1 !important;
  }

  #data-scroll-header {
    position: sticky;
    top: 0;
    z-index: 11;
    background: var(--bg);
  }

  #data-chart-panel {
    position: sticky;
    width: 100%;
    height: 45vh;
    max-height: 45vh;
    overflow: hidden;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem;
    z-index: 15;
    background: var(--bg);
    justify-content: flex-start;
  }

  #data-chart { max-height: 32vh; }

  .treatment-grid { grid-template-columns: 1fr 1fr; }
  .tcard:nth-child(n) { grid-column: span 1; }
  .tcard:nth-child(1), .tcard:nth-child(2) { grid-column: span 1; }

  .sandbox-controls { max-width: 100%; }
  #sandbox-chart, #sandbox-chart-header { max-width: 100%; }
  #sandbox-legend { max-width: 100%; }

  .comm-controls { flex-wrap: wrap; gap: 0.75rem; }

  .methods-point { flex-direction: column; gap: 0.75rem; }
  .methods-num { font-size: 1.8rem; width: auto; text-align: left; }

  .wreck-marker { font-size: 32px; }
  .wreck-pulse { width: 32px; height: 32px; }

  .conc-point { flex-direction: column; gap: 0.5rem; }
  .conc-num { font-size: 1.5rem; }

  #treatments, #sandbox, #community-section, #methods, #conclusion {
    padding: 4rem 1.5rem;
  }

  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  #hero h1 { font-size: 1.9rem; }

  .banner-beats { font-size: 1.2rem; }
  .banner-sub   { font-size: 1rem; }

  .treatment-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .tcard:nth-child(n) { grid-column: span 1; }
  .tcard:nth-child(1), .tcard:nth-child(2) { grid-column: span 1; }
  .trow-label { font-size: 0.8rem; }

  .ctrl-group { flex-wrap: wrap; }
  .ctrl-label { min-width: unset; }
  .pill { font-size: 0.62rem; padding: 0.32rem 0.6rem; }

  .bleach-zone-label { font-size: 0.52rem; }

  .step-content h2 { font-size: 1.3rem; }

  #community-section, #sandbox { padding: 3rem 1rem; }
  #conclusion { padding: 3rem 1rem; }
  .conc-fig img { border-radius: 4px; }

  footer { padding: 1.2rem 1rem; }
}
