/* ==========================================================
   Experts page — local styles (v2: scroll-pinned hero)
   ========================================================== */

html, body { background: var(--bg); }
body { overflow-x: hidden; }

/* About page accent: warm amber (hero / highlights). Pro tier charts still use --pink in markup. */
:root {
  --accent: var(--warm);
}

.xp-shell {
  max-width: var(--shell-width, 960px);
  margin: 0 auto;
  padding: 0 var(--shell-pad-x, clamp(1.25rem, 4vw, 2.5rem));
}

/* Post-hero main: same cadence as marketing PageShell + Divider bands */
.xp-main {
  padding-bottom: 0.5rem;
}
.xp-main .sc-divider {
  opacity: 0.85;
}

/* ------------------------------------------------------------
   Generic scene
   ------------------------------------------------------------ */
.xp-scene {
  padding: clamp(2.75rem, 5vw, 4rem) 0;
  position: relative;
}
.xp-scene-index {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.xp-scene-index .n { color: var(--text-dim); }
.xp-copy-col {
  min-width: 0;
}
.xp-split-scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (max-width: 780px) {
  .xp-split-scene {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   HERO — normal scroll title beats → scroll-pinned 3D
   ------------------------------------------------------------ */
.xp-hero-identity {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #eaeaea;
  text-align: center;
}
.xp-hero-identity-inner {
  padding: 2rem clamp(1rem, 4vw, 2.75rem);
  max-width: min(44rem, 94vw);
  margin: 0 auto;
}
.xp-hero-identity-inner--tight {
  max-width: min(44rem, 94vw);
}
.xp-hero-identity .xp-hero-title {
  margin: 0 auto;
}
.xp-hero-identity-inner--tight .xp-hero-title {
  white-space: nowrap;
}
.xp-hero-watch-line {
  position: relative;
  z-index: 2;
  min-height: clamp(5.75rem, 13vh, 8.5rem);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  padding: 0.7em clamp(0.75rem, 3vw, 2rem) clamp(0.45rem, 2vh, 1rem);
  background: #000;
  color: #eaeaea;
  text-align: center;
  overflow: hidden;
}
.xp-hero-watch-line::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: clamp(0.35rem, 1.2vh, 0.85rem);
  width: min(13.6vw, 152px);
  transform: translateX(-50%);
  border-top: 1px solid rgba(252, 248, 242, 0.34);
  box-shadow: 0 0 14px color-mix(in srgb, var(--warm) 24%, transparent);
}
.xp-hero-watch-line .xp-hero-title--watch-line {
  position: relative;
  width: max-content;
  max-width: 98vw;
  margin: 0 auto;
  white-space: nowrap;
  font-size: clamp(0.9rem, 3.8vw, 2.66rem);
  line-height: 1.08;
  transform: translateY(-0.45em);
}

.xp-hero-aura {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 140%; aspect-ratio: 1;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) calc(4% + var(--aura-p, 0) * 10%), transparent) 0%,
    transparent 55%
  );
  opacity: calc(0.4 + var(--aura-p, 0) * 0.6);
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
  filter: blur(20px);
}

.xp-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--warm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.xp-hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text-bright);
  margin: 0 auto;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.xp-hero-title .accent { color: var(--accent); transition: color 0.4s var(--ease); }
.xp-hero-title .dim { color: var(--text-dim); }

.xp-hero-lead {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  line-height: 1.55;
}

.xp-hero-narration {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  letter-spacing: 0.02em;
  opacity: 0.85;
  transition: opacity 0.3s var(--ease);
  min-height: 1.2em;
}
.xp-hero-hint {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: opacity 0.4s var(--ease);
  animation: xp-hint-bob 1.8s ease-in-out infinite;
}
@keyframes xp-hint-bob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(3px); }
}

