/* The public pages (/, /apply, /live, /results, /leaderboard): Tacto's look on top of ui.css.
   Black ink, whitesmoke, orange as the one accent (graphics only: never small text). */
@font-face { font-family: "Geist"; src: url("/static/fonts/Geist.woff2") format("woff2"); font-weight: 100 900;
  font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/static/fonts/GeistMono.woff2") format("woff2"); font-weight: 100 900;
  font-display: swap; }
:root { --faint: #6b6b6b; }  /* 4.9:1 on whitesmoke */
body { display: flex; flex-direction: column; min-height: 100vh; -webkit-font-smoothing: antialiased; }
body > main { flex: 1 0 auto; width: 100%; }
h1 { font-weight: 400; }
.hero h1, .kpi-value, .live .kpi-value, .bot-best { font-weight: 300; }
.hero h1 { letter-spacing: -0.035em; }
.eyebrow { font-size: 12px; letter-spacing: 0.04em; }
th.num { font-family: var(--sans); }  /* mono is for the figures, not their headers */
button, .btn { font: 400 13px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.02em; border-radius: 4px;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.primary:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--fg); }
.btn.big { height: 52px; padding: 0 24px; border-radius: 8px; font-size: 14px;
  box-shadow: 0 0.625rem 1rem -0.1875rem rgba(0, 0, 0, 0.2); }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 6px; font-size: 13px; }

/* header and footer, the same on every public page */
.site { background: var(--card); border-bottom: 1px solid var(--line); }
.site-in { max-width: 1280px; margin: 0 auto; padding: 0 24px; min-height: 64px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 8px 24px; }
.site-brand { display: flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; }
.site-brand img { display: block; width: 74px; height: 24px; }
.site-name { padding-left: 12px; border-left: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.site-nav { margin-left: auto; display: flex; gap: 4px; }
.site-nav a { padding: 9px 10px; font: 400 13px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--ink); text-decoration: none; border-radius: 4px; }
.site-nav a:hover { background: var(--hover); color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--fg); border-radius: 0; box-shadow: inset 0 -2px var(--accent); }
.site-foot { border-top: 1px solid var(--line); }
.site-foot .site-in { min-height: 56px; font: 400 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--dim); }

