/* ==========================================================================
   Rojadirecta — design layer
   --------------------------------------------------------------------------
   Visual reproduction of the rojadirecta.eu layout (snapshot 2026-03-12).
   Every number in here was measured off the original, not guessed: see
   JAK-DELAT-LEGAL-STREAM-WEB.md §3 and tools/measure.js.

   The original is a 2007-era table layout. This file reproduces the exact
   same box model using modern CSS (flex/grid + numbered design tokens), so
   the rendering is 1:1 while the code shares nothing with the original.

   Structure:
     1. Tokens
     2. Reset
     3. Shell (window, header, top nav, footer)
     4. Content grid
     5. Broadcast list
     6. Stream table
     7. Side boxes
     8. Article pages (subpages do not exist upstream)
     9. Responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Surfaces */
  --c-page:      #efefef;  /* body background            */
  --c-window:    #ffffff;  /* the centred window         */
  --c-window-bd: #333333;  /* its left/right hairline    */
  --c-red:       #d20808;  /* headers, accents           */
  --c-bar:       #cfcfcf;  /* top nav + footer strip     */
  --c-head:      #e7e8ed;  /* broadcast rows, light rows */
  --c-head-alt:  #d5d8e0;  /* even rows, box body        */
  --c-even:      #eddedc;  /* stream table even rows     */

  /* Text */
  --c-text:      #333333;
  --c-text-nav:  #555555;
  --c-text-dim:  #666666;
  --c-black:     #000000;
  --c-white:     #ffffff;

  /* Typography */
  --f-body:  Verdana, Arial, sans-serif;
  --f-ui:    Arial, Helvetica, sans-serif;
  --f-plain: sans-serif;

  /* Shell metrics */
  --w-window:    775px;
  --h-header:    100px;
  --h-subtitle:  25px;
  --h-footer-min: 48px;

  /* Content grid — the original is two fixed columns in a 773px cell */
  --w-content: 773px;
  --w-main:    421px;
  --w-side:    326px;
  --w-gutter:  13px;

  /* Broadcast list */
  --w-agenda:      415px;
  --h-agenda:      400px;
  --w-agenda-row:  398px;   /* 394 content + 1px padding + 1px border */
  --h-agenda-row:  14px;    /* content height; +4px chrome = 18px     */
  --h-agenda-step: 18px;    /* measured pitch between rows            */

  /* Stream table */
  --w-streams:     399px;

  /* Side boxes */
  --h-box-head: 19px;
  --h-box-a:    119px;
  --h-box-b:    138px;      /* 119 body + 19 head                     */
  --h-box-row:  15px;
  --gap-boxes:  19px;       /* the <br> between the two boxes         */
  --gap-side:   30px;       /* left column -> right column            */

  /* Interactive */
  --c-hover:   #d20808;
  --dur-fast:  90ms;
}

/* --------------------------------------------------------------------------
   2. Reset
   --------------------------------------------------------------------------
   Deliberately minimal. The original has no reset at all, which is why its
   base font size is the browser default 16px — matching that matters.
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { width: 100%; }

body {
  margin: 0;
  width: 100%;
  background: var(--c-page);
  color: var(--c-text);
  font: 16px/1.35 var(--f-body);
  text-align: center;            /* centres the window, as upstream */
  -webkit-text-size-adjust: 100%;
}

img { border: 0; max-width: 100%; }

a { text-decoration: none; }

a:link,
a:visited,
a:active { color: var(--c-text-nav); }

a:hover { color: var(--c-hover); }

/* Visible only to screen readers; used for headings the design has no room for */
.u-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.u-hidden { display: none !important; }

/* --------------------------------------------------------------------------
   3. Shell
   -------------------------------------------------------------------------- */

.window {
  width: var(--w-window);
  margin: 0 auto;
  padding-bottom: 3px;
  background: var(--c-window);
  border-left: 1px solid var(--c-window-bd);
  border-right: 1px solid var(--c-window-bd);
  text-align: center;
}

/* -- Header ---------------------------------------------------------------- */

.masthead {
  position: relative;
  height: var(--h-header);
  background: var(--c-red);
}

/* The logo is 129x129 and deliberately overflows the 100px band. Measured off
   the original: the image sits at y = -4.5px, i.e. it hangs 24.5px below the
   band. (Upstream reaches the same place via a negative-offset wrapper.) */
.masthead__logo {
  position: absolute;
  left: 0;
  top: -4.5px;
  width: 129px;
  height: 129px;
  z-index: 3;
  display: block;
}

.masthead__logo img {
  display: block;
  width: 129px;
  height: 129px;
}

/* Wordmark, 550x70, measured at y = 14.5px */
.masthead__wordmark {
  position: absolute;
  left: 159px;
  top: 14.5px;
  width: 550px;
  height: 70px;
  z-index: 2;
  background: url("../img/brand-wordmark.gif") no-repeat 0 0;
}

