/* ============================================================
   XQUBE GLOBAL — SERVICE 03 · PAYROLL
   Page-specific styles only. The system lives in css/main.css.
   Spine: title scene · the problem · paired panels ·
   THE PAY-RUN CYCLE (signature device) · scope · questions · close
   ============================================================ */

/* ---------- current-page marks in the shared chrome ---------- */
.nav-links a.is-here { color: var(--text); }
.nav-links a.is-here::after { transform: scaleX(1); opacity: 0.4; }
.mobile-links a.is-here { color: var(--text); }
.mobile-links a.is-here .mono { color: var(--pink-soft); }
.footer-col a.is-here { color: var(--text); }
.footer-col a.is-here::before { content: "·\00a0"; color: var(--purple-soft); }

/* ============================================================
   1 · TITLE SCENE
   ============================================================ */
section[data-scene="prologue"].pay-title { height: 190vh; }
.pay-title-stage { justify-content: center; }
.pay-title-stage .title-block { max-width: 1080px; }
.pay-h1 {
  font-size: clamp(34px, 5.1vw, 74px);
  max-width: 19ch;
  margin: 0 auto;
}
.pay-lede {
  margin: clamp(30px, 4.6vh, 52px) auto 0;
  max-width: 62ch;
  text-align: center;
}
@media (prefers-reduced-motion: no-preference) {
  .js .pay-lede {
    opacity: var(--subop, 0);
    transform: translateY(calc((1 - var(--subop, 0)) * 22px));
  }
}

/* ============================================================
   2 · THE PROBLEM — a reading rest, narrow and unhurried
   ============================================================ */
.problem-h { max-width: 16ch; }
.problem-body {
  margin-top: clamp(28px, 4vh, 44px);
  max-width: 62ch;
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 1.85;
  color: var(--mist);
  border-left: 2px solid rgba(255, 77, 128, 0.35);
  padding-left: clamp(20px, 3vw, 34px);
}

/* ============================================================
   3 · PAIRED PANELS — the work, and what it changes
   ============================================================ */
.panel-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2.4vw, 30px);
  align-items: stretch;
}
.pay-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  padding: clamp(26px, 3.2vw, 46px);
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.pay-panel-do { background-image: linear-gradient(105deg, rgba(91, 76, 255, 0.13), transparent 42%); }
.pay-panel-out { background-image: linear-gradient(105deg, rgba(255, 77, 128, 0.11), transparent 42%); }
.pay-panel:hover {
  border-color: rgba(148, 138, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 20px 52px rgba(0, 0, 0, 0.45);
}
.panel-ix {
  display: block;
  font-size: 11.5px; letter-spacing: 0.2em;
  color: var(--purple-soft);
  margin-bottom: var(--s3);
}
.pay-panel-out .panel-ix { color: var(--pink-soft); }
.panel-h {
  font-size: clamp(23px, 2.4vw, 31px);
  font-weight: 600; letter-spacing: -0.018em; line-height: 1.2;
  margin-bottom: var(--s3);
}
.panel-body { max-width: 46ch; }
.panel-quote { margin: 0 0 var(--s3); }

/* ============================================================
   4 · SIGNATURE DEVICE — THE PAY-RUN CYCLE
   A cadence rail (weekly / bi-weekly / semi-monthly) and the
   federal + state remittances landing on time, every period,
   with the paper trail retained. The scroll turns the quarter.
   Every landed state is driven by one custom property, --lit,
   so no-JS and reduced-motion get the completed cycle for free.
   ============================================================ */
section[data-scene="payrun"] { height: 340vh; }
.pay-cycle-stage { justify-content: center; }

.pay-dev {
  position: relative; z-index: 2;
  width: min(1120px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 13, 19, 0.55);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 26px 70px rgba(0, 0, 0, 0.45);
  padding: clamp(20px, 2.5vw, 32px);
  overflow: hidden;
}
.dev-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: clamp(14px, 2.2vh, 24px);
}
.dev-h {
  font-size: clamp(11.5px, 1.2vw, 13px); letter-spacing: 0.24em;
  font-weight: 400; color: var(--text);
}
.dev-sub { font-size: 10px; letter-spacing: 0.2em; color: var(--faint); white-space: nowrap; }

