/* =====================================================================
   explainers2.css
   The five interactive beats, rendered in the hero's language.

   Ground: a navy-indigo aurora lit at the corners, falling to near-black
   at the centre where the point clouds live. Point clouds and hairlines
   with bloom-like cores drawn on a 2D canvas per beat. The drawn-knob kit
   kept whole, restyled for the dark, plus one arc for the koi beat. Two
   type registers only: a tracked uppercase micro-label and one Libre
   Baskerville italic verdict line per beat.

   Two beats stand on the koi photograph (.dx-beat.koi). There, and only
   there, the brass warms toward the koi's own orange. Everywhere else
   stays navy and pale blue.

   No fine print inside a beat. The honesty text lives once, at the
   sources, in .dx-honesty.

   Loads AFTER the page <style> block. Reuses the page tokens.
   ===================================================================== */

.dx {
  --dx-ground: #0b0e18;
  --dx-pale: #dbe6f6;
  --dx-mid: #a0b8dc;
  --dx-deep: #33407a;
  --dx-brass: #c99b45;
  --dx-line: rgba(219, 230, 246, 0.22);
}
/* the koi beats: brass warms toward the fish */
.dx-beat.koi { --dx-brass: #d98c3e; }

/* =====================================================================
   1 . The lit stage
   ===================================================================== */

.dx-beat {
  position: relative;
  margin-top: 34px;
  border: 1px solid rgba(219, 230, 246, 0.16);
  border-radius: 3px;
  background: var(--dx-ground);
  padding: 34px 34px 26px;
  overflow: hidden;
  isolation: isolate;
}
.dx-beat::before {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 78% 66% at 0% 0%, rgba(44, 55, 98, 0.98), rgba(24, 31, 58, 0.44) 46%, transparent 74%),
    radial-gradient(ellipse 78% 70% at 100% 100%, rgba(42, 53, 94, 0.94), rgba(24, 31, 58, 0.42) 46%, transparent 74%),
    radial-gradient(ellipse 64% 50% at 100% 2%, rgba(36, 45, 84, 0.78), transparent 70%),
    radial-gradient(ellipse 64% 50% at 0% 100%, rgba(34, 43, 80, 0.72), transparent 70%);
}
.dx-beat::after {
  content: '';
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 62% 62% at 50% 46%,
    rgba(4, 5, 10, 0.74) 0%, rgba(4, 5, 10, 0.40) 50%, transparent 80%);
}
.dx-beat > * { position: relative; z-index: 2; }

.dx-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  margin-bottom: 22px;
}

/* =====================================================================
   2 . Type: two registers, plus the hero's numeric readout
   ===================================================================== */

.dx-lab {
  font-family: var(--font-headline); font-weight: 500;
  font-size: 12px; line-height: 1.3; letter-spacing: 0.20em; text-transform: uppercase;
  color: rgba(243, 239, 230, 0.85);
  white-space: nowrap;
}
.dx-lab.on {
  font-size: 13px; letter-spacing: 0.22em;
  color: rgba(243, 239, 230, 0.97);
}
.dx-lab.brass { color: var(--dx-brass); }
.dx-lab.wrap { white-space: normal; }
.dx-head .dx-lab { white-space: normal; }
.dx-lab.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* the one hint per beat: it says what to do, once, then leaves */
.dx-hint {
  font-family: var(--font-headline); font-weight: 500; font-size: 12px;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: rgba(243, 239, 230, 0.68);
  text-align: center; margin-bottom: 8px;
  transition: opacity 700ms var(--ease-standard);
}
.dx-hint.gone { opacity: 0; }
/* on the water it floats over the photograph */
.dx-hint.pond {
  position: absolute; left: 0; right: 0; bottom: 20px;
  margin: 0; z-index: 5; pointer-events: none;
  color: rgba(243, 239, 230, 0.82);
  text-shadow: 0 1px 14px rgba(4, 6, 10, 0.9);
}

.dx-verdict {
  margin-top: 28px;
  font-family: var(--font-editorial); font-style: italic;
  font-size: 22px; line-height: 1.56; letter-spacing: -0.004em;
  color: #dbe6f6;
  max-width: 52ch;
  min-height: 3.3em;
}
.dx-verdict .r { display: block; }
.dx-verdict .r + .r { margin-top: 12px; color: rgba(214, 228, 248, 0.82); }
.dx-verdict .n {
  font-family: var(--font-headline); font-style: normal; font-weight: 500;
  font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--dx-brass);
  margin-right: 14px; vertical-align: 0.12em;
}
.dx-verdict .r + .r .n { color: rgba(176, 198, 232, 0.95); }