/* -- Top navigation -------------------------------------------------------- */

.topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: var(--h-subtitle);
  background: var(--c-bar);
  color: var(--c-text-nav);
  font: 11px var(--f-plain);
}

.topnav__link { color: var(--c-text-nav); }

.topnav__sep {
  margin: 0 3px;
  color: var(--c-text-nav);
}

/* Language dropdown. Upstream keeps the box transparent over the grey strip,
   and its 7px right margin is what sets the strip's right inset (there is no
   container padding), so the box ends flush 7px from the window edge. */
.topnav__lang {
  position: relative;
  display: inline-block;
  margin: 0 7px 0 4px;
  padding: 0 10px;
  border: 1px solid var(--c-red);
  font: 700 11px var(--f-plain);
  color: var(--c-text-nav);
  cursor: pointer;
}

.topnav__lang-current {
  color: var(--c-text-nav);
  cursor: pointer;
}

.topnav__lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: -1px;
  z-index: 30;
  min-width: 150px;
  padding: 8px;
  background: var(--c-bar);
  border: 1px solid var(--c-red);
  font: 400 12px var(--f-plain);
  text-align: right;
  white-space: nowrap;
}

.topnav__lang:hover .topnav__lang-menu,
.topnav__lang:focus-within .topnav__lang-menu { display: block; }

.topnav__lang-menu a {
  display: block;
  color: var(--c-text-nav);
}

.topnav__lang-menu a b { font-weight: 700; }

/* -- Footer ---------------------------------------------------------------- */

/* The original's footer row is inset 3px by its outer table's cell padding, so
   the grey band is 767px wide rather than spanning the full window. */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* min-height, not height. The footer used to be a fixed 48px with
     `overflow: hidden`, which was fine while it held two lines. Adding the
     contact address made it three, and the address was silently clipped on
     desktop while looking correct on mobile (where the responsive block
     already set `height: auto`). Measured: the link's bottom sat 7px below the
     footer's. A fixed height plus overflow hidden hides exactly this class of
     mistake, so the height is now a floor. */
  min-height: var(--h-footer-min);
  margin: 0 3px;
  overflow: hidden;
  background: var(--c-bar);
  color: var(--c-text-nav);
  font: 12px/15px var(--f-plain);
}

.footer__links { line-height: 15px; }

.footer__sep { margin: 0 4px; }

.footer__cc { display: block; line-height: 0; }

.footer__cc a { display: inline-block; }

.footer__cc img {
  display: block;
  width: 88px;
  height: 31px;
  border: 0;
}

/* --------------------------------------------------------------------------
   4. Content grid
   --------------------------------------------------------------------------
   Upstream nests the two columns inside a 766px table cell that is itself
   inset 6.45px, which puts the red bar's border box at x=260 and the side
   box at x=694. We reproduce that exact geometry with one explicit grid
   template instead of nested tables.
   -------------------------------------------------------------------------- */

.content {
  display: grid;
  grid-template-columns: var(--w-main) var(--w-side);
  column-gap: var(--w-gutter);
  /* Geometry read off the original: the content table's border box sits at
     x=257 (3.5px in from the window's inner edge) and y=128, it is 766.1px
     wide, and the red bar's border box starts 3px inside that at x=260. Width
     is stated directly because the original is a fixed layout; the grid columns
     add up to less, exactly as upstream. */
  width: 766.1px;
  margin: 6px 0 0 3.5px;
  padding: 0 0 0 3px;
  text-align: left;
}

/* Only the schedule page has a fixed height.
   Upstream's content cell is exactly 503px because it holds the 406px event
   list plus the bar and the "load more" button. Article and hub pages put
   flowing text in the same grid, and a fixed height would clip them: the text
   ran past the window's bottom border. So the height is opt-in per page type,
   and the window grows with the copy everywhere else. */
.content--schedule { height: 511px; }

/* --------------------------------------------------------------------------
   5. Broadcast list
   -------------------------------------------------------------------------- */

.broadcasts__bar {
  /* 62px fit a one-line heading. The reframed heading ("Free sport on Internet
     TV" and its fifteen translations) runs to two lines in Spanish, German,
     Arabic and Hindi, which overflows 62px by 8px — measured in a real browser
     across all fifteen languages. Raised to 70px so the longest language fits;
     the rest keep their one line and the extra 8px is invisible. */
  height: 70px;
  padding: 2px;
  background: var(--c-red);
  border: 1px outset var(--c-red);
  color: var(--c-white);
  font: 14px var(--f-ui);
}

.broadcasts__bar-inner {
  display: flex;
  align-items: flex-start;
  height: 100%;
}

