/* =====================================================================
   THE CARBON STORY — cinematic KPI walkthrough (pure addon)
   ---------------------------------------------------------------------
   Every selector is namespaced #wt-* / .wt-*. Nothing here touches an
   existing class, element or custom property of the dashboard.
   No SVG. All marks, rules, ticks and transitions are CSS.
   ===================================================================== */

@property --wt-ang { syntax: "<angle>";  inherits: false; initial-value: 0deg; }
@property --wt-r   { syntax: "<length>"; inherits: false; initial-value: 0px;  }

/* ---------------------------------------------------------------------
   1. Entry point — a special "Carbon Story" card that sits in the hero
   row, in the empty half to the RIGHT of the gross-emissions balance
   card (above the KPI grid). walkthrough.js builds it and slots it there;
   `.wt-hero-host` (added to `.hero-row` only while the card is present)
   turns that row into a two-up flex layout so the card fills the gap and
   matches the balance card's height. Background is the entrykct.mp4
   footage; a light spins around the border on hover. No SVG. app.js /
   styles.css are never touched.
   --------------------------------------------------------------------- */

/* make the hero row a two-up layout — only while our card is hosted, so
   removing the card reverts the row to exactly how the dashboard left it */
.hero-row.wt-hero-host {
  display: flex;
  align-items: stretch;
  gap: 16px;
}
.hero-row.wt-hero-host > .balance { margin-bottom: 0; }

#wt-fab.wt-cta-kpi {
  --a: var(--green);
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  padding: 22px clamp(20px, 2.4vw, 26px);
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  /* the standing glow that marks it as the special one at a glance */
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--green) 42%, transparent),
    0 14px 34px -10px color-mix(in srgb, var(--green) 50%, transparent);
  /* entrance — fades/rises in */
  opacity: 0;
  transform: translateY(10px) scale(.99);
  transition:
    opacity .5s ease,
    transform .6s cubic-bezier(.16, 1, .3, 1),
    box-shadow .3s ease;
  animation: wt-cta-glow 3.6s ease-in-out infinite;
}
#wt-fab.wt-cta-kpi.is-visible { opacity: 1; transform: none; }
@keyframes wt-cta-glow {
  0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 34%, transparent),
                          0 10px 26px -10px color-mix(in srgb, var(--green) 40%, transparent); }
  50%      { box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 64%, transparent),
                          0 18px 46px -8px color-mix(in srgb, var(--green) 62%, transparent); }
}

/* the entrykct footage, full-bleed */
.wt-cta-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: wt-cta-drift 22s ease-in-out infinite alternate;
}
@keyframes wt-cta-drift {
  from { transform: scale(1.06) translate(0, 0); }
  to   { transform: scale(1.11) translate(-2%, -1.5%); }
}
/* darkened just enough that the white copy always reads on the video */
.wt-cta-tint {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 18, 12, .30) 0%, rgba(6, 18, 12, .58) 54%, rgba(5, 14, 10, .88) 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--green) 30%, rgba(6, 18, 12, .5)), transparent 66%);
}

/* a slow light sweep across the glass */
.wt-cta-shine {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.wt-cta-shine::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -70%;
  width: 40%;
  height: 180%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .26), transparent);
  transform: skewX(-18deg);
  animation: wt-cta-sweep 6.5s ease-in-out infinite;
}
@keyframes wt-cta-sweep { 0%, 60% { left: -70%; } 100% { left: 140%; } }

/* the border. At rest: a soft, static green edge glow. On hover: a bright
   concentrated light that races around the outline (a narrow white arc on
   a conic gradient, spun via --wt-ang). Masked to a ~2px edge ring. */
.wt-cta-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 1.6px;
  pointer-events: none;
  background: conic-gradient(from var(--wt-ang),
    color-mix(in srgb, var(--green) 45%, transparent),
    color-mix(in srgb, var(--green2) 55%, transparent),
    color-mix(in srgb, var(--green) 45%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: .5;
  transition: opacity .35s ease;
}
@keyframes wt-spin { to { --wt-ang: 360deg; } }
/* the spinning light, revealed on hover */
#wt-fab.wt-cta-kpi:hover .wt-cta-glow {
  padding: 2px;
  opacity: 1;
  background: conic-gradient(from var(--wt-ang),
    transparent 0deg,
    transparent 286deg,
    color-mix(in srgb, var(--green2) 55%, #fff) 322deg,
    #ffffff 344deg,
    #eafff1 350deg,
    color-mix(in srgb, var(--green2) 60%, #fff) 360deg);
  animation: wt-spin 1.5s linear infinite;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--green2) 70%, transparent));
}

