/* ROI · Rate Of Interest
   System: hairline 12-column boxes, numbered mono labels, small square buttons.
   One colour means one thing: magenta = people (interest). Valuation is always neutral. */
:root {
  --night: #060507; --panel: #0E0C11; --hair: #221D27; --hair-2: #2E2834;
  --bone: #ECE8EF; --ash: #8C8692; --ash-2: #615B67; --mag: #E13BFF;
  --sans: 'Hubot Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --t1: 120ms; --t2: 300ms; --t3: 600ms; --t4: 900ms;
  --out: cubic-bezier(.16, 1, .3, 1); --io: cubic-bezier(.65, 0, .35, 1);
  --wrap: 1360px; --gut: clamp(16px, 2.4vw, 32px);
  --nav-h: 60px; --bar-h: 36px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 8px); }
body {
  margin: 0; background: var(--night); color: var(--bone);
  font: 400 16px/1.5 var(--sans); font-stretch: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--mag); color: var(--night); }
:focus-visible { outline: 1px solid var(--bone); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--bone); color: var(--night); padding: 8px 12px; font: 500 13px var(--mono); }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* numbered mono labels */
.label { margin: 0; font: 400 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ash); display: flex; align-items: baseline; gap: 10px; }
.label .n { color: var(--bone); }
.label .n::before { content: '['; color: var(--ash-2); }
.label .n::after { content: ']'; color: var(--ash-2); }
.label .sub { text-transform: none; letter-spacing: 0; color: var(--ash-2); }

/* square buttons that fill from the left */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px;
  border: 1px solid var(--bone); border-radius: 0; background: transparent; cursor: pointer; overflow: hidden; isolation: isolate;
  font: 500 13px/1 var(--mono); letter-spacing: .02em; white-space: nowrap; transition: color var(--t2) var(--out); }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--bone); transform: scaleX(0); transform-origin: left; transition: transform var(--t2) var(--out); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
.btn:hover, .btn:focus-visible { color: var(--night); }
.btn-solid { background: var(--bone); color: var(--night); }
.btn-solid::before { background: #fff; }

/* 0 · preview bar */
.preview-bar { height: var(--bar-h); border-bottom: 1px solid var(--hair); background: var(--panel); font: 400 12px/1 var(--mono); color: var(--ash); }
.pb-in { height: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; }
.pb-chip { padding: 4px 7px; border: 1px solid var(--hair-2); color: var(--bone); letter-spacing: .08em; text-transform: uppercase; font-size: 10.5px; }
.pb-link { transition: color var(--t2); }
.pb-link:hover { color: var(--bone); }
.pb-arr { display: inline-block; transition: transform var(--t2) var(--out); }
.pb-link:hover .pb-arr { transform: translateX(3px); }
.pb-short { display: none; }

/* 1 · nav */
.nav { position: sticky; top: 0; z-index: 40; height: var(--nav-h); background: rgba(6, 5, 7, .965); border-bottom: 1px solid var(--hair);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.nav-in { height: 100%; display: flex; align-items: center; gap: 28px; }
.lockup { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.lockup-mark { width: 28px; height: 28px; }
.lockup-word { font: 600 19px/1 var(--sans); font-stretch: 112%; letter-spacing: .01em; }
.lockup-sub { font: 400 12px/1 var(--mono); color: var(--ash); letter-spacing: .06em; text-transform: uppercase; padding-left: 10px; border-left: 1px solid var(--hair-2); }
.nav-links { display: flex; gap: 26px; font-size: 14px; color: var(--ash); }
.nav-links a { position: relative; padding: 6px 0; transition: color var(--t2); }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--bone); transform: scaleX(0); transform-origin: left; transition: transform var(--t2) var(--out); }
.nav-links a:hover { color: var(--bone); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links .tick { color: inherit; }
.nav-cta { height: 36px; }

/* 2 · hero */
.hero { position: relative; border-bottom: 1px solid var(--hair); }
.hero-track { position: relative; }
.hero-stage { position: relative; }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); padding: 0; }
.hero-copy { grid-column: 1 / span 5; padding: clamp(36px, 5.2vh, 64px) clamp(20px, 2.6vw, 40px) 36px; display: flex; flex-direction: column; gap: 24px; border-right: 1px solid var(--hair); min-width: 0; }
.hero-field { grid-column: 6 / span 7; min-width: 0; display: flex; }
.h-hero { margin: 4px 0 0; font: 300 clamp(46px, 5.5vw, 86px)/.98 var(--sans); font-stretch: 118%; letter-spacing: -.025em; }
.h-hero .line { display: block; }
.lede { margin: 0; max-width: 31em; font-size: clamp(16px, 1.25vw, 18.5px); line-height: 1.5; color: #C9C3CE; }

.score-box { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.score-row { display: flex; border: 1px solid var(--hair-2); background: var(--panel); transition: border-color var(--t2); }
.score-row:focus-within { border-color: var(--bone); }
.score-row input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 0; background: transparent; outline: none; font: 400 14px var(--mono); }
.score-row input::placeholder { color: var(--ash-2); }
.score-row .btn { height: 48px; border: 0; border-left: 1px solid var(--hair-2); }
.score-help { margin: 0; font: 400 12px/1.45 var(--mono); color: var(--ash-2); }

.try { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-top: -8px; }
.try-k { font: 400 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ash-2); }
.try-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 30px; padding: 0 10px; border: 1px solid var(--hair-2); background: transparent; cursor: pointer; font: 400 12.5px var(--mono); color: var(--bone);
  display: inline-flex; align-items: center; gap: 8px; transition: border-color var(--t2), background var(--t2); }
