/* Theoros page layer on the taste-skill kit.
   Tokens: the Theoros design system (Bronze & Olive, Jost 500 + Inter); dark default, light by the toggle.
   Everything below the token blocks sits inside a visual (the console, the program monitor, the break
   graphics) or is a recipe's own page CSS (app-frame, close-word). */

:root {
  --p-bg: #14120f; --p-surface: #1f1c18; --p-ink: #f2eee6; --p-muted: #a39a8d;
  --p-accent: #d19b5e; --p-accent-ink: #14120f; --p-action: #d19b5e; --p-action-ink: #14120f;
  --p-inv-bg: #f2eee6; --p-inv-surface: #eae4d9; --p-inv-ink: #14120f; --p-inv-muted: #675e53;
  --p-inv-accent: #8a5a22; --p-inv-accent-ink: #ffffff; --p-inv-action: #8a5a22; --p-inv-action-ink: #ffffff;
  --font-display: "Jost", "Futura", "Century Gothic", sans-serif;
  --font-text: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 500;
  --display-tracking: -0.01em;
  --display-tracking-xl: -0.015em;
  --ly-scale: 0.97;

  /* brand constants for the drawn broadcast graphics: the same in both themes */
  --b-char: #14120f; --b-char-2: #1f1c18; --b-bone: #f2eee6; --b-bronze: #d19b5e; --b-olive: #a3ae72;
  --b-muted: #a39a8d;
}

html[data-theme="light"] {
  --p-bg: #f2eee6; --p-surface: #eae4d9; --p-ink: #14120f; --p-muted: #675e53;
  --p-accent: #8a5a22; --p-accent-ink: #ffffff; --p-action: #8a5a22; --p-action-ink: #ffffff;
  --p-inv-bg: #14120f; --p-inv-surface: #1f1c18; --p-inv-ink: #f2eee6; --p-inv-muted: #a39a8d;
  --p-inv-accent: #d19b5e; --p-inv-accent-ink: #14120f; --p-inv-action: #d19b5e; --p-inv-action-ink: #14120f;
}