.wt-cta-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
}
.wt-cta-badge {
  align-self: flex-start;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  letter-spacing: .16em;
  font-weight: 600;
  text-transform: uppercase;
  color: #e8fff0;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 42%, rgba(0, 0, 0, .35));
  border: 1px solid color-mix(in srgb, var(--green2) 65%, transparent);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}
.wt-cta-copy { display: flex; flex-direction: column; gap: 8px; }
.wt-cta-title {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.02;
  letter-spacing: -.02em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .55);
}
.wt-cta-go {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #cdf4d8;
}
.wt-cta-arrow {
  font-style: normal;
  font-size: 14px;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}

/* hover: a gentle lift, brighter standing glow, arrow slides */
#wt-fab.wt-cta-kpi:hover {
  transform: translateY(-4px) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--green) 78%, transparent),
    0 22px 50px -10px color-mix(in srgb, var(--green) 70%, transparent) !important;
}
#wt-fab.wt-cta-kpi:hover .wt-cta-arrow { transform: translateX(6px); }
#wt-fab.wt-cta-kpi:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

@media (max-width: 720px) {
  /* stack under the balance card on narrow screens */
  .hero-row.wt-hero-host { flex-direction: column; }
  .hero-row.wt-hero-host > .balance { max-width: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  #wt-fab.wt-cta-kpi,
  .wt-cta-video,
  .wt-cta-shine::before,
  #wt-fab.wt-cta-kpi:hover .wt-cta-glow { animation: none !important; }
  #wt-fab.wt-cta-kpi { opacity: 1; transform: none; transition: opacity .2s linear; }
}

/* ---------------------------------------------------------------------
   2. The overlay — a fixed cinema, revealed by an expanding circle
   --------------------------------------------------------------------- */

#wt-overlay {
  --wt-vh: 100vh;
  --wt-black: #070c09;
  --wt-paper: #f2f5f1;
  --wt-x: 50%;
  --wt-y: 50%;
  --wt-r: 0px;

  position: fixed;
  inset: 0;
  z-index: 10000;                  /* above #kpi-sidebar (9999) */
  display: none;
  background: var(--wt-black);
  color: var(--wt-paper);
  clip-path: circle(var(--wt-r) at var(--wt-x) var(--wt-y));
  contain: paint;
}
#wt-overlay.is-active { display: block; }
#wt-overlay * { box-sizing: border-box; }

/* the scroll engine ------------------------------------------------- */
#wt-scroller {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;    /* never chains scroll to the dashboard */
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#wt-scroller::-webkit-scrollbar { width: 0; height: 0; display: none; }

#wt-track { position: relative; }

/* sticky stage holds every act; the cues below supply the scroll length */
#wt-frame {
  position: sticky;
  top: 0;
  z-index: 2;
  height: var(--wt-vh);
  margin-bottom: calc(var(--wt-vh) * -1);
  overflow: hidden;
}
.wt-cue  { position: relative; z-index: 1; height: calc(var(--wt-vh) * 1.6); pointer-events: none; }
.wt-tail { height: var(--wt-vh); pointer-events: none; }

/* ---------------------------------------------------------------------
   3. An act
   --------------------------------------------------------------------- */

.wt-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 900px;              /* gives the copy's parallax tilt real depth */
  will-change: opacity;
}

/* Acts blend as a pure opacity cross-dissolve on the stage, driven by
   compositor-only properties (opacity + transform). No animated masks and
   no scrubbed filters: masking or blurring a playing full-screen video
   repaints it on every scroll frame and stutters on ordinary GPUs. The
   dissolve has no edges at all, so the flow stays continuous by
   construction — and cheap enough to be fluid everywhere. */
.wt-plate {
  position: absolute;
  inset: 0;
  /* only shows through before the footage loads — kept faint so the video,
     once in, carries its own natural colour rather than an accent wash */
  background: color-mix(in srgb, var(--a) 15%, var(--wt-black));
}

