:root {
    --slate-50:  #fafbff;
    --slate-100: #f1f5f9;
    --slate-200: #e6e8f0;
    --slate-300: #c8cde0;
    --slate-400: #8a91ad;
    --slate-500: #5b6280;
    --slate-700: #2c3354;
    --slate-900: #0a0d24;
    --blue:      #1E5BFF;
    --blue-deep: #1845C4;
    --white:     #ffffff;
  }

  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    font-family: 'Manrope', system-ui, sans-serif;
    color: var(--slate-900);
    background: var(--slate-50);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  /* ============ Section ============ */
  .yp-section {
    width: 100%;
    background: linear-gradient(180deg, var(--slate-50) 0%, #ffffff 60%);
    padding: 120px 24px;
    display: flex;
    justify-content: center;
  }
  @media (max-width: 720px) {
    .yp-section { padding: 64px 16px; }
  }

  /* ============ Card chrome ============ */
  .yp-card {
    position: relative;
    width: 100%;
    max-width: 1080px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 400ms ease-out, transform 400ms cubic-bezier(.2,.8,.2,1);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.8),
      inset 0 -1px 0 rgba(10,13,36,0.04);
  }
  .yp-card.is-in {
    opacity: 1;
    transform: scale(1);
  }

  /* Top instrument bezel */
  .yp-bezel {
    height: 24px;
    background: var(--white);
    color: var(--slate-400);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }
  .yp-bezel-left { display: flex; gap: 14px; align-items: center; }
  .yp-bezel-dots { display: inline-flex; gap: 5px; }
  .yp-bezel-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--slate-200); display: inline-block; }
  .yp-bezel-dots i:nth-child(2) { background: var(--slate-300); }
  .yp-bezel-dots i:nth-child(3) { background: var(--blue); opacity: 0.7; }

  /* Card scanning line — runs once on entry */
  .yp-card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: var(--blue);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 0 12px 0 rgba(30, 91, 255, 0.45);
  }
  .yp-card.is-in::before {
    animation: yp-scan 700ms cubic-bezier(.4,0,.2,1) 80ms forwards;
  }
  @keyframes yp-scan {
    0%   { transform: translateY(0);     opacity: 0; }
    8%   { opacity: 0.55; }
    90%  { opacity: 0.45; }
    100% { transform: translateY(var(--yp-card-h, 800px)); opacity: 0; }
  }

  /* Ambient ghost-scan, runs forever after first reveal */
  .yp-card.is-done::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: var(--blue);
    opacity: 0;
    pointer-events: none;
    z-index: 4;
    animation: yp-ghost 9s linear 2s infinite;
  }
  @keyframes yp-ghost {
    0%   { transform: translateY(0);     opacity: 0; }
    5%   { opacity: 0.05; }
    95%  { opacity: 0.05; }
    100% { transform: translateY(var(--yp-card-h, 800px)); opacity: 0; }
  }

  /* Inner graph-paper grid for body region (header + footer override) */
  .yp-card-body {
    position: relative;
    background-image:
      linear-gradient(to right, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: 0 0;
  }

  /* ============ Mono utilities ============ */
  .mono {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .mono-num { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
  .sep { color: var(--slate-300); padding: 0 6px; }

  /* ============ Header band ============ */
  .yp-head {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 22px 14px;
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
  }
  .yp-mark {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--slate-900);
    color: var(--white);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.04em;
  }
  .yp-head-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
    color: var(--slate-900);
  }
  .yp-head-meta {
    margin-top: 2px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 11px;
    color: var(--slate-500);
    letter-spacing: 0.04em;
  }
  .yp-head-meta-2 {
    margin-top: 2px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 10px;
    color: var(--slate-400);
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .yp-head-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .yp-head-status-label {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--slate-400);
  }
  .yp-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 9px;
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--slate-700);
    background: var(--white);
  }
  .yp-live .pulse {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 0 rgba(30, 91, 255, 0.45);
  }
  .yp-card.is-in .yp-live .pulse {
    animation: yp-pulse 2s ease-out infinite;
  }
  @keyframes yp-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(30, 91, 255, 0.45); }
    70%  { box-shadow: 0 0 0 8px rgba(30, 91, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 91, 255, 0); }
  }

  /* Header data fade-in */
  .yp-fade { opacity: 0; transition: opacity 320ms ease-out; }
  .yp-card.is-in .yp-fade { opacity: 1; }

  /* Typewriter caret styling */
  .yp-typed { display: inline-block; min-height: 1em; }
  .yp-caret {
    display: inline-block;
    width: 6px;
    height: 0.95em;
    background: var(--blue);
    margin-left: 2px;
    transform: translateY(2px);
    opacity: 0;
  }
  .yp-typed.is-typing .yp-caret { opacity: 0.85; animation: yp-blink 800ms steps(2,end) infinite; }
  @keyframes yp-blink { 50% { opacity: 0; } }

  /* ============ Top-line summary ============ */
  .yp-summary {
    position: relative;
    padding: 30px 24px 28px;
    display: grid;
    grid-template-columns: minmax(0, 280px) 1fr;
    gap: 28px 36px;
    align-items: center;
    border-bottom: 1px solid var(--slate-200);
    background-color: rgba(255,255,255,0.7);
  }
  @media (max-width: 720px) {
    .yp-summary { grid-template-columns: 1fr; gap: 20px; padding: 24px 18px 22px; }
  }
  .yp-score-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }
  .yp-score-num {
    font-weight: 700;
    font-size: 96px;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--blue);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
  }
  .yp-score-denom {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 22px;
    color: var(--slate-400);
    letter-spacing: 0.02em;
  }
  .yp-band {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 6px 14px 7px;
    background: rgba(30, 91, 255, 0.08);
    border: 1px solid rgba(30, 91, 255, 0.28);
    border-radius: 999px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--blue);
    text-transform: uppercase;
  }
  .yp-band::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 0 rgba(30, 91, 255, 0.4);
    animation: yp-band-pulse 2.4s ease-out infinite;
  }
  @keyframes yp-band-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(30, 91, 255, 0.45); }
    70%  { box-shadow: 0 0 0 6px rgba(30, 91, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 91, 255, 0); }
  }
  .yp-summary-stats {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 0 14px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    color: var(--slate-400);
    text-transform: uppercase;
  }
  .yp-summary-stats b { color: var(--slate-700); font-weight: 500; }
  .yp-summary-stats .delta { color: var(--slate-700); }

  /* Methodology box — credibility anchor (footnote at bottom of report) */
  .yp-method {
    padding: 18px 24px 20px;
    background: rgba(255, 255, 255, 0.4);
    border-top: 1px solid var(--slate-200);
  }
  .yp-method-head {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--slate-400);
    margin-bottom: 6px;
  }
  .yp-method-body {
    margin: 0;
    font-size: 11px;
    line-height: 1.55;
    color: var(--slate-500);
    max-width: 820px;
  }
  .yp-method-body b { color: var(--slate-700); font-weight: 600; }
  @media (max-width: 720px) {
    .yp-method { padding: 14px 18px 16px; }
    .yp-method-body { font-size: 10.5px; }
  }

  /* Mini scale */
  .yp-scale { position: relative; width: 100%; }
  .yp-scale-track {
    position: relative;
    height: 8px;
    border-radius: 2px;
    background: var(--slate-100);
    overflow: hidden;
    border: 1px solid var(--slate-200);
  }
  .yp-scale-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 0;
    background: var(--slate-900);
    transition: width 900ms cubic-bezier(.2,.8,.2,1) 900ms;
  }
  .yp-card.is-in .yp-scale-fill { width: calc(11 / 15 * 100%); }
  .yp-scale-marker {
    position: absolute;
    top: -6px;
    left: calc(11 / 15 * 100%);
    width: 2px;
    height: 20px;
    background: var(--slate-900);
    transform: translateX(-1px) scaleY(0);
    transform-origin: top;
    transition: transform 320ms cubic-bezier(.2,.8,.2,1) 1500ms;
  }
  .yp-card.is-in .yp-scale-marker { transform: translateX(-1px) scaleY(1); }

  /* Tick marks */
  .yp-scale-ticks {
    position: relative;
    height: 8px;
    margin-top: 4px;
  }
  .yp-scale-ticks span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9px;
    color: var(--slate-300);
    letter-spacing: 0.04em;
  }
  .yp-scale-ticks span::before {
    content: "";
    display: block;
    width: 1px;
    height: 4px;
    background: var(--slate-300);
    margin: 0 auto 2px;
  }
  .yp-scale-bands {
    display: grid;
    grid-template-columns: 7fr 3fr 3fr 2fr;
    margin-top: 6px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--slate-400);
    text-transform: uppercase;
  }
  .yp-scale-bands span {
    border-left: 1px solid var(--slate-200);
    padding: 6px 0 0 8px;
  }
  .yp-scale-bands span:first-child { border-left: none; padding-left: 0; }
  .yp-scale-bands b {
    display: block;
    color: var(--slate-700);
    font-weight: 500;
    margin-top: 2px;
  }

  /* ============ Element row shared ============ */
  .yp-row {
    position: relative;
    padding: 32px 24px 36px;
    border-bottom: 1px solid var(--slate-200);
    background-color: rgba(255,255,255,0.55);
  }
  @media (max-width: 820px) {
    .yp-row { padding: 26px 18px 28px; }
  }

  /* Hairline rule above each row, drawn left→right, with leading glyph */
  .yp-row .yp-rule {
    position: absolute;
    top: -1px; left: 0;
    height: 1px;
    width: 100%;
    background: var(--slate-200);
    transform: scaleX(0);
    transform-origin: left;
  }
  .yp-card.is-in .yp-row .yp-rule {
    animation: yp-draw 500ms cubic-bezier(.4,0,.2,1) forwards;
  }
  @keyframes yp-draw { to { transform: scaleX(1); } }
  .yp-row .yp-rule-glyph {
    position: absolute;
    top: -10px;
    left: 14px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 14px;
    color: var(--slate-300);
    line-height: 1;
    background: var(--white);
    padding: 0 6px;
    opacity: 0;
    transition: opacity 240ms ease-out 320ms;
  }
  .yp-card.is-in .yp-row .yp-rule-glyph { opacity: 1; }

  /* Element header lockup */
  .yp-elt-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
  }
  .yp-elt-index {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--slate-400);
    text-transform: uppercase;
  }
  .yp-elt-title {
    font-family: 'Fraunces', 'Manrope', serif;
    font-weight: 500;
    font-size: 44px;
    line-height: 1.02;
    letter-spacing: -0.015em;
    color: var(--slate-900);
    font-feature-settings: "ss01" on;
    margin: 0;
  }
  .yp-score-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    padding: 4px 9px;
    border: 1px solid rgba(30, 91, 255, 0.35);
    border-radius: 6px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 12px;
    color: var(--blue);
    background: var(--white);
    letter-spacing: 0.04em;
  }
  .yp-score-badge b { color: var(--blue); font-weight: 600; }
  .yp-score-badge .of { color: var(--slate-400); }

  /* Score badge stamp-in */
  .yp-stamp { opacity: 0; transform: scale(1.15); transition: opacity 200ms ease-out, transform 280ms cubic-bezier(.2,.8,.2,1); }
  .yp-card.is-in .yp-stamp.in { opacity: 1; transform: scale(1); }

  /* Element metadata strip */
  .yp-elt-meta {
    margin-top: 10px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    color: var(--slate-400);
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .yp-elt-meta b { color: var(--slate-700); font-weight: 500; display: block; margin-bottom: 2px; }
  .yp-elt-meta .sep { display: none; }

  .yp-diag {
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 16.5px;
    line-height: 1.65;
    color: var(--slate-700);
    max-width: 70ch;
    letter-spacing: 0;
    margin: 0;
  }
  .yp-diag em {
    font-style: italic;
    color: var(--slate-500);
    font-family: 'Fraunces', serif;
    font-weight: 400;
  }

  /* ====================================================== */
  /* CODES — wide horizontal diverging signal-strength meter */
  /* ====================================================== */

  .row-codes .yp-row-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px 36px;
    align-items: start;
  }
  @media (max-width: 820px) {
    .row-codes .yp-row-grid { grid-template-columns: 1fr; }
  }
  .row-codes .yp-elt-side { display: flex; flex-direction: column; gap: 12px; }
  .row-codes .yp-row-body { display: flex; flex-direction: column; gap: 22px; }

  .yp-codes-vis {
    position: relative;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: var(--white);
    padding: 44px 28px 44px;
  }

  /* Single-axis spectrum: PROCESS ←————→ EDGE */
  .yp-codes-spectrum {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
  }
  .yp-codes-end {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    line-height: 1;
  }
  .yp-codes-end.is-left  { color: var(--slate-400); }
  .yp-codes-end.is-right { color: var(--slate-900); }

  .yp-codes-track {
    position: relative;
    height: 6px;
    background: var(--slate-100);
    border-radius: 3px;
  }

  .yp-codes-pin {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .yp-codes-pin-dot {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
  }
  .yp-codes-pin.is-page .yp-codes-pin-dot {
    background: var(--blue);
    box-shadow: 0 0 0 5px rgba(30, 91, 255, 0.18);
  }
  .yp-codes-pin.is-target .yp-codes-pin-dot {
    background: var(--white);
    border: 2px solid var(--slate-900);
  }
  .yp-codes-pin-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .yp-codes-pin.is-page .yp-codes-pin-label {
    bottom: 18px;
    color: var(--blue);
    font-weight: 600;
  }
  .yp-codes-pin.is-target .yp-codes-pin-label {
    top: 18px;
    color: var(--slate-500);
  }
  @media (max-width: 720px) {
    .yp-codes-end { font-size: 20px; }
    .yp-codes-spectrum { gap: 14px; }
  }

  .yp-codes-axis {
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: 50%;
    width: 1px;
    background: var(--slate-900);
    transform: translateX(-0.5px);
    z-index: 1;
  }
  .yp-codes-axis-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    color: var(--slate-400);
    text-transform: uppercase;
    white-space: nowrap;
  }

  /* GAP indicator */
  .yp-gap-tag {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: 4px 9px;
    border: 1px solid var(--blue);
    border-radius: 4px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: 0.1em;
    color: var(--blue);
    opacity: 0;
    transition: opacity 240ms ease-out;
    white-space: nowrap;
    z-index: 3;
  }
  .yp-gap-tag.in { opacity: 1; }

  /* ====================================================== */
  /* CONTEXT — full-width scope                              */
  /* ====================================================== */
  .row-context .yp-row-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px 36px;
    align-items: start;
  }
  @media (max-width: 820px) {
    .row-context .yp-row-grid { grid-template-columns: 1fr; }
  }
  .row-context .yp-elt-side { display: flex; flex-direction: column; gap: 12px; }
  .row-context .yp-row-body { display: flex; flex-direction: column; gap: 22px; }

  .yp-scope {
    position: relative;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background:
      linear-gradient(to right, rgba(15, 23, 42, 0.06) 1px, transparent 1px) 0 0 / 40px 100%,
      linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 1px, transparent 1px) 0 0 / 100% 30px,
      var(--white);
    padding: 22px 56px 8px 60px;
  }
  .yp-scope-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.18em;
    color: var(--slate-400);
    text-transform: uppercase;
  }
  .yp-scope-head b { color: var(--slate-700); font-weight: 500; }

  .yp-scope-traces {
    position: relative;
  }
  .yp-scope-y {
    position: absolute;
    left: -52px;
    top: 0; bottom: 22px;
    width: 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    color: var(--slate-400);
    text-transform: uppercase;
    text-align: right;
  }
  .yp-scope-trace-row {
    position: relative;
    height: 110px;
    margin-bottom: 6px;
  }
  .yp-scope-trace-row + .yp-scope-trace-row { margin-top: 2px; }
  .yp-scope-trace-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
  }
  .yp-scope-trace-label {
    position: absolute;
    top: 6px;
    right: 8px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--slate-400);
    background: rgba(255,255,255,0.85);
    padding: 2px 6px;
    border: 1px solid var(--slate-200);
    border-radius: 3px;
  }
  .yp-scope-trace-label.is-blue { color: var(--blue); border-color: rgba(30,91,255,0.35); }
  .yp-scope-trace-label:not(.is-blue) { top: 60px; }

  .yp-scope-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: var(--len, 1200);
    stroke-dashoffset: var(--len, 1200);
    transition: stroke-dashoffset 1100ms cubic-bezier(.4,0,.2,1);
  }
  .yp-card.is-in .yp-scope-path.in { stroke-dashoffset: 0; }
  .yp-scope-path.is-buyer { stroke: var(--blue); stroke-width: 1.6; }
  .yp-scope-path.is-page  { stroke: var(--slate-400); stroke-width: 1.2; }

  /* Annotation pills floating above buyer trace */
  .yp-scope-annotations {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .yp-scope-anno {
    position: absolute;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 240ms ease-out;
  }
  .yp-scope-anno.in { opacity: 1; }
  .yp-scope-anno-pill {
    background: var(--slate-900);
    color: var(--white);
    padding: 3px 7px;
    border-radius: 3px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .yp-scope-anno-line {
    width: 1px;
    height: 14px;
    background: var(--slate-900);
    margin: 0 auto;
  }

  .yp-scope-x {
    margin-top: 8px;
    border-top: 1px solid var(--slate-200);
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.16em;
    color: var(--slate-400);
    text-transform: uppercase;
  }

  /* ====================================================== */
  /* CLARITY — dense data block (histogram + table + stack)  */
  /* ====================================================== */
  .row-clarity .yp-row-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px 36px;
    align-items: start;
  }
  @media (max-width: 820px) {
    .row-clarity .yp-row-grid { grid-template-columns: 1fr; }
  }
  .row-clarity .yp-elt-side { display: flex; flex-direction: column; gap: 12px; }
  .row-clarity .yp-row-body {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr 0.9fr;
    gap: 16px;
  }
  @media (max-width: 900px) {
    .row-clarity .yp-row-body { grid-template-columns: 1fr; }
  }
  .row-clarity .yp-diag-wrap {
    grid-column: 1 / -1;
    margin-top: 8px;
  }

  .yp-cell {
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    background: var(--white);
    padding: 14px 16px 16px;
  }
  .yp-cell-head {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.18em;
    color: var(--slate-400);
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .yp-cell-head b { color: var(--slate-900); font-weight: 600; font-size: 10.5px; }
  .yp-cell-head > span:nth-child(2) { font-size: 8.5px; color: var(--slate-400); }

  /* Histogram */
  .yp-hist {
    position: relative;
    height: 152px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    align-items: end;
    border-bottom: 1px solid var(--slate-200);
    border-left: 1px solid var(--slate-200);
    padding: 4px 0 0 0;
  }
  .yp-hist-bar {
    background: var(--slate-900);
    border-radius: 1px 1px 0 0;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 600ms cubic-bezier(.2,.8,.2,1);
    position: relative;
  }
  .yp-hist-bar.is-mean { background: var(--slate-900); } /* highlighted-mean container; line drawn separately */
  .yp-card.is-in .yp-hist-bar.in { transform: scaleY(1); }

  .yp-hist-overlay {
    position: absolute;
    inset: 4px 0 0 0;
    pointer-events: none;
  }
  .yp-hist-line {
    position: absolute;
    top: -10px;
    bottom: -2px;
    width: 0;
    opacity: 0;
    transition: opacity 280ms ease-out;
  }
  .yp-hist-line.in { opacity: 1; }
  .yp-hist-line.is-mean   { left: 52%; border-left: 1.5px solid var(--blue); }
  .yp-hist-line.is-target { left: 80%; border-left: 1.5px dashed var(--slate-400); }

  /* Histogram legend (below x-axis) */
  .yp-hist-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 12px;
    margin-left: 8px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.14em;
    color: var(--slate-500);
    text-transform: uppercase;
  }
  .yp-hist-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .yp-hist-legend-swatch {
    display: inline-block;
    width: 18px;
    height: 0;
    border-top: 1.5px solid var(--blue);
  }
  .yp-hist-legend-swatch.is-target {
    border-top: 1.5px dashed var(--slate-400);
  }

  /* (Old floating label styles — kept commented for reference, no longer in markup) */
  .yp-hist-line .lbl {
    display: none;
  }
  .yp-hist-line.is-mean .lbl { color: var(--blue); border-color: rgba(30,91,255,0.4); }
  .yp-hist-line.is-target .lbl { color: var(--slate-500); top: 4px; }

  .yp-hist-y {
    position: absolute;
    left: -28px;
    top: 0; bottom: 12px;
    width: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9px;
    color: var(--slate-400);
    text-align: right;
  }
  .yp-hist-x {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.04em;
    color: var(--slate-400);
  }
  .yp-hist-wrap {
    position: relative;
    margin-left: 28px;
  }

  /* Themes table */
  .yp-themes {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .yp-themes-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px dashed var(--slate-200);
    font-size: 13px;
    line-height: 1.3;
  }
  .yp-themes-row:last-child { border-bottom: none; }
  .yp-themes-key {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    color: var(--slate-700);
    font-size: 12.5px;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 500;
  }
  .yp-themes-val {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    color: var(--slate-500);
    text-transform: uppercase;
    text-align: right;
  }

  /* Surface/Working/Deep stack */
  .yp-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .yp-stack-row {
    display: grid;
    grid-template-columns: 50px 1fr 52px;
    gap: 8px;
    align-items: center;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.12em;
    color: var(--slate-500);
    text-transform: uppercase;
  }
  .yp-stack-row b { color: var(--slate-500); font-weight: 500; text-align: right; }
  .yp-stack-bar {
    height: 8px;
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
  }
  .yp-stack-bar i {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 0;
    background: var(--slate-900);
    transition: width 700ms cubic-bezier(.2,.8,.2,1);
  }
  .yp-card.is-in .yp-stack-bar i.in { width: var(--w, 0%); }

  /* Cell takeaway note (interpretation line below data) */
  .yp-cell-note {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px dashed var(--slate-200);
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: var(--slate-500);
    font-style: italic;
    letter-spacing: 0;
  }

  /* ============ Footer ============ */
  .yp-foot {
    position: relative;
    padding: 22px 24px 26px;
    background: var(--slate-100);
    border-top: 1px solid var(--slate-200);
  }
  .yp-foot .yp-rule { position: absolute; top: 0; left: 0; height: 1px; width: 100%; background: var(--slate-200); transform: scaleX(0); transform-origin: left; }
  .yp-card.is-in .yp-foot .yp-rule { animation: yp-draw 500ms cubic-bezier(.4,0,.2,1) forwards; animation-delay: 4400ms; }

  .yp-foot-meta {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--slate-400);
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 0 4px;
  }
  .yp-foot-meta b { color: var(--slate-700); font-weight: 500; }
  .yp-foot-bottom {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
  }
  .yp-foot-text {
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--slate-700);
    max-width: 72ch;
    margin: 0;
  }
  .yp-foot-text b { color: var(--slate-900); font-weight: 600; }
  .yp-foot-text .accent { color: var(--blue); font-weight: 500; }
  .yp-runlink-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
  }
  .yp-runlink-eyebrow {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--slate-500);
  }
  .yp-runlink-eyebrow::before {
    content: "↓";
    margin-right: 6px;
    color: var(--slate-400);
  }
  .yp-runlink-guarantee {
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 11.5px;
    color: var(--slate-500);
    font-style: italic;
  }
  .yp-runlink {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--blue);
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(30, 91, 255, 0.28);
    transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    white-space: nowrap;
  }
  .yp-runlink:hover {
    background: var(--blue-deep);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(30, 91, 255, 0.36);
  }
  .yp-runlink .arrow { display: inline-block; transition: transform 200ms ease; margin-left: 8px; }
  .yp-runlink:hover .arrow { transform: translateX(3px); }

  /* Reduced motion: render all final state instantly */
  @media (prefers-reduced-motion: reduce) {
    .yp-card,
    .yp-card.is-in,
    .yp-card *,
    .yp-card.is-in * {
      transition: none !important;
      animation: none !important;
    }
    .yp-card { opacity: 1 !important; transform: none !important; }
    .yp-card .yp-fade { opacity: 1 !important; }
    .yp-card .yp-rule { transform: scaleX(1) !important; }
    .yp-card .yp-stamp { opacity: 1 !important; transform: none !important; }
    .yp-card .yp-codes-bar { transform: scaleX(1) !important; }
    .yp-card .yp-codes-expect, .yp-card .yp-gap-tag { opacity: 1 !important; }
    .yp-card .yp-scope-path { stroke-dashoffset: 0 !important; }
    .yp-card .yp-scope-anno { opacity: 1 !important; }
    .yp-card .yp-hist-bar { transform: scaleY(1) !important; }
    .yp-card .yp-hist-line { opacity: 1 !important; }
    .yp-card .yp-stack-bar i { width: var(--w, 0%) !important; }
    .yp-card .yp-scale-fill { width: calc(11 / 15 * 100%) !important; }
    .yp-card .yp-scale-marker { transform: translateX(-1px) scaleY(1) !important; }
  }