.dev-grid {
  display: grid;
  grid-template-columns: 1fr 232px;
  gap: clamp(18px, 2.4vw, 34px);
  align-items: start;
}

/* ---------- the rails ---------- */
.pay-tracks { position: relative; --lab: 132px; }
.pr-play {
  position: absolute; top: 20px; bottom: 6px;
  left: calc(var(--lab) + (100% - var(--lab)) * var(--play, 0));
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 77, 128, 0.05), var(--pink) 22%, rgba(255, 77, 128, 0.12));
  box-shadow: 0 0 20px rgba(255, 77, 128, 0.55);
  pointer-events: none;
}
.pr-play::before {
  content: "";
  position: absolute; left: 50%; top: -4px;
  width: 5px; height: 5px; border-radius: 50%;
  transform: translateX(-50%);
  background: var(--pink);
  box-shadow: 0 0 12px rgba(255, 77, 128, 0.9);
}
.pr-div {
  position: absolute; top: 20px; bottom: 6px;
  left: calc(var(--lab) + (100% - var(--lab)) * var(--at));
  width: 1px;
  background: rgba(255, 255, 255, 0.055);
  pointer-events: none;
}
.pr-months { position: relative; height: 20px; margin-left: var(--lab); }
.pr-month {
  position: absolute; top: 0;
  left: calc(var(--at) * 100%);
  transform: translateX(-50%);
  font-size: 9.5px; letter-spacing: 0.2em; color: var(--faint);
  white-space: nowrap;
}

.pr-row {
  display: grid;
  grid-template-columns: var(--lab) 1fr;
  align-items: center;
  height: 44px;
}
.pr-label {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono-f);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint);
  background: none; border: 0; padding: 0 12px 0 0; margin: 0;
  text-align: left;
  transition: color 0.35s ease;
}
.pr-label::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  flex: none;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.pr-row-cad .pr-label { cursor: pointer; }
.pr-row-cad .pr-label:hover { color: var(--mist); }
.pr-row-cad.sel .pr-label { color: var(--text); }
.pr-row-cad.sel .pr-label::before {
  background: var(--purple);
  box-shadow: 0 0 12px rgba(91, 76, 255, 0.9);
}
.pr-label-fixed { cursor: default; }
.pr-label-fixed::before { border-radius: 1px; background: rgba(255, 255, 255, 0.2); }

.pr-rail { position: relative; height: 100%; }
.pr-rail::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.065);
}

/* a tick is a pay run. --lit is 0 until the playhead passes it. */
.pr-tick {
  position: absolute; left: calc(var(--at) * 100%); top: 50%;
  width: 2px;
  height: calc(15px + var(--lit, 0) * 7px);
  margin-left: -1px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: color-mix(in srgb, rgba(255, 255, 255, 0.14), var(--purple-soft) calc(var(--lit, 0) * 100%));
  box-shadow: 0 0 calc(var(--lit, 0) * 13px) rgba(91, 76, 255, 0.75);
  transition: height 0.45s cubic-bezier(0.3, 0.7, 0.3, 1), background 0.45s ease, box-shadow 0.45s ease;
}
.pr-tick.landed { --lit: 1; }
.pr-row-cad:not(.sel) .pr-tick.landed { --lit: 0.42; }