/* Hero file — the protagonist */
.xp-hero-file {
  border: 1px solid var(--border-hover);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.55),
    0 0 0 1px var(--border);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  overflow: hidden;
}
.xp-hero-file-head {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}
.xp-hero-file-head .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text-faint);
}
.xp-hero-file-head .dot.d1 { background: #ff605c; opacity: 0.55; }
.xp-hero-file-head .dot.d2 { background: #ffbd44; opacity: 0.55; }
.xp-hero-file-head .dot.d3 { background: #00ca4e; opacity: 0.55; }
.xp-hero-file-head .name { margin-left: 0.4rem; color: var(--text); }

.xp-hero-file-body {
  padding: 1.1rem 1.3rem 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text-dim);
  text-align: left;
  min-height: 18rem;
}

.xp-hero-line {
  position: relative;
  display: block;
  transition: background 0.3s var(--ease);
  padding: 0 2px;
  border-radius: 3px;
}
.xp-hero-line .weak,
.xp-hero-line .strong {
  display: inline-block;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.xp-hero-line[data-phase="strong"] .strong { color: var(--text-bright); }
.xp-hero-line[data-phase="strong"].k-rule .strong,
.xp-hero-line[data-phase="strong"].k-edge .strong {
  color: var(--text-bright);
}
.xp-hero-line.k-h .weak,
.xp-hero-line.k-h .strong,
.xp-hero-line.k-h2 .weak,
.xp-hero-line.k-h2 .strong { color: var(--text-faint); }
.xp-hero-line.k-desc[data-phase="strong"] .strong {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text-bright);
  padding: 0 4px;
  margin: 0 -4px;
  border-radius: 3px;
}

/* ------------------------------------------------------------
   HERO — black 3D scroll scene
   ------------------------------------------------------------ */
.xp-hero-startup {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #eaeaea;
  z-index: 20;
  pointer-events: none;
  transition: opacity 0.08s var(--ease);
}
.xp-hero-closing {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 30;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.xp-hero-closing .xp-hero-title {
  color: #fff;
}
.xp-hero-scene {
  position: absolute;
  inset: 0;
  z-index: 10;
  transition: opacity 0.3s var(--ease);
}

/* ==========================================================
   SHEET primitive — black surface + white mono (no paper).
   Still one .xp-prism parent for all transforms. Under-layers
   are cheap “squiggle” textures (line noise), not cream pages.
   ========================================================== */
/* The "sheet" is now a transparent text container — no panel, no glow, no border.
   Just a 360x460 clipping volume so text fills a consistent page-sized region. */
.xp-sheet {
  position: absolute;
  top: 50%; left: 50%;
  width: 360px;
  height: 460px;
  background: none;
  border: none;
  box-shadow: none;
  backface-visibility: hidden;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  overflow: hidden;
}
.xp-sheet-top { box-shadow: none; }

/* PageStack — 8 alternative-skill sheets behind the top sheet.
   Each layer is a 360x460 page at its own z translation, rendered
   as a DIRECT child of .xp-prism (see comment in StackWireframe /
   PageStack about Chrome flattening z through preserve-3d wrappers). */
.xp-page-stack-layer {
  position: absolute;
  top: 50%; left: 50%;
  width: 360px;
  height: 460px;
  background: transparent;
  border: none;
  box-shadow: none;
  backface-visibility: hidden;
  will-change: transform, opacity;
}
.xp-page-stack-text {
  position: absolute;
  inset: 38px 22px 22px 22px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  overflow: hidden;
}

/* ==========================================================
   SpotField — flat blue/pink highlights. One rect per spot.
   Rendered as a DIRECT child of .xp-prism so translateZ is
   preserved (a wrapper with transform-style: preserve-3d still
   flattens child z translations in Chrome). At pick the spot is
   small and sits at its depthPct inside the still-visible stack;
   at flatten+reveal it grows to fill its tile on the top page.
   ========================================================== */
.xp-spot {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  will-change: width, height, transform, opacity;
}

/* Final text sits above the spots. */
.xp-paper-body-over {
  z-index: 2;
  color: rgba(255, 255, 255, 0.96);
  mix-blend-mode: normal;
}
.xp-prism-stage {
  position: absolute;
  inset: 0;
  z-index: 15;
  perspective: 2400px;
  perspective-origin: 50% 45%;
  transform-style: preserve-3d;
  pointer-events: none;
}
.xp-prism-stage--firefox {
  perspective: none;
}
.xp-prism-frame,
.xp-prism {
  position: absolute;
  width: 360px;
  height: 460px;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  transform-box: border-box;
  will-change: transform;
}
.xp-prism-frame--firefox,
.xp-prism-frame--firefox .xp-prism {
  transform-style: flat;
}
.xp-prism-frame {
  top: 50%;
  left: 50%;
}
.xp-prism {
  inset: 0;
  /* translate is set inline alongside rotations */
}

/* Viewport-fixed rails: same band on all breakpoints (~10% from top + safe area). */
.xp-hero-rails {
  position: absolute;
  inset: 0;
  z-index: 35;
  pointer-events: none;
}
.xp-hero-rails-inner {
  position: absolute;
  left: 50%;
  top: calc(10% + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  width: min(1120px, 100vw);
  max-width: 100%;
  padding: 0 clamp(0.65rem, 4vw, 2.5rem);
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(0.75rem, 4vw, 2.5rem);
}

/* Score chip + tiny mark (replaces left copy). */
.xp-paper-meta {
  position: relative;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}
.xp-hero-rails .xp-paper-meta--mark {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.xp-hero-rail-mark {
  display: block;
  width: 30px;
  height: auto;
  filter:
    drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 35%, transparent))
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
@media (min-width: 900px) {
  .xp-hero-rail-mark {
    width: 32px;
  }
}
.xp-paper-meta--right {
  flex: 0 0 auto;
  position: relative;
  left: auto;
  transform: none;
  margin: 0;
}
.xp-paper-meta-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  padding: 0.38rem 0.72rem 0.42rem;
  border-radius: var(--r-md);
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(12, 10, 16, 0.72) 100%
  );
  border: 1px solid color-mix(in srgb, var(--pink) 48%, rgba(255, 255, 255, 0.12));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 10px 36px -12px rgba(0, 0, 0, 0.75),
    0 0 40px -8px color-mix(in srgb, var(--pink) 32%, transparent);
  backdrop-filter: blur(10px);
}
.xp-paper-meta-chip-label {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--warm);
  opacity: 0.95;
}
.xp-paper-meta-chip-value {
  font-family: var(--font-mono);
  font-size: clamp(0.88rem, 1.55vw, 1.12rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  line-height: 1;
  background: linear-gradient(
    118deg,
    #f7f2ea 0%,
    color-mix(in srgb, var(--warm) 88%, #fff) 42%,
    var(--pink) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--pink) 45%, transparent));
}
@supports not (background-clip: text) {
  .xp-paper-meta-chip-value {
    color: var(--text-bright);
    -webkit-text-fill-color: unset;
    background: none;
    filter: none;
  }
}

/* Narrow viewports: nudge prism down so the deck clears the HUD band. */
@media (max-width: 768px) {
  .xp-prism-frame {
    top: calc(50% + min(5.5vh, 52px));
  }
}

.xp-paper-label {
  position: absolute;
  top: 14px; left: 18px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.42);
  z-index: 2;
}