html { color-scheme: dark; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
html[data-theme="light"] { color-scheme: light; }

/* the kit darkens .footer--dark by the tone it read at load; the theme toggle changes palettes
   without a reload, so the light theme sets its own footer ground */
html[data-theme="light"] .footer--dark {
  --bg: var(--p-surface); --surface: var(--p-bg); --ink: var(--p-ink); --muted: var(--p-muted);
  --action: var(--p-action); --action-ink: var(--p-action-ink);
  --line: color-mix(in oklab, var(--p-ink) 12%, transparent); --line-strong: color-mix(in oklab, var(--p-ink) 26%, transparent);
  background: var(--bg); color: var(--ink);
}

/* the brand's radius scale: 4px is the largest corner in the system */
html[data-radius] { --r-sm: 2px; --r-md: 4px; --r-lg: 4px; --r-btn: 4px; }

/* ── Nav: the client's logo files and the theme toggle ─────────────────────── */
/* the lockup: the T mark, a hairline, then the wordmark, kept apart so the two Ts never touch */
.th-lockup { display: inline-flex; align-items: center; gap: 14px; }
.nav__logo .th-lockup__mark { height: 26px; width: auto; }
.nav__logo .th-lockup__word { height: 13px; width: auto; }
.th-lockup__rule { width: 1px; height: 22px; background: var(--line-strong, var(--line)); }
/* phone: about 121px wide (the brand's 120px minimum for the horizontal lockup); under 354px the mark alone */
@media (max-width: 639px) { .th-lockup { gap: 8px; } .nav__logo .th-lockup__mark { height: 20px; } .nav__logo .th-lockup__word { height: 9px; } .th-lockup__rule { height: 16px; } }
@media (max-width: 353px) { .nav .th-lockup__rule, .nav .nav__logo .th-lockup__word { display: none; } }
html[data-theme="light"] .on-dark,
html:not([data-theme="light"]) .on-light { display: none; }

.th-theme {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-btn);
  background: transparent; color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.th-theme:hover { border-color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.th-theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.th-theme .th-sun { display: none; }
html:not([data-theme="light"]) .th-theme .th-sun { display: block; }
html:not([data-theme="light"]) .th-theme .th-moon { display: none; }

/* ── Lit ground for the product frames: the brand's surface with one bronze light ── */
.hero__art,
.th-lit {
  background:
    radial-gradient(70% 60% at 16% 10%, color-mix(in oklab, var(--p-accent) 22%, transparent), transparent 70%),
    radial-gradient(60% 55% at 92% 100%, color-mix(in oklab, var(--b-olive) 14%, transparent), transparent 70%),
    var(--p-surface);
}

/* ── The console window (hero main piece) ────────────────────────────────── */
.th-win {
  background: var(--b-char-2); color: var(--b-bone); border: 1px solid #3a352e;
  border-radius: 4px; overflow: hidden; font: 400 13px/1.35 var(--font-text);
  box-shadow: 0 24px 60px -30px rgb(0 0 0 / .6);
}
.th-win__bar { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-bottom: 1px solid #3a352e; color: var(--b-muted); }
.th-win__bar b { color: var(--b-bone); font-weight: 500; }
.th-win__dots { display: inline-flex; gap: 6px; }
.th-win__dots i { width: 9px; height: 9px; border-radius: 50%; background: #3a352e; }
.th-win__body { padding: 14px var(--ly-cut-room, 14px) 14px 14px; display: grid; gap: 14px; }
.th-win__label { font-size: 12px; color: var(--b-muted); display: flex; justify-content: space-between; }

/* the program screen: a stream frame with the overlay on it */
.th-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 2px; background: #000; }
.th-screen > img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* the scoreboard bug */
.th-bug {
  position: absolute; left: 4%; top: 6%; display: flex; align-items: stretch;
  font: 600 clamp(9px, 1.25vw, 13px)/1 var(--font-text); color: var(--b-bone);
  background: rgb(20 18 15 / .92); border-radius: 2px; overflow: hidden; font-variant-numeric: tabular-nums;
}
.th-bug > span { display: flex; align-items: center; gap: .5em; padding: .55em .7em; }
.th-bug b { font: 500 1.25em/1 var(--font-display); letter-spacing: .02em; }
.th-bug .th-bug__home { border-left: 3px solid var(--b-bronze); }
.th-bug .th-bug__clock { background: var(--b-bronze); color: var(--b-char); }
.th-bug .th-bug__per { color: var(--b-muted); font-weight: 500; }

/* lower third (player feature, sponsor) */
.th-lower {
  position: absolute; left: 4%; right: 4%; bottom: 7%; display: flex; align-items: stretch;
  color: var(--b-bone); font: 400 clamp(9px, 1.2vw, 13px)/1.3 var(--font-text);
}
.th-lower__tag { display: flex; align-items: center; padding: .7em .9em; background: var(--b-bronze); color: var(--b-char); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .85em; }
.th-lower__main { flex: 1; padding: .6em 1em; background: rgb(20 18 15 / .92); display: grid; gap: .1em; }
.th-lower__main b { font: 500 1.35em/1.15 var(--font-display); }
.th-lower__main span { color: var(--b-muted); }

/* up-next rows under the screen */
.th-next { display: grid; }
.th-next__row { display: grid; grid-template-columns: minmax(0, 1fr) 44px 74px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #2f2a24; }
.th-next__row:first-child { border-top: 0; }
.th-next__row .num { color: #c4bbaf; font-variant-numeric: tabular-nums; }
.th-chip { justify-self: start; padding: 3px 8px; border-radius: 2px; font-size: 11px; font-weight: 500; background: #2a2620; color: var(--b-muted); }
.th-chip--air { background: color-mix(in oklab, var(--b-olive) 22%, #1f1c18); color: var(--b-olive); }
.th-chip--next { background: color-mix(in oklab, var(--b-bronze) 20%, #1f1c18); color: var(--b-bronze); }
@media (max-width: 639px) {
  .th-next__row { grid-template-columns: minmax(0, 1fr) 74px; }
  .th-next__row > .num { display: none; }
}

/* the result card over the window's lower-left corner */
.hero__art > .ly-piece--note { left: var(--s-6); bottom: var(--s-6); width: 300px; z-index: 2; }
.th-note { background: var(--b-bone); color: var(--b-char); border-radius: 4px; padding: 14px 16px; font: 400 13px/1.35 var(--font-text); box-shadow: 0 18px 40px -20px rgb(0 0 0 / .55); }
.th-note__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.th-note__head h5 { margin: 0; font: 500 15px/1.2 var(--font-display); }
.th-note__line { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid rgb(20 18 15 / .08); color: #3d3830; }
.th-note__line:first-of-type { border-top: 0; }
.th-note__line i { width: 18px; height: 18px; border-radius: 50%; flex: none; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; background: #e9ecdc; color: #5e6b2e; }
.th-note__line b { font-weight: 600; color: var(--b-char); }
.th-note .th-chip--air { background: #e9ecdc; color: #5e6b2e; }
@media (max-width: 1023px) { .hero__art > .ly-piece--note { left: var(--s-4); bottom: var(--s-4); width: 270px; } }

/* ── app-frame (sections-library.md, the whole recipe) ───────────────────── */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}

/* the open pane: the item on air, its program screen and its controls */
.th-open { display: grid; gap: 16px; padding: 20px; color: var(--u-ink, var(--ink)); font: 400 13px/1.4 var(--font-text); }
.th-open__head { display: flex; align-items: center; gap: 12px; }
.th-open__head h4 { margin: 0; font: 500 16px/1.2 var(--font-display); }
.th-open__head small { color: var(--u-muted, var(--muted)); }
.th-open__head .th-chip { margin-left: auto; }
.th-open__ctl { display: flex; gap: 18px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--u-line); font-size: 12px; font-weight: 500; color: var(--u-muted, var(--muted)); }
.th-open__ctl span.is-on { color: var(--u-ink, var(--ink)); box-shadow: inset 0 -2px 0 var(--b-bronze); padding-bottom: 8px; margin-bottom: -10px; }
/* in the open pane the feature card sits high in the picture, so the pane's cut never slices it */
.th-open .th-lower { top: 22%; bottom: auto; right: auto; max-width: 70%; }
.th-open__meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 12px; border-top: 1px solid var(--u-line); }
.th-open__meta dt { color: var(--u-muted, var(--muted)); font-size: 12px; }
.th-open__meta dd { margin: 2px 0 0; font-weight: 500; }

/* ── The halftime graphic (chapter frame) ────────────────────────────────── */
.th-gfx {
  aspect-ratio: 16 / 9; width: 100%; border-radius: 4px; overflow: hidden; position: relative;
  background: var(--b-char);
  border-top: 3px solid var(--b-bronze);
  color: var(--b-bone); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  padding: 5% 6%; gap: 6%; font-family: var(--font-text);
  box-shadow: 0 24px 60px -30px rgb(0 0 0 / .6);
}
.th-gfx__side { display: flex; flex-direction: column; justify-content: space-between; }
.th-gfx__tag { font: 600 clamp(9px, 1vw, 12px)/1 var(--font-text); letter-spacing: .14em; text-transform: uppercase; color: var(--b-bronze); }
.th-gfx__title { margin: .6em 0 0; font: 500 clamp(18px, 2.6vw, 34px)/1.05 var(--font-display); letter-spacing: -0.01em; }
.th-gfx__sub { color: var(--b-muted); font-size: clamp(10px, 1.1vw, 14px); }
.th-gfx__rows { display: grid; align-content: center; }
.th-gfx__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; padding: .8em 0; border-top: 1px solid rgb(242 238 230 / .12); font-size: clamp(10px, 1.15vw, 15px); }
.th-gfx__row:last-child { border-bottom: 1px solid rgb(242 238 230 / .12); }
.th-gfx__row b { font: 500 clamp(16px, 2.2vw, 30px)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.th-gfx__row b em { font-style: normal; color: var(--b-bronze); }
.th-gfx__mark { position: absolute; right: 4%; top: 7%; width: clamp(16px, 2.4vw, 30px); opacity: .9; }

/* chapter: the frame on the lit ground, the graphic inside it; the frame takes what one screen
   leaves under the head and the four names (content 708 at 1440x900) */
#breaks .frame--hero { margin-top: var(--s-7); padding: var(--s-6); }
#breaks .frame--hero:has(> .th-gfx) { aspect-ratio: auto; height: clamp(260px, calc(100svh - 480px), 440px); }
#breaks .th-gfx { height: 100%; width: auto; max-width: 100%; }
@media (max-width: 1023px) { #breaks .frame--hero:has(> .th-gfx) { height: auto; } #breaks .th-gfx { width: 100%; height: auto; } }
@media (max-width: 639px) { #breaks .frame--hero { padding: var(--s-4); } }
.th-names { margin-top: var(--s-6); }
.th-names p { margin: 0; }
.th-names .th-names__t { font: 500 var(--t-card, 20px)/1.3 var(--font-display); margin: 0 0 var(--s-2); }
@media (min-width: 640px) and (max-width: 1023px) { .th-names > .span-3 { grid-column: span 6; } }
@media (max-width: 639px) {
  .th-names { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-5); }
  .th-names > .span-3 { grid-column: auto; }
}

/* split frame: the sponsor slot on a stream */
#sponsors .frame--split { padding: clamp(24px, 4vw, 56px); }
#sponsors .th-screen { width: 100%; box-shadow: 0 24px 60px -30px rgb(0 0 0 / .45); }
@media (max-width: 1023px) { #sponsors .frame--split { --ratio: 0px; } }
@media (max-width: 639px) { #sponsors .frame--split { padding: var(--s-4); } }
/* the rundown on a tablet shows its whole rows only (the pane is 252px tall there) */
@media (max-width: 1023px) { .app .ui-win__row:nth-child(n+5) { display: none; } }
/* phone: the screens hold one section each, so the longest sections drop a line */
@media (max-width: 639px) {
  .th-hide-phone, .footer__lede { display: none; }
  .th-names { margin-top: var(--s-5); row-gap: var(--s-4); }
  #breaks .frame--hero { margin-top: var(--s-5); }
  #questions .faq > .faq__item { padding-block: var(--s-3); }
  /* the footer's link columns repeat the menu: a phone keeps the marks, the legal row and the disclaimer */
  footer.closing .footer__col, footer.closing .closing__links > .grid > .span-4:first-child { display: none; }
  footer .th-backing .th-backing__eit { width: 100%; }
  footer .th-backing .th-backing__eu { width: 140px; }
}
/* a tablet's screens are 1024 to 1180 tall: the FAQ runs full width under its heading, at reading size */
@media (min-width: 640px) and (max-width: 1023px) {
  #questions .grid > * { grid-column: 1 / -1; }
  #questions .faq { margin-top: var(--s-6); }
  #questions .faq__item { padding-block: var(--s-5); }
  #questions .faq__item p { font-size: 18px; line-height: 28px; }
}
/* a tall tablet (820x1180 held upright): one screen holds about 990px, so the sections open up */
@media (min-width: 640px) and (max-width: 1023px) and (min-height: 1100px) {
  .th-names > .span-3 { grid-column: 1 / -1; }
  #breaks .frame--hero { padding: var(--s-7); }
  #questions .faq__item { padding-block: var(--s-6); }
}

/* the sponsors moment: the old ground covers the section edge to edge (no gutter, square), so it reads as
   the section above carrying on until the line climbs through it, with no strip of the new ground round it */
#sponsors.mo-lc { --mo-gap: 0px; }
#sponsors.mo-lc > .mo-lc__stage { border-radius: 0; }

/* EU / 28DIGITAL marks: fixed artwork, a dark-ground and a light-ground file swapped by theme;
   the EU emblem stays larger than the Theoros lockup beside it */
/* the marks are the footer's fourth column: the 28DIGITAL lock-up over the EU emblem */
.th-backing { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
footer.closing .closing__links { gap: var(--s-5); }
.th-backing .th-backing__eit { width: 300px; max-width: 100%; height: auto; }
.th-backing .th-backing__eu { width: 168px; max-width: 60%; height: auto; }
.th-disclaimer { margin: 0; max-width: 92ch; font-size: 13px; line-height: 1.5; color: var(--muted); }
@media (min-width: 640px) and (max-width: 1023px) {
  footer.closing .closing__links > .grid > .th-backing { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: var(--s-5); }
}