/* midground haze — the layer that makes pointer parallax read as depth.
   Oversized so its edges can never slide into view. */
.wt-haze {
  position: absolute;
  inset: -16%;
  background: radial-gradient(58% 50% at 62% 38%, color-mix(in srgb, var(--a) 30%, transparent) 0%, transparent 72%);
  filter: blur(40px);
  opacity: .32;
  pointer-events: none;
  will-change: transform;
}

/* broad luminous band sweeping up with the dissolve — soft directional
   light, not a line. Travels by transform only; the blur is static and
   rasterised once, so the sweep costs nothing per frame. */
.wt-edge {
  position: absolute;
  left: -6%;
  right: -6%;
  top: 100%;
  height: 24vh;
  background: linear-gradient(to top, transparent, color-mix(in srgb, var(--a) 55%, transparent) 50%, transparent);
  filter: blur(30px);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
}

/* slow-sweeping light shafts on the two energy acts */
.wt-shaft {
  position: absolute;
  top: -22%;
  bottom: -22%;
  width: 17vw;
  transform: skewX(-17deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .075), transparent);
  filter: blur(26px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.wt-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .6s ease;
  will-change: transform;
}
.wt-media.is-ready { opacity: 1; }

/* film grade: a light touch of the act's accent in the shadows — enough to
   tie the footage to the act's colour, not enough to tint the whole frame */
.wt-grade {
  position: absolute;
  inset: 0;
  background: radial-gradient(88% 76% at 16% 84%, var(--a) 0%, transparent 64%);
  mix-blend-mode: soft-light;
  opacity: .42;
  pointer-events: none;
}
.wt-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(124% 104% at 50% 48%, transparent 40%, rgba(0, 0, 0, .58) 100%);
  pointer-events: none;
}
.wt-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 12, 9, .58) 0%, rgba(7, 12, 9, .12) 30%, rgba(7, 12, 9, .74) 76%, rgba(7, 12, 9, .94) 100%),
    linear-gradient(90deg, rgba(7, 12, 9, .86) 0%, rgba(7, 12, 9, .40) 40%, transparent 72%);
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   4. Copy
   --------------------------------------------------------------------- */

.wt-copy {
  position: absolute;
  left: clamp(24px, 7vw, 118px);
  right: clamp(24px, 7vw, 118px);
  bottom: clamp(84px, 15vh, 168px);
  max-width: 820px;
  opacity: 0;
  will-change: transform, opacity, filter;
}

/* the accent rule that grows beside the block */
.wt-rule {
  position: absolute;
  left: -26px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, var(--a), transparent 92%);
  transform: scaleY(0);
  transform-origin: 50% 0%;
}

.wt-eyebrow {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: rgba(242, 245, 241, .62);
  clip-path: inset(0 100% 0 0);
}
.wt-eyebrow .wt-idx { color: var(--a); }
.wt-eyebrow .wt-sep { color: rgba(242, 245, 241, .30); }
.wt-eyebrow .wt-name { color: rgba(242, 245, 241, .86); }

.wt-hair {
  height: 1px;
  width: 0%;
  margin: 18px 0 26px;
  background: linear-gradient(90deg, var(--a), rgba(242, 245, 241, .16) 62%, transparent);
}

.wt-head {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 6vw, 88px);
  line-height: .99;
  letter-spacing: -.035em;
  color: #fff;
}
.wt-line { display: block; overflow: hidden; }
.wt-line > i { display: block; font-style: normal; will-change: transform; }

.wt-metric {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 30px 0 26px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  transform-origin: 0% 50%;        /* the lock-in pulse grows from the left */
}
.wt-val-line {
  position: absolute;
  left: 0;
  bottom: -9px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--a), transparent);
}
.wt-val {
  font-size: clamp(30px, 4.4vw, 60px);
  font-weight: 500;
  letter-spacing: -.02em;
  color: #fff;
}
.wt-unit {
  font-size: clamp(12px, 1.05vw, 15px);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--a);
  filter: brightness(1.45);
}

.wt-def {
  margin: 0;
  max-width: 640px;
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: clamp(15px, 1.12vw, 18.5px);
  line-height: 1.64;
  color: rgba(242, 245, 241, .74);
}
.wt-w { display: inline-block; }   /* no will-change: ~450 spans would each get a layer */