.xp-paper-body {
  position: absolute;
  inset: 38px 22px 22px 22px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 1.5;
  color: #ffffff;
  text-align: left;
  overflow: hidden;
}
.xp-paper-line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 1em;
}

.xp-pick {
  position: absolute;
  border-radius: 1px;
  pointer-events: none;
  will-change: opacity;
}

/* 3D pick ribbon segment — a small colored rectangle at a specific
   (x, y, z) in the rotated prism frame. Inherits the prism rotation
   via its parent. */
.xp-ribbon-seg {
  position: absolute;
  transform-style: preserve-3d;
  pointer-events: none;
  border-radius: 2px;
  will-change: opacity, transform;
}

/* Bottom-centered per-stage caption, mono */
.xp-stage-caption {
  position: absolute;
  left: 50%;
  bottom: 8vh;
  transform: translateX(-50%);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.72);
  max-width: min(52ch, 92vw);
  white-space: normal;
  text-align: center;
  line-height: 1.45;
  z-index: 40;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}

/* ==========================================================
   Final paper — the reveal. Shown via .xp-final-wrap.
   ========================================================== */
.xp-final-wrap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  transition: opacity 0.3s var(--ease);
}
.xp-final-paper {
  position: relative;
  width: min(520px, 82vw);
  padding: 38px 40px 36px;
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(255, 255, 255, 0.045) 0%, transparent 50%),
    #050508;
  border: none;
  box-shadow:
    0 40px 80px -18px rgba(0, 0, 0, 0.82),
    0 0 60px -14px color-mix(in srgb, var(--accent) 22%, transparent);
}
.xp-final-paper .xp-paper-label {
  position: relative;
  top: auto; left: auto;
  display: block;
  margin-bottom: 18px;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.45);
}
.xp-final-body {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
}
.xp-final-body .xp-paper-line { white-space: normal; }

/* Small caption below final paper */
.xp-hero-closing-caption {
  position: absolute;
  left: 50%;
  bottom: 8vh;
  transform: translateX(-50%);
  z-index: 35;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.6);
  text-align: center;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.xp-hero-closing-caption .accent { color: var(--accent); }
.xp-hero-narration-bar {
  position: absolute;
  bottom: 7vh;
  left: 0; right: 0;
  text-align: center;
  z-index: 40;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

/* ------------------------------------------------------------
   Statement blocks between sections — used below the pinned hero
   ------------------------------------------------------------ */
.xp-statement {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-bright);
  max-width: 22ch;
}
.xp-statement .dim { color: var(--text-dim); }
.xp-statement .accent { color: var(--accent); }
.xp-statement-body {
  margin-top: 1rem;
  max-width: 38rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
}
.xp-statement--full {
  max-width: none;
}
.xp-bake-flow {
  margin-top: 1.25rem;
  max-width: none;
  width: 100%;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.65;
}
.xp-bake-flow p {
  margin: 0 0 1rem;
}
.xp-bake-flow p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   Pipeline
   ------------------------------------------------------------ */