/* =====================================================================
   3 . The canvas stage and its label layer
   ===================================================================== */

.dx-stage { position: relative; width: 100%; }
.dx-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dx-layer { position: absolute; inset: 0; pointer-events: none; }
.dx-layer .dx-lab {
  position: absolute;
  transition: opacity 260ms var(--ease-standard), color 260ms var(--ease-standard);
}
.dx-grab {
  position: absolute; cursor: crosshair; touch-action: none;
  border-radius: 3px; outline: none;
}
.dx-grab:focus-visible { box-shadow: 0 0 0 2px rgba(217, 140, 62, 0.6); }

/* =====================================================================
   4 . The pond: a photograph that breathes, a scrim that never moves
   ===================================================================== */

.dx-stage.pond {
  height: 420px; border-radius: 3px; overflow: hidden; background: #050708;
}
.dx-stage.pond.tall { height: 460px; }
.dx-stage.pond img {
  position: absolute; inset: -5%;
  width: 110%; height: 110%;
  object-fit: cover; object-position: 46% 58%;
  animation: dx-drift 46s ease-in-out infinite alternate;
  will-change: transform;
}
/* darkness only where type sits: the top strip and the bottom strip */
.dx-stage.pond::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(4, 8, 10, 0.62) 0%, rgba(4, 8, 10, 0.10) 26%, transparent 46%),
    linear-gradient(to top, rgba(4, 8, 10, 0.80) 0%, rgba(4, 8, 10, 0.34) 24%, transparent 52%);
}
.dx-stage.pond canvas { z-index: 2; }
.dx-stage.pond .dx-layer,
.dx-stage.pond .dx-grab { z-index: 3; }
.dx-stage.pond .dx-grab { inset: 0; }

/* the one number on the water */
.dx-tick {
  position: absolute; right: 20px; top: 16px; z-index: 4;
  font-family: var(--font-headline); font-weight: 300;
  font-size: 34px; line-height: 1; letter-spacing: -0.02em;
  color: var(--cream);
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  text-shadow: 0 1px 16px rgba(4, 6, 10, 0.85);
  pointer-events: none;
}

/* =====================================================================
   5 . The drawn-knob kit, on the dark
   ===================================================================== */

.dx-ctl-wrap { max-width: 400px; margin: 30px auto 0; }
.dx-ctl-wrap.wide { max-width: 900px; }
.dx-ctl-wrap.arc { max-width: 460px; margin-top: 22px; }
.dx-ctl { display: block; width: 100%; height: auto; overflow: visible; touch-action: none; }
.dx-ctl-ends {
  display: flex; justify-content: space-between; gap: 14px; margin-top: 6px;
  font-family: var(--font-headline); font-weight: 500; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(243, 239, 230, 0.72);
}
.dx-ctl-ends.four > span { flex: 1 1 0; text-align: center; }
.dx-ctl-ends.four > span:first-child { text-align: left; }
.dx-ctl-ends.four > span:last-child { text-align: right; }

.dx-track.base { fill: rgba(219, 230, 246, 0.22); }
.dx-track.fill { fill: var(--dx-brass); fill-opacity: 0.6; }
.dx-detent { stroke: rgba(219, 230, 246, 0.32); stroke-width: 1; }