/* a remittance deadline: DUE until it is FILED */
.pr-row-dl { height: 54px; }
.pr-dl {
  position: absolute; left: calc(var(--at) * 100%); top: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pr-dot {
  width: 9px; height: 9px;
  transform: rotate(45deg);
  border: 1px solid color-mix(in srgb, rgba(255, 255, 255, 0.24), var(--purple) calc(var(--lit, 0) * 100%));
  background: color-mix(in srgb, rgba(255, 255, 255, 0.04), var(--purple) calc(var(--lit, 0) * 100%));
  box-shadow: 0 0 calc(var(--lit, 0) * 16px) rgba(91, 76, 255, 0.8);
  transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}
.pr-dl-state .pr-dot {
  border-color: color-mix(in srgb, rgba(255, 255, 255, 0.24), var(--pink) calc(var(--lit, 0) * 100%));
  background: color-mix(in srgb, rgba(255, 255, 255, 0.04), var(--pink) calc(var(--lit, 0) * 100%));
  box-shadow: 0 0 calc(var(--lit, 0) * 16px) rgba(255, 77, 128, 0.7);
}
.pr-state {
  position: relative; display: block;
  min-width: 46px; height: 12px;
  font-size: 9px; letter-spacing: 0.18em; text-align: center;
  color: var(--faint);
}
.pr-state b, .pr-state em {
  position: absolute; left: 0; right: 0; top: 0;
  font-weight: 400; font-style: normal;
  transition: opacity 0.4s ease;
}
.pr-state b { opacity: calc(1 - var(--lit, 0)); }
.pr-state em { opacity: var(--lit, 0); color: var(--purple-soft); }
.pr-dl-state .pr-state em { color: var(--pink-soft); }
.pr-dl.landed { --lit: 1; }

.pr-rule {
  height: 1px;
  margin: 10px 0 10px var(--lab);
  background: linear-gradient(90deg, rgba(148, 138, 255, 0.28), rgba(255, 255, 255, 0.05) 60%, transparent);
}

/* ---------- the ledger ---------- */
.pay-ledger {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.026);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  padding: 16px 18px 16px;
  transition: border-color 0.6s ease, box-shadow 0.6s ease;
}
.pay-ledger.complete {
  border-color: rgba(148, 138, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 32px rgba(91, 76, 255, 0.15);
}
.ledger-head, .trail-head {
  font-size: 9.5px; letter-spacing: 0.24em; color: var(--faint);
}
.ledger-rows { margin: 6px 0 16px; }
.ledger-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 9px 0 8px;
}
.ledger-row dt { font-size: 10px; letter-spacing: 0.16em; color: var(--faint); }
.ledger-row dd { font-size: 14.5px; letter-spacing: 0.02em; color: var(--faint); }
.ledger-row em { font-style: normal; color: var(--text); }
.pay-trail { display: flex; gap: 5px; margin: 10px 0 14px; }
.pr-slip {
  flex: 1 1 0;
  height: 34px;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 0 4px;
  border: 1px solid color-mix(in srgb, rgba(255, 255, 255, 0.08), rgba(148, 138, 255, 0.5) calc(var(--lit, 0) * 100%));
  border-radius: 3px;
  background: color-mix(in srgb, rgba(255, 255, 255, 0.015), rgba(91, 76, 255, 0.1) calc(var(--lit, 0) * 100%));
  opacity: calc(0.3 + 0.7 * var(--lit, 0));
  transform: translateY(calc((1 - var(--lit, 0)) * 5px));
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1), border-color 0.5s ease, background 0.5s ease;
}
.pr-slip.filed { --lit: 1; }
.pr-slip i {
  display: block; height: 2px; border-radius: 1px;
  background: color-mix(in srgb, rgba(255, 255, 255, 0.16), rgba(178, 170, 255, 0.6) calc(var(--lit, 0) * 100%));
  transition: background 0.5s ease;
}
.pr-slip i:nth-child(2) { width: 72%; }
.pr-slip i:nth-child(3) { width: 45%; }
.pay-status {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
  font-size: 10px; letter-spacing: 0.26em;
  color: var(--faint); opacity: 0.4;
  transition: opacity 0.6s ease, color 0.6s ease, text-shadow 0.6s ease;
}
.pay-status.on {
  opacity: 1; color: var(--pink-soft);
  text-shadow: 0 0 20px rgba(255, 77, 128, 0.4);
}

/* ============================================================
   5 · SCOPE OF WORK — the length is the argument
   ============================================================ */
