/* Pit Clock page: a timing-dial 'circle of doom' with a verdict card and a lap scrubber. Uses the site tokens from site.css. */
.pc { padding-top: clamp(28px, 4vw, 56px); padding-bottom: 60px }
.pc-head { display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 24px; align-items: end }
.pc-head h1 { font-size: clamp(58px, 10vw, 132px); font-style: italic; margin: 6px 0 8px; line-height: .9 }
.pc-lede { max-width: 60ch; margin: 0 }
.pc-lede b { color: var(--chalk) }
.pc-mode { display: grid; gap: 8px; padding: 18px }
.pc-mode select { width: 100% }
.lbl { font: 700 11px/1 var(--f-mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim) }
.pc-badge { display: inline-flex; align-items: center; gap: 8px; font: 800 15px/1 var(--f-display); letter-spacing: 1.4px; color: var(--dim); width: max-content; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px 6px }
.pc-badge i { width: 9px; height: 9px; border-radius: 50%; background: var(--dim) }
.pc-badge.live { color: #fff; border-color: rgba(225, 6, 0, .7); background: rgba(225, 6, 0, .14) }
.pc-badge.live i { background: var(--red); box-shadow: 0 0 0 0 rgba(225, 6, 0, .7); animation: pcPulse 1.4s infinite }
@keyframes pcPulse { 70% { box-shadow: 0 0 0 9px rgba(225, 6, 0, 0) } 100% { box-shadow: 0 0 0 0 rgba(225, 6, 0, 0) } }
.pc-next { font: 600 13px/1.45 var(--f-body); color: var(--dim); border-top: 1px solid var(--line); padding-top: 10px }
.pc-next b { color: var(--chalk); font-family: var(--f-mono) }

.pc-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 18px; margin-top: 22px; align-items: start }
.pc-board { padding: 14px; display: grid; gap: 12px }
.pc-tools { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: rgba(6, 8, 14, .5) }
.seg button { font: 800 14px/1 var(--f-display); letter-spacing: 1px; color: var(--dim); background: none; border: 0; border-radius: 999px; padding: 9px 14px 8px; cursor: pointer }
.seg button[aria-selected="true"], .seg button[aria-checked="true"] { background: var(--chalk); color: var(--night) }
.seg button[data-cond="V"][aria-checked="true"] { background: var(--amber) }
.seg button[data-cond="S"][aria-checked="true"] { background: var(--amber) }
.pc-canvas { position: relative; aspect-ratio: 1 / 1; max-height: 78vh; margin: 0 auto; width: 100% }
.pc-canvas canvas { width: 100%; height: 100%; display: block; touch-action: manipulation; cursor: pointer }
.pc-hint { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font: 700 11px/1 var(--f-mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim); pointer-events: none; transition: opacity .4s }
.pc-pits { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(6, 8, 14, .55); font: 600 12.5px/1.2 var(--f-body); color: var(--dim) }
.pc-pits.hot { border-color: rgba(255, 200, 61, .55); background: rgba(255, 200, 61, .07) }
.pc-pits .plabel { display: inline-flex; align-items: center; gap: 7px; font: 900 16px/1 var(--f-display); font-style: italic; letter-spacing: 1px; color: var(--chalk) }
.pc-pits .plabel i { width: 9px; height: 9px; border-radius: 2px; background: var(--dim) }
.pc-pits.hot .plabel { color: var(--amber) }
.pc-pits.hot .plabel i { background: var(--amber); animation: pcPulse 1.2s infinite }
.pc-pits .pgroup { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap }
.pchip { display: inline-flex; gap: 5px; align-items: center; font: 700 11.5px/1 var(--f-mono); color: var(--chalk); background: rgba(6, 8, 14, .6); border: 1px solid var(--line); border-left: 3px solid var(--tc); border-radius: 7px; padding: 5px 7px; cursor: pointer }
.pchip span { color: var(--dim); font-weight: 500 }
.pchip.in { border-color: rgba(255, 200, 61, .6); border-left-color: var(--tc) }
.pc-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin }
.pc-strip button { flex: 0 0 auto; display: grid; grid-template-columns: auto auto; gap: 2px 7px; align-items: center; font: 700 12px/1 var(--f-mono); color: var(--chalk); background: rgba(6, 8, 14, .55); border: 1px solid var(--line); border-left: 4px solid var(--tc); border-radius: 9px; padding: 7px 9px 6px; cursor: pointer }
.pc-strip button small { grid-column: 1 / -1; color: var(--dim); font-weight: 500; font-size: 10.5px }
.pc-strip button[aria-pressed="true"] { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 22%, transparent); box-shadow: 0 0 0 1px var(--tc) inset }
.pc-strip button.out { opacity: .38 }
.pc-strip .tyre { width: 15px; height: 15px; border-radius: 50%; display: inline-grid; place-items: center; font: 800 9px/1 var(--f-mono); color: #111 }

.pc-card { position: sticky; top: 84px; padding: 20px }
.v-head { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px }
.v-head .sw { width: 6px; align-self: stretch; border-radius: 3px; background: var(--tc) }
.v-head h2 { margin: 0; font-size: 34px; line-height: .95; font-style: italic }
.v-head .sub { font: 600 12px/1.3 var(--f-mono); color: var(--dim); letter-spacing: .6px; margin-top: 4px }
.v-big { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; background: rgba(6, 8, 14, .55); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px }
.v-big .from, .v-big .to { font: 900 54px/.9 var(--f-display); font-style: italic }
.v-big .to { color: var(--amber) }
.v-big .arrow { font: 800 18px/1 var(--f-mono); color: var(--dim) }
.v-big .lost { grid-column: 1 / -1; font: 700 13px/1.3 var(--f-mono); letter-spacing: .4px }
.v-say { font: 600 17px/1.45 var(--f-body); margin: 14px 0 12px }
.v-say b { color: var(--amber) }
.v-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px }
.v-tag { font: 700 11.5px/1 var(--f-mono); letter-spacing: .7px; text-transform: uppercase; border-radius: 999px; padding: 7px 10px; border: 1px solid var(--line) }
.v-tag.good { color: var(--green); border-color: rgba(61, 220, 132, .45); background: rgba(61, 220, 132, .08) }
.v-tag.bad { color: #ff6b5e; border-color: rgba(225, 6, 0, .5); background: rgba(225, 6, 0, .1) }
.v-tag.warn { color: var(--amber); border-color: rgba(255, 200, 61, .45); background: rgba(255, 200, 61, .08) }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px }
.ladder li { display: grid; grid-template-columns: 34px 6px 1fr auto; gap: 9px; align-items: center; font: 600 14px/1 var(--f-body); padding: 7px 10px; border-radius: 9px; background: rgba(6, 8, 14, .4) }
.ladder li .p { font: 800 15px/1 var(--f-mono); color: var(--dim) }
.ladder li .b { width: 6px; height: 18px; border-radius: 3px; background: var(--tc) }
.ladder li .g { font: 700 12.5px/1 var(--f-mono); color: var(--dim) }
.ladder li.ghost { background: color-mix(in srgb, var(--tc) 18%, transparent); outline: 1.5px dashed var(--tc); font-weight: 800 }
.ladder li.ghost .g { color: var(--amber) }
.ladder li.near .g { color: #ff6b5e }
.v-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px }
.v-meta div { background: rgba(6, 8, 14, .45); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px }
.v-meta small { display: block; font: 700 10px/1 var(--f-mono); letter-spacing: 1.2px; color: var(--dim); text-transform: uppercase; margin-bottom: 6px }
.v-meta b { font: 800 22px/1 var(--f-display) }
.v-note { font-size: 12.5px; color: var(--dim); margin: 12px 0 0 }