.broadcasts__bar-title {
  flex: 1 1 auto;
  padding-top: 3px;
}

.broadcasts__bar-title b { font-weight: 700; }

/* 226px controls cell, as upstream. Upstream places this cell with
   vertical-align:top and its content begins 10px below the bar's top edge
   (1px border + 2px padding + 7px), which the padding-top reproduces. */
.broadcasts__bar-tools {
  flex: 0 0 226px;
  width: 226px;
  align-self: flex-start;
  padding-top: 7px;
  font: 700 10px var(--f-ui);
  line-height: 1;
}

.broadcasts__tz { color: var(--c-white); cursor: pointer; }

/* Live clock, sitting inline after the AM/PM radios exactly as upstream's
   #tP span does. Tabular figures stop the header from jittering as the
   seconds tick. */
.broadcasts__clock {
  margin-left: 3px;
  color: var(--c-white);
  font-variant-numeric: tabular-nums;
}

.broadcasts__formats { font-weight: 400; }

.broadcasts__formats label { cursor: pointer; }

.broadcasts__formats input { margin: 0 1px 0 3px; vertical-align: middle; }

/* Upstream separates the timezone/format line from the search box with a <br>
   inside an inline span; measured, the search box sits 28px below the first
   line's top edge. */
.broadcasts__search {
  margin-top: 15px;
  /* A row, not two inline-blocks that happen to fit. Upstream lays the field
     and the button side by side in a 226px cell, which works only for its own
     two labels ("Buscar", "Search"). The button is translated — it should be,
     upstream translates it too — and a longer one ("Rechercher", "Pesquisar")
     no longer fits beside a 148px field, so it wrapped onto a second line and
     the form grew from 21px to 42px. That pushed it 18px past the red bar and
     over the first row of the event list, which is why the search box sat on
     top of the schedule in those languages.
     Flex keeps the two on one line and lets the FIELD give up the width
     instead, so the row stays 21px tall and inside the bar. The mobile block
     below already does exactly this; the desktop rule simply never had to. */
  display: flex;
  align-items: center;
  gap: 3px;
}

/* The original declares width:140px under content-box sizing, so the border
   box is 148px. Stated explicitly, since the global reset makes everything
   else border-box. It is a PREFERRED width: the field shrinks when a longer
   button label needs the room, rather than pushing the button onto a new
   line. */
.broadcasts__search input[type="text"] {
  box-sizing: content-box;
  flex: 0 1 auto;
  width: 140px;
  min-width: 0;
  padding: 1px 2px;
  border: 2px inset #767676;
  background: var(--c-white);
  color: var(--c-black);
  font: 13.3333px Arial;
  vertical-align: middle;
}

.broadcasts__search button {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 1px 6px;
  font: 13.3333px Arial;
  vertical-align: middle;
}

/* Scrollable event list.
   Semantic <ol> for the schedule; the marker and the UA margins are removed so
   the geometry matches the original's plain-div list exactly.

   Width and height are BORDER boxes here, matching the original's measured
   421x406 (upstream sizes the content at 415x400 and adds 2px padding plus a
   1px border on each side). The global border-box reset means we state the
   outer figure directly. */
.broadcasts__list {
  width: 421px;
  height: 406px;
  margin: 0;
  padding: 2px;
  list-style: none;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  border: 1px outset var(--c-head-alt);
}

/* One event */
.event { display: block; }

.event__toggle {
  display: block;
  width: var(--w-agenda-row);
  padding: 1px;
  background: var(--c-head);
  color: var(--c-black);
  border: 1px outset var(--c-head-alt);
  font: 12px var(--f-ui);
  text-align: left;
  cursor: pointer;
}

.event__toggle:hover { background: var(--c-head-alt); }