.scope-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--s2);
}
.scope-h {
  font-size: clamp(12.5px, 1.4vw, 16px); letter-spacing: 0.24em;
  font-weight: 400; color: var(--text);
}
.scope-count { font-size: 10.5px; letter-spacing: 0.22em; color: var(--faint); white-space: nowrap; }
.scope-list { list-style: none; margin: 0; padding: 0; }
.scope-item {
  display: grid;
  grid-template-columns: 58px 22px 1fr;
  align-items: center;
  gap: var(--s2);
  padding: clamp(15px, 2.1vh, 23px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}
.js .scope-item.reveal { transition-delay: calc(var(--i, 0) * 0.055s); }
.scope-ix { font-size: 12px; letter-spacing: 0.12em; color: var(--faint); transition: color 0.4s ease; }
.scope-item:hover .scope-ix { color: var(--purple-soft); }
.scope-tick { width: 20px; height: 20px; overflow: visible; }
.tick-path {
  fill: none;
  stroke: var(--purple-soft);
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24;
}
.js .scope-item.in .tick-path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 0.6, 0.2, 1) calc(var(--i, 0) * 0.055s + 0.14s);
}
.scope-text {
  font-size: clamp(16px, 1.6vw, 19.5px);
  line-height: 1.45;
  color: var(--text);
}

/* ============================================================
   6 · QUESTIONS — THE PAY RUN
   Not a list. A conduit with four gates on it. One purple bar is
   the run; it advances left to right and every gate it reaches
   flips PENDING to CLEARED, its shutter lifts and a pink tick
   lands. Two inherited custom properties carry the whole device:

     --f   0..1  how far the run has travelled through THIS gate
                 (the gate sits at the halfway mark of its segment,
                  so it clears at --f = 0.5)
     --on  0|1   cleared

   Both default to 1. That is the progressive-enhancement contract:
   no-JS, reduced motion and mobile never touch them, so the run
   reads as finished and all four questions sit at full contrast.
   Only the live choreography knocks them down to 0.
   ============================================================ */
section[data-scene="payask"] { height: 320vh; }
.pay-ask-stage { justify-content: center; }

.run {
  position: relative; z-index: 2;
  width: min(1180px, 100%);
  /* the conduit overhangs the outer columns by half a gutter so the
     four rail segments tile edge to edge and each node lands on the
     exact centre of its own segment */
  --gx: clamp(18px, 2.2vw, 30px);
  --gn: 40px;
}

/* ---------- head: the deck line, and the tally ---------- */
.run-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s3);
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: clamp(30px, 5.4vh, 62px);
}
.run-h {
  font-size: clamp(11.5px, 1.25vw, 14px);
  letter-spacing: 0.22em;
  font-weight: 400;
  color: var(--text);
  text-transform: none;
}
.run-meta {
  font-size: 10.5px; letter-spacing: 0.22em;
  color: var(--faint);
  white-space: nowrap;
  transition: color 0.6s ease;
}
.run-meta em {
  font-style: normal;
  color: var(--purple-soft);
  transition: color 0.6s ease, text-shadow 0.6s ease;
}
.run.done .run-meta { color: var(--mist); }
.run.done .run-meta em {
  color: var(--pink-soft);
  text-shadow: 0 0 18px rgba(255, 77, 128, 0.45);
}

/* ---------- the pipeline ---------- */
.run-gates {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--gx);
}
.gate {
  --f: 1;
  --on: 1;
  position: relative;
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: auto var(--gn) 1fr;
  row-gap: clamp(12px, 1.6vh, 18px);
}
.js .gate { --f: 0; --on: 0; }
.js .gate.cleared { --on: 1; }

/* head of one gate: its id, and the state code that flips */
/* id and state code stay bound to each other at the head of the lane —
   pushed apart they read as belonging to the next gate along */
.gate-head {
  grid-row: 1; grid-column: 1;
  display: flex; align-items: baseline; justify-content: flex-start;
  gap: 12px;
}
.gate-id {
  font-size: 10.5px; letter-spacing: 0.16em;
  color: color-mix(in srgb, var(--faint), var(--purple-soft) calc(var(--on) * 100%));
  transition: color 0.5s ease;
}
.gate-state {
  position: relative;
  min-width: 64px; height: 12px;
  font-size: 9px; letter-spacing: 0.2em;
  text-align: left;
}
.gate-state b, .gate-state em {
  position: absolute; left: 0; top: 0;
  font-weight: 400; font-style: normal;
  transition: opacity 0.45s ease;
}
.gate-state b { color: var(--faint); opacity: calc(1 - var(--on)); }
.gate-state em { color: var(--pink-soft); opacity: var(--on); }

