/* ============================================================
 * Photo Editing page — local stylesheet (px- prefix)
 * Design vocabulary: graded · cinematic · cyan primary · retouch desk
 * Mirrors the Illustration (il-) conventions so the Graphics discipline
 * reads as one studio. LIME stays the site-wide primary accent;
 * cyan (--px-cyan) flavors the photo-editing demo surfaces only.
 * ============================================================ */

.px-page {
  --px-cyan: #22D3EE;
  --px-teal: #0E7490;
  --px-amber: #F2A65A;
  --px-lime: #d4ff3a;
  --px-ink: #0A0E10;
  --px-paper: #ECF7FA;
  --px-paper-soft: rgba(236, 247, 250, 0.04);
  --px-line: rgba(236, 247, 250, 0.12);
  --px-line-strong: rgba(236, 247, 250, 0.22);
  --px-mono: 'JetBrains Mono', ui-monospace, monospace;
  --px-display: 'Fraunces', 'Bodoni Moda', serif;
  --px-sans: 'Space Grotesk', system-ui, sans-serif;
  background: var(--px-ink);
  color: var(--px-paper);
}

/* ===== shared atoms ===== */
.px-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--px-mono);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(236, 247, 250, 0.62);
  padding: 8px 12px;
  border: 1px solid var(--px-line);
  border-radius: 999px;
  background: var(--px-paper-soft);
}
.px-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  animation: pxPulse 2.4s ease-in-out infinite;
}
@keyframes pxPulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.45 } }

.px-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--px-sans);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 22px;
  border: 1px solid var(--px-line-strong);
  border-radius: 999px;
  color: var(--px-paper);
  background: transparent;
  text-decoration: none;
  transition: background-color 0.35s cubic-bezier(0.16,1,0.3,1),
              color 0.35s cubic-bezier(0.16,1,0.3,1),
              border-color 0.35s cubic-bezier(0.16,1,0.3,1);
}
.px-btn:hover {
  background: var(--px-paper);
  color: var(--px-ink);
  border-color: var(--px-paper);
}
/* Primary CTA — LIME per site convention (matches .v2-btn--lime, .il-btn--lime).
 * Both --lime and --cyan aliases resolve to LIME so existing markup can opt into
 * a "cyan" name without ever colouring a primary CTA cyan. Cyan stays on demo art. */