.dx-knob-g { cursor: grab; touch-action: none; outline: none; }
.dx-knob-g:active { cursor: grabbing; }
.dx-knob { fill: var(--dx-brass); stroke: #050507; stroke-width: 1.5; }
.dx-knob-glow { fill: var(--dx-brass); opacity: 0.16; }
.dx-knob-hit { fill: transparent; }
.dx-knob-ring { fill: none; stroke: var(--dx-brass); stroke-width: 2; opacity: 0; }
.dx-knob-g:focus-visible .dx-knob-ring { opacity: 1; }
.dx-knob-hint { fill: none; stroke: var(--dx-brass); stroke-width: 1.5; opacity: 0; }
.dx-knob-hint.breathe { animation: dx-breathe 1s var(--ease-standard) 2; }
@keyframes dx-breathe {
  0%   { r: 22; opacity: 0.5; }
  100% { r: 30; opacity: 0; }
}

/* the arc: one hairline, from 40 to 17,000 */
.dx-arc { display: block; width: 100%; height: auto; overflow: visible; touch-action: none; }
.dx-arc-base { fill: none; stroke: rgba(219, 230, 246, 0.24); stroke-width: 1.25; }
.dx-arc-fill { fill: none; stroke: var(--dx-brass); stroke-width: 1.6; stroke-opacity: 0.85; }
.dx-arc-tick { stroke: rgba(219, 230, 246, 0.4); stroke-width: 1; }
.dx-arc-tick.thr { stroke: var(--dx-brass); stroke-width: 1.4; stroke-opacity: 0.95; }
.dx-arc-tick.det { stroke: rgba(219, 230, 246, 0.55); }
.dx-arc-t {
  font-family: var(--font-headline); font-weight: 500; font-size: 11.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  fill: rgba(243, 239, 230, 0.72);
}
.dx-arc-t.thr { fill: var(--dx-brass); text-anchor: start; }
.dx-arc-t.hi { text-anchor: end; }
/* the one number in the beat, sitting in the bowl of the arc */
.dx-arc-val {
  font-family: var(--font-headline); font-weight: 300; font-size: 27px;
  letter-spacing: -0.01em; fill: var(--cream);
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}

/* =====================================================================
   6 . The questions, as ripples on the water
   ===================================================================== */

.dx-marks { position: absolute; inset: 0; z-index: 3; }
.dx-q {
  position: absolute; transform: translate(-50%, -50%);
  border: 0; background: none; padding: 10px 12px; cursor: pointer;
  font-family: var(--font-headline); font-weight: 500; font-size: 12px;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: rgba(243, 239, 230, 0.92);
  text-shadow: 0 1px 3px rgba(2, 4, 6, 0.95), 0 2px 20px rgba(2, 4, 6, 0.9);
  white-space: nowrap;
  transition: color 300ms var(--ease-standard);
}
.dx-q span { position: relative; }
.dx-q span::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: rgba(243, 239, 230, 0.36);
  transition: background 300ms var(--ease-standard);
}
.dx-q:hover, .dx-q:focus-visible { color: var(--cream); }
.dx-q:focus-visible { outline: 2px solid rgba(217, 140, 62, 0.7); outline-offset: 2px; }
.dx-q.open { color: var(--dx-brass); }
.dx-q.open span::after { background: var(--dx-brass); }

.dx-q-panel {
  position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 4;
  max-width: 54ch;
  opacity: 0; transform: translateY(8px);
  transition: opacity 420ms var(--ease-standard), transform 420ms var(--ease-standard);
  pointer-events: none;
}
.dx-q-panel.open { opacity: 1; transform: none; }
.dx-q-panel .s {
  font-family: var(--font-body); font-weight: 300; font-size: 17px; line-height: 1.55;
  color: var(--cream);
  text-shadow: 0 1px 16px rgba(4, 6, 10, 0.9);
}
.dx-q-panel .q {
  margin-top: 10px;
  font-family: var(--font-editorial); font-style: italic; font-size: 16px; line-height: 1.5;
  color: rgba(233, 226, 213, 0.86);
  text-shadow: 0 1px 16px rgba(4, 6, 10, 0.9);
}
.dx-q-panel .q:empty { display: none; }

/* the reduced-motion column, off by default */
.dx-q-all { display: none; list-style: none; margin: 24px 0 0; padding: 0; }
.dx-q-all li { padding: 16px 0; border-top: 1px solid rgba(219, 230, 246, 0.14); }
.dx-q-all .k {
  display: block; margin-bottom: 8px;
  font-family: var(--font-headline); font-weight: 500; font-size: 12px;
  letter-spacing: 0.20em; text-transform: uppercase; color: var(--dx-brass);
}
.dx-q-all .s {
  display: block;
  font-family: var(--font-body); font-weight: 300; font-size: 16px; line-height: 1.6;
  color: rgba(243, 239, 230, 0.86);
}
.dx-q-all .q {
  display: block; margin-top: 8px;
  font-family: var(--font-editorial); font-style: italic; font-size: 15px; line-height: 1.5;
  color: rgba(219, 230, 246, 0.74);
}