/* the conduit segment. Each one is half a gutter wider than its
   column on both sides, so the four of them make one unbroken line. */
.gate-rail {
  grid-row: 2; grid-column: 1;
  position: relative; display: block;
  align-self: center;
  height: var(--gn);
  margin-inline: calc(var(--gx) * -0.5);
}
.gate-rail::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; margin-top: -0.5px;
  background: rgba(255, 255, 255, 0.075);
}
/* entry and exit caps on the whole conduit */
.gate:first-child .gate-rail::after,
.gate:last-child .gate-rail::after {
  content: "";
  position: absolute; top: 50%;
  width: 1px; height: 12px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.18);
}
.gate:first-child .gate-rail::after { left: 0; }
.gate:last-child .gate-rail::after { right: 0; }

/* the run itself: purple, frame-driven, no transition */
.gate-fill {
  position: absolute; left: 0; top: 50%;
  height: 2px; margin-top: -1px;
  width: calc(var(--f) * 100%);
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(91, 76, 255, 0.45), var(--purple) 32%, var(--purple-bright));
  box-shadow: 0 0 14px rgba(91, 76, 255, 0.45);
}
/* the leading edge, only on the segment the run is inside */
.gate-fill::after {
  content: "";
  position: absolute; right: -1px; top: 50%;
  width: 3px; height: 15px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: #CFC8FF;
  box-shadow: 0 0 18px rgba(148, 138, 255, 0.95);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.gate.live .gate-fill::after { opacity: 1; }

/* ---------- the gate itself: a shutter that lifts ---------- */
.gate-node {
  grid-row: 2; grid-column: 1;
  justify-self: center; align-self: center;
  position: relative; z-index: 2;
  width: 38px; height: 38px;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, rgba(255, 255, 255, 0.16), var(--purple) calc(var(--on) * 100%));
  background: #0B0B11;
  overflow: hidden;
  transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.gate.live .gate-node {
  border-color: var(--purple-bright);
  box-shadow: 0 0 26px rgba(91, 76, 255, 0.45);
}
.gate.cleared .gate-node { box-shadow: 0 0 22px rgba(255, 77, 128, 0.16); }

/* two leaves, shut across the conduit on a hairline seam until the
   run arrives — then they withdraw clear of the frame */
.gn-leaf {
  position: absolute; left: 4px; right: 4px;
  height: 11px;
  border-radius: 1.5px;
  background: linear-gradient(180deg, rgba(148, 138, 255, 0.34), rgba(91, 76, 255, 0.18));
  box-shadow: inset 0 0 0 1px rgba(148, 138, 255, 0.24);
  opacity: calc(1 - var(--on));
  transition: transform 0.55s cubic-bezier(0.3, 0.75, 0.25, 1), opacity 0.45s ease;
}
.gn-leaf-t { top: 6px;    transform: translateY(calc(var(--on) * -15px)); }
.gn-leaf-b { bottom: 6px; transform: translateY(calc(var(--on) * 15px)); }

/* the pink tick a cleared gate picks up */
.gn-tick {
  position: absolute; inset: 0; margin: auto;
  width: 21px; height: 21px;
  overflow: visible;
}
.gn-tick path {
  fill: none;
  stroke: var(--pink);
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: calc(24px * (1 - var(--on)));
  transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 0.6, 0.2, 1) 0.1s;
}

/* ---------- the question ---------- */
.gate-q {
  grid-row: 3; grid-column: 1;
  font-size: clamp(15.5px, 1.36vw, 19.5px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--mist), var(--text) calc(var(--on) * 100%));
  opacity: calc(0.3 + 0.7 * var(--on));
  transition: opacity 0.55s ease, color 0.55s ease;
}
/* reading ahead is allowed — and a cleared gate never dims on hover */
.js .gate:hover .gate-q { opacity: calc(0.82 + 0.18 * var(--on)); }

/* ============================================================
   7 · CLOSE
   ============================================================ */