.px-btn--lime,
.px-btn--cyan {
  background: var(--px-lime);
  color: var(--px-ink);
  border-color: var(--px-lime);
}
.px-btn--lime:hover,
.px-btn--cyan:hover {
  background: transparent;
  color: var(--px-lime);
  border-color: var(--px-lime);
}
.px-btn .arr { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.px-btn:hover .arr { transform: translateX(4px); }

.px-section {
  position: relative;
  padding: 140px 6vw 160px;
  z-index: 2;
}
/* Interactive sections sit above the rich.js ambient layer + any leftover
 * stacking context from earlier sticky sections (px-pass__pin, px-process
 * are 460–600vh tall with sticky children that make their own stacking
 * contexts). Belt-and-braces pointer-events on the interactive children. */
.px-style, .px-tools, .px-sys, .px-ledger, .px-cta {
  z-index: 5;
  isolation: isolate;
}
/* Keep the tall sticky-pin sections strictly below the live interactive
 * sections so a released sticky child can never intercept their clicks. */
.px-pass, .px-process { z-index: 1; }
.px-pass__sticky, .px-process__sticky { z-index: 1; }
.px-style__stage,
.px-style__panel,
.px-style__tab-row,
.px-style__tab,
.px-style__slider-wrap,
.px-style__slider,
.px-style__tokens,
.px-tools__grid,
.px-tool {
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.px-section__head {
  max-width: 880px;
  margin: 0 auto 80px;
  text-align: center;
}
.px-section__title {
  font-family: var(--px-display);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 92px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 24px 0 24px;
  font-variation-settings: 'opsz' 144, 'SOFT' 30, 'WONK' 1;
}
.px-section__title em {
  font-style: italic;
  color: var(--px-lime);
}
.px-section__lede {
  font-family: var(--px-sans);
  font-size: 17px;
  line-height: 1.62;
  color: rgba(236, 247, 250, 0.70);
  max-width: 640px;
  margin: 0 auto;
}
.px-section__lede em {
  font-family: var(--px-display);
  font-style: italic;
  color: var(--px-paper);
  font-weight: 500;
}

/* ============================================================
 * 01 — HERO (grade desk)
 * ============================================================ */
.px-hero {
  position: relative;
  min-height: 100vh;
  padding: 120px 6vw 60px;
  overflow: hidden;
  z-index: 1;
}
.px-hero__grain {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    radial-gradient(rgba(236, 247, 250, 0.6) 1px, transparent 1px),
    radial-gradient(rgba(236, 247, 250, 0.6) 1px, transparent 1px);
  background-size: 4px 4px, 6px 6px;
  background-position: 0 0, 2px 3px;
  mix-blend-mode: overlay;
}
.px-hero__three {
  position: absolute;
  top: 6%; right: -8%;
  width: 72vw; max-width: 1000px;
  height: 76vh;
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}
.px-hero__inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  min-height: calc(100vh - 240px);
}
.px-hero__left { padding-right: 20px; }
.px-hero__title {
  font-family: var(--px-display);
  font-weight: 400;
  font-size: clamp(48px, 6.4vw, 108px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 28px 0 28px;
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1;
}
.px-hero__title em {
  font-style: italic;
  color: var(--px-lime);
}
.px-hero__lede {
  font-family: var(--px-sans);
  font-size: 18px;
  line-height: 1.62;
  color: rgba(236, 247, 250, 0.72);
  max-width: 540px;
}
.px-hero__cta-row {
  margin-top: 32px;
  display: flex; gap: 14px; flex-wrap: wrap;
}
.px-hero__caption {
  margin-top: 38px;
  font-family: var(--px-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.45);
  display: flex; gap: 14px; align-items: baseline;
}
.px-hero__caption .n {
  font-family: var(--px-display);
  font-style: italic;
  font-size: 16px;
  color: var(--px-lime);
}

/* grade desk chrome */
.px-hero__desk {
  position: relative;
  width: 100%;
  height: min(620px, 70vh);
  background: linear-gradient(180deg, #11181c 0%, #0a0e10 100%);
  border-radius: 12px;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(236, 247, 250, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.px-desk__chrome {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--px-line);
  background: rgba(10, 14, 16, 0.7);
  backdrop-filter: blur(8px);
  z-index: 3;
}
.px-desk__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--px-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(236, 247, 250, 0.7);
}
.px-desk__pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: pxPulse 1.6s ease-in-out infinite;
}
.px-desk__counter {
  font-family: var(--px-display);
  font-style: italic;
  font-size: 13px;
  color: rgba(236, 247, 250, 0.55);
}
.px-desk__counter span { font-weight: 600; color: var(--px-cyan); }

.px-desk__viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #05080a;
  display: grid;
  place-items: center;
}
.px-desk__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* JS rewrites filter live from the three sliders */
  transition: filter 0.08s linear;
}
.px-desk__compare {
  position: absolute;
  top: 12px; left: 14px;
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--px-cyan);
  background: rgba(10, 14, 16, 0.66);
  border: 1px solid var(--px-line);
  border-radius: 999px;
  padding: 4px 10px;
  pointer-events: none;
}
.px-desk__hud {
  flex: 0 0 auto;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  border-top: 1px solid var(--px-line);
  background: rgba(10, 14, 16, 0.7);
  backdrop-filter: blur(8px);
  z-index: 3;
}
.px-desk__ctrl {
  display: flex; flex-direction: column; gap: 8px;
}
.px-desk__ctrl-k {
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.55);
}
.px-desk__slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100%; height: 4px;
  background: var(--px-line);
  border-radius: 2px;
  outline: none;
  cursor: ew-resize;
}
.px-desk__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--lime);
  cursor: ew-resize;
  box-shadow: 0 3px 10px rgba(212, 255, 58, 0.5);
}
.px-desk__slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--lime);
  cursor: ew-resize;
  border: 0;
  box-shadow: 0 3px 10px rgba(212, 255, 58, 0.5);
}
.px-desk__btn {
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 1px solid var(--px-line-strong);
  background: transparent;
  color: var(--px-paper);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.px-desk__btn:hover,
.px-desk__btn.is-held {
  background: var(--px-lime);
  border-color: var(--px-lime);
  color: var(--px-ink);
}

/* hero metrics row */
.px-hero__metrics {
  position: relative; z-index: 2;
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--px-line);
}
.px-hero__metric {
  padding: 22px 24px;
  border-right: 1px solid var(--px-line);
  display: flex; flex-direction: column; gap: 8px;
}
.px-hero__metric:last-child { border-right: 0; }
.px-hero__metric .k {
  font-family: var(--px-mono);
  font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.5);
}
.px-hero__metric .v {
  font-family: var(--px-display);
  font-size: 38px; font-weight: 500;
  color: var(--px-paper);
  font-variation-settings: 'opsz' 96, 'wght' 500;
}
.px-hero__metric .v em {
  font-style: italic;
  color: var(--px-lime);
}