/* The event is a button for keyboard/AT, but must read as plain text */
.event__toggle {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.event__time { color: var(--c-black); }

.event__name { font-weight: 700; }

/* Collapsed by default, exactly like upstream .submenu */
.event__panel { display: none; margin-bottom: 5.5px; }

.event.is-open > .event__panel { display: block; }

.event__panel-foot {
  width: var(--w-agenda-row);
  text-align: right;
  font: 12px var(--f-ui);
}

/* Result count for the schedule filter. Positioned above the list without
   affecting the bar's measured height (the bar's 56px content box is fixed,
   so this sits inside it the way upstream's layout allows). */
.broadcasts__search-note {
  margin: 4px 0 0;
  color: var(--c-white);
  font: 400 10px var(--f-ui);
}

/* Hidden rows are removed from layout but stay in the DOM, so the list keeps
   its height and the events are still there for a crawler. */
.event[hidden] { display: none; }

/* "Load more events" — upstream's .proxemi. Its content box is 23px (a 12px
   bold Arial line inside 2px padding), plus a 1px outset border each side,
   giving the measured 421x29 border box. */
.broadcasts__more {
  display: block;
  width: 421px;
  height: 29px;
  padding: 2px;
  background: var(--c-head);
  border: 1px outset var(--c-head-alt);
  color: var(--c-black);
  font: 700 12px var(--f-ui);
  text-align: center;
  cursor: pointer;
}

/* Client-side paging, mirroring upstream's "load more". Only applied once
   JavaScript runs, so a crawler that does not execute JS still sees every
   event in the list. */
.broadcasts__list.is-paged .event[data-page="2"] { display: none; }

/* The original reserves the space its sub-footer used to occupy. */
.u-footer-spacer { height: 7px; }

/* --------------------------------------------------------------------------
   6. Stream table
   --------------------------------------------------------------------------
   State matters here. Measured against the archived page, the DEFAULT render is
   completely plain: white cells, black text, a header row indistinguishable
   from the body, and 1px gaps from the original's cellspacing="1". The red
   header, the sort glyph and the #EDDEDC striping all live in the original CSS
   but are applied by its sorter only once a panel is opened, so they are
   interaction states rather than the resting appearance.

   We reproduce both: plain at rest, and the sorter's look once the table is
   live. The cells are <th> for accessibility; at rest they are reset to look
   exactly like the plain <td> row the original shipped.
   -------------------------------------------------------------------------- */

.streams {
  width: var(--w-streams);
  border-collapse: separate;
  border-spacing: 1px;        /* the original's cellspacing="1" */
  font: 11px Verdana, Arial;
  text-align: left;
}

.streams th,
.streams td {
  padding: 0;                 /* the original's cellpadding is reset by CSS */
  background: var(--c-window);
  border: 0;
}

.streams th {
  color: var(--c-text);
  font-weight: 400;
  text-align: left;
}

/* Header cell content box, so the sort glyph has somewhere to sit */
.streams th > span { display: block; }

/* -- Live sorter state (added by js/rojadirecta.js when a panel opens) ----------- */

.streams.is-live th {
  background: var(--c-red) url("../img/sort-neutral.gif") 6px center no-repeat;
  color: var(--c-white);
  cursor: pointer;
}

.streams.is-live th > span { padding-left: 18px; }

.streams.is-live th:hover { color: var(--c-white); }

.streams.is-live th[aria-sort="descending"],
.streams.is-live th[aria-sort="ascending"] {
  background-color: var(--c-even);
  color: var(--c-black);
}

.streams.is-live th[aria-sort="descending"] {
  background-image: url("../img/sort-desc.gif");
}

.streams.is-live th[aria-sort="ascending"] {
  background-image: url("../img/sort-asc.gif");
}

/* Striping only exists once the sorter has run, as upstream */
.streams.is-live tbody tr:nth-child(even) td { background: var(--c-even); }

.streams__play { font-weight: 700; }

/* --------------------------------------------------------------------------
   7. Side boxes
   -------------------------------------------------------------------------- */

.side { display: flex; flex-direction: column; }

.box { width: var(--w-side); }

.box + .box { margin-top: var(--gap-boxes); }

.box__head {
  margin: 0;
  height: var(--h-box-head);
  padding-left: 2px;
  background: var(--c-red);
  font: 400 12px var(--f-ui);
  color: var(--c-white);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

.box__head a,
.box__head a:link,
.box__head a:visited,
.box__head a:active {
  color: var(--c-white);
  text-decoration: none;
}

.box__head a:hover { text-decoration: underline; }

.box--matches .box__body { background: var(--c-head-alt); }
.box--highlights .box__body { background: var(--c-head); height: auto; }

.box__body {
  height: var(--h-box-a);
  /* The sports box grows; the matches box keeps its height.
     
     The original held seven rows in a fixed 119px box, which was correct while
     the box listed seven sports. It now lists sixteen, and a fixed height
     cannot show them: `overflow: hidden` cut nine off silently, and switching
     to `auto` merely hid them behind a scrollbar that desktop browsers do not
     paint until you hover — so the reader still could not see that athletics
     or golf had a page. Measured: 16 rows in the DOM, 7 visible, scrollHeight
     272 against a 119px box.
     
     Growing the box is the honest fix. It departs from the original's pixel
     height, which tools/compare.js reports, and that departure is deliberate:
     the original's height was a property of the original's shorter list, not a
     design constraint worth preserving at the cost of hiding half the content.
     The matches box is untouched and still measures exact. */
  overflow: visible;
  white-space: nowrap;
  font: 12px var(--f-body);
}

/* Row width differs by box upstream: the "matches" rows are 325px (323 content
   plus 1px padding) while the "highlights" rows are 338px and get clipped by
   the 326px body. Reproduced rather than normalised — at 12px Verdana a 13px
   difference is a whole character, so it is visible. */
.box--matches .box__row {
  width: 325px;
  background: var(--c-head-alt);
}

.box--highlights .box__row {
  width: 338px;
  background: var(--c-head);
}

.box__row {
  display: block;
  padding: 1px;
  line-height: 15px;
  color: var(--c-text-nav);
  overflow: hidden;
  text-overflow: ellipsis;
}

.box__row,
.box__row:link,
.box__row:visited {
  color: var(--c-text-nav);
  text-decoration: none;
}

.box__row:hover { color: var(--c-hover); }

/* --------------------------------------------------------------------------
   8. Article pages
   --------------------------------------------------------------------------
   The original is a single page; subpages are ours. Same window, same band,
   but the body is a readable article column so the content actually ranks.
   -------------------------------------------------------------------------- */

.article {
  /* Spans both grid columns. It must NOT be given --w-content (773px): the
     grid is 766.1px wide, so a 773px child overflows the window's right border
     by 5.5px. Filling the grid is the correct behaviour and it also means the
     column tracks the window at every size. */
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 16px 6.55px 28px 0;
  text-align: left;
  font-family: var(--f-body);
}

.article__breadcrumb {
  margin-bottom: 10px;
  color: var(--c-text-dim);
  font: 11px var(--f-plain);
}

.article__breadcrumb a { color: var(--c-text-nav); }

.article__title {
  margin: 0 0 6px;
  color: var(--c-red);
  font: 700 22px/1.25 var(--f-ui);
}

.article__meta {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-head-alt);
  color: var(--c-text-dim);
  font: 11px var(--f-plain);
}

/* The desk avatar in the byline. Inline with the text, round, and small
   enough not to disturb the meta line's height on a phone. */
.article__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  vertical-align: -7px;
  margin-right: 5px;
  background: var(--c-head);
}

