/* ============================================================
   monopole.quest — seapunk field expedition log
   Palette: #06b6c9 Lagoon Cyan · #0a8a8f Verdigris · #1d6a5a Kelp Green
            #7df3e4 Seafoam · #f4ede0 Wet Sand · #11201f Abyssal
            #e8743b Coral Flag (used sparingly — the anomaly)
   Fonts: Bricolage Grotesque (display) · Archivo Black (numerals)
          Spline Sans Mono (logbook) · Newsreader italic (paper quotes)
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --lagoon: #06b6c9;
  --verdigris: #0a8a8f;
  --kelp: #1d6a5a;
  --seafoam: #7df3e4;
  --sand: #f4ede0;
  --abyssal: #11201f;
  --coral: #e8743b;

  /* water-column gradient stops, animated per section */
  --wc-top: #f4ede0;
  --wc-bot: #7df3e4;

  --rake: 15deg;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  color: var(--abyssal);
  background: var(--abyssal);
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: "Spline Sans Mono", ui-monospace, monospace; }

/* ---------- fixed water-column background ---------- */
#water-column {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: linear-gradient(180deg, var(--wc-top) 0%, var(--wc-bot) 100%);
  transition: --wc-top 900ms linear, --wc-bot 900ms linear, background 900ms linear;
}
/* register custom props for transition (where supported) */
@property --wc-top { syntax: '<color>'; inherits: true; initial-value: #f4ede0; }
@property --wc-bot { syntax: '<color>'; inherits: true; initial-value: #7df3e4; }

/* ---------- marine snow ---------- */
#marine-snow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.snow-dot {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--seafoam);
  opacity: 0.4;
  /* squarish flake, not a bubble — keep edges sharp */
}

/* ---------- depth-meter razor rail ---------- */
#depth-rail {
  position: fixed;
  top: 0; left: 0;
  width: 64px;
  height: 100vh;
  z-index: 40;
  pointer-events: none;
}
#rail-track {
  position: absolute;
  left: 22px; top: 0;
  width: 4px;
  height: 100%;
  background: var(--verdigris);
  opacity: 0.85;
}
#rail-cap {
  position: absolute;
  left: -3px;
  width: 10px;
  height: 26px;
  background: var(--lagoon);
  top: 0;
  box-shadow: 0 0 12px rgba(125,243,228,0.6);
  transition: top 240ms linear;
}
#depth-readout {
  position: absolute;
  left: 34px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: left center;
  white-space: nowrap;
  font-family: "Archivo Black", system-ui, sans-serif;
}
#depth-number {
  font-size: 1.9rem;
  color: var(--abyssal);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(244,237,224,0.5);
}
#depth-unit {
  font-size: 1rem;
  margin-left: 0.25em;
  color: var(--verdigris);
}
/* on deep sections the rail text needs to read against dark */
.deep-active #depth-number { color: var(--seafoam); text-shadow: none; }
.deep-active #depth-unit { color: var(--seafoam); }

/* ---------- vessel coordinate overlay ---------- */
#coord-overlay {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 40;
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--verdigris);
  background: rgba(244,237,224,0.55);
  padding: 5px 12px 5px 16px;
  border-left: 2px solid var(--verdigris);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
  text-transform: uppercase;
}
.coord-sep { opacity: 0.5; margin: 0 0.35em; }
#coord-status.anomaly {
  color: var(--coral);
  font-weight: 600;
}
.deep-active #coord-overlay {
  background: rgba(17,32,31,0.55);
  border-left-color: var(--seafoam);
  color: var(--seafoam);
}

/* ---------- manatee cursor companion ---------- */
#companion {
  position: fixed;
  top: 0; left: 0;
  z-index: 45;
  pointer-events: none;
  transform: translate(-100px, -100px);
  transition: transform 60ms linear;
  will-change: transform;
}
#companion.rolling svg { animation: barrel-roll 900ms ease-in-out; }
@keyframes barrel-roll {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#wake-layer {
  position: fixed;
  inset: 0;
  z-index: 44;
  pointer-events: none;
}
.wake-mark {
  position: absolute;
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.7rem;
  color: var(--seafoam);
  opacity: 0.8;
  transition: opacity 700ms linear, transform 700ms linear;
  text-shadow: 0 0 6px rgba(125,243,228,0.5);
  user-select: none;
}

/* ============================================================
   DEPTH STATIONS — full-viewport parallax sections
   ============================================================ */
main { position: relative; z-index: 1; }