/* =====================================================================
   7 . The photography plates
   ===================================================================== */

.dx-plate {
  position: relative;
  margin-top: 34px;
  height: 440px;
  border-radius: 3px;
  overflow: hidden;
  background: #050507;
}
.dx-plate img {
  position: absolute; inset: -6%;
  width: 112%; height: 112%;
  object-fit: cover;
  animation: dx-drift 42s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes dx-drift {
  from { transform: scale(1.00) translate3d(0, 0, 0); }
  to   { transform: scale(1.07) translate3d(-1.6%, -1.1%, 0); }
}
.dx-plate .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5, 5, 7, 0.80) 0%, rgba(5, 5, 7, 0.42) 30%, rgba(5, 5, 7, 0.04) 64%, transparent 100%);
}
.dx-plate .cap {
  position: absolute; left: 34px; right: 34px; bottom: 30px;
  max-width: 40ch;
}
.dx-plate .cap .k {
  display: block;
  font-family: var(--font-headline); font-weight: 500;
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(243, 239, 230, 0.85);
  margin-bottom: 12px;
}
.dx-plate .cap .l {
  font-family: var(--font-editorial); font-style: italic;
  font-size: 22px; line-height: 1.5; color: var(--cream);
}

/* =====================================================================
   8 . The honesty block, placed once at the sources
   ===================================================================== */

.dx-honesty { margin-top: 34px; }
.dx-honesty-k {
  font-family: var(--font-headline); font-weight: 500; font-size: 12px;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(243, 239, 230, 0.85); margin-bottom: 14px;
}
.dx-fine {
  margin-top: 14px;
  font-family: var(--font-body); font-weight: 300;
  font-size: 13.5px; line-height: 1.7;
  color: rgba(243, 239, 230, 0.6);
  max-width: 78ch;
}
.dx-fine .b { color: rgba(243, 239, 230, 0.82); }

/* =====================================================================
   9 . Mobile
   ===================================================================== */

@media (max-width: 720px) {
  .dx-beat { padding: 22px 16px 18px; margin-top: 26px; }
  .dx-head { margin-bottom: 18px; }
  .dx-lab { font-size: 12px; letter-spacing: 0.13em; }
  .dx-lab.on { font-size: 13px; letter-spacing: 0.15em; }
  .dx-verdict { font-size: 19px; margin-top: 22px; }
  .dx-fine { font-size: 13px; }

  .dx-ctl-wrap, .dx-ctl-wrap.wide { max-width: none; }
  .dx-ctl-ends { font-size: 12px; letter-spacing: 0.10em; gap: 10px; }
  .dx-ctl-ends.four { gap: 6px; letter-spacing: 0.06em; }

  .dx-stage.pond { height: 430px; }
  .dx-stage.pond.tall { height: 520px; }
  .dx-stage.pond img { object-position: 44% 56%; }
  .dx-tick { font-size: 26px; right: 14px; top: 12px; }
  .dx-arc-t { font-size: 15px; letter-spacing: 0.06em; }
  .dx-arc-val { font-size: 32px; }
  .dx-q { font-size: 11.5px; letter-spacing: 0.12em; padding: 8px 8px; }
  .dx-q-panel { left: 16px; right: 16px; bottom: 16px; }
  .dx-q-panel .s { font-size: 15.5px; }
  .dx-q-panel .q { font-size: 14.5px; }

  .dx-plate { height: 300px; margin-top: 26px; }
  .dx-plate .cap { left: 20px; right: 20px; bottom: 22px; }
  .dx-plate .cap .l { font-size: 18px; }
}

/* =====================================================================
   10 . Reduced motion
   Every beat keeps a settled state that still teaches, and every control
   stays usable. The four questions open together, in a column.
   ===================================================================== */

@media (prefers-reduced-motion: reduce) {
  .dx-knob-hint.breathe { animation: none; }
  .dx-plate img, .dx-stage.pond img { animation: none; transform: scale(1.03); }
  .dx-layer .dx-lab { transition: none; }
  .dx-hint, .dx-q, .dx-q-panel, .dx-q span::after { transition: none; }

  #dxPond .dx-marks,
  #dxPond .dx-q-panel,
  #dxPond .dx-hint { display: none; }
  #dxPond .dx-stage.pond.tall { height: 260px; }
  .dx-q-all { display: block; }
}