/* The editorial desks on /about/. */
.desks {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.desk {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-head-alt);
}

.desk:last-child {
  border-bottom: 0;
}

.desk__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--c-head);
}

.desk__name {
  display: block;
  font: 700 13px var(--f-plain);
}

.desk__role {
  display: block;
  color: var(--c-text-dim);
  font: 11px var(--f-plain);
  margin-bottom: 4px;
}

.desk__bio {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.article__lead {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.article p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
}

.article h2 {
  margin: 22px 0 8px;
  color: var(--c-red);
  font: 700 16px var(--f-ui);
}

.article h3 {
  margin: 16px 0 6px;
  color: var(--c-text);
  font: 700 13px var(--f-ui);
}

.article ul,
.article ol {
  margin: 0 0 14px;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.7;
}

.article table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font: 12px var(--f-body);
}

.article th {
  padding: 5px 8px;
  background: var(--c-red);
  color: var(--c-white);
  text-align: left;
}

.article td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--c-head-alt);
}

.article tr:nth-child(even) td { background: var(--c-head); }

.article__related {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--c-head-alt);
}

.article__related h2 { margin-top: 0; }

.article__related ul {
  list-style: none;
  padding-left: 0;
}

.article__related li {
  padding: 4px 0;
  border-bottom: 1px solid var(--c-head);
  font-size: 12px;
}

/* Index of all articles */
.index-list {
  /* Same reasoning as .article: fill the grid rather than assert 773px, which
     would overflow the 766.1px content column. */
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 16px 6.55px 28px 0;
  text-align: left;
}

.index-list h1 {
  margin: 0 0 14px;
  color: var(--c-red);
  font: 700 22px var(--f-ui);
}

.index-list h2 {
  margin: 20px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--c-head-alt);
  color: var(--c-red);
  font: 700 14px var(--f-ui);
}

.index-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.index-list li {
  padding: 4px 0;
  border-bottom: 1px solid var(--c-head);
  font: 12px var(--f-body);
  overflow-wrap: break-word;
}

.index-list a { color: var(--c-text-nav); }

/* --------------------------------------------------------------------------
   Preview hub (/preview/)
   --------------------------------------------------------------------------
   A reviewer's index of the build. Same window and same type as the article
   index; only the density and the count badges differ, so it is obvious at a
   glance that this is a working page and not part of the site.
   -------------------------------------------------------------------------- */

.preview__intro {
  margin: 0 0 14px;
  padding: 8px 10px;
  background: var(--c-head);
  border-left: 3px solid var(--c-red);
  font-size: 12px;
  line-height: 1.5;
}