.depth-station {
  position: relative;
  min-height: 100vh;
  padding: clamp(3rem, 8vh, 7rem) clamp(1.5rem, 6vw, 6rem) clamp(3rem, 8vh, 7rem) clamp(4.5rem, 8vw, 8rem);
  overflow: hidden;
  display: flex;
  align-items: center;
  /* angled wipe reveal mask — alternates direction */
  --wipe: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.depth-station::before {
  /* faint isobath contour fill in negative space */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-radial-gradient(circle at 80% 30%, transparent 0 38px, rgba(125,243,228,0.05) 38px 39px),
    repeating-radial-gradient(circle at 15% 85%, transparent 0 46px, rgba(125,243,228,0.04) 46px 47px);
  pointer-events: none;
  z-index: 0;
}
.depth-station.deep { color: var(--seafoam); }
.depth-station.seabed { align-items: flex-start; }
.depth-station.resurface { align-items: center; }

/* parallax layers */
.parallax-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.layer-far { z-index: 0; opacity: 0.9; }
.layer-mid { z-index: 1; opacity: 0.9; }
.layer-near {
  position: relative;
  z-index: 3;
  width: 100%;
  pointer-events: auto;
  display: flex;
  inset: auto;
}
.station-content { max-width: 1180px; margin: 0 auto; width: 100%; }

.horizon-svg, .seabed-contour {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: 60%;
}
.depth-station.resurface .horizon-svg { top: 10%; height: 40%; bottom: auto; }
.isobath-band {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.wave-glyph {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 8%; width: min(70vw, 900px); height: auto;
}
.kelp-frond { position: absolute; right: 6%; bottom: 0; height: 70%; width: auto; }
.sonar-arcs { position: absolute; left: -4%; bottom: -4%; width: 50vw; height: 50vw; max-width: 640px; max-height: 640px; }
.hammerhead-glyph { position: absolute; left: 4%; top: 12%; width: min(40vw, 460px); height: auto; }
.nautilus-glyph { position: absolute; right: 5%; bottom: 8%; width: min(30vw, 320px); height: auto; }
.submersible-glyph { position: absolute; right: 4%; top: 30%; width: min(36vw, 420px); height: auto; }

/* ---------- frayed Dirac-string rope between sections ---------- */
.frayed-rope {
  position: absolute;
  left: 14%;
  bottom: -90px;
  width: 24px;
  height: 160px;
  z-index: 5;
  pointer-events: none;
}
.frayed-rope svg { width: 100%; height: 100%; }
.deep-rope { left: 70%; bottom: -110px; height: 180px; }

/* ============================================================
   SECTION 1 — SURFACE
   ============================================================ */
.masthead { max-width: 900px; }
.vessel-line {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--verdigris);
  margin-bottom: 1.4rem;
  transform: rotate(-1deg);
}
.vessel-name { color: var(--abyssal); font-weight: 600; }

.domain-mark, .resurface-mark {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 8.5vw, 6.5rem);
  letter-spacing: -0.02em;
  line-height: 0.92;
  color: var(--abyssal);
  text-transform: lowercase;
  display: inline-block;
  transform: rotate(-1.5deg);
}
.pole-dot {
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  background: var(--lagoon);
  margin: 0 0.06em;
  vertical-align: baseline;
  /* a single pole — a dot with no opposite. lozenge, not circle. */
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.mission-statement {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  max-width: 640px;
  margin-top: 1.8rem;
  color: var(--abyssal);
  transform: rotate(0.5deg);
}
.day-count {
  margin-top: 1.6rem;
  font-size: 1rem;
  color: var(--verdigris);
  font-weight: 500;
}
.day-num { color: var(--abyssal); font-family: "Archivo Black", sans-serif; font-size: 1.05em; }
.ping-trigger-title { color: var(--kelp); }

.sonar-host { position: relative; width: 0; height: 0; }
.sonar-ping {
  position: absolute;
  border: 2px solid var(--seafoam);
  border-radius: 50%;
  width: 10px; height: 10px;
  transform: translate(-50%, -50%);
  opacity: 0.7;
  pointer-events: none;
  animation: sonar-expand 1.8s ease-out forwards;
}
@keyframes sonar-expand {
  0% { width: 10px; height: 10px; opacity: 0.7; }
  100% { width: 520px; height: 520px; opacity: 0; }
}

/* ============================================================
   SECTION HEAD BARS — stenciled hull markings, cut on a diagonal
   ============================================================ */
.section-head-bar {
  display: inline-block;
  background: var(--verdigris);
  color: var(--sand);
  padding: 0.7rem 2.4rem 0.7rem 1.6rem;
  margin-bottom: 2rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%);
  transform: rotate(-1deg);
  position: relative;
}
.section-head-bar[data-rake="right"] {
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%);
  transform: rotate(1deg);
}
.section-head-bar::after {
  /* rivet dots */
  content: "";
  position: absolute;
  right: 30px; top: 8px;
  width: 4px; height: 4px;
  background: var(--sand);
  box-shadow: 0 14px 0 var(--sand), -10px 7px 0 var(--sand);
  opacity: 0.6;
}
.section-head-bar.coral-bar {
  background: var(--coral);
  color: var(--abyssal);
}
.section-head-bar.coral-bar::after { background: var(--abyssal); box-shadow: 0 14px 0 var(--abyssal), -10px 7px 0 var(--abyssal); opacity: 0.4; }
.section-index {
  display: block;
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.15rem;
}
.section-title {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.section-lede, .section-lede.mono {
  max-width: 720px;
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  margin-bottom: 2.6rem;
  transform: rotate(0.4deg);
}
.depth-station.deep .section-lede { color: var(--seafoam); }

/* ============================================================
   SECTION 2 — DIRAC CONDITION
   ============================================================ */
.dirac-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.dirac-text .lede {
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  margin-bottom: 1.8rem;
  transform: rotate(-0.5deg);
}
.nowrap { white-space: nowrap; }

.equation-frame {
  background: var(--sand);
  border: 2px solid var(--verdigris);
  padding: 1.6rem 1.8rem;
  margin: 1.6rem 0 1.8rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), 18px 100%, 0 100%);
  transform: skewX(-3deg) rotate(0.6deg);
  position: relative;
}
.equation-frame::before {
  content: "";
  position: absolute;
  left: 10px; top: 8px;
  width: 4px; height: 4px;
  background: var(--verdigris);
  box-shadow: 14px 0 0 var(--verdigris);
  opacity: 0.5;
}
.equation-inner { transform: skewX(3deg); }
.eq-main {
  display: block;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--abyssal);
  letter-spacing: 0.01em;
}
.eq-frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 0.15em; font-size: 0.7em; }
.eq-num { border-bottom: 2px solid var(--abyssal); padding: 0 0.2em; }
.eq-den { padding: 0 0.2em; }
.eq-caption {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--verdigris);
  letter-spacing: 0.02em;
}