/* "in other words" — the live equivalency line */
.wt-equiv {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin-top: 20px;
  max-width: 640px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12.5px;
  letter-spacing: .05em;
  line-height: 1.6;
  color: rgba(242, 245, 241, .60);
  clip-path: inset(0 100% 0 0);
}
.wt-equiv .wt-equiv-sign {
  color: var(--a);
  filter: brightness(1.5);
  font-size: 15px;
}
.wt-equiv b { color: #fff; font-weight: 500; }

/* the closing arithmetic — Gross − Avoided = Net */
.wt-ledger {
  width: min(430px, 100%);
  margin: 32px auto 6px;
  display: grid;
  gap: 13px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.wt-ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 26px;
}
.wt-ledger-row .k {
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(242, 245, 241, .52);
  white-space: nowrap;
}
.wt-ledger-row .n {
  font-size: 17px;
  color: rgba(242, 245, 241, .92);
}
.wt-ledger-rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(242, 245, 241, .05), rgba(242, 245, 241, .28), rgba(242, 245, 241, .05));
  transform: scaleX(0);
}
.wt-ledger-net .k { color: var(--a); filter: brightness(1.45); }
.wt-ledger-net .n {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -.02em;
  color: #fff;
}
.wt-ledger-net .n small {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .13em;
  margin-left: 9px;
  color: var(--a);
  filter: brightness(1.45);
}

.wt-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.wt-chip {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(242, 245, 241, .72);
  padding: 8px 13px;
  border: 1px solid rgba(242, 245, 241, .17);
  border-radius: 999px;
  background: rgba(242, 245, 241, .04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}
.wt-chip.is-accent { border-color: color-mix(in srgb, var(--a) 60%, transparent); color: #fff; }
.wt-chip.is-good { border-color: rgba(90, 165, 82, .55); }
.wt-chip.is-bad  { border-color: rgba(190, 75, 59, .55); }

/* ---------------------------------------------------------------------
   5. Title & closing cards

   Centred with grid, never with `transform` — the scrub timeline tweens
   `y` on .wt-copy, which would overwrite a translate(-50%,-50%).
   --------------------------------------------------------------------- */

/* The title still and the closing footage are both bright in the middle, where
   the copy sits. The edge-weighted scrim used by the KPI acts cannot carry
   centred text, so these cards get a centre-weighted one. */
.wt-centered .wt-scrim {
  background:
    radial-gradient(74% 64% at 50% 50%, rgba(7, 12, 9, .84) 0%, rgba(7, 12, 9, .58) 44%, rgba(7, 12, 9, .30) 72%, transparent 100%),
    linear-gradient(180deg, rgba(7, 12, 9, .66) 0%, rgba(7, 12, 9, .30) 34%, rgba(7, 12, 9, .40) 66%, rgba(7, 12, 9, .78) 100%);
}

.wt-centered .wt-copy {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  max-width: none;
  padding: 0 28px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}
.wt-centered .wt-copy > * { max-width: min(880px, 100%); }
.wt-centered .wt-rule { display: none; }
.wt-centered .wt-eyebrow { justify-content: center; }
.wt-centered .wt-hair { margin: 20px auto 28px; }
.wt-centered .wt-def { margin-inline: auto; }
.wt-centered .wt-metric { justify-content: center; }
.wt-centered .wt-chips { justify-content: center; }
.wt-act-0 .wt-head { font-size: clamp(44px, 8.2vw, 128px); }
.wt-act-0 .wt-def { font-size: clamp(15px, 1.35vw, 21px); color: rgba(242, 245, 241, .80); }

.wt-sub { margin-top: 30px; }

/* scroll cue on the title card */
#wt-hint {
  position: absolute;
  left: 50%;
  bottom: 8.5vh;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 14px;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}
#wt-hint.is-on { opacity: 1; }
#wt-hint span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(242, 245, 241, .5);
  padding-left: .34em;
}
#wt-hint i {
  position: relative;
  display: block;
  width: 1px;
  height: 52px;
  background: rgba(242, 245, 241, .16);
  overflow: hidden;
}
#wt-hint i::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1px;
  height: 18px;
  background: var(--green2);
  animation: wt-fall 2.1s cubic-bezier(.7, 0, .3, 1) infinite;
}
@keyframes wt-fall {
  0%   { transform: translateY(-20px); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(52px); opacity: 0; }
}