.preview__quick {
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.preview__quick li {
  padding: 6px 0;
  border-bottom: 1px solid var(--c-head-alt);
  font-size: 12px;
}

.preview__quick a {
  font-weight: 700;
  color: var(--c-red);
}

.preview__count {
  margin-left: 6px;
  padding: 1px 6px;
  background: var(--c-head-alt);
  color: var(--c-text-dim);
  font: 400 10px var(--f-plain);
  font-weight: 400;
}

.preview li {
  font-size: 12px;
  line-height: 1.5;
}

.preview h2 {
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   Homepage intro
   --------------------------------------------------------------------------
   Prose below the schedule. The original has no such block, so this is an
   addition rather than a reproduction — it is deliberately OUTSIDE .content and
   styled with the article typography, so the measured 1:1 geometry of the
   window above it is untouched (see tools/compare.js, which measures .content
   and its children).
   -------------------------------------------------------------------------- */

.home-intro {
  /* Match the content column's left edge so the page reads as one column. */
  width: 766.1px;
  margin: 18px 0 0 3.5px;
  padding: 3px 0 0 3px;
  text-align: left;
  font-family: var(--f-body);
}

.home-intro__heading {
  margin: 0 0 8px;
  color: var(--c-red);
  font: 700 17px var(--f-ui);
}

.home-intro__lead {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.home-intro p {
  margin: 0 0 11px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--c-text);
}

.home-intro__browse {
  margin: 16px 0 6px;
  color: var(--c-text);
  font: 700 13px var(--f-ui);
}

.home-intro__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-intro__links li {
  padding: 3px 0;
  border-bottom: 1px solid var(--c-head);
  font-size: 12px;
}

.home-intro__links a { font-weight: 700; }

/* --------------------------------------------------------------------------
   9. Responsive
   --------------------------------------------------------------------------
   Upstream is a fixed 775px table layout that overflows every phone. The
   rebuild keeps the identical design and simply lets it fit: the window goes
   fluid, the two columns stack, the fixed pixel widths that only exist to
   reproduce the desktop grid are released, and touch targets are enlarged.
   Nothing about the palette, type or hierarchy changes.
   -------------------------------------------------------------------------- */

/* The skip link is hidden until focused, then shown like any other skip link.
   Hidden with clip rather than by parking it off-screen at left: -9999px.
   The off-screen trick is direction-dependent: in RTL the element still has
   `left: -9999px`, but the document's inline origin is the right edge, so it
   sticks out the other side and stretches the page — Arabic measured a
   scrollWidth of 10 999px against a 1 000px viewport, which is a horizontal
   scrollbar on every page. clip works the same in both directions and needs no
   RTL override. */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  z-index: 100;
  padding: 8px 14px;
  background: var(--c-red);
  color: var(--c-white);
  font: 700 12px var(--f-ui);
}

.skip-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  color: var(--c-white);
}

/* Below this the 775px window no longer fits, so the layout has to reflow.
   The threshold sits above 820px so tablets in portrait get the touch layout
   rather than the desktop one, which is unusable with a finger. */
