/* STONXTEXT: the public site, styled as the channel's teletext service. Pure teletext colors on black; the logo is pixel
   art, the text a legible sans. */
@font-face {
  font-family: "Press Start 2P";
  src: url("/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/AtkinsonHyperlegibleNext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --black: #000000;
  --white: #ffffff;
  --yellow: #ffff00;
  --cyan: #00ffff;
  --green: #39ff14;   /* the channel's green; gains */
  --red: #ff3b3b;     /* losses */
  --blue: #0000d8;    /* title bands */
  --magenta: #ff40ff; /* the simulation warnings */
  --dim: #9a9ab0;
  --pixel: "Press Start 2P", monospace;
  --text: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--black); }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 17px/1.45 var(--text);
  font-variant-numeric: tabular-nums;
}
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--yellow); }
:focus-visible { outline: 2px dashed var(--cyan); outline-offset: 2px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.screen { max-width: 1040px; margin: 0 auto; padding: 0 16px 96px; }

/* ---------- the header row: page number, service, date, clock ---------- */
.header {
  display: flex; gap: 0 18px; flex-wrap: wrap; align-items: baseline;
  padding: 10px 0 6px; font-size: 16px;
}
.header .pageno { min-width: 4.5ch; color: var(--white); }
.header .pageno.searching { color: var(--yellow); }
.header .service { color: var(--cyan); }
.header .date { margin-left: auto; color: var(--white); }
.header .clock { color: var(--yellow); }

.masthead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 6px 0 14px; }
.logo { font-family: var(--pixel); font-size: 26px; color: var(--green); text-decoration: none; line-height: 1; }
.logo em { font-style: normal; color: var(--white); }
.masthead p { margin: 0; color: var(--dim); }

/* ---------- title bands ---------- */
.band { background: var(--blue); padding: 10px 14px 6px; margin: 0 0 18px; }
.dh {
  margin: 0; font: 700 30px/1.1 var(--text); color: var(--yellow);
}
.band .sub { display: block; color: var(--white); margin-top: 6px; }
h2 { font: 700 19px/1.3 var(--text); color: var(--yellow); margin: 28px 0 8px; }
h2::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; background: var(--cyan); margin-right: 0.5em; }