/* closing call to action */
.wt-cta {
  margin-top: 38px;
  padding: 15px 30px;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .01em;
  color: var(--wt-black);
  background: var(--wt-paper);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1), box-shadow .4s ease;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .35);
}
.wt-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(0, 0, 0, .45); }
.wt-cta:focus-visible { outline: 2px solid var(--green2); outline-offset: 3px; }

/* ---------------------------------------------------------------------
   6. Blend layers + chrome

   The wash and the grain use mix-blend-mode, which is isolated by the
   nearest ancestor stacking context. They must therefore be siblings of
   #wt-scroller (direct children of #wt-overlay) so their backdrop is the
   painted acts. Nesting them inside #wt-chrome would blend them against
   nothing.
   --------------------------------------------------------------------- */

/* ambient accent wash — two layers that cross-fade per act */
.wt-wash {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  background: radial-gradient(76% 60% at 14% 86%, var(--c, transparent) 0%, transparent 68%);
}

/* sparse accent motes — foreground bokeh (raster canvas, additive) */
#wt-motes {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* film grain (raster canvas — not vector) */
#wt-grain {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  opacity: .06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

#wt-chrome {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
#wt-chrome > * { pointer-events: auto; }
#wt-chrome > .wt-bar,
#wt-chrome > #wt-progress,
#wt-chrome > #wt-hint { pointer-events: none; }

/* letterbox */
.wt-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  background: var(--wt-black);
  pointer-events: none;
}
.wt-bar-top { top: 0; }
.wt-bar-bot { bottom: 0; }

/* global progress — the gradient is every act's accent in order */
#wt-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(242, 245, 241, .10);
  pointer-events: none;
}
#wt-progress i {
  display: block;
  height: 100%;
  width: 0%;
  background-size: 100vw 100%;
  background-repeat: no-repeat;
}

/* chapter rail */
#wt-rail {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 11px;
  justify-items: end;
}
.wt-tick {
  width: 34px;
  height: 14px;
  display: grid;
  align-items: center;
  justify-items: end;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.wt-tick i {
  display: block;
  width: 14px;
  height: 1.5px;
  background: rgba(242, 245, 241, .30);
  transition: width .55s cubic-bezier(.16, 1, .3, 1), background-color .55s ease;
}
.wt-tick:hover i { width: 24px; background: rgba(242, 245, 241, .62); }
.wt-tick.is-on i { width: 34px; background: var(--a); }
.wt-tick:focus-visible { outline: 1px solid var(--green2); outline-offset: 3px; }

/* close */
#wt-close {
  position: absolute;
  top: 26px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(242, 245, 241, .18);
  background: rgba(242, 245, 241, .05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background-color .35s ease, transform .5s cubic-bezier(.16, 1, .3, 1);
}
#wt-close:hover { background: rgba(242, 245, 241, .12); transform: rotate(90deg); }
#wt-close:focus-visible { outline: 2px solid var(--green2); outline-offset: 3px; }
#wt-close::before,
#wt-close::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 1.4px;
  background: var(--wt-paper);
}
#wt-close::before { transform: rotate(45deg); }
#wt-close::after  { transform: rotate(-45deg); }

/* ---------------------------------------------------------------------
   7. Responsive
   --------------------------------------------------------------------- */

@media (max-width: 900px) {
  .wt-copy { left: 24px; right: 24px; bottom: 96px; }
  .wt-rule { left: -14px; }
  .wt-head { letter-spacing: -.028em; }
  .wt-metric { margin: 24px 0 20px; }
  .wt-def { font-size: 15px; }
  .wt-scrim { background: linear-gradient(180deg, rgba(7, 12, 9, .5) 0%, rgba(7, 12, 9, .2) 26%, rgba(7, 12, 9, .82) 70%, rgba(7, 12, 9, .96) 100%); }

  #wt-rail {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 22px;
    transform: translateX(-50%);
    grid-auto-flow: column;
    gap: 9px;
    justify-items: center;
  }
  .wt-tick { width: 14px; height: 14px; justify-items: center; }
  .wt-tick i { width: 5px; height: 5px; border-radius: 999px; }
  .wt-tick:hover i { width: 5px; }
  .wt-tick.is-on i { width: 12px; border-radius: 999px; }

  #wt-close { top: 16px; right: 14px; }
  #wt-hint { bottom: 12vh; }
}