.v-all { font-size: 30px; font-style: italic; margin: 10px 0 4px; line-height: 1 }
.v-allsub { font-size: 13.5px; margin: 0 0 12px }
.costs { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 560px; overflow: auto }
.costs li { display: grid; grid-template-columns: 34px 40px 1fr 46px; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; border-left: 3px solid var(--tc); background: rgba(6, 8, 14, .4); cursor: pointer; font: 700 13px/1 var(--f-mono) }
.costs li:hover { background: color-mix(in srgb, var(--tc) 16%, transparent) }
.costs .p { color: var(--dim) }
.costs .bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .06); overflow: hidden }
.costs .bar i { display: block; height: 100%; border-radius: 4px }
.costs .n { text-align: right }
.pc-time { margin-top: 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 18px }
.pc-play { display: flex; gap: 6px }
.btn.sm { padding: 9px 13px; font-size: 16px; min-width: 46px; justify-content: center }
.pc-scrub { position: relative; height: 40px }
.pc-lane { position: absolute; inset: 9px 0 auto; height: 10px; border-radius: 5px; overflow: hidden; background: rgba(61, 220, 132, .16) }
.pc-lane span { position: absolute; top: 0; bottom: 0 }
.pc-lane .V, .pc-lane .S { background: var(--amber) }
.pc-lane .R { background: var(--red) }
.pc-lane .pit { top: -1px; bottom: -1px; width: 3px; background: var(--chalk); border-radius: 2px }
.pc-scrub input { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none }
.pc-scrub input::-webkit-slider-runnable-track { height: 28px; background: transparent }
.pc-scrub input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 28px; border-radius: 6px; background: var(--chalk); box-shadow: 0 0 0 3px var(--night) }
.pc-scrub input::-moz-range-thumb { width: 18px; height: 28px; border-radius: 6px; background: var(--chalk); border: 3px solid var(--night) }
.pc-lapno { font: 900 30px/1 var(--f-display); font-style: italic; text-align: right; min-width: 108px }
.pc-lapno small { display: block; font: 700 11px/1.4 var(--f-mono); color: var(--dim); font-style: normal; letter-spacing: 1px }
.pc-learn { margin-top: 26px }
.pc-learn h3 { margin: 6px 0 6px; font-size: 26px }
.pc-learn p { margin: 0; font-size: 15px }
.pc-src { font-size: 12.5px; margin-top: 22px }

@media (max-width: 960px) {
  .pc-head { grid-template-columns: 1fr }
  .pc-stage { grid-template-columns: 1fr }
  .pc-card { position: static }
}
@media (max-width: 560px) {
  .pc-time { grid-template-columns: auto 1fr; gap: 10px 12px }
  .pc-lapno { grid-column: 1 / -1; text-align: left; order: -1 }
  .seg button { padding: 8px 10px 7px; font-size: 13px }
  .v-big .from, .v-big .to { font-size: 44px }
}