.paper-quote {
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  color: var(--kelp);
  border-left: 3px solid var(--kelp);
  padding-left: 1.1rem;
  margin: 1.4rem 0;
  line-height: 1.5;
}
.depth-station.deep .paper-quote { color: var(--seafoam); border-left-color: var(--seafoam); }
.paper-cite { font-style: normal; font-family: "Spline Sans Mono", monospace; font-size: 0.85em; opacity: 0.8; }

/* field-line figure */
.fieldline-figure {
  background: rgba(244,237,224,0.6);
  border: 2px solid var(--verdigris);
  padding: 1.4rem;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  transform: rotate(1.2deg);
}
.fieldline-pair {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  align-items: center;
}
.fieldline-cell { text-align: center; }
.fieldline-cell svg { width: 100%; max-width: 240px; height: auto; }
.fieldline-cell figcaption {
  font-size: 0.74rem;
  color: var(--verdigris);
  letter-spacing: 0.03em;
  margin-top: 0.4rem;
}
.fieldline-hairline { background: var(--verdigris); align-self: stretch; opacity: 0.5; }
.figure-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--kelp);
  text-align: center;
}

/* monopole rays / dipole loops drawn by JS, animated here */
#monopole-rays path {
  stroke-dasharray: 110;
  stroke-dashoffset: 110;
}
#monopole-rays path.drawn {
  animation: ray-emanate 4s linear infinite;
}
@keyframes ray-emanate {
  0% { stroke-dashoffset: 110; opacity: 0.15; }
  20% { opacity: 1; }
  100% { stroke-dashoffset: -110; opacity: 0.15; }
}
#dipole-loops path {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  transition: stroke-dashoffset 1.5s ease-out;
}
#dipole-loops path.drawn { stroke-dashoffset: 0; }

/* ============================================================
   SECTION 3 — DETECTORS
   ============================================================ */