/* ============================================================
 * 02 — LEDGER
 * ============================================================ */
.px-ledger__table {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--px-line-strong);
}
.px-ledger__row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 2.4fr 1fr;
  gap: 30px;
  padding: 26px 18px;
  border-bottom: 1px solid var(--px-line);
  transition: background 0.3s ease, padding 0.3s ease;
  align-items: baseline;
}
.px-ledger__row:hover {
  background: rgba(236, 247, 250, 0.03);
  padding-left: 28px;
}
.px-ledger__name {
  font-family: var(--px-display);
  font-style: italic;
  font-size: 28px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
  color: var(--px-paper);
}
.px-ledger__type {
  font-family: var(--px-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.55);
}
.px-ledger__beat {
  font-family: var(--px-sans);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(236, 247, 250, 0.72);
}
.px-ledger__metric {
  text-align: right;
  display: flex; flex-direction: column; gap: 4px;
}
.px-ledger__metric em {
  font-family: var(--px-display);
  font-style: italic;
  font-size: 32px;
  font-weight: 500;
  color: var(--px-lime);
  font-variation-settings: 'opsz' 96, 'wght' 500;
}
.px-ledger__metric span {
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.45);
}

/* ============================================================
 * 03 — FOUR PASSES (sticky scroll: raw → cut-out → composite → retouch)
 * ============================================================ */
.px-pass__intro { max-width: 880px; margin: 0 auto 60px; text-align: center; }
.px-pass__pin {
  position: relative;
  height: 460vh;
}
.px-pass__stage {
  position: relative;
  width: 100%;
  height: 100%;
}
.px-pass__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.px-pass__rail {
  position: absolute;
  bottom: 6vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px;
  background: rgba(236, 247, 250, 0.05);
  border: 1px solid var(--px-line);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  z-index: 5;
}
.px-pass__counter {
  font-family: var(--px-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  display: flex; gap: 6px;
}
.px-pass__counter span:first-child { color: var(--px-lime); font-weight: 600; }
.px-pass__counter .sep { color: rgba(236, 247, 250, 0.3); }
.px-pass__progress {
  width: 240px;
  height: 2px;
  background: rgba(236, 247, 250, 0.12);
  border-radius: 1px;
  overflow: hidden;
}
.px-pass__progress-fill {
  height: 100%;
  width: 0%;
  background: var(--px-lime);
  transition: width 0.3s ease;
}
.px-pass__label {
  font-family: var(--px-display);
  font-style: italic;
  font-size: 13px;
  color: rgba(236, 247, 250, 0.78);
  min-width: 180px;
}
.px-pass__art {
  position: relative;
  width: min(640px, 84vw);
  display: flex; flex-direction: column; align-items: center;
  gap: 22px;
}
#px-pass-svg {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 460;
  border-radius: 10px;
  overflow: hidden;
  background: #06090b;
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(236, 247, 250, 0.06);
}
/* Each pass layer reveals cumulatively. JS sets data-pass on the svg.
 * 0 Raw · 1 Cut-out · 2 Composite · 3 Retouch */