/* ---------- warnings ---------- */
.sim {
  border: 2px solid var(--magenta); color: var(--magenta); padding: 8px 12px; margin: 0 0 18px;
}
.sim strong { color: var(--white); background: var(--magenta); padding: 0 6px; margin-right: 8px; font-weight: 700; }
.legal { color: var(--dim); font-size: 14px; border-top: 2px solid #333; margin-top: 30px; padding-top: 12px; }
.legal p { margin: 0 0 10px; max-width: 78ch; }
.legal [lang="it"] { color: #7c7c90; }

/* ---------- Live ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border: 2px solid #222; }
.player canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.player iframe { display: block; width: 100%; height: 100%; border: 0; }
.onair { position: absolute; top: 12px; left: 12px; background: var(--red); color: var(--white); padding: 1px 8px; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; }
.preview { color: var(--dim); margin: 8px 0 0; }
/* Watch on Kick, Watch on Twitch: teletext blocks in each platform's nearest color, under the player */
.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; } /* where we're live, in the masthead */
.platforms a { color: var(--black); font-weight: 700; text-decoration: none; padding: 3px 12px; }
.platforms a::after { content: " ↗"; }
.platforms a:hover, .platforms a:focus-visible { background: var(--yellow); color: var(--black); }
.platforms .youtube { background: var(--red); color: var(--white); }
.platforms .kick { background: var(--green); }
.platforms .twitch { background: var(--magenta); }
.vertical { display: none; margin: 10px 0 0; } /* the Shorts player's link, for a phone held upright */
@media (orientation: portrait) and (max-width: 720px) { .vertical { display: block; } }
.vertical a { display: inline-block; background: var(--red); color: var(--white); font-weight: 700; text-decoration: none; padding: 6px 14px; }
.vertical a::after { content: " ↗"; }
.more { margin: 14px 0 0; }
.now { display: grid; gap: 2px; }
.now .show { font-size: 24px; font-weight: 700; }
.schedule { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.schedule li { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; }
.schedule time { color: var(--yellow); white-space: nowrap; }
.schedule.past li { opacity: 0.6; } /* what just played */
.schedule li.on { background: #0c0c28; padding: 4px 0; }
.schedule li.on time { color: var(--white); }
.schedule .title { color: var(--white); }
.premiere { background: var(--yellow); color: var(--black); font-size: 13px; font-weight: 700; padding: 0 6px; margin-left: 4px; text-transform: uppercase; }
.now-break { color: var(--dim); margin: 0; }
.timetable li { grid-template-columns: 9.5em 1fr; border-bottom: 1px solid #1c1c1c; padding: 4px 0; }
.timetable .sep { color: var(--dim); }
.timetable .premiere-row b { font-size: 18px; }
.turns summary { cursor: pointer; color: var(--dim); }
.turns summary:hover { color: var(--white); }
.turns[open] summary { margin-bottom: 4px; }
.vod { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.vod.shorts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.vod a { display: grid; gap: 6px; color: var(--white); text-decoration: none; }
.vod a:hover .title, .vod a:focus-visible .title { color: var(--yellow); text-decoration: underline; }
.vod img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #111; border: 2px solid #222; }
.vod.shorts img { aspect-ratio: 9 / 16; }
.vod .title { font-weight: 700; }
.vod .tag { display: block; margin-top: 2px; font-size: 14px; }
.tag { color: var(--dim); }

/* ---------- Shows ---------- */
.shows { list-style: none; margin: 0; padding: 0; }
.shows > li { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: baseline; border-bottom: 1px solid #222; padding: 8px 0; }
.shows .swatch { width: 14px; height: 14px; align-self: start; margin-top: 8px; } /* by the name */
.shows .name { display: block; font-size: 20px; font-weight: 700; }
.shows .tag { display: block; }
.shows .airs { color: var(--cyan); text-align: right; max-width: 34ch; }

/* ---------- Cast portfolios ---------- */
.board { width: 100%; border-collapse: collapse; }
.board th { text-align: right; color: var(--cyan); font-weight: 600; padding: 4px 8px; border-bottom: 2px solid #333; }
.board td { padding: 6px 8px; border-bottom: 1px solid #1c1c1c; text-align: right; white-space: nowrap; }
.board th:first-child, .board td:first-child, .board .l { text-align: left; }
.board tr.link { cursor: pointer; }
.board tr.link:hover td { background: #0c0c28; }
.board .page { color: var(--yellow); }
.board .who { display: flex; align-items: center; gap: 10px; white-space: normal; text-decoration: none; }
.board .who:hover span { text-decoration: underline; }
.board .who canvas { width: 48px; height: 45px; image-rendering: pixelated; flex: none; }
.board .who small { display: block; color: var(--dim); font-size: 14px; }
.up { color: var(--green); }
.down { color: var(--red); }
.flat { color: var(--white); }
.scroll { overflow-x: auto; }

.profile { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: start; margin-bottom: 8px; }
.profile canvas { width: 160px; height: 150px; image-rendering: pixelated; border: 2px solid #222; }
.profile .role { color: var(--dim); }
.profile .strategy { color: var(--yellow); font-size: 20px; font-weight: 700; margin-top: 6px; }
.quote { color: var(--white); margin: 12px 0 0; padding-left: 14px; border-left: 4px solid var(--cyan); max-width: 60ch; }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 32px; margin: 0; }
.figures div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted #333; padding: 4px 0; }
.figures dt { color: var(--cyan); white-space: nowrap; }
.figures dd { margin: 0; text-align: right; }

.chart { width: 100%; height: 150px; display: block; }
.chart-note { color: var(--dim); }
.rules { margin: 0; padding-left: 1.2em; max-width: 72ch; }
.rules li { margin: 2px 0; }
.rules li::marker { color: var(--cyan); }
.ledger td.note { white-space: normal; text-align: left; color: var(--dim); min-width: 18ch; }
.ledger .act { color: var(--white); text-align: left; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.sources { color: var(--dim); }

.notfound { min-height: 40vh; }

/* ---------- fastext: the four colored keys ---------- */
.fastext {
  position: fixed; left: 0; right: 0; bottom: 0; background: var(--black); border-top: 2px solid #222;
  display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1040px; margin: 0 auto; padding: 8px 16px;
}
.fastext a { text-decoration: none; font-size: 16px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.fastext a::before { content: ""; width: 14px; height: 14px; background: currentColor; flex: none; }
.fastext a[aria-current="page"] span { text-decoration: underline; text-underline-offset: 4px; }
.fastext .k-red { color: var(--red); }
.fastext .k-green { color: var(--green); }
.fastext .k-yellow { color: var(--yellow); }
.fastext .k-cyan { color: var(--cyan); }
.fastext .short { display: none; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .header { font-size: 14px; }
  .header .date { margin-left: 0; }
  .logo { font-size: 18px; }
  .dh { font-size: 24px; }
  .profile { grid-template-columns: 96px 1fr; gap: 14px; }
  .profile canvas { width: 96px; height: 90px; }
  .board .hide-sm { display: none; }
  .board .who canvas { width: 32px; height: 30px; }
  .shows > li { grid-template-columns: 12px 1fr; row-gap: 4px; }
  .shows .swatch { width: 12px; height: 12px; }
  .shows .airs { grid-column: 2; text-align: left; max-width: none; }
  .fastext { padding: 8px; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 8px; }
  .fastext a { font-size: 14px; gap: 5px; }
  .fastext a::before { width: 10px; height: 10px; }
  .fastext .long { display: none; }
  .fastext .short { display: inline; }
}

/* ---------- the legal pages (privacy.html, terms.html) and the site's links to them ---------- */
.legalpage { max-width: 78ch; padding-bottom: 48px; }
.legalpage p, .legalpage li { line-height: 1.55; }
.legalpage ul { padding-left: 1.2em; }
.legal-nav { margin-top: 32px; color: var(--dim); }
.sitefoot { color: var(--dim); font-size: 14px; margin: 36px 0 0; }