/* ================= TV MODE: one screen, no scrolling, tabletop look (oak table, blueprint sheets, paper-print alerts) ================= */
.tvbtn { margin-top: 6px; justify-content: center; font-size: 15px; letter-spacing: 1px }
.tv-bar, #toasts { display: none }
body.tv { overflow: hidden; height: 100vh; height: 100dvh;
  background: radial-gradient(ellipse 70% 50% at 30% 0%, rgba(255, 214, 150, .22), transparent 60%), repeating-linear-gradient(92deg, #4b3019 0 4px, #57391f 4px 9px, #46301a 9px 11px, #523620 11px 15px), #3d2716 }
body.tv:before { background: radial-gradient(120% 95% at 50% 35%, transparent 45%, rgba(0, 0, 0, .6)) }
body.tv .nav, body.tv footer, body.tv .skip, body.tv .pc-head, body.tv .pc-learn, body.tv .pc-src, body.tv .pc-time, body.tv .pc-hint, body.tv .tvbtn { display: none !important }
body.tv.idle { cursor: none }
body.tv .tv-bar { display: flex; position: fixed; z-index: 30; inset: 10px 14px auto; height: 46px; align-items: center; gap: 22px; padding: 0 18px; border-radius: 6px; background: #0a1a34; border: 1px solid rgba(190, 215, 255, .35); box-shadow: 0 8px 22px rgba(0, 0, 0, .5) }
.tv-brand { display: inline-flex; align-items: center; gap: 10px } .tv-brand img { height: 22px; width: auto } .tv-brand b { font: 900 22px/1 var(--f-display); font-style: italic; letter-spacing: 1.5px; color: var(--red) }
.tv-race { font: 800 20px/1 var(--f-display); letter-spacing: 1.6px; color: var(--chalk); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.tv-st { font: 800 16px/1 var(--f-display); letter-spacing: 1.4px; padding: 7px 14px 6px; border-radius: 999px; color: #06210f; background: var(--green) }
.tv-st[data-k="V"], .tv-st[data-k="S"] { background: var(--amber); color: #2a1d00; animation: pcPulse 1.4s infinite }
.tv-st[data-k="R"] { background: var(--red); color: #fff }
.tv-lap { font: 900 30px/1 var(--f-display); font-style: italic; letter-spacing: 1px }
.tv-x { font: 700 11px/1 var(--f-mono); letter-spacing: 1.2px; color: var(--dim); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; cursor: pointer }
body.tv main { height: 100vh; height: 100dvh }
body.tv .wrap.pc { max-width: none; height: 100%; padding: 68px 14px 12px }
body.tv .pc-stage { margin: 0; height: 100%; display: grid; gap: 12px; grid-template-columns: clamp(230px, 17vw, 300px) minmax(0, 1fr) clamp(320px, 25vw, 420px); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "strip tools card" "strip dial card" "strip pits card"; align-items: stretch }
body.tv .pc-board { display: contents }
body.tv .pc-tools { grid-area: tools; justify-content: center }
body.tv .pc-canvas { grid-area: dial; aspect-ratio: auto; max-height: none; width: 100%; height: 100%; min-height: 0; container-type: size; display: grid; place-items: center; position: relative;
  background: linear-gradient(rgba(150, 190, 255, .09) 1px, transparent 1px) 0 0 / 26px 26px, linear-gradient(90deg, rgba(150, 190, 255, .09) 1px, transparent 1px) 0 0 / 26px 26px, #0b1d3a; border: 1px solid rgba(190, 215, 255, .35); border-radius: 6px; box-shadow: 0 14px 34px rgba(0, 0, 0, .55) }
body.tv .pc-canvas canvas { width: min(100cqw, 100cqh); height: auto; aspect-ratio: 1 }
body.tv .pc-pits { grid-area: pits; flex-wrap: nowrap; overflow: hidden; background: #0a1a34; border-radius: 6px; border-color: rgba(190, 215, 255, .35) }
body.tv .pc-strip { grid-area: strip; display: grid; grid-auto-rows: 1fr; gap: 3px; overflow: hidden; padding: 10px; background: #0a1a34; border: 1px solid rgba(190, 215, 255, .35); border-radius: 6px; box-shadow: 0 14px 34px rgba(0, 0, 0, .55) }
body.tv .pc-strip button { grid-template-columns: 1fr auto 62px; gap: 0 8px; padding: 0 9px; font-size: clamp(11px, 1.9vh, 16px); border-radius: 5px; min-height: 0 }
body.tv .pc-strip button small { grid-column: auto; text-align: right; font-size: clamp(9px, 1.5vh, 13px) }
body.tv .pc-strip .tyre { width: clamp(13px, 2.1vh, 19px); height: clamp(13px, 2.1vh, 19px) }
body.tv .pc-card { grid-area: card; position: relative; top: auto; overflow: hidden; padding: 16px 18px; background: #0a1a34; border: 1px solid rgba(190, 215, 255, .35); border-radius: 6px; box-shadow: 0 14px 34px rgba(0, 0, 0, .55); display: flex; flex-direction: column }
body.tv .pc-card > .eyebrow { margin: 0 }
body.tv .v-head { margin: 6px 0 10px } body.tv .v-head h2 { font-size: clamp(26px, 4.4vh, 40px) }
body.tv .v-big { padding: 10px 14px } body.tv .v-big .from, body.tv .v-big .to { font-size: clamp(40px, 7vh, 64px) }
body.tv .v-say { font-size: clamp(14px, 2vh, 18px); margin: 10px 0 8px }
body.tv .v-tags { margin-bottom: 10px } body.tv .v-tag { font-size: 11px; padding: 6px 9px }
body.tv .ladder li { padding: 5px 9px; font-size: clamp(12px, 1.8vh, 15px) } body.tv .ladder li:nth-child(n+6) { display: none }
body.tv .v-meta { margin-top: 10px } body.tv .v-meta b { font-size: 20px } body.tv .v-note { display: none }
@media (max-height: 760px) { body.tv .ladder li:nth-child(n+5), body.tv .v-meta, body.tv .v-tags { display: none } }
/* the alerts: paper prints taped onto the table */
body.tv #toasts { display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; position: fixed; z-index: 40; left: 14px; right: 14px; bottom: 16px; pointer-events: none }
.toast { position: relative; display: flex; align-items: center; gap: 6px 16px; width: max-content; max-width: min(760px, 92vw); background: #f0e7d1; color: #1b1710; border-radius: 3px; padding: 8px 18px 8px 20px; box-shadow: 0 8px 22px rgba(0, 0, 0, .55); border-left: 8px solid var(--tc); animation: toastIn .5s cubic-bezier(.2, 1.2, .4, 1) both; transition: opacity .6s, transform .6s }
.toast.out { opacity: 0; transform: translateY(24px) }
.toast .tape { position: absolute; top: -8px; left: 14%; width: 56px; height: 15px; background: rgba(255, 213, 102, .8); transform: rotate(-2deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .3) }
.toast .stamp { flex: none; font: 800 11px/1 var(--f-mono); letter-spacing: 1.6px; color: #c4281c; border: 1.5px solid #c4281c; border-radius: 3px; padding: 4px 7px 3px; transform: rotate(-2deg); white-space: nowrap }
.toast.win .stamp { color: #0a7a3a; border-color: #0a7a3a }
.toast.sc .stamp { color: #9a6200; border-color: #9a6200 }
.toast b { flex: none; font: 900 clamp(20px, 3vh, 30px)/1 var(--f-display); font-style: italic; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap }
.toast span:not(.stamp) { font: 600 clamp(13px, 1.8vh, 16px)/1.25 var(--f-body); color: #3a3426 }
@keyframes toastIn { from { opacity: 0; transform: translateY(40px) } to { opacity: 1; transform: none } }
@media (max-width: 900px) { .toast { flex-wrap: wrap } }

/* ---- tabletop skin: real oak, charcoal paper sheets with folded corners, orange label tags, props on the table ---- */
body.tv { background: radial-gradient(ellipse 60% 45% at 28% 0%, rgba(255, 220, 160, .35), transparent 65%), url(/assets/tv/oak.jpg) center / cover, #6b4524 }
body.tv:before { background: radial-gradient(120% 95% at 50% 35%, transparent 50%, rgba(20, 8, 0, .55)) }
body.tv .wrap.pc { padding: 66px 26px 24px } body.tv .pc-stage { gap: 22px }
body.tv .tv-bar { background: none; border: 0; box-shadow: none; padding: 0 6px; inset: 12px 26px auto }
.tv-brand img { height: 26px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)) } .tv-brand b { text-shadow: 0 2px 4px rgba(0, 0, 0, .6) }
.tv-race { flex: none; max-width: 46vw; background: #ff9a1f; color: #14100a; padding: 8px 18px 6px; transform: rotate(-.8deg); font-size: 19px; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); border-radius: 2px }
.tv-bar:after { content: ""; flex: 1; order: 2 } .tv-st { order: 3 } .tv-lap { order: 4; background: #f0e7d1; color: #1b1710; padding: 6px 16px 4px; border-radius: 2px; transform: rotate(.7deg); box-shadow: 0 4px 10px rgba(0, 0, 0, .45) } .tv-x { order: 5; background: rgba(10, 6, 2, .55) }
.tv-race { order: 1 } .tv-brand { order: 0 }
/* sheets: the element is a transparent box, the paper is its :before with a clipped corner and a folded flap in :after */
body.tv .pc-canvas, body.tv .pc-strip, body.tv .pc-card, body.tv .pc-pits { background: none !important; border: 0 !important; box-shadow: none !important; position: relative; isolation: isolate; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .55)) }
body.tv .pc-canvas:before, body.tv .pc-strip:before, body.tv .pc-card:before, body.tv .pc-pits:before { content: ""; position: absolute; inset: 0; z-index: -1; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
  background: linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(160deg, #34373b, #232528 70%); box-shadow: inset 0 0 0 9px #26282b, inset 0 0 0 10px rgba(255, 255, 255, .22) }
body.tv .pc-card:before { background: linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(160deg, #1d5aa0, #123f75 75%); box-shadow: inset 0 0 0 9px #17488a, inset 0 0 0 10px rgba(255, 255, 255, .35) }
body.tv .pc-canvas:after, body.tv .pc-strip:after, body.tv .pc-card:after, body.tv .pc-pits:after { content: ""; position: absolute; right: 0; bottom: 0; width: 30px; height: 30px; z-index: -1; clip-path: polygon(0 0, 100% 0, 0 100%); background: linear-gradient(135deg, #5a5d63, #44474c) }
body.tv .pc-card:after { background: linear-gradient(135deg, #3d7bc4, #2a62a8) }
body.tv .pc-canvas { width: min(100%, calc(100dvh - 250px)); height: auto; aspect-ratio: 1; container-type: normal; justify-self: center; align-self: center }
body.tv .pc-canvas canvas { width: 100%; height: 100%; aspect-ratio: auto }
body.tv .pc-strip { padding: 16px } body.tv .pc-card { padding: 22px 24px }
body.tv .pc-strip button { background: rgba(0, 0, 0, .28) } body.tv .v-big, body.tv .v-meta div, body.tv .ladder li { background: rgba(0, 0, 0, .25) } body.tv .pc-pits { padding: 12px 18px }
/* props on the table, in the space either side of the clock (wide screens only) */
body.tv .tv-props { display: none }
@media (min-width: 1500px) {
  body.tv .tv-props { display: block; grid-area: dial; position: relative; z-index: 0; pointer-events: none }
  .tv-props i { position: absolute; background: no-repeat center / contain; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .5)) }
  .tv-props .pm { left: 2%; bottom: 3%; width: 7.5vw; aspect-ratio: 814 / 926; background-image: url(/assets/tv/mug.png) }
  .tv-props .pt { left: 4%; top: 6%; width: 5vw; aspect-ratio: 1; background-image: url(/assets/tv/tape.png) }
  .tv-props .pp { right: 1%; top: 16%; width: 15vw; aspect-ratio: 1842 / 104; background-image: url(/assets/tv/pencil.png); transform: rotate(-58deg) }
  .tv-props .pr { right: 3%; bottom: 8%; width: 13vw; aspect-ratio: 1330 / 220; background-image: url(/assets/tv/ruler.png); transform: rotate(8deg) }
}
body.tv .pc-canvas, body.tv .pc-pits, body.tv .pc-tools { z-index: 1 }
.tv-brand { flex: none } .tv-lap, .tv-st, .tv-x { white-space: nowrap; flex: none } .tv-race { min-width: 0 }
.tv-race { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .tv-bar { gap: 16px }
/* clock sheet: the paper is the canvas itself, sized by the row so it never grows over the toggles */
body.tv .pc-canvas { width: 100%; height: 100%; aspect-ratio: auto; container-type: size; display: grid; place-items: center; min-height: 0; overflow: visible }
body.tv .pc-canvas:before, body.tv .pc-canvas:after { display: none }
body.tv .pc-canvas canvas { width: min(100cqw, 100cqh); height: auto; aspect-ratio: 1; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
  background: linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(160deg, #34373b, #232528 70%); box-shadow: inset 0 0 0 9px #26282b, inset 0 0 0 10px rgba(255, 255, 255, .22) }
body.tv .pc-tools { position: relative; z-index: 2 }

/* ===== TV polish pass (2026-11-06) ===== */
.tv-feed { display: none }
body.tv .pc-stage { padding: 0; grid-template-columns: clamp(290px, 19vw, 370px) minmax(0, 1fr) clamp(330px, 24vw, 430px); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "strip dial card" "strip pits card" }
/* controls float over the clock and fade out with the cursor, so a stream shows only data */
body.tv .pc-tools { grid-area: dial; align-self: start; justify-self: center; margin-top: 8px; z-index: 5; transition: opacity .4s }
body.tv.idle .pc-tools, body.tv.idle .tv-x { opacity: 0; pointer-events: none }
.tv-x { transition: opacity .4s }
/* header */
.tv-brand b { font: 900 17px/1 var(--f-display); font-style: normal; letter-spacing: 1.6px; color: #1b1710; background: #f0e7d1; padding: 6px 10px 4px; border-radius: 2px; transform: rotate(-1.5deg); text-shadow: none; box-shadow: 0 3px 8px rgba(0, 0, 0, .45) }
body.tv .tv-lap { display: grid; gap: 5px; padding: 7px 16px 7px }
.tv-lap b { font: 900 30px/1 var(--f-display); font-style: italic }
.tv-prog { display: block; height: 5px; border-radius: 3px; background: rgba(27, 23, 16, .18); overflow: hidden } .tv-prog i { display: block; height: 100%; width: 0; background: #e10600; transition: width .8s }
/* running order */
body.tv .pc-strip { padding: 18px 16px 18px; gap: 2px }
body.tv .pc-strip .tr-head, body.tv .pc-strip button.tr { display: grid; grid-template-columns: 30px minmax(0, 1fr) 58px 72px 50px; align-items: center; gap: 0 8px; padding: 0 10px 0 9px }
body.tv .pc-strip .tr-head { font: 700 clamp(9px, 1.1vh, 11px)/1 var(--f-mono); letter-spacing: 1.3px; color: rgba(238, 242, 248, .55); border-bottom: 1px solid rgba(255, 255, 255, .18); padding-bottom: 6px }
body.tv .pc-strip .tr-head span:nth-child(n+3) { text-align: center } body.tv .pc-strip .tr-head span:nth-child(4) { text-align: right }
body.tv .pc-strip button.tr { font: 700 clamp(12px, 1.75vh, 18px)/1 var(--f-mono); color: var(--chalk); background: rgba(0, 0, 0, .22); border: 0; border-left: 4px solid var(--tc); border-radius: 4px; min-height: 0; cursor: pointer }
body.tv .pc-strip button.tr:nth-of-type(odd) { background: rgba(0, 0, 0, .34) }
body.tv .pc-strip button.tr[aria-pressed="true"] { background: color-mix(in srgb, var(--tc) 30%, rgba(0, 0, 0, .3)); box-shadow: 0 0 0 1.5px var(--tc) inset }
.tr .p { color: rgba(238, 242, 248, .6); text-align: right } .tr .c { font: 800 clamp(15px, 2.1vh, 22px)/1 var(--f-display); letter-spacing: 1px; text-align: left }
.tr .ty { display: flex; align-items: center; justify-content: center; gap: 5px } .tr .ty i { width: clamp(15px, 2vh, 20px); height: clamp(15px, 2vh, 20px); border-radius: 50%; display: inline-grid; place-items: center; font: 800 clamp(9px, 1.1vh, 11px)/1 var(--f-mono); color: #111; font-style: normal; box-shadow: 0 0 0 2px rgba(0, 0, 0, .5) inset }
.tr .ty small { font: 600 clamp(10px, 1.3vh, 13px)/1 var(--f-mono); color: rgba(238, 242, 248, .65); min-width: 2ch; text-align: left }
.tr .g { text-align: right; font-weight: 600; color: rgba(238, 242, 248, .85) }
.tr .sb { justify-self: center; font: 800 clamp(10px, 1.3vh, 13px)/1 var(--f-mono); letter-spacing: .5px; padding: 3px 5px 2px; border-radius: 3px; min-width: 38px; text-align: center }
.tr .sb.free { background: #2fbf6a; color: #04210f } .tr .sb.warn { background: rgba(255, 200, 61, .9); color: #2a1d00 } .tr .sb.bad { background: rgba(255, 255, 255, .1); color: rgba(238, 242, 248, .7) }
.tr .sb.pit { background: #ff9a1f; color: #14100a; animation: pcPulse 1.4s infinite }
body.tv .pc-strip button.tr.out { opacity: .35; cursor: default }
/* verdict card + race feed */
body.tv .pc-card { gap: 0 } body.tv #verdict { flex: none }
body.tv .tv-feed { display: block; margin-top: auto; padding-top: 14px; min-height: 0; overflow: hidden }
.f-head { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid rgba(255, 255, 255, .3); padding-top: 10px; margin-bottom: 8px }
.f-head span { font: 900 18px/1 var(--f-display); letter-spacing: 1.6px; color: #fff } .f-head small { font: 600 10.5px/1 var(--f-mono); letter-spacing: 1px; color: rgba(255, 255, 255, .55); text-transform: uppercase }
.tv-feed ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px }
.tv-feed li { display: grid; grid-template-columns: 36px 4px minmax(0, 1fr); gap: 9px; align-items: center; padding: 6px 9px; border-radius: 4px; background: rgba(0, 0, 0, .22); animation: feedIn .5s ease both }
.tv-feed li .l { font: 700 12px/1 var(--f-mono); color: rgba(255, 255, 255, .6) } .tv-feed li i { height: 16px; border-radius: 2px; background: var(--tc) }
.tv-feed li b { font: 800 clamp(14px, 1.9vh, 18px)/1.05 var(--f-display); letter-spacing: .6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.tv-feed li.win b { color: #6ff0a4 } .tv-feed li.pit b { color: #ffb45c } .tv-feed li.sc b { color: var(--amber) }
.tv-feed li:first-child { background: rgba(255, 255, 255, .1) }
.f-empty { font-size: 13px; color: rgba(255, 255, 255, .6); margin: 0 }
@keyframes feedIn { from { opacity: 0; transform: translateX(14px) } }
@media (max-height: 900px) { .tv-feed li:nth-child(n+5) { display: none } }
@media (max-height: 760px) { .tv-feed li:nth-child(n+3) { display: none } }
/* pit lane sheet, readable from the sofa */
body.tv .pc-pits { font-size: clamp(13px, 1.6vh, 16px); gap: 8px 18px }
body.tv .pc-pits .plabel { font-size: clamp(17px, 2.2vh, 22px) }
body.tv .pchip { font-size: clamp(12px, 1.5vh, 15px); padding: 6px 9px }
/* props: lying on the table in the empty band beside the header, never under a sheet */
body.tv .tv-props { display: block !important; position: fixed; inset: 0; z-index: 0; pointer-events: none; grid-area: auto }
body.tv .tv-props i { position: absolute; background: no-repeat center / contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .5)) }
body.tv .tv-props .pp { top: 22px; left: 47vw; width: 15vw; aspect-ratio: 1842 / 104; background-image: url(/assets/tv/pencil.png); transform: rotate(-4deg) }
body.tv .tv-props .pt { top: 4px; left: 66vw; width: 54px; aspect-ratio: 1; background-image: url(/assets/tv/tape.png) }
body.tv .tv-props .pw { top: -14px; left: 71vw; width: 60px; aspect-ratio: 516 / 663; background-image: url(/assets/tv/watch.png); transform: rotate(14deg) }
.tv-props .pm, .tv-props .pr { display: none !important }
@media (max-width: 1400px) { body.tv .tv-props { display: none !important } }
body.tv main { position: relative; z-index: 1 } body.tv .tv-bar { z-index: 30 }
body.tv .pc-strip button.tr[aria-pressed="true"] { background: color-mix(in srgb, var(--tc) 48%, rgba(0, 0, 0, .2)); box-shadow: 0 0 0 2px #fff inset }
body.tv .pc-strip button.tr[aria-pressed="true"] .p, body.tv .pc-strip button.tr[aria-pressed="true"] .g { color: #fff }
/* running order columns scale with the screen so 720p streams stay aligned */
body.tv .pc-stage { grid-template-columns: clamp(270px, 19vw, 370px) minmax(0, 1fr) clamp(300px, 24vw, 430px) }
body.tv .pc-strip .tr-head, body.tv .pc-strip button.tr { grid-template-columns: clamp(20px, 1.6vw, 30px) minmax(0, 1fr) clamp(40px, 3vw, 58px) clamp(50px, 3.8vw, 72px) clamp(36px, 2.6vw, 50px); gap: 0 clamp(4px, .4vw, 8px); padding: 0 clamp(6px, .5vw, 10px) 0 clamp(5px, .5vw, 9px) }
.tr .ty { gap: 3px } .tr .sb { min-width: 0; width: 100% }
/* pit lane sheet: always one line */
body.tv .pc-pits, body.tv .pc-pits .pgroup { flex-wrap: nowrap; white-space: nowrap } body.tv .pc-pits .pgroup { display: inline-flex; align-items: center; gap: 6px }
@media (max-width: 1500px) { body.tv .pc-pits .pgroup:last-child .pchip:nth-of-type(n+3) { display: none } }
.tv-feed li { animation: none }
/* banners swap in over the pit lane sheet, filling exactly its slot (a lower third), so nothing half-overlaps */
body.tv #toasts { position: relative; inset: auto; left: auto; right: auto; bottom: auto; transform: none; width: auto; grid-area: pits; z-index: 6; display: block; pointer-events: none }
body.tv #toasts:empty { display: none }
body.tv .toast { position: absolute; inset: 0; width: auto; max-width: none; height: 100%; border-radius: 2px; padding: 0 26px 0 24px; gap: 18px; box-shadow: 0 10px 22px rgba(0, 0, 0, .55) }
body.tv .toast .tape { left: 8%; top: -9px } body.tv .toast b { font-size: clamp(22px, 3.4vh, 36px) } body.tv .toast span:not(.stamp) { font-size: clamp(14px, 2vh, 19px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0 }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
body.tv .toast.out { transform: translateY(16px) }
/* the oak always reaches the bottom edge, whatever the browser chrome does */
html:has(body.tv) { height: 100%; background: #6b4524 }
body.tv { background-attachment: fixed, fixed, fixed }
body.tv .pc-pits { transition: opacity .35s } body.tv .pc-stage:has(#toasts:not(:empty)) .pc-pits { opacity: 0 }

/* ===== stream pass (2026-11-06): header weather + CTA, scene tag, strategy sheet, race-control banners, chat vote, pre/post race ===== */
.tv-wx, .tv-cta, .tv-pencil, .tv-scene { display: none }
body.tv .tv-props { display: none !important }
body.tv .tv-bar:after { content: none }
body.tv .tv-wx { display: inline-block; order: 1; flex: none; font: 800 16px/1 var(--f-display); letter-spacing: 1.2px; background: #f0e7d1; color: #1b1710; padding: 8px 12px 6px; border-radius: 2px; transform: rotate(.8deg); box-shadow: 0 3px 8px rgba(0, 0, 0, .45); white-space: nowrap }
body.tv .tv-wx[hidden] { display: none } body.tv .tv-wx.rain { background: #36a3ff; color: #021426 }
body.tv .tv-pencil { display: block; order: 2; flex: 1; min-width: 40px; height: 22px; background: url(/assets/tv/pencil.png) no-repeat center / min(300px, 100%) auto; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .5)); transform: rotate(-3deg) }
body.tv .tv-cta { display: inline-block; order: 2; flex: none; font: 800 15px/1 var(--f-mono); letter-spacing: 1.4px; color: #fff; background: var(--red); padding: 9px 14px 8px; border-radius: 2px; transform: rotate(-1deg); box-shadow: 0 3px 8px rgba(0, 0, 0, .45); white-space: nowrap }
.tv-cta.flip { animation: ctaFlip .6s ease both } @keyframes ctaFlip { from { transform: rotate(-1deg) rotateX(90deg); opacity: 0 } to { transform: rotate(-1deg); opacity: 1 } }
@media (max-width: 1500px) { body.tv .tv-pencil { display: none } body.tv .tv-cta { font-size: 12px } }
@media (max-width: 1250px) { body.tv .tv-wx { font-size: 13px } }
/* scene tag + the swap between scenes */
body.tv .tv-scene { display: block; position: absolute; z-index: 4; left: 50%; top: 10px; transform: translateX(-50%) rotate(-1deg); font: 900 15px/1 var(--f-display); letter-spacing: 2px; background: #ff9a1f; color: #14100a; padding: 7px 14px 5px; border-radius: 2px; box-shadow: 0 3px 8px rgba(0, 0, 0, .45); pointer-events: none; white-space: nowrap }
body.tv:not(.idle) .tv-scene { opacity: 0 }
.pc-canvas canvas, .pc-strat { transition: opacity .45s, transform .45s } .pc-canvas.swap canvas, .pc-canvas.swap .pc-strat { opacity: 0; transform: scale(.97) }
.pc-canvas[data-view="strat"] canvas { visibility: hidden }
/* tyre strategy sheet */
.pc-strat { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; background: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px, #25272a; border-radius: 6px; box-shadow: inset 0 0 0 9px #26282b, inset 0 0 0 10px rgba(255, 255, 255, .22) }
.pc-strat[hidden] { display: none }
body.tv .pc-strat { padding: 52px 30px 26px }
.sg-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap } .sg-head b { font: 900 clamp(22px, 3.2vh, 34px)/1 var(--f-display); font-style: italic; letter-spacing: 1px } .sg-lap { font: 700 13px/1 var(--f-mono); color: var(--dim); letter-spacing: 1px }
.sg-key { margin-left: auto; display: flex; gap: 12px } .sg-key i { font: 700 11px/1 var(--f-mono); font-style: normal; letter-spacing: 1px; color: var(--dim); display: inline-flex; align-items: center; gap: 5px } .sg-key i:before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c) }
.sg-body { flex: 1; min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); gap: 3px }
.sg-row { display: grid; grid-template-columns: 30px 46px minmax(0, 1fr) 64px; align-items: center; gap: 10px; min-height: 0 }
.sg-row .p { font: 700 clamp(11px, 1.5vh, 15px)/1 var(--f-mono); color: var(--dim); text-align: right } .sg-row .c { font: 800 clamp(13px, 1.9vh, 20px)/1 var(--f-display); letter-spacing: 1px; border-left: 4px solid var(--tc); padding-left: 6px }
.sg-row .n { font: 700 clamp(9px, 1.2vh, 12px)/1 var(--f-mono); color: var(--dim); letter-spacing: .6px }
.sg-track { position: relative; height: 72%; min-height: 8px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 6px, transparent 6px 12px); border-radius: 3px }
.sg-track i { position: absolute; top: 0; bottom: 0; background: var(--c); border-radius: 3px; box-shadow: inset -2px 0 0 rgba(0, 0, 0, .55); font: 800 clamp(9px, 1.25vh, 12px)/1 var(--f-mono); font-style: normal; color: #111; display: flex; align-items: center; padding-left: 6px; overflow: hidden; white-space: nowrap }
.sg-track em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .7) }
.sg-axis .sg-track { background: none; height: 14px } .sg-axis b { position: absolute; transform: translateX(-50%); font: 700 10px/1 var(--f-mono); color: var(--dim) }
/* race control + chat vote banners */
.toast.rc .stamp { color: #1b1710; border-color: #1b1710 } .toast.vote .stamp { color: #6b2bd9; border-color: #6b2bd9 }
.tv-feed li.rc b { color: #fff } .tv-feed li.vote b { color: #c9a4ff }
/* chat vote panel (alternates with the race feed every 20 s) */
.tv-vote { display: none }
body.tv .tv-vote:not([hidden]) { display: block; margin-top: auto; padding-top: 14px }
body.tv .pc-card[data-b="vote"] .tv-feed, body.tv .pc-card[data-b="feed"] .tv-vote { display: none }
.v-ask { margin: 0 0 10px; font-size: clamp(13px, 1.7vh, 16px); color: rgba(255, 255, 255, .8) } .v-ask b { font-family: var(--f-mono); color: #fff }
.tv-vote ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px }
.tv-vote li { display: grid; grid-template-columns: 52px minmax(0, 1fr) 46px; align-items: center; gap: 10px }
.tv-vote li b { font: 900 clamp(18px, 2.4vh, 24px)/1 var(--f-display); border-left: 4px solid var(--tc); padding-left: 7px }
.tv-vote .bar { height: clamp(14px, 2vh, 20px); background: rgba(0, 0, 0, .3); border-radius: 3px; overflow: hidden } .tv-vote .bar i { display: block; height: 100%; background: var(--tc); transition: width .8s }
.tv-vote li small { font: 700 13px/1 var(--f-mono); text-align: right } .tv-vote li.none { display: block; color: rgba(255, 255, 255, .6) }
/* pre / post race sheet over the clock */
.tv-over { display: none }
body.tv .tv-over:not([hidden]) { display: flex; flex-direction: column; position: absolute; inset: 0; z-index: 8; padding: 40px 48px; background: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px, #25272a; border-radius: 6px; box-shadow: inset 0 0 0 9px #26282b, inset 0 0 0 10px rgba(255, 255, 255, .22), 0 14px 34px rgba(0, 0, 0, .55); overflow: hidden }
.tv-over.pre { align-items: center; justify-content: center; text-align: center }
.o-eyebrow { font: 700 clamp(12px, 1.6vh, 16px)/1 var(--f-mono); letter-spacing: 2.5px; color: var(--amber) }
.tv-over h2 { font: 900 clamp(34px, 6vh, 72px)/.95 var(--f-display); font-style: italic; margin: 10px 0 8px }
.o-meta { font: 600 clamp(14px, 2vh, 20px)/1.3 var(--f-body); color: rgba(255, 255, 255, .75) }
.o-label { margin-top: clamp(20px, 4vh, 44px); font: 800 clamp(16px, 2.4vh, 24px)/1 var(--f-display); letter-spacing: 3px; color: rgba(255, 255, 255, .7) }
.o-count { font: 900 clamp(64px, 14vh, 170px)/1 var(--f-display); font-style: italic; letter-spacing: 2px; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 6px 24px rgba(0, 0, 0, .5) }
.o-lights { display: flex; gap: clamp(10px, 1.6vh, 18px); margin: clamp(10px, 2vh, 24px) 0; padding: 12px 18px; background: #111; border-radius: 10px; box-shadow: inset 0 0 0 2px #333 }
.o-lights i { width: clamp(30px, 5vh, 54px); aspect-ratio: 1; border-radius: 50%; background: #2a0b0b; box-shadow: inset 0 0 10px #000 } .o-lights i.on { background: radial-gradient(circle at 40% 35%, #ff6a5e, #e10600 60%); box-shadow: 0 0 22px rgba(225, 6, 0, .9) }
.o-sub { margin: 0; font: 700 clamp(14px, 2vh, 20px)/1.3 var(--f-body); color: var(--amber) } .o-note { margin: 14px 0 0; font-size: clamp(12px, 1.6vh, 15px); color: rgba(255, 255, 255, .6) }
.tv-over.post { padding-top: 64px }
.o-checks { position: absolute; left: 0; right: 0; top: 0; height: 36px; background: repeating-conic-gradient(#f0e7d1 0 25%, #14100a 0 50%) 0 0 / 36px 36px; box-shadow: 0 3px 8px rgba(0, 0, 0, .5) }
.o-pod { display: grid; gap: 8px; margin-top: 12px }
.o-r { display: grid; grid-template-columns: 52px 6px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 4px; background: rgba(0, 0, 0, .28) } .o-r i { height: 70%; border-radius: 3px; background: var(--tc) }
.o-r .p { font: 800 clamp(13px, 1.8vh, 18px)/1 var(--f-mono); color: rgba(255, 255, 255, .65) } .o-r b { font: 800 clamp(16px, 2.2vh, 22px)/1 var(--f-display); letter-spacing: 1px } .o-r small { font: 600 12px/1 var(--f-mono); color: rgba(255, 255, 255, .6) }
.o-r.big { padding: 10px 16px } .o-r.big b { font-size: clamp(24px, 3.8vh, 42px); font-style: italic } .o-r.big .p { font-size: clamp(18px, 2.6vh, 26px) }
.o-r.p1 { background: linear-gradient(90deg, rgba(255, 200, 61, .35), rgba(0, 0, 0, .25)) } .o-r.p1 .p { color: var(--amber) }
.o-rest { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 10px; margin-top: 12px }
.o-rest .o-r { grid-template-columns: 40px 5px minmax(0, 1fr); padding: 5px 9px } .o-rest .o-r b { font-size: clamp(14px, 1.9vh, 19px) }
.o-stats { margin-top: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-top: 12px }
.o-stats div { background: #f0e7d1; color: #1b1710; padding: 9px 12px; border-radius: 2px } .o-stats small { display: block; font: 700 10px/1 var(--f-mono); letter-spacing: 1.2px; color: #6b604b; margin-bottom: 6px } .o-stats b { font: 900 clamp(16px, 2.3vh, 24px)/1 var(--f-display) }
.tv-props { display: none }

/* ===== growth pass (2026-11-06): like goal, live chat sheet, pre-race grid / last-year sheet ===== */
.tv-goal, .tv-chat { display: none }
body.tv .tv-goal:not([hidden]) { display: grid; order: 2; gap: 4px; flex: none; background: #f0e7d1; color: #1b1710; padding: 6px 12px 6px; border-radius: 2px; transform: rotate(1deg); box-shadow: 0 3px 8px rgba(0, 0, 0, .45) }
.tv-goal b { font: 800 14px/1 var(--f-mono); letter-spacing: .6px; white-space: nowrap } .tv-goal > i { display: block; height: 5px; border-radius: 3px; background: rgba(27, 23, 16, .18); overflow: hidden } .tv-goal > i i { display: block; height: 100%; width: 0; background: #e10600; transition: width 1s }
@media (max-width: 1500px) { .tv-goal b { font-size: 11px } }
/* the card bottom cycles vote -> chat -> feed */
body.tv .tv-chat:not([hidden]) { display: block; margin-top: auto; padding-top: 14px; min-height: 0; overflow: hidden }
body.tv .pc-card[data-b] .tv-feed, body.tv .pc-card[data-b] .tv-vote, body.tv .pc-card[data-b] .tv-chat { display: none }
body.tv .pc-card[data-b="feed"] .tv-feed { display: block } body.tv .pc-card[data-b="vote"] .tv-vote:not([hidden]) { display: block } body.tv .pc-card[data-b="chat"] .tv-chat:not([hidden]) { display: block }
.tv-chat ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px }
.tv-chat li { background: rgba(0, 0, 0, .22); border-radius: 4px; padding: 6px 9px; font: 500 clamp(13px, 1.7vh, 16px)/1.3 var(--f-body); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.tv-chat li:first-child { background: rgba(255, 255, 255, .12) } .tv-chat li b { color: var(--amber); margin-right: 7px; font-weight: 700 } .tv-chat li.none { color: rgba(255, 255, 255, .6) }
@media (max-height: 900px) { .tv-chat li:nth-child(n+5) { display: none } }
/* pre-race in two columns: countdown left, grid or last year right */
body.tv .tv-over.pre.cols { flex-direction: row; align-items: stretch; gap: 34px; text-align: left; justify-content: stretch }
.tv-over.pre.cols .o-main { flex: 1.15; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-width: 0 }
.tv-over.pre .o-main { display: flex; flex-direction: column; align-items: center }
.o-side { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; border-left: 1px dashed rgba(255, 255, 255, .25); padding-left: 30px }
.o-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px }
.o-slot { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(0, 0, 0, .3); border-left: 4px solid var(--tc); border-radius: 3px }
.o-slot.r { transform: translateY(50%) } .o-slot .p { font: 700 13px/1 var(--f-mono); color: rgba(255, 255, 255, .6) } .o-slot b { font: 800 clamp(16px, 2.2vh, 22px)/1 var(--f-display); letter-spacing: 1px } .o-slot small { font: 600 11px/1 var(--f-mono); color: rgba(255, 255, 255, .55) }
.o-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.o-facts div { background: #f0e7d1; color: #1b1710; padding: 12px 14px; border-radius: 2px; transform: rotate(-.4deg) } .o-facts div:nth-child(even) { transform: rotate(.5deg) }
.o-facts small { display: block; font: 700 10.5px/1 var(--f-mono); letter-spacing: 1.2px; color: #6b604b; margin-bottom: 7px } .o-facts b { font: 900 clamp(18px, 2.8vh, 30px)/1.05 var(--f-display) }
.tv-over.pre.cols h2 { font-size: clamp(30px, 5vh, 60px) } .tv-over.pre.cols .o-count { font-size: clamp(56px, 11vh, 140px) }
body.tv .tv-race { flex: none; max-width: none } body.tv .tv-cta { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis }
body.tv:has(.tv-goal:not([hidden])) .tv-pencil { display: none } body.tv:has(.tv-goal:not([hidden])) .tv-bar { gap: 12px }
body.tv.clean .pc-tools, body.tv.clean .tv-scene, body.tv.clean .tv-x { display: none !important }

/* ===== SESSION MODE (practice + qualifying): lap-time tower, sectors, knockout line ===== */
.sess { display: none }
body.tv.sess-on main { display: none }
body.tv .sess:not([hidden]) { display: grid; position: fixed; z-index: 5; inset: 66px 26px 24px; gap: 18px 22px; grid-template-columns: clamp(270px, 19vw, 370px) minmax(0, 1fr) clamp(300px, 24vw, 430px); grid-template-rows: minmax(0, 1fr) clamp(52px, 6vh, 66px); grid-template-areas: "info tower card" "info toasts card" }
.ss-sheet { position: relative; min-height: 0; overflow: hidden; border-radius: 6px; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .55));
  background: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(160deg, #34373b, #232528 70%); box-shadow: inset 0 0 0 9px #26282b, inset 0 0 0 10px rgba(255, 255, 255, .22) }
.ss-info { grid-area: info; padding: 22px 20px; display: flex; flex-direction: column; gap: 12px }
.ss-tower { grid-area: tower; padding: 18px 20px 16px; display: flex; flex-direction: column }
.ss-toasts { grid-area: toasts; position: relative; z-index: 6 } .ss-toasts:empty { display: none }
.ss-card { grid-area: card; position: relative; min-height: 0; overflow: hidden; padding: 22px 24px; display: flex; flex-direction: column; border-radius: 6px; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .55));
  background: linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(160deg, #1d5aa0, #123f75 75%); box-shadow: inset 0 0 0 9px #17488a, inset 0 0 0 10px rgba(255, 255, 255, .35) }
/* the tower */
.ss-th, .ss-tr { display: grid; grid-template-columns: clamp(28px, 2.4vw, 46px) minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .95fr) repeat(3, minmax(0, .95fr)) minmax(0, .55fr) minmax(0, .85fr) minmax(0, 1fr); align-items: center; gap: 0 clamp(4px, .5vw, 10px) }
.ss-th { font: 700 clamp(9px, 1.1vh, 11px)/1 var(--f-mono); letter-spacing: 1.3px; color: rgba(238, 242, 248, .55); padding: 4px 10px 8px; border-bottom: 1px solid rgba(255, 255, 255, .18) }
.ss-th span:nth-child(n+3) { text-align: center }
.ss-tb { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 4px }
.ss-tr { flex: 1 1 0; min-height: 0; padding: 0 10px 0 8px; border-left: 4px solid var(--tc); border-radius: 4px; background: rgba(0, 0, 0, .22); font: 700 clamp(12px, 1.8vh, 19px)/1 var(--f-mono); color: var(--chalk); transition: background .4s }
.ss-tr:nth-child(odd) { background: rgba(0, 0, 0, .34) }
.ss-tr .p { color: rgba(238, 242, 248, .6); text-align: right } .ss-tr .c { font: 800 clamp(15px, 2.2vh, 24px)/1 var(--f-display); letter-spacing: 1px }
.ss-tr .b { text-align: center; font-size: clamp(13px, 2vh, 21px) } .ss-tr .g { text-align: center; color: rgba(238, 242, 248, .75); font-weight: 600 }
.ss-tr .l { text-align: center; color: rgba(238, 242, 248, .7) }
.sx { justify-self: center; font: 700 clamp(10px, 1.45vh, 15px)/1 var(--f-mono); padding: 3px 6px 2px; border-radius: 3px; min-width: 6.2ch; text-align: center; color: rgba(255, 255, 255, .45) }
.sx.pu { background: #9b4dff; color: #fff } .sx.gr { background: #2fbf6a; color: #04210f } .sx.ye { background: #ffd23f; color: #241a00 } .sx.old { opacity: .5 }
.ss-tr .ty { display: flex; align-items: center; justify-content: center; gap: 4px } .ss-tr .ty i { width: clamp(15px, 2vh, 20px); height: clamp(15px, 2vh, 20px); border-radius: 50%; display: inline-grid; place-items: center; font: 800 clamp(9px, 1.1vh, 11px)/1 var(--f-mono); color: #111; font-style: normal; box-shadow: 0 0 0 2px rgba(0, 0, 0, .5) inset } .ss-tr .ty small { font: 600 clamp(10px, 1.3vh, 13px)/1 var(--f-mono); color: rgba(238, 242, 248, .65) }
.ss-tr .st { justify-self: center; font: 800 clamp(9px, 1.2vh, 12px)/1 var(--f-mono); letter-spacing: .6px; padding: 4px 6px 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); color: rgba(238, 242, 248, .6) }
.st-push { background: #2fbf6a !important; color: #04210f !important } .st-outlap { background: #36a3ff !important; color: #021426 !important } .st-out { color: #ff6b5e !important; background: none !important }
.ss-tr.danger { background: rgba(225, 6, 0, .2) } .ss-tr.danger .p { color: #ff6b5e }
.ss-tr.out { opacity: .45 } .ss-tr.flash { background: rgba(255, 200, 61, .32) !important } .ss-tr.spot { box-shadow: 0 0 0 2px #fff inset }
.ss-cut { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; margin: 3px 0; padding: 0 10px; height: clamp(18px, 2.4vh, 26px); border-top: 2px dashed #ff4a3d; border-bottom: 2px dashed #ff4a3d; background: rgba(225, 6, 0, .12) }
.ss-cut b { font: 900 clamp(11px, 1.6vh, 15px)/1 var(--f-display); letter-spacing: 2px; color: #ff6b5e } .ss-cut span { font: 700 clamp(10px, 1.3vh, 12px)/1 var(--f-mono); color: rgba(255, 255, 255, .75) }
.ss-sep { flex: 0 0 auto; font: 800 clamp(10px, 1.3vh, 12px)/1 var(--f-mono); letter-spacing: 2px; color: rgba(255, 255, 255, .5); padding: 5px 10px 3px; border-top: 1px solid rgba(255, 255, 255, .2); margin-top: 3px }
/* session sheet */
.si-eyebrow { font: 700 12px/1 var(--f-mono); letter-spacing: 2px; color: var(--amber) }
.ss-info h2 { margin: 0; font: 900 clamp(26px, 3.8vh, 40px)/.95 var(--f-display); font-style: italic }
.si-clock { background: #111; border-radius: 6px; padding: 12px 14px; box-shadow: inset 0 0 0 2px #333 } .si-clock small { display: block; font: 700 11px/1 var(--f-mono); letter-spacing: 1.6px; color: rgba(255, 255, 255, .6); margin-bottom: 6px }
.si-clock b { font: 900 clamp(46px, 8vh, 84px)/.9 var(--f-display); font-variant-numeric: tabular-nums; color: #fff } .si-clock.red { box-shadow: inset 0 0 0 3px #e10600 } .si-clock.red b { color: #ff4a3d }
.si-box { background: #f0e7d1; color: #1b1710; border-radius: 2px; padding: 12px 14px; transform: rotate(-.4deg); box-shadow: 0 4px 10px rgba(0, 0, 0, .35) }
.si-box small { display: block; font: 700 10.5px/1 var(--f-mono); letter-spacing: 1.3px; color: #6b604b; margin-bottom: 7px } .si-box > b { font: 900 clamp(22px, 3.4vh, 34px)/1 var(--f-display) } .si-box > span { font: 700 13px/1 var(--f-mono); margin-left: 8px }
.si-box.cut { background: #ffe3dc; transform: rotate(.5deg) } .si-box.cut > b { color: #b3160d }
.si-dz { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center } .si-dz small { width: 100%; margin: 0 } .si-dz i { font: 800 13px/1 var(--f-mono); font-style: normal; background: #1b1710; color: #fff; border-left: 4px solid var(--tc); padding: 4px 6px 3px; border-radius: 2px }
.si-sec { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 8px; padding: 3px 0 } .si-sec span { font: 700 12px/1 var(--f-mono); color: #6b604b } .si-sec b { font: 800 clamp(16px, 2.2vh, 22px)/1 var(--f-mono); color: #6b2bd9 } .si-sec i { font: 800 13px/1 var(--f-mono); font-style: normal; border-left: 4px solid var(--tc); padding-left: 5px }
.si-sec.ideal { border-top: 1px dashed rgba(27, 23, 16, .3); margin-top: 4px; padding-top: 7px } .si-sec.ideal b { color: #1b1710 } .si-sec.ideal i { border: 0; color: #0a7a3a }
.si-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto }
.si-row div { background: rgba(0, 0, 0, .3); border-radius: 4px; padding: 10px 12px } .si-row small { display: block; font: 700 10px/1 var(--f-mono); letter-spacing: 1.2px; color: rgba(255, 255, 255, .55); margin-bottom: 6px } .si-row b { font: 800 clamp(16px, 2.2vh, 22px)/1 var(--f-display); display: block } .si-row span { font: 600 11px/1.3 var(--f-mono); color: rgba(255, 255, 255, .6) }
/* spotlight card */
.ss-spot .eyebrow { margin: 0 } .ss-spot .v-head { margin: 8px 0 12px } .ss-spot .v-head h2 { font-size: clamp(26px, 4.2vh, 40px) }
.ss-big { display: flex; align-items: center; gap: 16px; background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 10px 14px } .ss-big > b { font: 900 clamp(44px, 7vh, 70px)/.9 var(--f-display); font-style: italic; color: var(--amber) }
.ss-big strong { display: block; font: 800 clamp(24px, 3.6vh, 36px)/1 var(--f-mono); color: #fff } .ss-big small { font: 700 12px/1.4 var(--f-mono); letter-spacing: 1px; color: rgba(255, 255, 255, .7) }
.ss-need { display: inline-block; margin-top: 10px } .ss-secs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px }
.ss-secs div { background: rgba(0, 0, 0, .25); border-radius: 6px; padding: 8px 10px; border-top: 3px solid #2fbf6a } .ss-secs div.pu { border-top-color: #9b4dff } .ss-secs small { display: block; font: 700 10px/1 var(--f-mono); color: rgba(255, 255, 255, .6) } .ss-secs b { font: 800 clamp(15px, 2vh, 20px)/1.2 var(--f-mono) } .ss-secs span { font: 700 10.5px/1 var(--f-mono); color: rgba(255, 255, 255, .7) }
.ss-spot .v-meta { margin-top: 12px }
.ss-slot { margin-top: auto; min-height: 0; overflow: hidden }
.ss-slot .tv-feed, .ss-slot .tv-vote, .ss-slot .tv-chat { margin-top: 0 }
.ss-slot[data-b] .tv-feed, .ss-slot[data-b] .tv-vote, .ss-slot[data-b] .tv-chat { display: none !important }
.ss-slot[data-b="feed"] .tv-feed { display: block !important } .ss-slot[data-b="vote"] .tv-vote:not([hidden]) { display: block !important } .ss-slot[data-b="chat"] .tv-chat:not([hidden]) { display: block !important }
.ss-slot .tv-feed li { grid-template-columns: 74px 4px minmax(0, 1fr) }
@media (max-height: 900px) { .ss-slot .tv-feed li:nth-child(n+4) { display: none } .ss-secs { display: none } }
.ss-secs b { display: block; font-size: clamp(14px, 1.8vh, 18px) } .ss-secs span { display: block; margin-top: 3px } .ss-secs div { min-width: 0; overflow: hidden }
.si-imp { display: grid; gap: 4px } .si-imp small { font: 700 10.5px/1 var(--f-mono); letter-spacing: 1.3px; color: rgba(255, 255, 255, .55); margin-bottom: 3px }
.si-imp div { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 8px; padding: 5px 9px; background: rgba(0, 0, 0, .3); border-left: 4px solid var(--tc); border-radius: 3px } .si-imp div:first-of-type { background: rgba(255, 200, 61, .18) }
.si-imp b { font: 800 clamp(14px, 1.9vh, 18px)/1 var(--f-display); letter-spacing: 1px } .si-imp span { font: 700 clamp(12px, 1.6vh, 15px)/1 var(--f-mono) } .si-imp i { font: 700 12px/1 var(--f-mono); font-style: normal; color: var(--amber) }
@media (max-height: 820px) { .si-imp div:nth-of-type(n+4) { display: none } }
@media (max-width: 1400px) { body.tv .tv-cta, body.tv .tv-brand b { display: none } body.tv .tv-bar { gap: 10px } body.tv .tv-lap b { font-size: 24px } body.tv .tv-race { font-size: 16px } body.tv .tv-wx { font-size: 12px } }
/* scene tag: only the clock lacks its own title; the map and strategy sheets draw theirs, so the tag would sit on top of them */
body.tv .tv-scene { left: auto; right: 22px; top: auto; bottom: 18px; transform: rotate(-1.5deg) }
body.tv .pc-canvas[data-view="map"] .tv-scene, body.tv .pc-canvas[data-view="strat"] .tv-scene { display: none }
/* session results sheet (sits over the tower when the session is over) + the weekend list on practice countdowns */
.ss-final { grid-area: tower; z-index: 4; padding: 54px 34px 22px; display: flex; flex-direction: column }
.ss-final[hidden] { display: none }
.ss-final h2 { font: 900 clamp(28px, 4.6vh, 50px)/.95 var(--f-display); font-style: italic; margin: 8px 0 4px }
.ss-final .o-rest { grid-template-columns: repeat(3, minmax(0, 1fr)) } .ss-final .o-r small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.ss-final .o-r.big small { font-size: clamp(14px, 2vh, 20px); color: #fff }
.o-nextup { margin-top: 10px; display: flex; align-items: baseline; gap: 14px; background: #111; border-radius: 6px; padding: 10px 16px; box-shadow: inset 0 0 0 2px #333 }
.o-nextup small { font: 700 12px/1 var(--f-mono); letter-spacing: 2px; color: var(--amber) } .o-nextup b { font: 900 clamp(20px, 3vh, 30px)/1 var(--f-display); font-style: italic } .o-nextup span { margin-left: auto; font: 900 clamp(26px, 4vh, 42px)/1 var(--f-display); font-variant-numeric: tabular-nums }
.o-week { display: grid; gap: 6px } .o-week div { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; background: rgba(0, 0, 0, .3); border-radius: 4px; padding: 9px 12px; border-left: 4px solid rgba(255, 255, 255, .2) }
.o-week b { font: 800 clamp(16px, 2.2vh, 22px)/1 var(--f-display); letter-spacing: 1px } .o-week span { font: 600 13px/1.2 var(--f-mono); color: rgba(255, 255, 255, .75) } .o-week small { grid-column: 1 / -1; font: 700 10.5px/1 var(--f-mono); letter-spacing: 1.5px; color: rgba(255, 255, 255, .5) }
.o-week div.next { border-left-color: var(--amber); background: rgba(255, 200, 61, .14) } .o-week div.next small { color: var(--amber) } .o-week div.done { opacity: .5 }
.ss-final .o-rest .o-r { grid-template-columns: 44px 5px auto minmax(0, 1fr); padding: 6px 10px } .ss-final .o-rest .o-r small { text-align: right; font-size: clamp(11px, 1.5vh, 14px); color: rgba(255, 255, 255, .8) }
.toast.radio .stamp { color: #1b1710; border-color: #1b1710; background: #ffd23f } .tv-feed li.radio b { color: #ffd23f }
.ss-tr .c em.res { font: 800 9px/1 var(--f-mono); font-style: normal; letter-spacing: .6px; background: #ffd23f; color: #241a00; border-radius: 3px; padding: 2px 4px 1px; margin-left: 6px; vertical-align: middle } .si-res { background: #fff3c4 } .si-res .si-dz i { background: #1b1710 }
/* the full-screen countdown (countdown.html?tv=1) that covers the stream page before a session */
#tvcd { position: fixed; inset: 0; z-index: 100; background: #3d2716 } #tvcd[hidden] { display: none } #tvcd iframe { width: 100%; height: 100%; border: 0; display: block }
