/* surf.stats — Statistical Twin pages (twins/…, pt/twins/…). Reuses site.css primitives (.wrap .label .card .btn). */

.tw-head { padding-top: var(--space-4); padding-bottom: var(--space-2); }
.tw-head h1 { margin-bottom: var(--space-1); }
.tw-lede { font-size: 1.08rem; }
.tw-memorial { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted); }
.tw-ribbon-wrap { margin-bottom: var(--space-2); }
.tw-error { color: var(--bad); border-left: 3px solid var(--bad); padding-left: 0.6rem; }
.tw-nav { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-2); }
.tw-nav .btn { min-height: 44px; }

/* hero portrait (episode) */
.tw-hero { display: grid; grid-template-columns: 1fr; gap: var(--space-2); align-items: end; }
.tw-hero img { width: min(260px, 70%); height: auto; margin: 0 auto; }
@media (min-width: 640px) { .tw-hero { grid-template-columns: 1.4fr 1fr; } .tw-hero img { width: 100%; } }

/* landing episode cards */
.tw-episodes { display: grid; gap: var(--space-2); }
.tw-ep { display: flex; gap: var(--space-2); align-items: center; text-decoration: none; min-height: 44px; }
.tw-ep:hover { border-color: var(--accent); }
.tw-ep-img { width: 72px; height: 72px; flex: none; border-radius: 50%; background: var(--cream); object-fit: cover; }
.tw-ep-text { display: flex; flex-direction: column; gap: 0.15rem; }
.tw-ep-name { font-family: var(--font-display); font-size: 1.7rem; line-height: 1; letter-spacing: 0.01em; font-weight: 400; }
.tw-ep-q { color: var(--muted); }
.tw-ep-go { color: var(--accent); font-weight: 700; }

/* method: the 12 stats */
.tw-stat-list { padding-left: 1.4rem; }
.tw-stat-list li { margin-bottom: var(--space-1); }
.tw-stat-list strong { display: block; }
.tw-stat-list span { color: var(--muted); }
.tw-callout { border-left: 3px solid var(--accent); }
.tw-callout p:last-child { margin-bottom: 0; }

/* episode: headline facts */
.tw-tops { list-style: none; padding: 0; margin: 0 0 var(--space-2); }
.tw-tops li { font-family: var(--font-display); font-size: clamp(1.35rem, 5.2vw, 1.8rem); line-height: 1.1; margin-bottom: 0.4rem; }
.tw-tops li::before { content: "▸ "; color: var(--accent); }

/* episode: fingerprint rows */
.tw-fp-head, .tw-fp-row { display: grid; grid-template-columns: 1fr 3.2rem 5.4rem; column-gap: 0.6rem; align-items: baseline; }
.tw-fp-head { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 0.3rem; border-bottom: 1px solid var(--border); }
.tw-fp-head span:not(:first-child) { text-align: right; }
.tw-fp { list-style: none; padding: 0; margin: 0; }
.tw-fp-row { padding: 0.55rem 0 0.5rem; border-bottom: 1px solid var(--border); }
.tw-fp-name { font-weight: 600; }
.tw-fp-pct { font-family: var(--font-mono); font-weight: 700; text-align: right; }
.tw-fp-rank { font-family: var(--font-mono); font-size: 0.8rem; text-align: right; color: var(--muted); white-space: nowrap; }
.tw-bar { grid-column: 1 / -1; height: 6px; background: rgba(22, 32, 48, 0.1); margin-top: 0.35rem; border-radius: 3px; overflow: hidden; }
.tw-bar-fill { display: block; height: 100%; background: var(--navy); }
.tw-fp-row.is-top .tw-bar-fill { background: var(--accent); }
.tw-fp-row.is-top .tw-fp-rank { color: var(--accent); font-weight: 700; }
.tw-fp-row.is-surprise .tw-bar-fill { background: var(--blue); }
.tw-note { font-size: 0.88rem; color: var(--muted); margin-top: var(--space-1); }

/* episode: 10 closest careers */
.tw-nbs { list-style: none; padding: 0; margin: 0; }
.tw-nb { display: grid; grid-template-columns: 1.6rem 44px 1fr auto; gap: 0.6rem; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.tw-nb-rank { font-family: var(--font-mono); font-weight: 700; color: var(--muted); text-align: right; }
.tw-nb-img { width: 44px; height: 44px; border-radius: 50%; background: var(--cream); object-fit: cover; }
.tw-nb-initials { display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; }
.tw-nb-who { display: flex; flex-direction: column; min-width: 0; }
.tw-nb-seasons { font-size: 0.78rem; color: var(--muted); }
.tw-nb-d { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; }
.tw-nb.is-twin { background: var(--paper); }
.tw-nb.is-twin .tw-nb-rank, .tw-nb.is-twin .tw-nb-d { color: var(--accent); }
.tw-nbs-head { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 0.3rem; border-bottom: 1px solid var(--border); }

/* episode: side by side */
.tw-side { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tw-side th, .tw-side td { padding: 0.5rem 0.3rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tw-side thead th { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tw-side thead th:not(:first-child), .tw-side td { text-align: right; width: 5.6rem; }
.tw-side tbody th { font-weight: 600; }
.tw-side td b { display: block; font-family: var(--font-mono); font-size: 1rem; }
.tw-side td small { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.tw-tag { display: inline-block; margin-left: 0.35rem; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.05rem 0.35rem; border-radius: var(--radius); vertical-align: 0.1em; }
.tw-tag--tagShared { background: rgba(62, 122, 79, 0.14); color: var(--good); }
.tw-tag--tagGap { background: rgba(176, 71, 43, 0.12); color: var(--bad); }
.tw-tag--tagAdv { background: rgba(200, 90, 20, 0.14); color: var(--accent); }
.tw-reveal p { margin-bottom: var(--space-1); }
.tw-reveal .tw-twin-line { font-family: var(--font-display); font-size: clamp(1.5rem, 6vw, 2.1rem); line-height: 1.1; }

/* episode: the reel slot */
.tw-reel { border: 1px dashed var(--border-strong); background: var(--paper); text-align: center; }
.tw-reel p { margin: 0; }
.tw-reel .btn { margin-top: var(--space-1); }

/* .ribbon sets display, which would beat the [hidden] attribute */
.ribbon[hidden], .tw-error[hidden], .tw-reel [hidden] { display: none; }