.xp-pipeline {
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background: var(--surface);
  padding: 2rem 1.75rem;
}
.xp-pipeline-timeline {
  display: flex;
  gap: 0;
  position: relative;
}
.xp-pipeline-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  padding: 0.5rem 0.8rem 0.5rem 0;
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
}
.xp-pipeline-node-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-faint);
  border: 2px solid var(--bg);
  position: relative; z-index: 2;
  transition: all 0.25s var(--ease);
}
.xp-pipeline-node[data-active="true"] .xp-pipeline-node-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.xp-pipeline-node-rule {
  position: absolute;
  top: 4px; left: 0; right: 0;
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.xp-pipeline-node:first-child .xp-pipeline-node-rule { left: 50%; }
.xp-pipeline-node:last-child .xp-pipeline-node-rule { right: 50%; }
.xp-pipeline-node-date {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.xp-pipeline-node[data-active="true"] .xp-pipeline-node-date { color: var(--text-dim); }
.xp-pipeline-node-title {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.xp-pipeline-node[data-active="true"] .xp-pipeline-node-title { color: var(--text-bright); }
.xp-pipeline-detail {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.xp-pipeline-detail-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}
.xp-pipeline-detail-body {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 46rem;
}

/* ------------------------------------------------------------
   Ability — note + pink callout (landing unlockPanel vibe)
   ------------------------------------------------------------ */
.xp-ability-body {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 44rem) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem) clamp(0.25rem, 0.8vw, 0.65rem);
  align-items: stretch;
}
.xp-ability-note {
  margin-top: 0;
  max-width: 44rem;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 12px;
  background:
    radial-gradient(ellipse 80% 120% at 0% 0%, color-mix(in srgb, var(--accent) 9%, transparent) 0%, transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.025) 0%, transparent 45%),
    var(--surface);
  padding: 1.1rem 1.2rem 1.15rem 1.35rem;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.6;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.xp-unlock-callout {
  position: relative;
  margin: 0;
  margin-right: calc(-1 * clamp(1.25rem, 4vw, 2.5rem));
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--pink-border);
  background: linear-gradient(
    160deg,
    rgba(232, 93, 154, 0.09) 0%,
    var(--surface) 60%
  );
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  align-self: stretch;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: min(100%, 14rem);
  max-width: min(22rem, 100%);
}
.xp-unlock-callout-inner {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.xp-unlock-callout-kicker {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-bright);
}
.xp-unlock-callout-rule {
  display: block;
  width: 2.75rem;
  height: 1px;
  margin: 1rem 0 0.85rem;
  border: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--pink) 55%, transparent) 50%,
    transparent 100%
  );
  opacity: 0.9;
}
.xp-unlock-callout-time {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pink);
}
@media (max-width: 720px) {
  .xp-ability-body {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .xp-unlock-callout {
    justify-self: stretch;
    width: auto;
    max-width: none;
    margin-right: 0;
    margin-top: 0.5rem;
  }
}
.xp-ability-note p + p { margin-top: 1rem; }
.xp-ability-note em {
  color: var(--text-bright);
  font-style: italic;
}
.xp-ability-note-tag {
  margin-top: 1.4rem !important;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.xp-ability-note-tag a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.xp-ability-note-tag a:hover {
  border-bottom-color: var(--accent);
}

/* ------------------------------------------------------------
   Bake loop — text row, no fake product screenshot
   ------------------------------------------------------------ */
.xp-bake-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.xp-bake-text-step,
.xp-artifact-card {
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 16px;
  background-clip: padding-box, border-box;
  background-origin: border-box;
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
.xp-bake-text-step {
  padding: 1rem 1.05rem 1.05rem;
  background-image:
    radial-gradient(ellipse 95% 78% at 100% 100%, rgba(94, 140, 230, 0.08) 0%, transparent 58%),
    linear-gradient(165deg, #0a0b0f 0%, #08090c 100%),
    linear-gradient(135deg, rgba(94, 140, 230, 0.34), rgba(255, 255, 255, 0.04));
}
.xp-bake-text-step.is-hot {
  background-image:
    radial-gradient(ellipse 105% 86% at 100% 100%, rgba(232, 93, 154, 0.12) 0%, transparent 58%),
    linear-gradient(165deg, #0a0b0f 0%, #08090c 100%),
    linear-gradient(135deg, rgba(232, 93, 154, 0.52), rgba(94, 140, 230, 0.18));
}
.xp-bake-text-step h3 {
  margin: 0.55rem 0 0.45rem;
  font-size: 1rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-bright);
}
.xp-bake-text-step p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.5;
}
.xp-card-kicker {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.xp-bake-step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}
.xp-artifact-stat-row,
.xp-artifact-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ------------------------------------------------------------
   Artifact proof
   ------------------------------------------------------------ */
.xp-artifact-head {
  max-width: none;
}
.xp-artifact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.xp-artifact-card {
  padding: 1.25rem 1.25rem 1.15rem;
}
.xp-artifact-card h3 {
  margin: 0.65rem 0 0.45rem;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-bright);
}
.xp-artifact-card p {
  min-height: 3.4rem;
  margin: 0 0 1rem;
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.5;
}
.xp-artifact-card--muted {
  background-image:
    radial-gradient(ellipse 90% 78% at 100% 100%, rgba(255, 255, 255, 0.045) 0%, transparent 58%),
    linear-gradient(165deg, #151720 0%, #101218 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035));
}
.xp-artifact-card--muted .xp-card-kicker {
  color: var(--text-faint);
}
.xp-artifact-card--active {
  background-image:
    radial-gradient(ellipse 100% 92% at 90% 94%, rgba(232, 93, 154, 0.13) 0%, transparent 54%),
    linear-gradient(165deg, #0a0b0f 0%, #08090c 100%),
    linear-gradient(135deg, #df6b96, #b898a8, #6b9ae4);
}
.xp-artifact-card--active .xp-card-kicker {
  color: var(--pink);
}
.xp-artifact-stat-row {
  padding-top: 0.95rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.xp-artifact-score {
  padding: 0.72rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.xp-artifact-score .before {
  color: var(--text-dim);
}
.xp-artifact-score .arrow {
  color: var(--blue);
  font-weight: 800;
}
.xp-artifact-score .after {
  color: var(--green);
  font-weight: 800;
}
.xp-artifact-score .time {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 0.66rem;
}
@media (max-width: 720px) {
  .xp-artifact-head,
  .xp-artifact-grid,
  .xp-bake-row {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   Complexity gradient
   ------------------------------------------------------------ */
.xp-gradient {
  margin-top: 2rem;
  border: 2px solid transparent;
  border-radius: 16px;
  background-image:
    radial-gradient(ellipse 105% 80% at 90% 94%, rgba(232, 93, 154, 0.1) 0%, transparent 54%),
    linear-gradient(165deg, #0a0b0f 0%, #08090c 100%),
    linear-gradient(135deg, rgba(94, 140, 230, 0.52), rgba(232, 93, 154, 0.55));
  background-clip: padding-box, padding-box, border-box;
  background-origin: border-box;
  padding: 1.75rem;
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
.xp-gradient-chart {
  position: relative;
  height: clamp(240px, 30vw, 300px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 100% 25%, 12.5% 100%, auto;
  overflow: hidden;
}
.xp-gradient-chart svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.xp-gradient-axis {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}
.xp-gradient-axis.y-top { top: 0.75rem; left: 0.9rem; }
.xp-gradient-axis.y-bot { bottom: 0.75rem; left: 0.9rem; }
.xp-gradient-playhead {
  position: absolute;
  top: 0; bottom: 0; width: 1px;
  background: var(--border-hover);
  pointer-events: none;
}
.xp-gradient-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin-top: 1.1rem;
  height: 2px;
  background: var(--border);
  border-radius: 999px;
  outline: none;
}
.xp-gradient-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-bright);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border-hover);
  cursor: pointer;
}
.xp-gradient-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-bright);
  border: 2px solid var(--bg); cursor: pointer;
}
.xp-gradient-labels {
  display: flex; justify-content: space-between;
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.xp-gradient-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 1.25rem;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.xp-legend-cell {
  background: rgba(24, 26, 34, 0.92);
  padding: 1rem 1.1rem;
}
.xp-legend-head {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.xp-legend-swatch { width: 10px; height: 10px; border-radius: 50%; }
.xp-legend-name {
  font-size: 0.78rem;
  color: var(--text-bright);
  font-weight: 600;
}
.xp-legend-score {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-top: 0.1rem;
}
.xp-legend-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* ------------------------------------------------------------
   CTA
   ------------------------------------------------------------ */
.xp-cta {
  text-align: center;
  padding: clamp(3.5rem, 7vw, 5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}
.xp-cta-title {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.12;
  margin: 0 auto 1.25rem;
  max-width: 22ch;
}