/* the start page */
.home { max-width: 1280px; margin: 0 auto; padding: 56px 24px 72px; display: flex; flex-direction: column; gap: 72px; }
.home h2 { font-size: 28px; font-weight: 300; letter-spacing: -0.02em; }
.home-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.home-hero > div { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.home-hero h1 { font-size: clamp(44px, 6.2vw, 80px); font-weight: 300; letter-spacing: -0.045em; line-height: 1; }
.claim { font-size: clamp(24px, 2.6vw, 34px); font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; }
.lede { max-width: 56ch; font-size: 17px; color: var(--dim); }
.deal { margin: 0; padding: 20px 20px 12px; }
.deal svg { display: block; width: 100%; height: auto; overflow: visible; }
.deal text { font: 400 11px var(--mono); letter-spacing: 0.04em; fill: var(--dim); }
.links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fg); }
.links a { display: grid; grid-template-columns: minmax(200px, 2fr) minmax(0, 3fr) minmax(0, 2fr); gap: 4px 24px;
  align-items: baseline; padding: 18px 8px; border-bottom: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.links a:hover { background: var(--card); }
.links b { font-size: 19px; font-weight: 400; letter-spacing: -0.01em; }
.links span { color: var(--dim); }
.links code { font: 13px var(--mono); color: var(--dim); text-align: right; overflow-wrap: anywhere; }
.links a:hover code { color: var(--fg); }
.when { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.when + p { margin-top: 24px; }
.when li { position: relative; padding: 24px 24px 0 0; border-top: 1px solid var(--fg); display: flex; flex-direction: column;
  gap: 6px; }
.when li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%;
  background: var(--fg); }
.when li.key::before { background: var(--accent); }
.when time { font: 13px var(--mono); text-transform: uppercase; letter-spacing: 0.02em; color: var(--dim); }
.when b { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.when span { color: var(--dim); }
.rule { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px 48px; padding: 40px; border-radius: 10px;
  color: #fff; background: radial-gradient(90% 160% at 100% 100%, rgba(255, 100, 20, 0.32), transparent 60%), var(--fg); }
.rule .eyebrow { color: rgba(255, 255, 255, 0.7); }
.rule h2 { margin-top: 8px; }
.rule p { max-width: 60ch; font-size: 17px; color: rgba(255, 255, 255, 0.85); }
.rule code { padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); color: #fff; font: 14px var(--mono); }

/* /leaderboard */
.board > * { min-width: 0; }  /* the table scrolls inside its card, the page never sideways */
.board table { font-size: 15px; }
.board th.num, .board td.num { text-align: right; font-variant-numeric: tabular-nums; }
.board tr.top td:first-child { font-weight: 600; box-shadow: inset 3px 0 var(--accent); }
.board table.compact td { padding-top: 6px; padding-bottom: 6px; }

@media (prefers-reduced-motion: no-preference) {
  .deal .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s forwards; }
  .deal .star { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pop 0.4s ease-out 1.4s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .home-hero, .rule { grid-template-columns: minmax(0, 1fr); }
  .links a { grid-template-columns: minmax(0, 1fr); }
  .links code { text-align: left; }
}
@media (max-width: 720px) {
  .site-in { padding: 10px 16px; }
  .site-nav { margin-left: -10px; }
  .home { padding: 32px 16px 48px; gap: 48px; }
  .deal { display: none; }  /* the QR-code visitor needs the button and the links */
  .rule { padding: 28px 20px; }
  .when { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
  .when li { padding: 0 0 24px 24px; border-top: 0; border-left: 1px solid var(--fg); }
  .when li:last-child { padding-bottom: 0; }
  .when li::before { top: 6px; left: -5px; }
}

/* /faq: the questions as an accordion, the feedback-loop hacks under them, a recorded negotiation beside them */
.faq { max-width: 1280px; margin: 0 auto; padding: 40px 24px 64px; display: flex; flex-direction: column; gap: 28px; }
.faq-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.faq-hero h1 { font-size: clamp(40px, 5vw, 64px); font-weight: 300; letter-spacing: -0.045em; line-height: 1; }
.faq a { color: var(--fg); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; align-items: start; }
.faq-list { display: flex; flex-direction: column; gap: 24px; }
.qa-group { border-top: 1px solid var(--fg); }
.qa { border-bottom: 1px solid var(--line); scroll-margin-top: 16px; font-size: 16px; }
.qa summary { display: flex; align-items: center; gap: 16px; padding: 18px 4px; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary h2 { flex: 1; font-size: 21px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.25; }
.qa summary::after { content: ""; flex: none; width: 12px; height: 12px; border: solid var(--fg); border-width: 0 1.5px 1.5px 0;
  transform: translateY(-3px) rotate(45deg); transition: transform 0.2s; }
.qa[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.qa summary:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.qa-body { padding: 0 4px 28px; display: flex; flex-direction: column; gap: 16px; }
.qa .short { font-size: 18px; line-height: 1.45; }
.qa h3 { margin: 8px 0 0; font: 400 13px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--dim); }
.qa code { padding: 1px 5px; border-radius: 4px; background: var(--line-soft); font: 0.9em var(--mono); }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 14px; }
.steps li::marker { font-family: var(--mono); color: var(--dim); }
.plain { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.parts { border-collapse: collapse; width: 100%; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.parts th, .parts td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.parts th { width: 170px; font-weight: 500; }
.parts td { color: var(--ink); }
.formula { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 14px 0 10px; font-size: 24px; font-weight: 300; }
.formula .dim { font-size: 15px; }
.frac { display: inline-flex; flex-direction: column; align-items: center; font-family: var(--mono); font-size: 19px; }
.frac > span { padding: 2px 10px; }
.frac > span:first-child { border-bottom: 2px solid var(--fg); }
.terms { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.terms dt { font: 500 15px var(--mono); }
.terms dd { margin: 0; color: var(--ink); }
.example { margin: 4px 0 0; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.example figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.example figcaption code { background: none; padding: 0; }
.scale { padding: 4px 0 22px; }
.scale .track { position: relative; height: 8px; border-radius: 999px; background: var(--line-soft); }
.scale .track span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--accent); }
.scale .track i { position: absolute; top: -5px; width: 2px; height: 18px; background: var(--fg); }
.scale .ends { position: relative; display: flex; justify-content: space-between; margin-top: 10px; font: 0.8125rem var(--mono); }
.scale .deal-at { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.calc { width: 100%; border-collapse: collapse; font-size: 14px; }
.calc th, .calc td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line-soft); text-align: left; }
.calc thead th { font: 400 12px var(--mono); text-transform: uppercase; color: var(--dim); }
.calc td.num, .calc th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc tr.total th, .calc tr.total td { border-bottom: 0; font-weight: 600; }
.calc tr.total td.num { font-size: 22px; }
.qa-note { color: var(--dim); }
.phases { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; }
.phases .card { display: flex; flex-direction: column; gap: 8px; }
.phases .key { box-shadow: inset 3px 0 var(--accent); }
.phases ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.loops { padding: 24px 28px; border-radius: 10px; color: #fff; scroll-margin-top: 16px;
  background: radial-gradient(90% 120% at 100% 100%, rgba(255, 100, 20, 0.3), transparent 60%), var(--fg); }
.loops .eyebrow { color: rgba(255, 255, 255, 0.7); }
.loops h2 { margin: 6px 0 16px; font-size: 24px; font-weight: 300; letter-spacing: -0.02em; }
.loops ol { margin: 0; padding-left: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px;
  color: rgba(255, 255, 255, 0.85); }
.loops li::marker { font-family: var(--mono); color: rgba(255, 255, 255, 0.6); }
.loops b { color: #fff; font-weight: 500; }
.loops code { padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); color: #fff; font: 0.9em var(--mono);
  overflow-wrap: anywhere; }
.faq-grid > .nego { position: sticky; top: 16px; }

/* a recorded negotiation, played back message by message (static/negotiation.js); sized in rem for the big screen */
.nego { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.nego-head { position: relative; padding: 1.125rem 1.25rem 0.875rem; border-bottom: 1px solid var(--line); display: flex;
  flex-direction: column; gap: 0.25rem; }
.nego-head h2 { font-size: 1.375rem; font-weight: 400; letter-spacing: -0.015em; }
.nego-head p { font-size: 0.875rem; color: var(--dim); max-width: 46ch; }
.nego-replay { position: absolute; top: 1rem; right: 1.25rem; height: 28px; padding: 0 10px; background: var(--card);
  border: 1px solid var(--line); font-size: 11px; cursor: pointer; }
.nego-replay:hover { border-color: var(--fg); }
.nego-thread { list-style: none; margin: 0; padding: 1rem 1.25rem; height: 27rem; overflow-y: auto; scrollbar-width: none;
  display: flex; flex-direction: column; gap: 0.625rem; background: var(--bg); }
.nego-thread::-webkit-scrollbar { display: none; }
.msg { display: none; max-width: 88%; flex-direction: column; gap: 0.375rem; padding: 0.625rem 0.75rem; border-radius: 0.75rem;
  font-size: 0.875rem; line-height: 1.45; }
.msg.on { display: flex; }
.msg.s { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 0.25rem; }
.msg.b { align-self: flex-end; background: var(--fg); color: #fff; border-bottom-right-radius: 0.25rem; }
.msg .from { font: 0.6875rem var(--mono); text-transform: uppercase; letter-spacing: 0.03em; color: var(--dim); }
.msg.b .from { color: rgba(255, 255, 255, 0.6); }
.msg code { padding: 0 0.25rem; border-radius: 3px; background: var(--line-soft); font: 0.92em var(--mono); }
.msg.b code { background: rgba(255, 255, 255, 0.16); }
.sheets { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.sheets span { padding: 0.125rem 0.5rem; border: 1px solid var(--line); border-radius: 999px; font: 0.75rem var(--mono); }
.msg.b .sheets span { border-color: rgba(255, 255, 255, 0.3); }
.sheets em { padding: 0.125rem 0.5rem; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); font: normal 0.75rem var(--sans); }
.typing { display: none; align-self: flex-start; gap: 0.25rem; padding: 0.75rem 0.875rem; border-radius: 0.75rem;
  border: 1px solid var(--line); background: var(--card); }
.typing.on { display: flex; }
.typing i { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--faint); }
.nego-result { padding: 0.875rem 1.25rem 1rem; border-top: 1px solid var(--line); display: flex; flex-direction: column;
  gap: 0.625rem; }
.nego-result:not(.on) { display: none; }
.nego-result .scale { padding-bottom: 1.25rem; }
.nego-deal { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.nego-deal b { display: block; font-size: 1.0625rem; font-weight: 500; }
.nego-score { text-align: right; }
.nego-score b { font-size: 2.5rem; font-weight: 300; line-height: 1; letter-spacing: -0.03em; }
@media (prefers-reduced-motion: no-preference) {
  .msg.on, .typing.on, .nego-result.on { animation: msg-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .typing i { animation: blink 1s infinite; }
  .typing i:nth-child(2) { animation-delay: 0.15s; }
  .typing i:nth-child(3) { animation-delay: 0.3s; }
}
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0.3; } }

/* /live: the hacks strip */
.tips { padding: 18px 20px; display: grid; grid-template-columns: max-content repeat(4, minmax(0, 1fr)); gap: 12px 24px;
  align-items: start; border-radius: 10px; color: #fff; background: var(--fg); }
.tips h2 { font-size: 18px; font-weight: 400; letter-spacing: -0.01em; }
.tips h2 a { display: block; margin-top: 4px; font: 400 12px var(--mono); text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.tips p { font-size: 14px; color: rgba(255, 255, 255, 0.8); }
.tips b { color: #fff; font-weight: 500; }
.tips code { padding: 0 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); font: 12px var(--mono); color: #fff; }

@media (max-width: 1000px) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-grid > .nego { position: static; order: -1; }
  .tips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tips h2 { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .faq { padding: 28px 16px 48px; gap: 24px; }
  .qa summary h2 { font-size: 18px; }
  .qa .short { font-size: 17px; }
  .parts th { width: auto; }
  .phases, .tips, .loops ol { grid-template-columns: minmax(0, 1fr); }
  .formula { font-size: 20px; }
  .frac { font-size: 15px; }
  .scale .deal-at { display: none; }
  .loops { padding: 24px 20px; }
  .nego-thread { height: 24rem; }
}

/* /live?tv=1: the big screen - one 16:9 page, no scrolling, every size in rem from the screen's width */
html.tv { font-size: clamp(11px, 0.84vw, 34px); }
html.tv body { height: 100vh; overflow: hidden; font-size: 1rem; }
.tv-grid { height: 100vh; padding: 1.25rem 1.5rem; display: grid; gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr); grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "top top top" "bots bots now" "teams feed now" "news news news"; }
.tv-grid > * { min-height: 0; }
.tv .eyebrow { font-size: 0.6875rem; }
.tv h2.tv-h { display: flex; align-items: baseline; gap: 0.625rem; margin-bottom: 0.625rem; font-size: 1.125rem; font-weight: 500; }
.tv h2.tv-h span { font: 400 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.03em; color: var(--dim); }
.tv-top { grid-area: top; display: flex; align-items: center; gap: 2.5rem; padding-bottom: 0.875rem; border-bottom: 1px solid var(--line); }
.tv-brand { display: flex; align-items: center; gap: 0.875rem; }
.tv-brand img { width: 5.5rem; height: auto; }
.tv-brand > span { padding-left: 0.875rem; border-left: 1px solid var(--line); font-size: 1.25rem; font-weight: 500; }
.tv-brand .chip { font-size: 0.75rem; }
.tv-kpis { display: flex; gap: 2.25rem; margin-left: auto; }
.tv-kpis div, .tv-clock { display: flex; flex-direction: column; gap: 0.125rem; }
.tv-kpis b, .tv-clock b { font-size: 2rem; font-weight: 300; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tv-kpis span { font: 0.6875rem var(--mono); text-transform: uppercase; letter-spacing: 0.03em; color: var(--dim); }
.tv-clock { padding-left: 2.25rem; border-left: 1px solid var(--line); }
.tv-clock b { font-family: var(--mono); font-size: 1.75rem; }
.tv-bots { grid-area: bots; }
.tv-bots > div { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.625rem; }
.tv-bot { padding: 0.75rem 0.875rem; display: flex; flex-direction: column; gap: 0.375rem; }
.tv-bot .top { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.75rem; }
.tv-bot .top b { font: 500 0.75rem var(--mono); }
.tv-bot .t { font-size: 0.875rem; line-height: 1.3; height: 2.6em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; }
.tv-bot .sup { font-size: 0.75rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-bot .best { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-top: 0.125rem; }
.tv-bot .best b { font-size: 2rem; font-weight: 300; line-height: 1; letter-spacing: -0.02em; }
.tv-bot .best span { font-size: 0.8125rem; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar { position: relative; height: 0.3125rem; border-radius: 999px; background: var(--line-soft); }
.hbar span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--fg); }
.hbar span.beat { background: var(--accent); }
.hbar i { position: absolute; top: -0.25rem; width: 2px; height: 0.8125rem; background: var(--accent); }
.tv-bot .ft { display: flex; justify-content: space-between; font: 0.6875rem var(--mono); color: var(--dim); }
.tv-teams { grid-area: teams; display: flex; flex-direction: column; }
.tv-teams table { width: 100%; font-size: 0.9375rem; border-collapse: collapse; }
.tv-teams th { padding: 0 0.5rem 0.375rem 0; font: 400 0.6875rem var(--mono); text-transform: uppercase; color: var(--dim);
  text-align: left; border-bottom: 1px solid var(--fg); background: none; }
.tv-teams td { padding: 0.4375rem 0.5rem 0.4375rem 0; border-bottom: 1px solid var(--line); }
.tv-teams td.num, .tv-teams th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tv-teams .rows { flex: 1; min-height: 0; overflow: hidden; -webkit-mask-image: linear-gradient(#000 82%, transparent);
  mask-image: linear-gradient(#000 82%, transparent); }
.tv-feed { grid-area: feed; display: flex; flex-direction: column; }
.tv-feed ol { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column;
  -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.tv-feed li { display: flex; gap: 0.625rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.tv-feed li .tag { width: 4.25rem; font-size: 0.6875rem; }
.tv-feed li small { display: block; color: var(--faint); font-size: 0.6875rem; }

/* "Today in numbers" (OP24): a strip on /live; on the big screen it sits under "Live now" */
.tag.supplier_first { background: var(--ok-bg); color: var(--ok-ink); }
.tag.jump { background: var(--warn-bg); color: var(--warn-ink); }
.today { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.today-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 12px; }
.today-grid > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 0 16px;
  border-left: 1px solid var(--line-soft); }
.today-grid > div:first-child { padding-left: 0; border-left: 0; }
.today-grid b { font-size: 32px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .today-grid { grid-template-columns: minmax(0, 1fr); }
  .today-grid > div { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line-soft); }
  .today-grid > div:first-child { padding-top: 0; border-top: 0; }
}
.tv-bot .now { display: inline-flex; align-items: center; gap: 0.375rem; font-weight: 500; white-space: nowrap; }
.tv-bot .now .dot { width: 0.4375rem; height: 0.4375rem; }

/* Big screen "Live now" (OP26): running practice negotiations and fresh deals, today's numbers below */
.tv-now { grid-area: now; display: flex; flex-direction: column; padding: 1.125rem 1.25rem 1rem; }
.tv-now > h2.tv-h { font-size: 1.375rem; }
.tv-now h2 .dot { align-self: center; }
.tv-now ol { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; overflow: hidden; display: flex;
  flex-direction: column; -webkit-mask-image: linear-gradient(#000 88%, transparent); mask-image: linear-gradient(#000 88%, transparent); }
.tv-now ol:empty { display: none; }
.tv-now li { display: grid; grid-template-columns: minmax(0, 1fr) auto 3.75rem; align-items: baseline; gap: 1rem;
  padding: 0.6875rem 0.75rem; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
.tv-now .now-pair { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.tv-now .now-pair b { font-weight: 600; color: var(--fg); }
.tv-now .rd { font: 0.8125rem var(--mono); color: var(--dim); }
.tv-now .clk { font: 500 1.0625rem var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.tv-now li.now-deal { grid-template-columns: minmax(0, 1fr); row-gap: 0.125rem; margin: 0.25rem 0; border: 0;
  border-radius: 8px; background: var(--ok-bg); box-shadow: inset 3px 0 var(--ok); }
.tv-now .res { font-size: 1.25rem; font-weight: 600; color: var(--ok-ink); white-space: nowrap; }
.tv-quiet { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: var(--dim); }
.tv-quiet[hidden] { display: none; }
.tv-today { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.875rem 1.25rem; margin-top: 0.75rem;
  padding-top: 0.875rem; border-top: 1px solid var(--line); }
.tv-today h2.tv-h { grid-column: 1 / -1; margin: 0; }
.tv-today div { min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.tv-today b { font-size: 1.75rem; font-weight: 300; line-height: 1.15; letter-spacing: -0.02em; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.tv-today small { font-size: 0.8125rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: no-preference) {
  .tv-now li.in { animation: now-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .tv-now li.out { animation: now-out 0.4s ease-in forwards; }
}
@keyframes now-in { from { opacity: 0; transform: translateY(-0.5rem); } }
@keyframes now-out { to { opacity: 0; } }

/* /live (OP25): who is ahead and what just happened first, the suppliers hardest first, the hacks last.
   Scoped to .live-page: /results shares the .live class. */
.live-page { gap: 24px; }
.live-page .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.live-main { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.live-page .section-title { row-gap: 2px; }
.standings .section-title { padding: 16px 16px 10px; }
.standings table { font-size: 15px; }
.standings th { font-size: 12px; }
.standings td { padding-top: 9px; padding-bottom: 9px; }
.standings th.num, .standings td.num { text-align: right; font-variant-numeric: tabular-nums; }
.standings td.num { white-space: nowrap; }
.standings td.mean { font-size: 17px; color: var(--fg); }
.standings tr.top td:first-child { box-shadow: inset 3px 0 var(--accent); }
.standings tr.top td:first-child, .standings tr.top .name, .standings tr.top td.mean { font-weight: 600; }
.standings th.used { width: 190px; padding-left: 24px; }
.standings td.used { padding-left: 24px; }
.standings .used-m { display: none; }
.standings .waiting { padding: 12px 16px 0; border-top: 1px solid var(--line); }
.standings .waiting b { font-weight: 500; color: var(--ink); }
.highlights { display: flex; flex-direction: column; gap: 6px; }
.live-page .feed > div { font-size: 14px; line-height: 1.45; }
.live-page .feed .title { gap: 2px; min-width: 0; }
.live-page .feed:not(.all) > div:nth-child(n + 9) { display: none; }
.highlights #feed-more { align-self: flex-start; }
.live-page .bots { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.live-page .bot { gap: 10px; }
.live-page .bot-foot { padding-top: 0; border-top: 0; }
.live-page .bot-title { padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 15px; line-height: 1.35; }
.bot-score { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bot-score > .small { text-align: right; overflow-wrap: anywhere; }
@media (max-width: 1000px) { .live-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .live-page { gap: 20px; }
  .live-page .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .live-page .kpi { padding: 12px; }
  .live-page .kpi-value { font-size: 26px; }
  .live-page .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .live-page .today-grid > div { padding: 0 0 0 12px; border-top: 0; border-left: 1px solid var(--line-soft); }
  .live-page .today-grid > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .live-page .today-grid b { font-size: 24px; white-space: normal; }
  .standings table { font-size: 14px; }
  .standings th { white-space: normal; vertical-align: bottom; }
  .standings th, .standings td { padding-left: 6px; padding-right: 6px; }
  .standings :is(th, td):first-child { padding-left: 12px; }
  .standings :is(th, td):nth-child(4) { padding-right: 16px; }
  .standings td.num { font-size: 13px; }
  .standings td.mean { font-size: 16px; }
  .standings .name { overflow-wrap: anywhere; }
  .standings .used, .standings .rec { display: none; }
  .standings .used-m { display: block; }
}

/* Big screen celebrations (OP27): the sound chip and a full-screen callout above everything */
.tv .tv-snd { height: auto; font: 400 0.75rem var(--sans); text-transform: none; letter-spacing: 0; }
.tv .tv-snd[hidden], .tv .cele[hidden] { display: none; }
.tv .cele { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(0, 0, 0, 0.93);
  opacity: 0; transition: opacity 1s ease; pointer-events: none; }
.tv .cele.on { opacity: 1; transition-duration: 0.3s; }
.tv .cele canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tv .cele-in { position: relative; max-width: 90vw; display: flex; flex-direction: column; align-items: center; gap: 2.5rem;
  text-align: center; }
.tv .cele-in b { font-size: 9.5rem; font-weight: 700; line-height: 0.95; letter-spacing: -0.04em; text-transform: uppercase;
  color: var(--accent); }
.tv .cele-in span { font-size: 3rem; font-weight: 400; line-height: 1.2; color: #fff; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) {
  .tv .cele.on .cele-in { animation: cele-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
}
@keyframes cele-pop { from { opacity: 0; transform: scale(0.4); } }
.tv .cele-mini { position: fixed; top: 24px; left: 50%; z-index: 999; display: flex; align-items: baseline; gap: 1.25rem;
  max-width: 86vw; padding: 1.1rem 1.75rem; background: #111; color: #fff; border-left: 10px solid var(--accent);
  border-radius: 6px; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35); transform: translate(-50%, -160%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); pointer-events: none; }
.tv .cele-mini[hidden] { display: none; }
.tv .cele-mini.on { transform: translate(-50%, 0); }
.tv .cele-mini b { flex: none; font-size: 1.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em; color: var(--accent); }
.tv .cele-mini span { font-size: 1.6rem; line-height: 1.25; }
@media (prefers-reduced-motion: reduce) { .tv .cele-mini { transition: none; } }

/* /live: the overnight note */
.live-page .night { padding: 18px 20px; border-left: 6px solid var(--accent); }
.live-page .night[hidden] { display: none; }
.live-page .night h2 { margin: 0 0 6px; font-size: 18px; }
.live-page .night p { margin: 0 0 8px; }
.live-page .night ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.live-page .night code { overflow-wrap: anywhere; }

/* Big screen: the news strip at the bottom, one line, teletext style */
.tv-grid:has(.tv-news:not([hidden])) { padding-bottom: 0.5rem; }
.tv .tv-news { grid-area: news; display: flex; align-items: stretch; height: 2rem; overflow: hidden; border-radius: 4px;
  background: #111; color: #fff; font-size: 0.9375rem; }
.tv .tv-news[hidden] { display: none; }
.tv .tv-news b { flex: none; display: flex; align-items: center; padding: 0 0.875rem; background: var(--accent); color: #111;
  font: 600 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.04em; }
.tv .tv-news span { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 1rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; transition: opacity 0.4s ease, transform 0.4s ease; }
.tv .tv-news span.out { opacity: 0; transform: translateY(60%); }
@media (prefers-reduced-motion: reduce) { .tv .tv-news span { transition: opacity 0.4s ease; } .tv .tv-news span.out { transform: none; } }

/* /live: the final setup card with the QR to /results */
.live-page .finalprep { padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  border-left: 6px solid var(--accent); }
.live-page .finalprep[hidden] { display: none; }
.live-page .finalprep h2 { margin: 0 0 8px; font-size: 18px; }
.live-page .finalprep ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.live-page .finalprep code { overflow-wrap: anywhere; }
.live-page .finalprep-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 13px;
  color: var(--fg); text-decoration: none; }
.live-page .finalprep-qr img { width: 132px; height: 132px; padding: 8px; background: #fff; border-radius: 6px; }
@media (max-width: 720px) { .live-page .finalprep { grid-template-columns: minmax(0, 1fr); } }

/* Big screen: QR to /results in the header */
.tv .tv-qr { display: flex; align-items: center; gap: 0.75rem; padding-left: 2.25rem; border-left: 1px solid var(--line); }
.tv .tv-qr img { width: 4.75rem; height: 4.75rem; padding: 0.25rem; background: #fff; }
.tv .tv-qr span { display: flex; flex-direction: column; gap: 0.125rem; font: 0.6875rem var(--mono); text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--dim); }
.tv .tv-qr b { font: 500 0.9375rem var(--sans); text-transform: none; letter-spacing: 0; color: var(--fg); }

/* /results?tv=1: the Live Final on the big screen - standings left, live negotiations and highlights right */
.tv-grid.fx { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "top top" "board now" "news news"; }
.fx-wave { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; max-width: 26rem; }
.fx-wave b { font-size: 1.625rem; font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.fx-board { grid-area: board; display: flex; flex-direction: column; min-height: 0; }
.fx-head, .fx-board li { display: grid; align-items: center; gap: 0 1rem;
  grid-template-columns: 2rem minmax(0, 1fr) 14.5rem 12rem 4rem 7.5rem; }
.fx-head { padding: 0 0.5rem 0.375rem; border-bottom: 1px solid var(--fg); font: 0.6875rem var(--mono); text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--dim); }
.fx-head .num, .fx-board li .num { text-align: right; }
.fx-w { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); text-align: center; }
.fx-board ol { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column;
  -webkit-mask-image: linear-gradient(#000 90%, transparent); mask-image: linear-gradient(#000 90%, transparent); }
.fx-board li { flex: 1 1 0; min-height: 1.75rem; max-height: 2.6rem; padding: 0 0.5rem; border-bottom: 1px solid var(--line);
  font-size: 1.125rem; transition: background-color 0.4s; }
.fx-board li.lead { background: var(--card); box-shadow: inset 3px 0 var(--accent); }
.fx-board .rk { font: 0.9375rem var(--mono); color: var(--dim); }
.fx-board .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.fx-board li .fx-w span { font: 0.9375rem var(--mono); color: var(--ink); }
.fx-board li .fx-w span.run { color: var(--fg); font-weight: 600; box-shadow: inset 0 -2px var(--accent); }
.fx-board .pt { display: flex; align-items: center; gap: 0.75rem; }
.fx-board .pt i { flex: 1; height: 0.5rem; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.fx-board .pt s { display: block; height: 100%; border-radius: 999px; background: var(--sep); }
.fx-board li.lead .pt s { background: var(--accent); }
.fx-board .pt b { width: 4.25rem; text-align: right; font: 600 1.25rem var(--mono); font-variant-numeric: tabular-nums; }
.fx-board .eu { font: 0.875rem var(--mono); color: var(--dim); }
.fx-pre { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 1rem; min-height: 0; }
.fx-pre-n { display: flex; align-items: baseline; gap: 0.75rem; }
.fx-pre-n b { font-size: 9rem; font-weight: 300; line-height: 0.9; letter-spacing: -0.04em; color: var(--accent); }
.fx-pre-n span { font-size: 3rem; font-weight: 300; color: var(--dim); }
.fx-pre ul { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem; overflow: hidden; }
.fx-pre li { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); font-size: 0.9375rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-pre li i { flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--line); }
.fx-pre li.on { color: var(--fg); border-color: var(--fg); }
.fx-pre li.on i { background: var(--accent); }
.fx-now { grid-area: now; }
.fx-now li.more { display: block; color: var(--dim); font-size: 0.875rem; }
.fx-hl-h { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.fx-hl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.375rem; max-height: 14rem; overflow: hidden;
  font-size: 0.9375rem; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.fx-hl li { padding: 0.375rem 0; border-bottom: 1px solid var(--line-soft); }

/* Finalists from the event file: a small tag next to the team name (finalist.js) */
.finalist { display: inline-block; margin-left: 0.4em; padding: 0.05em 0.45em; border: 1px solid var(--accent); border-radius: 999px;
  color: var(--accent); font: 600 0.62em/1.4 var(--mono); letter-spacing: 0.04em; vertical-align: 0.15em; text-transform: none; }