.close-cta { margin-top: 0; }
.close-chips {
  display: flex; flex-wrap: wrap; gap: var(--s2);
  margin-top: var(--s4);
}
/* related services — the lean row list the other service pages share */
.siblings {
  margin-top: var(--s7);
  border-top: 1px solid var(--line);
  padding-top: var(--s4);
  text-align: left;
}
.sib-head {
  font-size: 10.5px; letter-spacing: 0.24em;
  color: var(--faint);
  margin-bottom: var(--s2);
}
.sib {
  display: grid;
  grid-template-columns: 62px 1fr 24px;
  align-items: center;
  gap: var(--s2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  padding: var(--s3) 0;
  transition: padding-left 0.35s cubic-bezier(0.3, 0.7, 0.3, 1), border-color 0.35s ease;
}
.sib:hover { padding-left: 10px; border-bottom-color: rgba(148, 138, 255, 0.35); }
.sib-num { font-size: 11.5px; letter-spacing: 0.1em; color: var(--purple-soft); }
.sib-name { font-size: clamp(16px, 1.5vw, 19px); font-weight: 500; letter-spacing: -0.01em; }
.sib-arrow {
  justify-self: end;
  font-size: 15px; color: var(--faint);
  transform: translateX(-4px);
  transition: transform 0.3s cubic-bezier(0.3, 0.7, 0.3, 1), color 0.3s ease;
}
.sib:hover .sib-arrow { transform: translateX(0); color: var(--purple-soft); }

/* ============================================================
   short desktop windows: the device compresses instead of clipping
   ============================================================ */
@media (min-width: 981px) and (max-height: 800px) {
  .pr-row { height: 38px; }
  .pr-row-dl { height: 46px; }
  .pr-slip { height: 28px; }
  .ledger-row { padding: 7px 0 6px; }
  .pay-title-stage .scroll-cue { display: none; }
  .pay-h1 { font-size: clamp(32px, 4.4vw, 60px); }
  .run { --gn: 34px; }
  .run-head { margin-bottom: clamp(22px, 4vh, 40px); }
  .gate { row-gap: 10px; }
  .gate-node { width: 34px; height: 34px; }
  .gn-leaf { height: 10px; }
  .gate-q { font-size: clamp(15px, 1.24vw, 17.5px); }
}

/* ============================================================
   responsive — pinned scenes go static; nothing overflows
   ============================================================ */
@media (max-width: 980px) {
  section[data-scene="prologue"].pay-title { height: auto; }
  section[data-scene="prologue"].pay-title .scene-stage {
    justify-content: center;
    min-height: 100svh;
    padding-bottom: var(--s7);
  }
  .pay-h1 { max-width: 100%; }

  .panel-pair { grid-template-columns: 1fr; }

  section[data-scene="payrun"] { height: auto; }
  section[data-scene="payrun"] .scene-stage {
    position: static; height: auto; overflow: visible;
    padding-top: var(--section-gap); padding-bottom: 0;
  }
  .dev-grid { grid-template-columns: 1fr; }
  /* 116px, not 104: "Semi-monthly" is 12 characters of 10px mono at 0.12em,
     which is 86px of text — it was wrapping to two lines inside a 104px
     column. The copy is locked, so the column moves instead. */
  .pay-tracks { --lab: 116px; }
  .pr-label { font-size: 10px; letter-spacing: 0.12em; }
  .pr-month { font-size: 9px; letter-spacing: 0.14em; }
  /* the playhead stays: js/service-payroll.js now turns the quarter down
     here too, driven by where the device sits in the viewport rather than
     by a pinned stage, so there IS a --play to follow */
  .pay-ledger { margin-top: var(--s3); }

  /* ---- THE CADENCE SELECTOR, FOR A THUMB ----
     .pr-row is already 44px tall, but align-items:center left the button
     itself at its 12px line box: 32 of those 44px looked tappable and were
     not. Stretch the button into the row it already owns. The label is
     display:flex; align-items:center, so the text stays optically centred
     and nothing moves — the button simply has no background or border to
     give the new height away. */
  .pr-row { align-items: stretch; }
  .pr-label { align-self: stretch; }
  /* touch has no hover, so give the press itself a state */
  .pr-row-cad .pr-label:active { color: var(--text); }

  /* ---- the pipeline stands up: the run flows top to bottom ---- */
  section[data-scene="payask"] { height: auto; }
  section[data-scene="payask"] .scene-stage {
    position: static; height: auto; overflow: visible;
    padding-top: var(--section-gap); padding-bottom: 0;
  }
  section[data-scene="payask"] .ghost-center { display: none; }

  /* THE RUN SCRUBS HERE TOO. This used to pin --f/--on to 1 and hand the
     phone the finished pipeline, which is the one beat of this section.
     Everything below already stands the conduit up vertically, so the same
     bar simply travels top-to-bottom instead of left-to-right; the scene
     drives it off the device's position in the viewport (see
     js/service-payroll.js), because the section is unpinned down here and
     its own scroll range is a few dozen pixels.
     The no-JS and reduced-motion statics at the foot of this file still
     force --f/--on to 1, and the scene keeps a watchdog that finishes the
     run if the engine never drives it — the four questions can never be
     stranded at opacity 0.3. */

  .run { --gv: clamp(26px, 5vw, 38px); --gn: 34px; }
  .run-head { margin-bottom: clamp(24px, 5vw, 36px); }
  .run-gates { display: block; }
  .gate {
    grid-template-columns: var(--gn) 1fr;
    grid-template-rows: var(--gn) auto;
    column-gap: clamp(14px, 3.6vw, 20px);
    row-gap: 8px;
    padding-bottom: var(--gv);
  }
  .gate:last-child { padding-bottom: 0; }
  .gate-head { grid-row: 1; grid-column: 2; align-self: center; }
  .gate-q { grid-row: 2; grid-column: 2; font-size: clamp(15.5px, 4vw, 18px); }
  .gate-node {
    grid-row: 1; grid-column: 1;
    width: var(--gn); height: var(--gn);
  }
  .gn-leaf { height: 10px; left: 3px; right: 3px; }
  .gn-leaf-t { top: 5px; }
  .gn-leaf-b { bottom: 5px; }
  .gn-tick { width: 19px; height: 19px; }

  .gate-rail {
    grid-row: 1 / span 2; grid-column: 1;
    height: auto; align-self: stretch;
    margin-inline: 0;
  }
  .gate-rail::before {
    left: 50%; right: auto; top: 0; bottom: calc(var(--gv) * -1);
    width: 1px; height: auto; margin-top: 0;
    transform: translateX(-50%);
  }
  .gate:last-child .gate-rail::before { bottom: auto; height: calc(var(--gn) / 2); }
  .gate-fill {
    left: 50%; right: auto; top: 0;
    width: 2px; height: calc(var(--f) * 100%);
    margin-top: 0;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(91, 76, 255, 0.45), var(--purple) 32%, var(--purple-bright));
  }
  .gate:last-child .gate-fill { height: calc(var(--f) * var(--gn) / 2); }
  /* the leading edge turns with the conduit: a crossbar sitting on the
     bottom of the fill rather than a cap on its right end */
  .gate-fill::after {
    top: auto; bottom: -1px;
    right: auto; left: 50%;
    width: 15px; height: 3px;
    transform: translateX(-50%);
  }
  .gate:first-child .gate-rail::after {
    left: 50%; right: auto; top: 0;
    width: 12px; height: 1px;
    transform: translateX(-50%);
  }
  .gate:last-child .gate-rail::after { display: none; }

  .scope-item { grid-template-columns: 44px 20px 1fr; gap: 12px; }
  .sib { grid-template-columns: 52px 1fr 20px; }
}