/* ---------------------------------------------------------------------
   7b. Phone landscape — the story on a rotated phone (short viewport)
   --------------------------------------------------------------------- */

@media (max-height: 500px) and (pointer: coarse) {
  .wt-copy { bottom: 52px; left: 20px; right: 20px; }
  .wt-head { font-size: clamp(24px, 9vh, 40px); }
  .wt-act-0 .wt-head { font-size: clamp(30px, 12vh, 52px); }
  .wt-metric { margin: 12px 0 10px; }
  .wt-def { font-size: 13px; }
  #wt-rail { bottom: 10px; }
  #wt-hint { bottom: 8vh; }
  #wt-close { top: 10px; right: 10px; }
}

/* ---------------------------------------------------------------------
   7c. Seamless looping — the hidden twin that dissolves in at each wrap
   point (built by makeSeamless in walkthrough.js). The pair lives in a
   .wt-mwrap so parallax/scale move both as one frame.
   --------------------------------------------------------------------- */

.wt-mwrap {
  position: absolute;
  inset: 0;
  will-change: transform;
}

/* the twin idles invisible; .wt-loop-in dissolves it up over the wrap
   seam and its removal dissolves it back off (same transition both
   ways). !important beats .wt-media.is-ready / card base rules. */
.wt-loop-twin {
  opacity: 0 !important;
  transition: opacity .45s linear !important;
}
.wt-loop-twin.wt-loop-in {
  opacity: 1 !important;
}

/* ---------------------------------------------------------------------
   7d. Rotate gate — phones open the story in landscape only
   --------------------------------------------------------------------- */

.wt-rotate-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  background: rgba(5, 10, 8, .96);
  color: #f2f5f1;
}
.wt-rotate-gate.is-on { display: flex; }

.wt-gate-phone {
  width: 46px;
  height: 78px;
  border: 3px solid #e8fff0;
  border-radius: 10px;
  position: relative;
  margin-bottom: 10px;
  animation: wt-gate-rot 2.4s cubic-bezier(.45, 0, .2, 1) infinite;
}
.wt-gate-phone i {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 14px;
  height: 3px;
  margin-left: -7px;
  border-radius: 3px;
  background: #e8fff0;
}
@keyframes wt-gate-rot {
  0%, 22%   { transform: rotate(0deg); }
  50%, 82%  { transform: rotate(90deg); }
  100%      { transform: rotate(0deg); }
}

.wt-gate-title {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.01em;
}
.wt-gate-sub {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: rgba(242, 245, 241, .72);
}
.wt-gate-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #f2f5f1;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .wt-gate-phone { animation: none; transform: rotate(90deg); }
}

/* ---------------------------------------------------------------------
   8. Reduced motion — stills, no scrub, no grain
   --------------------------------------------------------------------- */

#wt-overlay.wt-reduced .wt-media,
#wt-overlay.wt-reduced .wt-mwrap { transform: none !important; }
#wt-overlay.wt-reduced #wt-grain,
#wt-overlay.wt-reduced #wt-motes,
#wt-overlay.wt-reduced .wt-edge { display: none; }
#wt-overlay.wt-reduced .wt-copy { opacity: 1; }
#wt-overlay.wt-reduced .wt-rule { transform: scaleY(1); }
#wt-overlay.wt-reduced .wt-eyebrow { clip-path: none; }
#wt-overlay.wt-reduced .wt-equiv { clip-path: none; }
#wt-overlay.wt-reduced .wt-hair { width: 100%; }
#wt-overlay.wt-reduced .wt-ledger-rule { transform: scaleX(1); }
#wt-overlay.wt-reduced .wt-stage { transition: opacity .25s linear; }

/* Period the act's number comes from, e.g. "2025 Annual Data". */
.wt-source { margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: .03em; opacity: .75; }
.wt-ledger .wt-source { margin: 0; font-size: 11px; opacity: .7; }