.detector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 3vw, 2.4rem);
}
.detector-card {
  background: var(--sand);
  color: var(--abyssal);
  padding: 1.5rem 1.5rem 1.7rem;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
  transform: rotate(-1.5deg);
  border: 1px solid var(--verdigris);
}
.detector-card[data-rake="right"] {
  clip-path: polygon(24px 0, 100% 0, 100% 100%, 0 100%, 0 24px);
  transform: rotate(1.8deg);
}
.detector-card[data-rake="left"]:nth-of-type(3) { transform: rotate(1deg); }
.card-rule { height: 3px; background: var(--verdigris); margin-bottom: 1rem; }
.detector-name {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
  color: var(--kelp);
}
.detector-illo {
  background: rgba(125,243,228,0.12);
  border: 1px solid rgba(10,138,143,0.3);
  padding: 0.6rem;
  margin-bottom: 1rem;
}
.detector-illo svg { width: 100%; height: auto; display: block; }
.detector-copy { font-size: 0.86rem; line-height: 1.6; }

/* ============================================================
   SECTION 4 — THE LONG WATCH (charts)
   ============================================================ */
.chart-figure { margin-bottom: 3.2rem; }
.chart-frame {
  background: var(--sand);
  border: 2px solid var(--verdigris);
  padding: 1.6rem 1.8rem 1.2rem;
  transform: skewX(-4deg) rotate(0.6deg);
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), 20px 100%, 0 100%);
}
.chart-frame::before {
  content: "";
  position: absolute;
  right: 14px; top: 10px;
  width: 4px; height: 4px;
  background: var(--verdigris);
  box-shadow: -14px 0 0 var(--verdigris), -28px 0 0 var(--verdigris);
  opacity: 0.45;
}
.chart-inner { transform: skewX(4deg); }
#nullchart {
  width: 100%;
  height: auto;
  background-image:
    linear-gradient(rgba(10,138,143,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,138,143,0.08) 1px, transparent 1px);
  background-size: 30px 30px;
  background-position: 60px 20px;
}
#nullline {
  stroke-dasharray: 720;
  stroke-dashoffset: 720;
  transition: stroke-dashoffset 2.2s ease-out;
}
#nullline.drawn { stroke-dashoffset: 0; }
#regline { opacity: 0; transition: opacity 1.4s ease 0.6s; }
#regline.drawn { opacity: 0.7; }
.axis-lab {
  font-family: "Spline Sans Mono", monospace;
  font-size: 13px;
  fill: var(--abyssal);
  letter-spacing: 0.02em;
}
.axis-max { font-family: "Archivo Black", sans-serif; font-size: 14px; fill: var(--verdigris); }
.anomaly-lab {
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px;
  fill: var(--coral);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.anomaly-lab.shown { opacity: 1; }
.chart-axis-title {
  transform: skewX(4deg);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--verdigris);
  text-transform: uppercase;
  margin-top: 0.8rem;
  text-align: center;
}
.chart-cap { margin-top: 1.4rem; max-width: 760px; }
.chart-cap-plain { font-size: 0.88rem; margin-top: 0.8rem; }

/* oscilloscope trace */
.trace-figure { margin-top: 1rem; }
.trace-frame {
  background: var(--abyssal);
  border: 2px solid var(--kelp);
  padding: 1.4rem 1.5rem 1.2rem;
  transform: rotate(-0.8deg);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  color: var(--seafoam);
}
.trace-title {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--seafoam);
  margin-bottom: 0.8rem;
}
#scope {
  width: 100%;
  height: auto;
  display: block;
  background: var(--abyssal);
  border: 1px solid rgba(125,243,228,0.25);
}
.trace-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  margin-top: 0.8rem;
  font-size: 0.74rem;
  color: var(--seafoam);
}
.legend-item { display: flex; align-items: center; gap: 0.5rem; }
.swatch-line { width: 24px; height: 0; border-top: 2px solid var(--seafoam); display: inline-block; }
.swatch-noise { border-top-style: solid; }
.swatch-ghost { border-top-style: dotted; border-top-width: 2px; opacity: 0.7; }

/* ============================================================
   SECTION 5 — THE VALENTINE'S DAY EVENT
   ============================================================ */
.ghost-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.ghost-illo {
  background: rgba(17,32,31,0.4);
  border: 1px solid rgba(125,243,228,0.2);
  padding: 1.4rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), 22px 100%, 0 100%);
  transform: rotate(-1.5deg);
}
.ghost-illo svg { width: 100%; height: auto; }
.ghost-tag { font-family: "Spline Sans Mono", monospace; font-size: 12px; fill: var(--coral); letter-spacing: 0.04em; }
.ghost-tag.dim { fill: var(--seafoam); opacity: 0.6; }
.ghost-text { color: var(--seafoam); }
.ghost-open {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: -0.01em;
  color: var(--seafoam);
  margin-bottom: 1.2rem;
  transform: rotate(0.6deg);
}
.ghost-body { font-size: 0.92rem; margin: 1rem 0; line-height: 1.66; }
.ghost-quietline {
  margin-top: 1.6rem;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(125,243,228,0.25);
  padding-top: 0.9rem;
}
.status-anom { color: var(--coral); font-weight: 600; letter-spacing: 0.08em; }