@media (max-width: 640px) {
  /* 94px buys "SEMI-MONTHLY" one line at 9px/0.08em (73px of text) once the
     dot gap and the trailing pad come down with it; 84px did not, and the
     wrap was the only thing making that one control taller than its siblings */
  .pay-tracks { --lab: 94px; }
  /* the row keeps its full 44px on a phone. It was 40px here, which is below
     every touch-target minimum for the page's one real control, and the four
     pixels bought nothing: the device fits without them. */
  .pr-row { height: 44px; }
  .pr-label { font-size: 9px; letter-spacing: 0.08em; gap: 6px; padding-right: 6px; }
  .pr-label::before { width: 5px; height: 5px; }
  .pr-state { min-width: 34px; font-size: 8px; letter-spacing: 0.1em; }
  .pr-month { letter-spacing: 0.08em; }
  .dev-head { flex-direction: column; gap: 6px; }
  .close-cta .btn { width: 100%; justify-content: center; }
  .scope-item { grid-template-columns: 38px 18px 1fr; }

  .run-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .run-h { font-size: 11px; letter-spacing: 0.15em; }
  .gate-state { min-width: 54px; letter-spacing: 0.14em; }
}

/* ============================================================
   statics — no-JS and reduced motion get the completed cycle
   ============================================================ */
