/* ============================================================
   SkinSignal / css / prestige-page.css
   The standalone Prestige Ladder page. It shares the SITE'S type system
   (Saira for display, Inter for body/labels, JetBrains Mono for figures)
   so it reads as the same product as the dashboard. Full-art medallion
   emblems (no crop), a vertical three-column ladder, dark ground with
   gold-for-prestige and a blue whisper for what is conquered. Shares
   style.css for the shell (topbar, nav, footer, tokens); scoped to .pl-*.
   ============================================================ */

:root {
  /* The panel material (--surface-panel, --surface-raised, --edge,
     --edge-top) comes from css/surface-tokens.css, shared with the
     dashboard and the leaderboard. */

  --pl-gold: #ffd36b;
  --pl-gold-soft: rgba(255, 211, 107, 0.5);
  --pl-gold-dim: rgba(255, 211, 107, 0.14);
  --pl-blue: #7db4ff;
  --pl-blue-soft: rgba(125, 180, 255, 0.4);

  /* the dashboard .mod plate, exactly */
  --pl-plate: var(--surface-panel);
  --pl-plate-edge:
    inset 0 1px 0 var(--edge-top),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 12px 32px -16px rgba(0, 0, 0, 0.9);

  /* ONE rhythm and ONE radius scale for the whole page */
  --pl-gap: clamp(18px, 2vw, 28px);
  --pl-radius: 18px;      /* modules: hero, ladder, panels, simulator */
  --pl-radius-sm: 14px;   /* tiles: stat tiles, next cards, tier detail */
  --pl-pad: clamp(18px, 2vw, 28px);
}

.pl-main { position: relative; }
/* The faint 45deg grain, page wide, behind the content. */
.pl-main::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px);
}
.pl-wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: clamp(28px, 3.6vw, 48px) clamp(16px, 3vw, 32px) var(--pl-gap); }
/* THE RHYTHM: every section is one --pl-gap from the next. The old rule
   was `.pl-wrap > *`, but the sections are children of #prestigeRoot, so
   it only ever spaced the root itself: that is where the uneven gaps came
   from. */
#prestigeRoot > * { margin: 0 0 var(--pl-gap); }
#prestigeRoot > *:last-child { margin-bottom: 0; }
/* the signed-out / never-analysed card stays centred */
#prestigeRoot > .pl-state { margin: clamp(30px, 6vw, 80px) auto; }

/* Pull the site footer up to the page on this page only: the shared
   footer's own top margin and its close-section padding, stacked on the
   wrap's bottom padding, left a black void under "What is next". */
.pl-main + .footer { margin-top: 0; }
.pl-main + .footer .footer__close { padding-top: clamp(36px, 4.4vw, 60px); }

.pl-eyebrow {
  margin: 0; font-family: var(--font-body); font-size: 11px; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--pl-gold);
}