@media (max-width: 860px) {
  .window {
    width: 100%;
    max-width: 100%;
    padding-bottom: 0;
    border: 0;
  }

  /* Header keeps its proportions rather than a fixed 100px band. */
  .masthead { height: 76px; }

  .masthead__logo { top: -4px; width: 92px; height: 92px; }
  .masthead__logo img { width: 92px; height: 92px; }

  .masthead__wordmark {
    left: 104px;
    top: 14px;
    right: 8px;
    width: auto;
    height: 48px;
    background-size: contain;
    background-position: left center;
  }

  /* Nav wraps instead of running off the edge, and gains touch height. */
  .topnav {
    flex-wrap: wrap;
    justify-content: center;
    height: auto;
    padding: 4px 8px;
    row-gap: 2px;
  }

  .topnav__link,
  .topnav__sep,
  .topnav__lang {
    line-height: 24px;
  }

  .topnav__link,
  .topnav__lang-current {
    display: inline-block;
    padding: 0 2px;
  }

  .topnav__lang { padding: 0 10px; }

  .topnav__lang-menu {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    text-align: center;
  }

  /* Single column: schedule first, then the two side boxes. */
  .content {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    padding: 6px 8px 10px;
  }

  .broadcasts__bar { height: auto; }

  .broadcasts__bar-inner { display: block; height: auto; }

  .broadcasts__bar-title { padding: 3px 0 6px; }

  .broadcasts__bar-tools {
    flex: none;
    width: auto;
    padding-top: 0;
  }

  /* Stacked, so the controls need real vertical rhythm and tap height. */
  .broadcasts__formats label {
    display: inline-block;
    padding: 5px 4px;
    line-height: 24px;
  }

  .broadcasts__formats input {
    width: 16px;
    height: 16px;
  }

  .broadcasts__tz { display: inline-block; padding: 6px 0; line-height: 24px; }

  .broadcasts__search {
    margin-top: 2px;
    display: flex;
    gap: 6px;
  }

  /* The result count is 10px inside the desktop bar, which is too small to
     read on a phone. */
  .broadcasts__search-note { font-size: 12px; }

  .broadcasts__search input[type="text"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 28px;
  }

  .broadcasts__search button {
    padding: 4px 12px;
    min-height: 28px;
  }

  .broadcasts__list {
    width: 100%;
    height: auto;
    max-height: 70vh;
  }

  .event__toggle {
    width: 100%;
    padding: 5px 4px;
    line-height: 1.4;
  }

  .event__panel-foot { width: 100%; padding: 4px 0; }

  .event__panel-foot a {
    display: inline-block;
    min-height: 24px;
    padding: 5px 4px 0;
  }

  .broadcasts__more {
    width: 100%;
    height: auto;
    padding: 8px 2px;
  }

  .streams {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  /* Upstream's stream rows are 13px tall because they are desktop-dense. On a
     touch screen they need real tap height, so the cells gain vertical
     padding. The table's look is unchanged, only its density. */
  .streams th > span { padding-top: 6px; padding-bottom: 6px; }
  .streams td { padding-top: 6px; padding-bottom: 6px; }
  .streams__play a {
    display: inline-block;
    min-height: 24px;
    padding: 5px 4px 0;
  }

  .side { margin-top: 18px; }

  .box { width: 100%; }

  .box--matches .box__row,
  .box--highlights .box__row { width: 100%; }

  .box__row { padding: 5px 1px; }

  /* The box header is a link and only 19px tall upstream — too short to tap.
     The anchor is made a block so the whole band is clickable, not just the
     14px line box of the text. */
  .box__head {
    height: auto;
    padding: 0;
    line-height: 16px;
  }

  .box__head a {
    display: block;
    min-height: 24px;
    padding: 5px 2px;
  }

  /* Upstream buttons the two side boxes off short; on mobile let them show. */
  .box--matches .box__body { max-height: 260px; overflow-y: auto; }

  .box__body { height: auto; max-height: 260px; overflow-y: auto; }

  .footer {
    height: auto;
    min-height: 48px;
    margin: 0;
    padding: 8px 10px;
  }

  .footer__links { line-height: 24px; }

  .footer__links a { display: inline-block; min-height: 24px; padding: 4px 2px 0; }

  /* The contact address is a tap target like any other footer link. Without
     this it measured 14px tall at every phone width — the audit caught it, and
     it is the same rule the other footer links already carry. */
  .footer__contact { display: block; line-height: 24px; }
  .footer__contact a { display: inline-block; min-height: 24px; padding: 4px 2px 0; }

  .u-footer-spacer { display: none; }

  .article,
  .index-list { width: auto; padding: 14px 10px 24px; }

  .home-intro {
    width: auto;
    margin: 18px 0 0;
    padding: 3px 10px 0;
  }

  .home-intro__links li { padding: 5px 0; }

  .home-intro__links a { display: inline-block; min-height: 24px; padding: 4px 0 0; }

  /* Index entries and related-page links are list items whose only content is
     the link, so on a touch screen the link itself has to carry the tap
     height — a 14px line box is not tappable. */
  .index-list li,
  .article__related li { padding: 5px 0; }

  .index-list li a,
  .article__related li a {
    display: block;
    min-height: 24px;
    padding: 4px 0 0;
  }

  .preview__quick li { padding: 5px 0; }

  .preview__quick a { display: inline-block; min-height: 24px; padding: 4px 0 0; }
}

@media (max-width: 380px) {
  .masthead { height: 64px; }
  .masthead__logo { width: 76px; height: 76px; }
  .masthead__logo img { width: 76px; height: 76px; }
  .masthead__wordmark { left: 86px; height: 40px; top: 12px; }

  .broadcasts__list { max-height: 60vh; }

  .article__title { font-size: 19px; }
}

/* --------------------------------------------------------------------------
   Broadcaster logo
   --------------------------------------------------------------------------
   One logo per broadcaster page, at the top of the article. Sized by height
   rather than width, because the eleven logos have aspect ratios from 0.74 to
   5.78 and fixing the width would render the wide ones as unreadable slivers.
   width/height attributes are also set in the markup so the browser reserves
   the space before the image arrives and the layout does not shift.
   -------------------------------------------------------------------------- */

.logo {
  margin: 0 0 16px;
  padding: 0;
}

.logo img {
  display: block;
  height: 54px;
  width: auto;
  max-width: 100%;
  /* A hairline so light logos stay visible on the white window. */
  border: 1px solid var(--c-head);
  background: var(--c-window);
  padding: 6px 8px;
}

.logo figcaption {
  margin-top: 4px;
  color: var(--c-text-dim);
  font: 11px var(--f-plain);
}

.logo__credit {
  margin: 2px 0 0;
  color: var(--c-text-dim);
  font: 10px var(--f-plain);
}

/* ==========================================================================
   Right-to-left (Arabic)
   ==========================================================================
   The layout is built on flex and grid, which follow the document direction on
   their own — `dir="rtl"` on <html> flips them with no help from here. What it
   does NOT flip is the physical properties below: a left margin stays on the
   left, a left border stays on the left, `text-align: left` keeps hugging the
   left edge. In Arabic that is a page whose text is right-aligned but whose
   bullets, accent bars and inset panels sit on the wrong side.

   So the rules here are the mirror image of the ones above, and they are
   grouped in one place rather than scattered through the file. Values are
   equal and opposite to the originals — a `padding-left: 22px` becomes
   `padding-right: 22px` — which keeps the measured geometry identical on the
   mirrored side.

   Physical `left`/`right` on absolutely positioned decoration (the wordmark at
   `left: 159px`, the centred language menu) is deliberately NOT flipped. Those
   are pinned to the window itself, not to the reading direction, and the
   original measures them from the window's left edge. */

[dir="rtl"] .content,
[dir="rtl"] .event__toggle,
[dir="rtl"] .streams,
[dir="rtl"] .streams th,
[dir="rtl"] .box__head,
[dir="rtl"] .article,
[dir="rtl"] .article th,
[dir="rtl"] .index-list,
[dir="rtl"] .home-intro {
  text-align: right;
}

[dir="rtl"] .topnav__lang-menu,
[dir="rtl"] .event__panel-foot {
  text-align: left;
}

[dir="rtl"] .broadcasts__clock {
  margin-left: 0;
  margin-right: 3px;
}

/* The sort icon is drawn as a background at `6px center`; the 18px span
   padding reserves room for it on the left. In RTL the icon moves to the right
   edge, so the padding moves with it. */
[dir="rtl"] .streams.is-live th {
  background-position: right 6px center;
}

[dir="rtl"] .streams.is-live th > span {
  padding-left: 0;
  padding-right: 18px;
}

[dir="rtl"] .box__head {
  padding-left: 0;
  padding-right: 2px;
}

/* List markers sit outside the text block. The 22px is on the side the markers
   are on, so it follows the direction. */
[dir="rtl"] .article ul,
[dir="rtl"] .article ol {
  padding-left: 0;
  padding-right: 22px;
}

[dir="rtl"] .preview__intro {
  border-left: 0;
  border-right: 3px solid var(--c-red);
}

[dir="rtl"] .preview__count {
  margin-left: 0;
  margin-right: 6px;
}

/* Arabic, Hebrew, Persian and Urdu need a script that has the letterforms;
   the CJK stack follows for Japanese, Korean and Chinese, where the Latin
   fallback renders as a substitute face that looks nothing like the rest of
   the page. Both are appended AFTER the existing families, so Latin text keeps
   the original Verdana/Arial and only the scripts that need them fall through. */
[dir="rtl"] {
  --f-body: Verdana, Arial, "Segoe UI", Tahoma, "Noto Naskh Arabic",
            "Noto Sans Arabic", sans-serif;
  --f-ui:   Arial, Helvetica, "Segoe UI", Tahoma, "Noto Naskh Arabic",
            "Noto Sans Arabic", sans-serif;
}

:lang(ja) {
  --f-body: Verdana, Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic",
            "Noto Sans JP", "Meiryo", sans-serif;
  --f-ui:   Arial, Helvetica, "Hiragino Kaku Gothic ProN", "Yu Gothic",
            "Noto Sans JP", "Meiryo", sans-serif;
}

:lang(ko) {
  --f-body: Verdana, Arial, "Malgun Gothic", "Apple SD Gothic Neo",
            "Noto Sans KR", sans-serif;
  --f-ui:   Arial, Helvetica, "Malgun Gothic", "Apple SD Gothic Neo",
            "Noto Sans KR", sans-serif;
}

:lang(zh) {
  --f-body: Verdana, Arial, "PingFang SC", "Microsoft YaHei",
            "Noto Sans SC", sans-serif;
  --f-ui:   Arial, Helvetica, "PingFang SC", "Microsoft YaHei",
            "Noto Sans SC", sans-serif;
}

/* Devanagari. Hindi was the last language added, and without this it fell
   through to the Latin stack: the conjuncts and matras rendered in whatever
   substitute face the system picked, which looks nothing like the rest of the
   page and can break the shaping of clusters like क्ष or त्र. */
:lang(hi) {
  --f-body: Verdana, Arial, "Noto Sans Devanagari", "Nirmala UI",
            "Mangal", sans-serif;
  --f-ui:   Arial, Helvetica, "Noto Sans Devanagari", "Nirmala UI",
            "Mangal", sans-serif;
}