.px-layer {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Pass 0 — raw: busy plate + subject in raw tones */
#px-pass-svg[data-pass="0"] .px-layer--raw,
#px-pass-svg[data-pass="0"] .px-layer--subject { opacity: 1; }
/* Pass 1 — cut-out: selection edge appears over the raw plate */
#px-pass-svg[data-pass="1"] .px-layer--raw { opacity: 0.5; }
#px-pass-svg[data-pass="1"] .px-layer--subject,
#px-pass-svg[data-pass="1"] .px-layer--cutout { opacity: 1; }
/* Pass 2 — composite: raw plate gone, subject on the clean new background */
#px-pass-svg[data-pass="2"] .px-layer--newbg,
#px-pass-svg[data-pass="2"] .px-layer--subject { opacity: 1; }
#px-pass-svg[data-pass="2"] .px-layer--cutout { opacity: 0.4; }
/* Pass 3 — retouch: graded skin, glow, grain; the cut line fades back */
#px-pass-svg[data-pass="3"] .px-layer--newbg,
#px-pass-svg[data-pass="3"] .px-layer--subject,
#px-pass-svg[data-pass="3"] .px-layer--retouch { opacity: 1; }
#px-pass-svg[data-pass="3"] .px-layer--cutout { opacity: 0; }
.px-pass__caption {
  font-family: var(--px-display);
  font-style: italic;
  font-size: 16px;
  color: rgba(236, 247, 250, 0.66);
  text-align: center;
  max-width: 520px;
  min-height: 24px;
  transition: opacity 0.4s ease;
}

/* ============================================================
 * 04 — PROCESS (sticky pinned scenes)
 * ============================================================ */
.px-process {
  position: relative;
  padding: 0;
  background: linear-gradient(180deg, transparent, rgba(236, 247, 250, 0.02), transparent);
}
.px-process__inner {
  position: relative;
  height: 600vh;
}
.px-process__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.px-process__num {
  position: absolute;
  top: 8vh; right: 6vw;
  font-family: var(--px-display);
  font-style: italic;
  font-size: clamp(120px, 18vw, 280px);
  line-height: 1;
  color: rgba(236, 247, 250, 0.05);
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1;
  pointer-events: none;
}
.px-process__scene {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  padding: 0 6vw;
}
.px-process__scene.is-active {
  opacity: 1;
  transform: translateY(0);
}
.px-process__scene-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}
.px-process__copy h3 {
  font-family: var(--px-display);
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 24px 0 20px;
  font-variation-settings: 'opsz' 144, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.px-process__copy h3 em {
  font-style: italic;
  color: var(--px-lime);
}
.px-process__copy p {
  font-family: var(--px-sans);
  font-size: 17px;
  line-height: 1.62;
  color: rgba(236, 247, 250, 0.72);
  max-width: 480px;
}
.px-process__step {
  margin-top: 24px;
  font-family: var(--px-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
}
.px-process__visual {
  position: relative;
  height: 56vh;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(236, 247, 250, 0.03);
  border: 1px solid var(--px-line);
}

.px-process__rail {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: rgba(236, 247, 250, 0.12);
  border-radius: 1px;
  overflow: hidden;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.px-process__rail.is-on { opacity: 1; }
.px-process__rail-fill {
  height: 100%;
  width: 0%;
  background: var(--px-lime);
  transition: width 0.2s linear;
}

/* process visual variants */
.px-pv {
  position: absolute; inset: 0;
  padding: 28px;
  display: flex; flex-direction: column;
  gap: 12px;
  overflow: auto;
}
.px-pv--brief { gap: 16px; }
.px-pv__note {
  padding: 18px 22px;
  background: rgba(236, 247, 250, 0.04);
  border-left: 2px solid var(--px-cyan);
  border-radius: 0 6px 6px 0;
}
.px-pv__note em {
  display: block;
  font-family: var(--px-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  color: var(--px-paper);
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}
.px-pv__note span {
  display: block;
  margin-top: 6px;
  font-family: var(--px-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.5);
}
.px-pv__tags {
  margin-top: auto;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.px-pv__tags span {
  padding: 6px 12px;
  border: 1px solid var(--px-line);
  border-radius: 999px;
  font-family: var(--px-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.6);
}

.px-pv--thumbs { padding: 18px; }
.px-pv__thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  height: 100%;
}
.px-pv__thumb {
  background: rgba(236, 247, 250, 0.03);
  border: 1px solid var(--px-line);
  border-radius: 6px;
  display: grid; place-items: center;
  position: relative;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.px-pv__thumb.is-pick {
  background: rgba(34, 211, 238, 0.12);
  border-color: var(--px-cyan);
  box-shadow: 0 0 0 1px var(--px-cyan);
}
.px-pv__thumb svg { width: 64%; height: 64%; color: rgba(236, 247, 250, 0.7); }
.px-pv__thumb.is-pick svg { color: var(--px-cyan); }
.px-pv__thumb-num {
  position: absolute; top: 6px; left: 8px;
  font-family: var(--px-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(236, 247, 250, 0.4);
}

.px-pv--line, .px-pv--color { padding: 22px 26px; }
.px-pv__sys-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--px-line);
  align-items: center;
}
.px-pv__sys-row:last-child { border-bottom: 0; }
.px-pv__sys-row .k {
  font-family: var(--px-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.5);
}
.px-pv__sys-row .v {
  font-family: var(--px-sans);
  font-size: 14px;
  color: rgba(236, 247, 250, 0.9);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.px-pv__sys-row .v i {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(236, 247, 250, 0.18);
}

.px-pv--render {
  flex-direction: row; flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 8px;
  padding: 28px;
}
.px-pv__chip {
  padding: 8px 14px;
  border: 1px solid var(--px-line);
  border-radius: 999px;
  font-family: var(--px-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.7);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.px-pv__chip:hover {
  background: var(--px-cyan);
  color: var(--px-ink);
  border-color: var(--px-cyan);
}

.px-pv--deliver { padding: 22px 26px; gap: 0; }
.px-pv__defense {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--px-line);
  align-items: baseline;
}
.px-pv__defense:last-child { border-bottom: 0; }
.px-pv__defense .k {
  font-family: var(--px-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--px-lime);
}
.px-pv__defense .v {
  font-family: var(--px-display);
  font-style: italic;
  font-size: 17px;
  color: rgba(236, 247, 250, 0.92);
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}

/* ============================================================
 * 05 — STYLE (live grade morph)
 * ============================================================ */
.px-style__stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}
.px-style__board {
  position: relative;
  width: min(460px, 92%);
  margin: 0 auto;
  background: #0c1216;
  border: 1px solid var(--px-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(236, 247, 250, 0.05);
}
.px-style__board-bar,
.px-style__board-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.6);
}
.px-style__board-bar { border-bottom: 1px solid var(--px-line); }
.px-style__board-foot { border-top: 1px solid var(--px-line); }
.px-style__board-dims, .px-style__board-mood { color: rgba(236, 247, 250, 0.4); }
.px-style__canvas { position: relative; }
#px-style-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}
.px-style__panel {
  display: flex; flex-direction: column;
  gap: 22px;
  padding: 28px;
  background: rgba(236, 247, 250, 0.03);
  border: 1px solid var(--px-line);
  border-radius: 12px;
}
.px-style__tab-row { display: flex; gap: 14px; }
.px-style__tab {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--px-line);
  border-radius: 8px;
  cursor: pointer;
  /* Specific transitions only — `transition: all` on a clickable card can
   * drop mid-click activation when the page bg-tone is also transitioning. */
  transition: border-color 0.3s ease, background-color 0.3s ease;
  position: relative;
  z-index: 1;
}
.px-style__tab.is-on {
  border-color: var(--lime);
  background: rgba(212, 255, 58, 0.05);
}
.px-style__tab-name {
  font-family: var(--px-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.7);
  margin-bottom: 4px;
}
.px-style__tab-name em {
  font-family: var(--px-display);
  font-style: italic;
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--px-paper);
  margin-left: 4px;
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}
.px-style__tab-line {
  font-family: var(--px-sans);
  font-size: 12px;
  color: rgba(236, 247, 250, 0.55);
}
.px-style__slider-wrap { display: flex; flex-direction: column; gap: 8px; }
.px-style__slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100%; height: 4px;
  background: var(--px-line);
  border-radius: 2px;
  outline: none;
  cursor: ew-resize;
}
.px-style__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--lime);
  cursor: ew-resize;
  box-shadow: 0 4px 12px rgba(212, 255, 58, 0.5);
}
.px-style__slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--lime);
  cursor: ew-resize;
  border: 0;
  box-shadow: 0 4px 12px rgba(212, 255, 58, 0.5);
}
.px-style__slider-rail {
  display: flex; justify-content: space-between;
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.55);
}
.px-style__tokens {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--px-line);
  border-left: 1px solid var(--px-line);
}
.px-style__token {
  padding: 12px 14px;
  border-right: 1px solid var(--px-line);
  border-bottom: 1px solid var(--px-line);
  display: flex; flex-direction: column; gap: 4px;
}
.px-style__token .k {
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.5);
}
.px-style__token .v {
  font-family: var(--px-sans);
  font-size: 13px;
  color: var(--px-paper);
}