.chip:hover, .chip:focus-visible { border-color: var(--ash); background: var(--panel); }
.chip em { font-style: normal; color: var(--mag); }

/* hero stat callouts (bottom of the copy column) */
.hero-stats { margin: auto 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hair); padding-top: 0; }
.hero-stats div { padding: 14px 14px 0 0; min-width: 0; }
.hero-stats div + div { padding-left: 14px; border-left: 1px solid var(--hair); }
.hero-stats dt { font: 400 12px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ash-2); }
.hero-stats dd { margin: 6px 0 0; font: 600 26px/1.05 var(--sans); font-stretch: 104%; font-variant-numeric: tabular-nums; }
.hero-stats dd small { display: block; margin-top: 4px; font: 400 12px/1.3 var(--mono); color: var(--ash); }
#stBuyers { color: var(--mag); }

/* result card */
.result { border: 1px solid var(--hair-2); background: var(--panel); animation: boxIn var(--t2) var(--out) both; }
@keyframes boxIn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.r-head { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-bottom: 1px solid var(--hair); }
.r-sym { font: 600 16px/1 var(--sans); font-stretch: 108%; }
.r-name { font: 400 12px var(--mono); color: var(--ash); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.r-x { margin-left: auto; width: 28px; height: 28px; border: 1px solid var(--hair-2); background: none; cursor: pointer; color: var(--ash); font: 400 15px/1 var(--mono); flex: none; }
.r-x:hover { color: var(--bone); border-color: var(--ash); }
.r-body { display: grid; grid-template-columns: 112px 1fr; }
.r-glyph { border-right: 1px solid var(--hair); padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.r-glyph svg { width: 100%; height: auto; display: block; }
.r-glyph small { font: 400 12px/1.35 var(--mono); color: var(--ash-2); }
.r-main { padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.r-rate { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.r-rate b { font: 600 32px/1 var(--sans); font-stretch: 105%; color: var(--mag); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.r-rate span { font: 400 12px var(--mono); color: var(--ash); }
.r-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 6px 12px; margin: 0; }
.r-stats div { min-width: 0; }
.r-stats dt { font: 400 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ash-2); }
.r-stats dd { margin: 0; font: 500 14px/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.r-stats dd small { font: 400 12px var(--mono); color: var(--ash); }
.r-score { font: 400 12px/1.45 var(--mono); color: var(--ash); }
.r-score b { color: var(--bone); font-weight: 500; }
.r-checks { list-style: none; margin: 0; padding: 9px 12px; border-top: 1px solid var(--hair); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.r-checks li { font: 400 12px/1.35 var(--mono); color: var(--ash); display: grid; grid-template-columns: 12px 1fr; gap: 6px; }
.r-checks li::before { content: ''; width: 7px; height: 7px; margin-top: 4px; border: 1px solid var(--ash-2); }
.r-checks li b { color: #C9C3CE; font-weight: 500; }
.r-checks li.flag::before { background: var(--bone); border-color: var(--bone); }
.r-checks li.flag b { color: var(--bone); }
.r-checks li.wait::before { border-style: dashed; }
.r-links { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--hair); }
.r-links a { flex: 1 1 auto; text-align: center; padding: 9px 10px; font: 400 12px var(--mono); color: var(--ash); border-right: 1px solid var(--hair); transition: color var(--t2), background var(--t2); }
.r-links a:last-child { border-right: 0; }
.r-links a:hover { color: var(--bone); background: #141118; }
.r-msg { padding: 14px; font: 400 13px/1.5 var(--mono); color: var(--ash); }
.r-msg b { color: var(--bone); font-weight: 500; }
.r-load { padding: 14px; font: 400 12.5px var(--mono); color: var(--ash); display: flex; gap: 10px; align-items: center; }
.r-load i { width: 7px; height: 7px; background: var(--mag); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* with a reading open, the copy column makes room (the unit is on the card) */
.has-result .score-help { display: none; }
.has-result .hero-copy { gap: 18px; }

/* the field */
.field-box { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--hair); min-height: 58px; flex-wrap: wrap; }
.sort { display: flex; border: 1px solid var(--hair-2); }
.sort-btn { height: 32px; padding: 0 12px; border: 0; background: transparent; cursor: pointer; font: 400 12px var(--mono); color: var(--ash); position: relative; isolation: isolate; overflow: hidden; transition: color var(--t2); }
.sort-btn + .sort-btn { border-left: 1px solid var(--hair-2); }
.sort-btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--bone); transform: scaleX(0); transform-origin: left; transition: transform var(--t2) var(--out); }
.sort-btn[aria-pressed="true"] { color: var(--night); }
.sort-btn[aria-pressed="true"]::before { transform: scaleX(1); }
.sort-btn:hover:not([aria-pressed="true"]) { color: var(--bone); }
.field-stage { position: relative; flex: 1; min-height: 420px; overflow: hidden; background: radial-gradient(120% 90% at 50% 100%, #110D14 0%, var(--night) 60%); touch-action: pan-y; }
.field-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity var(--t4) var(--out); }
.field-stage.ready .field-poster { opacity: 0; }
.field-stage.nogl .field-poster { opacity: 1; }
.field-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; transition: opacity 100ms linear; }
.field-labels { position: absolute; inset: 0; pointer-events: none; transition: opacity 100ms linear; }
.halo-label { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: baseline; gap: 6px; padding: 3px 6px; border: 1px solid transparent;
  background: rgba(6, 5, 7, .62); cursor: pointer; font: 400 12px/1.2 var(--mono); color: var(--ash); white-space: nowrap; opacity: 0; transition: opacity var(--t2), border-color var(--t2), color var(--t2); }
.halo-label.on { opacity: 1; }
.halo-label b { font-weight: 500; color: #CFC9D3; }
.halo-label .v-int { display: none; }
.halo-label.mode-int .v-size { display: none; }
.halo-label.mode-int .v-int { display: inline; }
.halo-label.lit b { color: var(--bone); }
.halo-label.lit .v-int { color: var(--mag); }
.halo-label.hover, .halo-label:hover { border-color: var(--hair-2); color: var(--bone); }
.field-caption { position: absolute; left: 16px; top: 14px; margin: 0; font: 300 clamp(18px, 1.6vw, 24px)/1.15 var(--sans); font-stretch: 112%; pointer-events: none; }
.field-caption span { display: block; transition: opacity var(--t3) var(--out), transform var(--t3) var(--out); }
.field-caption .cap-int { position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(8px); white-space: nowrap; }
.field-stage.is-int .cap-size { opacity: 0; transform: translateY(-8px); }
.field-stage.is-int .cap-int { opacity: 1; transform: none; }
.field-hint { position: absolute; right: 16px; bottom: 12px; margin: 0; font: 400 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ash); transition: opacity var(--t3); pointer-events: none; }
.field-hint span { display: inline-block; animation: nudge 1.6s var(--io) infinite; }
@keyframes nudge { 50% { transform: translateY(3px); } }
.field-stage.is-int .field-hint, .field-stage.touched .field-hint { opacity: 0; }
.field-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 11px 16px; border-top: 1px solid var(--hair); font: 400 12px var(--mono); color: var(--ash); }
.key { display: inline-flex; align-items: center; gap: 8px; }
.key i { display: inline-block; flex: none; }
.k-disc { width: 10px; height: 10px; border-radius: 50%; background: var(--bone); }
.k-bead { width: 6px; height: 6px; border-radius: 50%; background: var(--mag); box-shadow: 0 0 6px rgba(225, 59, 255, .7); }
.k-dot { width: 6px; height: 6px; background: var(--ash-2); }
.status { margin-left: auto; }
.status.live .k-dot { background: var(--bone); animation: blink 1.6s steps(2) infinite; }

/* entry: headline lines rise 12 px + fade, 60 ms stagger */
.js .h-hero .line, .js .hero-copy .lede, .js .score-box { opacity: 0; transform: translateY(12px); }
.js.in .h-hero .line, .js.in .hero-copy .lede, .js.in .score-box { opacity: 1; transform: none; transition: opacity var(--t3) var(--out), transform var(--t3) var(--out); }
.js.in .h-hero .line:nth-child(2) { transition-delay: 60ms; }
.js.in .hero-copy .lede { transition-delay: 120ms; }
.js.in .score-box { transition-delay: 180ms; }

/* desktop: the hero holds while one scroll re-sorts the field */
@media (min-width: 1024px) and (min-height: 640px) {
  .hero-track { height: calc(100svh - var(--nav-h) + 62vh); }
  .hero-stage { position: sticky; top: var(--nav-h); height: min(calc(100svh - var(--nav-h) - var(--bar-h)), 1200px); }
  .hero-stage .hero-grid { height: 100%; }
  .hero-copy { overflow-y: auto; scrollbar-width: none; padding-top: clamp(28px, 4.4vh, 60px); }
  .hero-copy::-webkit-scrollbar { display: none; }
  .field-stage { min-height: 0; }
}
@media (max-width: 1180px) {
  .nav-links { gap: 18px; }
  .lockup-sub { display: none; }
}
@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: 1fr; border-left: 0; border-right: 0; }
  .hero-copy, .hero-field { grid-column: 1 / -1; }
  .hero-copy { border-right: 0; border-bottom: 1px solid var(--hair); padding: 32px var(--gut) 28px; }
  .field-stage { height: min(118vw, 560px); min-height: 0; flex: none; }
  .field-head { padding: 10px var(--gut); }
  .field-foot { padding: 10px var(--gut); }
  .field-hint { display: none; }
  .wrap.hero-grid { padding: 0; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-in { gap: 12px; }
  .nav-cta { height: 34px; padding: 0 12px; font-size: 12px; }
  .preview-bar { font-size: 11px; }
  .pb-in { justify-content: flex-start; }
  .pb-long { display: none; }
  .pb-short { display: inline; }
  .h-hero { font-size: clamp(44px, 12.4vw, 60px); font-stretch: 112%; }
  .r-body { grid-template-columns: 104px 1fr; }
  .score-row input { padding: 0 10px; font-size: 13px; }
  .r-links a { flex: 1 1 50%; border-bottom: 1px solid var(--hair); }
  .r-links a:nth-child(2n) { border-right: 0; }
  .score-row .btn { padding: 0 12px; }
  .r-rate b { font-size: 30px; }
  .r-checks { grid-template-columns: 1fr; }
  .r-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .hero-stats dd { font-size: 21px; }
  .hero-stats div { padding-right: 8px; }
  .hero-stats div + div { padding-left: 10px; }
  .field-caption { font-size: 17px; }
  .status { margin-left: 0; }
}
@media (max-width: 380px) {
  .sort-btn { padding: 0 9px; font-size: 11.5px; }
  .score-row .btn { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .field-canvas, .field-labels { transition: opacity 100ms linear !important; }
  .js .h-hero .line, .js .hero-copy .lede, .js .score-box { opacity: 1; transform: none; }
  .hero-track { height: auto !important; }
  .hero-stage { position: relative !important; top: auto !important; height: auto !important; }
  .field-stage { min-height: 460px; }
}

/* stage 5 · critique fixes */
p, figcaption, .w-d, .pl-d { text-wrap: pretty; }
@media (max-width: 760px), (pointer: coarse) {
  /* touch: every control at least 40px tall */
  .chip, .sort-btn, .win-btn, .wp-next, .nav-cta { height: 40px; }
  .pb-link { display: inline-block; padding: 14px 0; margin: -14px 0; }
  .nav .lockup { min-height: 44px; }
}
/* hero display fills its column on desktop (no dead band above the stats); eases back when a reading opens */
@media (min-width: 1024px) and (min-height: 640px) {
  .h-hero { font-size: clamp(56px, min(8.1vw, 13.2vh), 124px); letter-spacing: -.03em; transition: font-size var(--t3) var(--out); }
  .has-result .h-hero { font-size: clamp(46px, min(5.2vw, 8.4vh), 80px); }
}
@media (min-width: 1024px) and (min-height: 640px) and (max-height: 820px) {
  .h-hero { font-size: clamp(52px, min(7vw, 10.4vh), 96px); }
  .has-result .h-hero { font-size: clamp(44px, min(4.6vw, 7.4vh), 68px); }
  .hero-copy { gap: 16px; padding-top: 24px; padding-bottom: 24px; }
  .try { margin-top: -4px; }
}