/* ---------- INTRO ---------- */
.pl-intro { text-align: left; }
.pl-intro__title {
  margin: 12px 0 10px; font-family: var(--font-display); font-stretch: var(--display-hero); font-weight: 700;
  font-size: clamp(34px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -0.02em; color: var(--text, #f5f2ec);
}
.pl-intro__sub {
  margin: 0; max-width: 60ch; font-family: var(--font-body); font-weight: 300;
  font-size: clamp(15px, 1.6vw, 18px); line-height: 1.5; color: var(--muted, #9aa3b2);
}

/* ---------- HERO ---------- */
/* THE ANCHOR. Three columns sized to their content (current | progress |
   next) so nothing stretches across a gap; the progress column takes the
   slack. A faint gold wash in the current corner is the only tint. */
.pl-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: clamp(20px, 2.4vw, 32px);
  padding: var(--pl-pad) clamp(20px, 2.4vw, 32px);
  border: 1px solid var(--edge); border-radius: var(--pl-radius);
  background: radial-gradient(60% 140% at 0% 0%, rgba(255, 211, 107, 0.07), transparent 60%), var(--pl-plate);
  box-shadow: var(--pl-plate-edge);
}
.pl-hero__now { display: flex; align-items: center; gap: 20px; min-width: 0; }
.pl-hero__nowtext { min-width: 0; }
.pl-hero__tier { margin: 0 0 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pl-gold); }
.pl-hero__name {
  margin: 0 0 6px; font-family: var(--font-display); font-stretch: var(--display-wide); font-weight: 600;
  font-size: clamp(30px, 3.4vw, 48px); line-height: 0.98; letter-spacing: -0.015em; color: var(--text, #fff);
}
.pl-hero__val { margin: 0; font-family: var(--font-mono); font-size: 16px; color: var(--muted); }
.pl-hero__ascheck { margin: 3px 0 0; font-family: var(--font-body); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint, #6b7280); }

.pl-hero__goal { min-width: 0; padding: 4px clamp(20px, 2.4vw, 32px); border-left: 1px solid var(--edge); border-right: 1px solid var(--edge); }
.pl-hero__goallabel { margin: 0 0 12px; font-family: var(--font-body); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
/* THE METER, in the dashboard's bar language: the track is cut into the
   plate (dark groove, far-wall highlight at the bottom), and the fill is
   solid gold with a lit top edge. Depth, not glow. */
.pl-meter {
  position: relative; height: 14px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.pl-meter__fill {
  position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); border-radius: 999px;
  background: linear-gradient(180deg, #ffe29a 0%, var(--pl-gold) 45%, #e9b546 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}
.pl-hero__gap { margin: 11px 0 0; font-family: var(--font-mono); font-size: 14px; color: var(--text); }
.pl-hero__away { margin: 5px 0 0; font-family: var(--font-body); font-size: 14px; color: var(--pl-gold); }
.pl-hero__apex { margin: 0; font-family: var(--font-display); font-stretch: var(--display-header); font-weight: 500; font-size: 20px; color: var(--pl-gold); }

.pl-hero__next { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; min-width: 0; }
.pl-hero__nextname { margin: 0; font-family: var(--font-display); font-stretch: var(--display-wide); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; color: var(--text); }
.pl-hero__nextth { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--faint); }

/* ---------- EMBLEMS (full art, no crop, a soft gloss "light on glass") ---------- */
.pl-emblem { display: inline-flex; flex: none; align-items: center; justify-content: center; position: relative; }
.pl-emblem img, .pl-emblem picture { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
/* the gloss: a static diagonal light catching the medallion, top-left. */
.pl-emblem::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 14px;
  background: linear-gradient(122deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.03) 32%, transparent 46%);
}
.pl-emblem--none { border-radius: 14px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.pl-emblem--none::after { background: none; }
/* bigger, so the art reads; the hero current emblem is the anchor */
/* the anchor: the largest thing on the page, seated with a real shadow,
   and a restrained gold halo that says "yours" */
.pl-emblem--now {
  width: clamp(128px, 12vw, 160px); height: clamp(128px, 12vw, 160px);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 12px rgba(255, 211, 107, 0.26));
}
.pl-emblem--now::after { background: linear-gradient(122deg, rgba(255, 236, 190, 0.22) 0%, rgba(255, 236, 190, 0.04) 34%, transparent 48%); }
.pl-emblem--next { width: 76px; height: 76px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5)); }
.pl-emblem--rung { width: 54px; height: 54px; }
.pl-emblem--ms { width: 50px; height: 50px; }

/* ---------- STATS ROW ---------- */
.pl-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
/* Every tile the same height, the label pinned top and the figure (or the
   lock) seated at the bottom, so a locked tile and a real one carry the
   same weight and none reads hollow. */
.pl-stat {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 124px; padding: 16px 18px;
  border: 1px solid var(--edge); border-radius: var(--pl-radius-sm); background: var(--pl-plate); box-shadow: var(--pl-plate-edge); min-width: 0;
}
.pl-stat--chart { grid-column: span 2; justify-content: flex-start; }
.pl-stat--locked { border-color: rgba(255, 211, 107, 0.2); }
.pl-stat__label { margin: 0; font-family: var(--font-body); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.pl-stat__fig { margin: 14px 0 0; font-family: var(--font-mono); font-size: 28px; font-weight: 500; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.pl-stat__fig--sm { font-size: 18px; }
.pl-stat__fig.is-up { color: #6bd08a; }
.pl-stat__fig.is-down { color: #e08a8a; }
.pl-stat__of { margin-left: 5px; font-size: 14px; color: var(--faint); }
.pl-stat__sub { margin: 6px 0 0; font-family: var(--font-body); font-size: 11px; color: var(--muted); }
.pl-muted { color: var(--faint); }
.pl-stat__skel {
  margin-top: 14px; display: block; width: 60%; height: 14px; border-radius: 999px;
  background: linear-gradient(100deg, rgba(168, 186, 214, 0.1), rgba(168, 186, 214, 0.22) 45%, rgba(168, 186, 214, 0.1) 90%);
  box-shadow: inset 0 0 0 1px rgba(168, 186, 214, 0.1);
}
.pl-stat--locked .cta { margin-top: 10px; align-self: flex-start; }
.pl-lock { flex: none; }

.pl-quote {
  grid-column: span 6; margin: 4px 0 0; padding: 0; border: 0;
  font-family: var(--font-display); font-stretch: var(--display-header); font-weight: 500; font-size: clamp(19px, 2.2vw, 26px);
  color: rgba(255, 255, 255, 0.82); text-align: center; letter-spacing: -0.01em;
}

/* the chart */
.pl-chart__wait, .pl-chart__empty { margin: 14px 0 0; font-family: var(--font-body); font-size: 12px; color: var(--muted); }
.pl-chart { margin-top: 12px; }
/* three quiet gridlines under the line, like the dashboard's value chart */
.pl-chart__plot {
  position: relative; height: 72px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)) 0 0 / 100% 1px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.035)) 0 50% / 100% 1px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)) 0 100% / 100% 1px no-repeat;
}
.pl-chart__svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pl-chart__line { fill: none; stroke: var(--pl-gold); stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.pl-chart__area { fill: url(#plAreaGrad); stroke: none; }
.pl-chart__dot {
  position: absolute; right: -4px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--pl-gold); box-shadow: 0 0 0 3px rgba(255, 211, 107, 0.18);
}
.pl-chart__axis { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }

/* ---------- THE LADDER ---------- */
/* the ladder sits on the same plate as every other module */
.pl-ladder {
  padding: var(--pl-pad); border: 1px solid var(--edge); border-radius: var(--pl-radius);
  background: var(--pl-plate); box-shadow: var(--pl-plate-edge);
}
.pl-ladder__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.pl-ladder__title { margin: 0; font-family: var(--font-display); font-stretch: var(--display-header); font-weight: 600; font-size: clamp(23px, 2.8vw, 34px); letter-spacing: -0.015em; color: var(--text); }
.pl-ladder__meta { font-family: var(--font-body); font-size: 12px; color: var(--faint); }
.pl-ladder__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); }
.pl-ladder__col { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.pl-rung {
  position: relative; display: grid; grid-template-columns: 12px 24px 54px minmax(0, 1fr) auto;
  align-items: center; gap: 12px; padding: 8px 10px 8px 4px; border-radius: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}
.pl-rung:last-child { border-bottom: 0; }
.pl-rung__node { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.pl-rung__no { font-family: var(--font-mono); font-size: 12px; color: var(--faint); text-align: right; }
.pl-rung__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-rung__name { font-family: var(--font-display); font-stretch: var(--display-header); font-weight: 500; font-size: 16px; letter-spacing: -0.01em; color: var(--muted); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-rung__th { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.pl-rung__lock { color: rgba(150, 165, 190, 0.45); display: inline-flex; }

/* THREE STATES, READ AT A GLANCE. Contrast from brightness, saturation,
   scale and weight, never from glow.
     passed   full-colour art, lit blue node, bright name
     current  the hero row: largest, brightest art, gold name, gold node
     locked   near-greyscale, dark, smaller art, faded name, a lock */
.pl-rung.is-passed .pl-rung__node { background: var(--pl-blue); }
.pl-rung.is-passed .pl-rung__name { color: var(--text); }
.pl-rung.is-passed .pl-rung__no { color: var(--muted); }

.pl-rung.is-locked .pl-emblem--rung { width: 46px; height: 46px; justify-self: center; }
.pl-rung.is-locked .pl-emblem img { filter: grayscale(1) brightness(0.36) contrast(0.9); }
.pl-rung.is-locked .pl-emblem::after { opacity: 0.25; }
.pl-rung.is-locked .pl-rung__name { color: rgba(150, 160, 180, 0.42); font-weight: 400; }
.pl-rung.is-locked .pl-rung__th { color: rgba(130, 130, 125, 0.6); }
.pl-rung.is-locked .pl-rung__no { color: rgba(130, 130, 125, 0.5); }

.pl-rung.is-current {
  margin: 6px 0; padding: 12px 10px 12px 4px; border-bottom: 0;
  background: linear-gradient(90deg, rgba(255, 211, 107, 0.11), rgba(255, 211, 107, 0.02) 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 211, 107, 0.32);
}
.pl-rung.is-current .pl-rung__node { background: var(--pl-gold); box-shadow: 0 0 0 3px rgba(255, 211, 107, 0.16); }
.pl-rung.is-current .pl-rung__no { color: var(--pl-gold); }
.pl-rung.is-current .pl-rung__name { color: var(--pl-gold); font-weight: 700; font-size: 18px; }
.pl-rung.is-current .pl-rung__th { color: rgba(255, 211, 107, 0.7); }
.pl-rung.is-current .pl-emblem--rung {
  width: 66px; height: 66px; justify-self: center; margin: -6px 0;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5)) brightness(1.08) saturate(1.1);
}

/* ---------- PANELS: milestones + peak ---------- */
.pl-panels { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
.pl-panel { padding: var(--pl-pad); border: 1px solid var(--edge); border-radius: var(--pl-radius); background: var(--pl-plate); box-shadow: var(--pl-plate-edge); min-width: 0; }
.pl-panel__title { margin: 0 0 16px; font-family: var(--font-body); font-size: 10px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }

/* YOUR RECORD: the peak, then three real figures in raised tiles, so the
   column is full instead of a hollow plate beside the milestones. */
.pl-panel--record { display: flex; flex-direction: column; }
.pl-peak__label { margin: 0 0 3px; font-family: var(--font-body); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.pl-panel--record .pl-emblem--ms { width: 64px; height: 64px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5)); }
.pl-panel--record .pl-peak__name { font-size: 22px; }
.pl-record { margin: auto 0 0; padding-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pl-record__cell {
  padding: 12px 14px; border-radius: 12px; background: var(--surface-raised);
  box-shadow: inset 0 1px 0 var(--edge-top), inset 0 0 0 1px var(--edge);
}
.pl-record dt { margin: 0 0 8px; font-family: var(--font-body); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.pl-record dd { margin: 0; font-family: var(--font-mono); font-size: 20px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.pl-panel__empty { margin: 0; font-family: var(--font-body); font-style: italic; font-size: 15px; color: var(--muted); }
.pl-ms__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.pl-ms { display: flex; align-items: center; gap: 13px; min-width: 0; }
.pl-ms__text { min-width: 0; }
.pl-ms__name { margin: 0; font-family: var(--font-body); font-size: 14px; color: var(--text); }
.pl-ms__date { margin: 2px 0 0; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.pl-ms__date--approx { color: var(--faint); }
.pl-peak { display: flex; align-items: center; gap: 13px; }
.pl-peak__name { margin: 0; font-family: var(--font-display); font-stretch: var(--display-wide); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; color: var(--text); }
.pl-peak__date { margin: 3px 0 0; font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }

/* ---------- STATES (signed out / never analysed) ---------- */
/* Signed out: the public ladder (js/prestige.js renderPublic). No rung is
   passed, current or locked, so each is drawn plainly at full colour. */
.pl-rung.is-public .pl-rung__name { color: var(--text); }
.pl-rung.is-public .pl-rung__no { color: var(--muted); }
.pl-state { max-width: 620px; margin: clamp(30px, 6vw, 80px) auto; text-align: center; padding: clamp(28px, 4vw, 48px); border: 1px solid var(--edge); border-radius: var(--pl-radius); background: var(--pl-plate); box-shadow: var(--pl-plate-edge); }
.pl-state__title { margin: 12px 0 12px; font-family: var(--font-display); font-stretch: var(--display-hero); font-weight: 700; font-size: clamp(26px, 3.6vw, 42px); letter-spacing: -0.02em; color: var(--text); }
.pl-state__line { margin: 0 auto 22px; max-width: 52ch; font-family: var(--font-body); font-weight: 300; font-size: 16px; line-height: 1.5; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .pl-hero { grid-template-columns: minmax(0, 1fr); }
  .pl-hero__goal { border-left: 0; border-right: 0; padding: 0; }
  .pl-hero__next { align-items: flex-start; text-align: left; flex-direction: row; gap: 14px; }
  .pl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-stat--chart { grid-column: span 2; }
  .pl-quote { grid-column: span 2; }
  .pl-ladder__grid { grid-template-columns: minmax(0, 1fr); }
  /* stacked, the three lists read as one continuous ladder */
  .pl-ladder__grid { gap: 0; }
  .pl-ladder__col:not(:last-child) .pl-rung:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.045); }
  .pl-panels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .pl-stats { grid-template-columns: minmax(0, 1fr); }
  .pl-stat--chart, .pl-quote { grid-column: span 1; }
}

/* ============================================================
   INTERACTIVE COMPONENTS: chart tabs, clickable tier detail, the "what if"
   simulator, plus the "what is next" band and the per-section reveal.
   ============================================================ */

/* ---- THE "WHAT IS NEXT" BAND ---- */
.pl-next__title { margin: 0 0 18px; font-family: var(--font-display); font-stretch: var(--display-header); font-weight: 600; font-size: clamp(23px, 2.8vw, 34px); letter-spacing: -0.015em; color: var(--text); }
.pl-next__grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pl-next__card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 16px 18px; border: 1px solid var(--edge); border-radius: var(--pl-radius-sm); background: var(--pl-plate); box-shadow: var(--pl-plate-edge);
}
.pl-emblem--next2 { width: 64px; height: 64px; }
.pl-next__body { min-width: 0; }
.pl-next__name { margin: 0 0 8px; font-family: var(--font-display); font-stretch: var(--display-wide); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; color: var(--text); line-height: 1; }
.pl-meter--sm { height: 7px; }
.pl-next__gap { margin: 7px 0 0; font-family: var(--font-body); font-size: 12px; color: var(--muted); }
.pl-next__th { font-family: var(--font-mono); font-size: 13px; color: var(--pl-gold); white-space: nowrap; align-self: start; }

/* ---- CHART RANGE TABS ---- */
.pl-chart__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pl-chart__tabs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.pl-chart__tab {
  appearance: none; border: 0; cursor: pointer; padding: 4px 10px; border-radius: 999px; background: transparent;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--faint); transition: color 160ms ease, background-color 160ms ease;
}
.pl-chart__tab:hover { color: var(--muted); }
.pl-chart__tab.is-active { color: #1a1406; background: var(--pl-gold); box-shadow: 0 0 12px -3px var(--pl-gold-soft); }
.pl-chart__tab:focus-visible { outline: 2px solid var(--pl-gold-soft); outline-offset: 2px; }
.pl-chart__body { margin-top: 6px; }

/* ---- CLICKABLE TIER: the rung and its expanding detail ---- */
.pl-rung { cursor: pointer; outline: none; }
.pl-rung:focus-visible { box-shadow: inset 0 0 0 2px var(--pl-gold-soft); border-radius: 10px; }
.pl-rung.is-open { background: rgba(255, 211, 107, 0.05); box-shadow: inset 0 0 0 1px var(--pl-gold-dim); border-radius: 10px; }
.pl-tierdetail {
  grid-column: 1 / -1; overflow: hidden; max-height: 0; opacity: 0; margin-top: 0;
  border-radius: var(--pl-radius-sm); background: var(--surface-raised);
  box-shadow: inset 0 1px 0 var(--edge-top), inset 0 0 0 1px var(--edge);
  transition: max-height 320ms ease, opacity 260ms ease, margin-top 320ms ease; position: relative;
}
.pl-tierdetail.is-open { max-height: 240px; opacity: 1; margin-top: 14px; }
.pl-td__close {
  position: absolute; top: 10px; right: 12px; appearance: none; border: 0; background: transparent; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--faint); padding: 2px 6px; border-radius: 6px;
}
.pl-td__close:hover { color: var(--text); }
.pl-td__inner { display: flex; align-items: center; gap: 22px; padding: 22px 24px; }
.pl-emblem--td { width: 104px; height: 104px; }
.pl-td--current .pl-emblem--td { filter: drop-shadow(0 0 14px var(--pl-gold-soft)); }
.pl-td--locked .pl-emblem--td img { filter: grayscale(0.9) brightness(0.5); }
.pl-td__eyebrow { margin: 0 0 4px; font-family: var(--font-body); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.pl-td__name { margin: 0 0 6px; font-family: var(--font-display); font-stretch: var(--display-wide); font-weight: 600; font-size: 30px; letter-spacing: -0.015em; color: var(--text); line-height: 1; }
.pl-td__th { margin: 0 0 8px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.pl-td__line { margin: 0; font-family: var(--font-body); font-size: 14px; color: var(--text); }
.pl-td__gold { color: var(--pl-gold); font-weight: 600; }
.pl-td__gap { color: var(--pl-gold); }
.pl-td__approx { color: var(--faint); font-style: italic; }

/* ---- THE "WHAT IF" SIMULATOR (the showpiece) ----
   The payoff is the tier: its emblem and name are the largest things in the
   panel. The track is the meter's groove, filled gold up to the thumb, with
   a tick at every tier threshold (the snap-points); the reader's own tier
   tick is gold. The framing stays honest: "you would be", never "you are". */
.pl-sim {
  padding: var(--pl-pad) clamp(20px, 2.4vw, 32px);
  border: 1px solid var(--edge); border-radius: var(--pl-radius);
  background: var(--pl-plate); box-shadow: var(--pl-plate-edge);
}
.pl-sim__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.pl-sim__title { margin: 0; font-family: var(--font-display); font-stretch: var(--display-header); font-weight: 600; font-size: clamp(23px, 2.8vw, 34px); letter-spacing: -0.015em; color: var(--text); }
.pl-sim__sub { margin: 0; max-width: 56ch; font-family: var(--font-body); font-weight: 300; font-size: 13px; line-height: 1.5; color: var(--muted); }
.pl-sim__stage {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(20px, 2.6vw, 36px);
  min-height: 180px; margin: 10px 0 18px;
}
.pl-sim__emblem { width: clamp(140px, 13vw, 176px); height: clamp(140px, 13vw, 176px); display: flex; align-items: center; justify-content: center; }
.pl-emblem--sim { width: 100%; height: 100%; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.55)); }
.pl-emblem--sim.is-swap { animation: plSwap 260ms cubic-bezier(0.22, 1, 0.36, 1) 1 both; }
@keyframes plSwap {
  from { opacity: 0; transform: scale(0.9) translateY(4px); }
  to { opacity: 1; transform: none; }
}
.pl-sim__read { min-width: 0; }
.pl-sim__at { margin: 0 0 8px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.pl-sim__tier {
  margin: 0; font-family: var(--font-display); font-stretch: var(--display-wide); font-weight: 700;
  font-size: clamp(38px, 5.2vw, 68px); letter-spacing: -0.025em; color: var(--pl-gold); line-height: 0.95;
}
.pl-sim__rank { margin: 10px 0 12px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.pl-sim__delta { margin: 0; font-family: var(--font-body); font-size: 15px; color: var(--text); opacity: 0.86; }

.pl-sim__track { position: relative; padding: 8px 0 14px; }
.pl-sim__slider {
  --fill: 0%;
  position: relative; z-index: 1;
  appearance: none; -webkit-appearance: none; width: 100%; height: 12px; margin: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(90deg, #e9b546 0, var(--pl-gold) var(--fill), rgba(0, 0, 0, 0.42) var(--fill));
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}
.pl-sim__slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; cursor: grab;
  background: radial-gradient(circle at 35% 30%, #fff4d6, var(--pl-gold) 62%); border: 2px solid #1a1406;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 160ms ease;
}
.pl-sim__slider:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.1); }
.pl-sim__slider::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%; cursor: grab;
  background: radial-gradient(circle at 35% 30%, #fff4d6, var(--pl-gold) 62%); border: 2px solid #1a1406;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
.pl-sim__slider:focus-visible { outline: 2px solid var(--pl-gold-soft); outline-offset: 5px; }
.pl-sim__ticks { position: absolute; left: 13px; right: 13px; top: 24px; height: 8px; pointer-events: none; }
.pl-sim__tick { position: absolute; top: 0; width: 1px; height: 6px; margin-left: -0.5px; background: rgba(255, 255, 255, 0.18); }
.pl-sim__tick.is-yours { width: 2px; height: 8px; margin-left: -1px; background: var(--pl-gold); }
.pl-sim__scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--faint); }

/* ---- HOVER LIFE ---- */
/* ONE language everywhere: a 2px lift and a brighter hairline. No glow. */
@media (hover: hover) {
  .pl-next__card, .pl-stat, .pl-record__cell { transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
  .pl-next__card:hover, .pl-stat:not(.pl-stat--chart):hover {
    transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.11);
  }
  .pl-rung:not(.is-current):not(.is-open):hover { background: rgba(255, 255, 255, 0.03); transform: translateY(-2px); }
  .pl-rung.is-current:hover { transform: translateY(-2px); }
  .pl-rung:hover .pl-emblem { transform: scale(1.06); }
  .pl-rung.is-locked:hover .pl-emblem img { filter: grayscale(0.6) brightness(0.6); }
  .pl-rung .pl-emblem, .pl-rung .pl-emblem img { transition: transform 200ms ease, filter 200ms ease; }
  .pl-chart__tab:not(.is-active):hover { background: rgba(255, 255, 255, 0.05); }
}

/* ---- REVEAL, PER SECTION, ON SCROLL (JS adds .is-inview via IntersectionObserver) ---- */
.pl-sec { transition: opacity 640ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1); }
.pl-sec:not(.is-inview) { opacity: 0; transform: translateY(18px); }

/* Children reveal on the independent `translate` property with their own
   stagger (--rd), so the delay never applies to `transform`: hover lifts
   stay instant on every row and tile, even the ones that revealed last. */
.pl-stats .pl-stat, .pl-panels .pl-panel, .pl-next__card, .pl-ladder .pl-rung {
  transition:
    opacity 560ms ease var(--rd, 0ms),
    translate 520ms cubic-bezier(0.22, 1, 0.36, 1) var(--rd, 0ms),
    transform 200ms ease, background-color 200ms ease, border-color 200ms ease;
}
.pl-stats:not(.is-inview) .pl-stat,
.pl-panels:not(.is-inview) .pl-panel,
.pl-next:not(.is-inview) .pl-next__card,
.pl-ladder:not(.is-inview) .pl-rung { opacity: 0; translate: 0 12px; }
.pl-stats .pl-stat:nth-child(2) { --rd: 70ms; }
.pl-stats .pl-stat:nth-child(3) { --rd: 130ms; }
.pl-stats .pl-stat:nth-child(4) { --rd: 190ms; }
.pl-stats .pl-stat:nth-child(5) { --rd: 250ms; }
.pl-stats .pl-stat:nth-child(6) { --rd: 310ms; }
.pl-ladder .pl-rung { --rd: calc(120ms + var(--ri, 0) * 24ms); }
.pl-panels .pl-panel:nth-child(2) { --rd: 110ms; }
.pl-next .pl-next__card { --rd: calc(var(--ni, 0) * 90ms); }

.pl-meter__fill { transition: width 1000ms cubic-bezier(0.22, 1, 0.36, 1) 300ms; }
.pl-sec:not(.is-inview) .pl-meter__fill { width: 0; }

.pl-rung__node { transition: background-color 420ms ease, box-shadow 420ms ease; }
.pl-ladder.is-inview .pl-rung__node { transition-delay: calc(200ms + var(--ri, 0) * 48ms); }
.pl-ladder:not(.is-inview) .pl-rung.is-passed .pl-rung__node,
.pl-ladder:not(.is-inview) .pl-rung.is-current .pl-rung__node {
  background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.pl-ladder.is-inview .pl-rung.is-current { animation: plPulseIn 900ms ease-out calc(200ms + var(--ri, 0) * 48ms) 1 both; }
/* the current row settles in with its gold edge tightening once: a ring,
   not a glow, and it rests exactly on the row's own static edge */
@keyframes plPulseIn {
  0% { box-shadow: inset 0 0 0 1px rgba(255, 211, 107, 0.08); }
  45% { box-shadow: inset 0 0 0 2px rgba(255, 211, 107, 0.6); }
  100% { box-shadow: inset 0 0 0 1px rgba(255, 211, 107, 0.32); }
}

/* the hero emblem arrives once (a settle into its seat), resting exactly
   on its static depth-shadow-and-halo, so nothing keeps moving */
.pl-hero.is-inview .pl-emblem--now { animation: plBloom 900ms cubic-bezier(0.22, 1, 0.36, 1) 200ms 1 both; }
@keyframes plBloom {
  0% { opacity: 0; transform: scale(0.94); }
  100% { opacity: 1; transform: none; }
}

/* The line draws left to right as a wipe of the whole SVG. (It used a
   pathLength dash, but with vector-effect: non-scaling-stroke Chrome lays
   dashes out in screen space, so at rest the line rendered broken.) A
   rectangular reveal on the chart only; emblems carry no clip anywhere. */
.pl-chart__svg { clip-path: inset(0 100% 0 0); }
.pl-chart.is-drawn .pl-chart__svg { clip-path: inset(0 0 0 0); transition: clip-path 1200ms cubic-bezier(0.4, 0, 0.2, 1); }
.pl-chart__area { opacity: 0; }
.pl-chart.is-drawn .pl-chart__area { opacity: 1; transition: opacity 600ms ease 400ms; }
.pl-chart__dot { opacity: 0; }
.pl-chart.is-drawn .pl-chart__dot { opacity: 1; transition: opacity 300ms ease 1100ms; }

@media (max-width: 980px) {
  .pl-next__grid { grid-template-columns: minmax(0, 1fr); }
  .pl-sim__stage { grid-template-columns: minmax(0, 1fr); justify-items: start; min-height: 0; }
  .pl-td__inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .pl-tierdetail.is-open { max-height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-sec, .pl-stat, .pl-panel, .pl-next__card, .pl-rung, .pl-meter__fill, .pl-rung__node,
  .pl-chart__line, .pl-chart__area, .pl-rung .pl-emblem, .pl-emblem--now, .pl-rung.is-current,
  .pl-tierdetail, .pl-emblem--sim, .pl-emblem--sim.is-swap, .pl-chart__tab, .pl-chart__dot,
  .pl-record__cell { transition: none !important; animation: none !important; }
  .pl-sec:not(.is-inview) { opacity: 1; transform: none; }
  .pl-stats:not(.is-inview) .pl-stat,
  .pl-panels:not(.is-inview) .pl-panel,
  .pl-next:not(.is-inview) .pl-next__card,
  .pl-ladder:not(.is-inview) .pl-rung { opacity: 1; translate: none; transform: none; }
  .pl-sec:not(.is-inview) .pl-meter__fill { width: calc(var(--p, 0) * 100%); }
  .pl-chart__svg { clip-path: none !important; }
  .pl-chart__area, .pl-chart__dot { opacity: 1; }
}