/* ============================================================
   SECTION 6 — WHY WE KEEP LOOKING (logbook)
   ============================================================ */
.logbook-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  max-width: 1100px;
}
.logbook-card {
  background: var(--sand);
  color: var(--abyssal);
  padding: 1.6rem 1.7rem 1.8rem;
  position: relative;
  /* one clipped corner — index card */
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
  border: 1px solid rgba(10,138,143,0.4);
  /* slide-up animation start state */
  opacity: 0;
  transform: translateY(28px) rotate(var(--card-rot, 1deg));
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.34,1.56,.64,1);
}
.logbook-card[data-rake="1"] { --card-rot: 1.4deg; }
.logbook-card[data-rake="-2"] { --card-rot: -2deg; }
.logbook-card[data-rake="2"] { --card-rot: 2deg; }
.logbook-card[data-rake="-1"] { --card-rot: -1.2deg; }
.logbook-card.settled {
  opacity: 1;
  transform: translateY(0) rotate(var(--card-rot, 1deg));
}
.card-corner-rule { height: 3px; background: var(--verdigris); margin-bottom: 1rem; width: 60%; }
.log-day {
  font-family: "Archivo Black", sans-serif;
  font-size: 0.95rem;
  color: var(--verdigris);
  letter-spacing: 0.02em;
  margin-bottom: 0.7rem;
}
.log-body { font-size: 0.9rem; line-height: 1.68; }
.final-card { grid-column: 1 / -1; }
.closing-sign { color: var(--verdigris); font-style: normal; }

/* ============================================================
   SECTION 7 — RESURFACE / FOOTER
   ============================================================ */
.resurface-footer { max-width: 820px; text-align: left; }
.resurface-mark { color: var(--abyssal); transform: rotate(-1deg); margin-bottom: 1.4rem; }
.resurface-line {
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  color: var(--abyssal);
  margin-bottom: 1.2rem;
  transform: rotate(0.4deg);
}
.resurface-meta {
  font-size: 0.82rem;
  color: var(--verdigris);
  letter-spacing: 0.04em;
  margin-bottom: 1.8rem;
}
.back-deck {
  background: var(--verdigris);
  color: var(--sand);
  border: none;
  padding: 0.8rem 1.6rem;
  font-family: "Spline Sans Mono", monospace;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
  transform: rotate(-0.8deg);
  transition: background 0.2s ease, transform 0.2s ease;
}
.back-deck:hover {
  background: var(--lagoon);
  color: var(--abyssal);
  transform: rotate(-0.8deg) translateY(-2px);
}
.colophon {
  margin-top: 2rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--verdigris);
  opacity: 0.7;
}

/* ---------- single-pole bullet (recurring micro-motif) ---------- */
.single-pole-bullet {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  background: var(--lagoon);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  margin: 0 0.2em;
  vertical-align: middle;
}
.single-pole-bullet.coral { background: var(--coral); }
.depth-station.deep .single-pole-bullet { background: var(--seafoam); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .dirac-grid, .ghost-grid { grid-template-columns: 1fr; }
  .detector-grid { grid-template-columns: 1fr; }
  .logbook-stack { grid-template-columns: 1fr; }
  .final-card { grid-column: auto; }
  .depth-station { padding-left: clamp(3.5rem, 14vw, 5rem); }
  #depth-readout { left: 30px; }
  #depth-number { font-size: 1.4rem; }
}
@media (max-width: 560px) {
  .domain-mark, .resurface-mark { font-size: clamp(2rem, 12vw, 3rem); }
  .section-head-bar { padding-right: 1.6rem; }
  #coord-overlay { font-size: 0.62rem; }
}

/* ============================================================
   REDUCED MOTION — collapse parallax, stop breathing/cursor
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .parallax-layer { transform: none !important; }
  #companion, #wake-layer { display: none !important; }
  #monopole-rays path.drawn { animation: none; stroke-dashoffset: 0; opacity: 1; }
  .sonar-ping { animation: none; display: none; }
  #rail-cap { transition: none; }
  .logbook-card { transition: opacity 0.3s linear; transform: rotate(var(--card-rot,1deg)); }
  .logbook-card.settled { transform: rotate(var(--card-rot,1deg)); }
  #nullline { transition: none; stroke-dashoffset: 0; }
}