/* ============================================================
 * 06 — SYSTEM
 * ============================================================ */
.px-sys__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.px-sys__panel {
  padding: 28px;
  background: rgba(236, 247, 250, 0.03);
  border: 1px solid var(--px-line);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.px-sys__panel-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--px-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.55);
  margin-bottom: 22px;
}
.px-sys__panel-head .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

.px-sys__preset-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--px-line);
  color: var(--px-paper);
}
.px-sys__preset-row:last-child { border-bottom: 0; }
.px-sys__preset-row .pn {
  font-family: var(--px-display);
  font-style: italic;
  font-size: 18px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.px-sys__strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  height: 26px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--px-line);
}
.px-sys__strip i { display: block; height: 100%; }

.px-sys__sw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--px-line);
  border: 1px solid var(--px-line);
  border-radius: 8px;
  overflow: hidden;
}
.px-sys__sw {
  aspect-ratio: 2 / 1;
  padding: 12px 14px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  color: var(--px-paper);
  position: relative;
}
.px-sys__sw-name {
  font-family: var(--px-display);
  font-style: italic;
  font-size: 22px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.px-sys__sw-meta {
  font-family: var(--px-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.px-sys__rule {
  padding: 14px 0;
  border-bottom: 1px solid var(--px-line);
  font-family: var(--px-sans);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(236, 247, 250, 0.78);
}
.px-sys__rule:last-child { border-bottom: 0; }
.px-sys__rule em {
  font-family: var(--px-display);
  font-style: italic;
  color: var(--px-paper);
  font-size: 15px;
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}
.px-sys__rule .ok, .px-sys__rule .no {
  display: inline-block;
  padding: 3px 9px;
  margin-right: 10px;
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
}
.px-sys__rule .ok { background: var(--px-teal); color: var(--px-paper); }
.px-sys__rule .no { background: rgba(34, 211, 238, 0.15); color: var(--px-cyan); border: 1px solid var(--px-cyan); }

.px-sys__jar { padding: 0; }
.px-sys__jar .px-sys__panel-head {
  position: absolute; top: 18px; left: 22px;
  margin: 0;
  z-index: 2;
  /* The head + readout float over the canvas where chips pile up. Let pointer
   * events pass through so every chip stays draggable. */
  pointer-events: none;
}
.px-sys__jar-readout { pointer-events: none; }
#px-sys-jar {
  width: 100%;
  aspect-ratio: 1.4 / 1;
  display: block;
  background: rgba(236, 247, 250, 0.02);
}
.px-sys__jar-readout {
  position: absolute; bottom: 14px; left: 22px; right: 22px;
  padding: 10px 14px;
  background: rgba(10, 14, 16, 0.65);
  border: 1px solid var(--px-line);
  border-radius: 6px;
  font-family: var(--px-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: rgba(236, 247, 250, 0.85);
  backdrop-filter: blur(8px);
}

/* ============================================================
 * 07 — TOOLS
 * ============================================================ */
.px-tools__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--px-line);
  border: 1px solid var(--px-line);
  border-radius: 12px;
  overflow: hidden;
}
.px-tool {
  background: var(--px-ink);
  padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  /* Specific transitions only — `transition: all` collides with rich.js's
   * stagger-list animation-fill-mode: forwards. */
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 110px;
  position: relative;
}
.px-tool:hover {
  background: var(--px-cyan);
  color: var(--px-ink);
}
.px-tool .cat {
  font-family: var(--px-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 247, 250, 0.45);
  margin-bottom: 6px;
}
.px-tool:hover .cat { color: rgba(10, 14, 16, 0.65); }
.px-tool .nm {
  font-family: var(--px-display);
  font-style: italic;
  font-size: 22px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.px-tool .glyph svg {
  width: 28px; height: 28px;
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.4;
  transition: stroke 0.3s ease, transform 0.3s ease;
}
.px-tool:hover .glyph svg {
  stroke: var(--px-ink);
  transform: rotate(8deg);
}

/* ============================================================
 * 08 — CTA
 * ============================================================ */
.px-cta {
  position: relative;
  padding: 160px 6vw 200px;
  text-align: center;
  overflow: hidden;
}
.px-cta canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.px-cta__inner {
  position: relative; z-index: 1;
  max-width: 880px;
  margin: 0 auto;
}
.px-cta__title {
  font-family: var(--px-display);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 112px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 24px 0 24px;
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1;
}
.px-cta__title em {
  font-style: italic;
  color: var(--px-lime);
}
.px-cta__lede {
  font-family: var(--px-sans);
  font-size: 18px;
  line-height: 1.6;
  color: rgba(236, 247, 250, 0.7);
  max-width: 580px;
  margin: 0 auto 36px;
}

/* ============================================================
 * Tweaks panel + sound toggle — hidden on production-facing pages.
 * ============================================================ */
.px-page .v2-tweaks,
.px-page .v2-sound { display: none !important; }

/* ============================================================
 * Responsive
 * ============================================================ */
@media (max-width: 1024px) {
  .px-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .px-hero__three { display: none; }
  .px-hero__metrics { grid-template-columns: repeat(2, 1fr); }
  .px-hero__metric { border-bottom: 1px solid var(--px-line); }
  .px-hero__metric:nth-child(2) { border-right: 0; }
  .px-process__scene-inner { grid-template-columns: 1fr; gap: 30px; }
  .px-process__visual { height: 38vh; }
  .px-style__stage { grid-template-columns: 1fr; gap: 30px; }
  .px-tools__grid { grid-template-columns: repeat(2, 1fr); }
  .px-sys__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .px-section { padding: 80px 5vw 100px; }
  .px-hero { padding: 100px 5vw 40px; }
  .px-desk__hud { grid-template-columns: 1fr 1fr; }
  .px-ledger__row { grid-template-columns: 1fr; gap: 8px; padding: 18px 12px; }
  .px-ledger__metric { text-align: left; }
  .px-pv__thumb-grid { grid-template-columns: repeat(3, 1fr); }
  .px-pass__pin { height: auto; }
  .px-pass__sticky { position: static; height: auto; padding: 40px 0; }
  .px-process__inner { height: auto; }
  .px-process__sticky { position: static; height: auto; padding: 60px 0; }
  .px-process__scene { position: relative; opacity: 1; transform: none; padding: 30px 5vw; height: auto; }
  .px-process__visual { height: 40vh; }
  .px-style__tokens { grid-template-columns: 1fr; }
  .px-process__rail { display: none; }
  .px-sys__preset-row { grid-template-columns: 1fr; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .px-process__scene { transition: none; }
  .px-layer { transition: none; }
  .px-desk__pulse, .px-eyebrow .dot { animation: none; }
}