.no-js .pay-lede { opacity: 1; transform: none; }
.no-js .pr-tick,
.no-js .pr-dl,
.no-js .pr-slip { --lit: 1; }
.no-js .pr-row-cad:not(.sel) .pr-tick { --lit: 0.42; }
.no-js .pr-play { display: none; }
.no-js .pay-status { opacity: 1; color: var(--pink-soft); }
.no-js .tick-path { stroke-dashoffset: 0; }
.no-js .pr-label { cursor: default; }

/* THE PAY RUN, finished: bar full, every gate open and ticked, every
   question at full contrast. `.js .gate` is the only thing that ever
   knocks --f/--on down, so with no JS these are already the defaults —
   restated here so the contract survives any future edit. */
.no-js .gate { --f: 1; --on: 1; }
.no-js .gate-fill::after { display: none; }
.no-js .gate-node, .no-js .gn-leaf, .no-js .gn-tick path { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .pay-lede { opacity: 1; transform: none; }
  .pr-tick, .pr-dl, .pr-slip { --lit: 1; }
  .pr-row-cad:not(.sel) .pr-tick { --lit: 0.42; }
  .pr-play { display: none; }
  .pay-status { opacity: 1; color: var(--pink-soft); }
  .tick-path { stroke-dashoffset: 0; }

  /* the engine never calls a scene under reduced motion, so the run is
     shown already complete — nothing is faded, offset or collapsed */
  .gate, .js .gate { --f: 1; --on: 1; }
  .gate-fill::after { display: none; }
  .gate-node, .gn-leaf, .gn-tick path, .gate-q, .gate-id, .gate-state b, .gate-state em,
  .run-meta, .run-meta em { transition: none; }
}


/* ============================================================
   GLASS, COSTED FOR A PHONE (page-scoped)
   css/main.css flattens its OWN glass components below 980px, but it cannot
   reach the devices this page declares. backdrop-filter re-blurs everything
   behind an element on every frame it moves, and these sit inside a
   scrolling film — it is the most expensive thing a handset does here.

   Blur removed below 980px. Where the surface was too sheer to survive
   without it (var(--surface) is 3.5% white) an opaque base is added as
   background-COLOR, not background, so any ruled gradient painted on top
   of it is left intact.
   ============================================================ */
@media (max-width: 980px) {
  .pay-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-color: var(--glass-flat);
  }
  .pay-dev {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* the blur is gone but the surface was only 55% opaque and it sits on a
       field that repaints on the clock — 9px DUE/FILED labels were reading
       against moving dots. Opaque enough to hold the ruling, still short of
       flat so the world shows through as a wash. background-COLOR only: the
       device paints no gradient of its own, and this keeps it that way. */
    background-color: rgba(13, 13, 19, 0.9);
    /* a 70px shadow blur is repainted every time the scroller tiles this
       card; the phone gets the same lift for a third of the fill rate */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 14px 34px rgba(0, 0, 0, 0.45);
  }
}

/* wide touch screens (a landscape tablet is >980px and still all thumb) get
   the same stretched cadence rows. A mouse desktop is never (pointer: coarse),
   so the verified desktop film is untouched by this. */
@media (min-width: 981px) and (pointer: coarse) {
  .pr-row { align-items: stretch; }
  .pr-label { align-self: stretch; }
  .pr-row-cad .pr-label:active { color: var(--text); }
}
