/* Crictime. One stylesheet, mobile first.
   Plain and dense, in the manner of a score site: the device's own font at
   ordinary sizes, white blocks on grey, scores as bold text, many links.
   No web fonts, no pictures, nothing decorative. The colours are tokens
   printed in the page head (app/colours.php). */

:root {
  /* One scale for space and one for type; every padding, gap and font size below is one of these. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --t-2xs: .733rem; --t-xs: .8rem; --t-sm: .867rem; --t-md: 1rem; --t-lg: 1.2rem; --t-xl: 1.467rem;      /* 11, 12, 13, 15, 18, 22px */
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 60px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: calc(58px + env(safe-area-inset-bottom));
}

h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 .7em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
small, .small { font-size: var(--t-sm); }
.muted { color: var(--muted); }
b, strong { font-weight: 700; }
time, .countdown { white-space: nowrap; }
button { font: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); padding: var(--s2) var(--s3); }
.skip:focus { left: 8px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--s3); }
.wrap.narrow { max-width: 760px; }

/* status: red while it is live, amber before; a result is plain text, so it
   is never taken for a link (links and the header are blue) */
.st-live { color: var(--live); }
.st-done { color: var(--text); font-weight: 600; }
.st-soon { color: var(--soon); }

/* ---------- development bar ---------- */
.devbar {
  display: flex; flex-wrap: wrap; gap: 2px var(--s4); justify-content: space-between;
  padding: var(--s1) var(--s3); font-size: var(--t-xs); background: #fff3bf; color: #4a3b00;
}

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--head-bg); color: var(--head-ink); }
.head-row { display: flex; align-items: center; gap: var(--s4); min-height: 46px; }
.brand { display: inline-flex; align-items: center; min-height: 36px; gap: var(--s2); color: inherit; }
.brand:hover { text-decoration: none; }
.mark { flex: none; display: block; }
.wm { font-weight: 800; font-size: var(--t-lg); letter-spacing: -.02em; line-height: 1; }
.top-nav { display: none; }
/* the two buttons at the right of the header, both links: search, and the gear that opens the settings */
.head-btn {
  margin-left: auto; width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 4px; background: transparent; color: var(--head-ink); border: 0; cursor: pointer; opacity: .9;
}
.head-btn:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.head-btn[aria-current] { background: rgba(255,255,255,.2); opacity: 1; }
.search-btn + .settings-btn { margin-left: 0; }
.head-row { gap: var(--s2); }
.top-nav { margin-right: var(--s2); }
/* back to the top, on a long list: shown by site.js after some scrolling */
.to-top { position: fixed; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 25; padding: var(--s2) var(--s3); border-radius: 4px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0,0,0,.15); font-size: var(--t-sm); font-weight: 600; }
.to-top[hidden] { display: none; }
/* the search page */
.search-list li small { display: inline; margin-left: var(--s2); }
.share-btn { margin-left: var(--s2); padding: 2px var(--s2); font: inherit; font-size: var(--t-xs); font-weight: 600; color: var(--link); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.share-btn[hidden] { display: none; }
.more-btn { display: block; width: 100%; padding: var(--s3) var(--s3); font: inherit; font-weight: 600; color: var(--link); background: var(--surface); border: 0; border-top: 1px solid var(--line); cursor: pointer; text-align: left; }

/* ---------- bottom tab bar (phones) ---------- */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-bar a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: var(--s2) 2px var(--s2); font-size: var(--t-xs); font-weight: 600; color: var(--muted);
}
.tab-bar a:hover { text-decoration: none; }
.tab-bar a[aria-current] { color: var(--brand); }
.tab-count {
  position: absolute; top: 3px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 var(--s1);
  border-radius: 9px; background: var(--accent); color: var(--accent-ink);      /* the button red: white on it passes in both themes */ font-size: var(--t-2xs); line-height: 17px; text-align: center;
}

/* ---------- page parts ---------- */
.page-head, .mh { padding: var(--s3) 0 var(--s2); }
.page-head h1, .mh h1 { font-size: var(--t-lg); }
.page-sub { color: var(--muted); margin: var(--s1) 0 0; font-size: var(--t-sm); }
.page-sub b { color: var(--text); }
/* how a series stands, or who won a tournament: a line of its own under the dates */
.page-score { margin: var(--s1) 0 0; font-size: var(--t-sm); font-weight: 700; }
.page-score .muted { font-weight: 400; }
.page-score a { display: inline-block; padding: var(--s1) 0; margin: calc(-1 * var(--s1)) 0; }
.mh-meta { margin: var(--s1) 0 0; font-size: var(--t-sm); color: var(--muted); }
.mh-meta b { color: var(--text); font-weight: 600; }
.mh-meta span + span { margin-left: var(--s2); }
.mh-meta a, .info td a { padding: var(--s1) 0; }      /* taller to a finger; the padding of a link in a line of text moves nothing */

.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s2) 0 0; font-size: var(--t-xs); color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: var(--s1); }
.crumbs a { display: inline-block; padding: 6px 0; margin: -6px 0; color: var(--muted); }      /* a link 15px high: with this a thumb has 27px, and nothing moves */

.block { margin: var(--s3) 0; }
.block-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.block-h { font-size: var(--t-md); margin-bottom: var(--s2); }
/* a heading under another's blocks: "Just finished", under the matches being played */
.sub-h { margin: var(--s3) 0 var(--s2); font-size: var(--t-sm); }
/* "Live now" and "Just finished" side by side, where the column has room for two blocks and the partial says the two
   lists are short enough (partials/live-blocks): each list a column of its own, the two headings on one line */
.now-box { container: now / inline-size; }
@container now (min-width: 612px) {
  /* One grid for the two lists, each in its column (the wrappers give up their boxes), so that a block of one and the
     block of the other in the same row are of one height, their links on one line, as two blocks in a row are anywhere
     else. (Each list in a grid of its own, the live block of a Test at stumps ended 45px below the one just finished
     beside it, its links lower: "hmmm not good", the owner, 23 November 2026.) A heading stands 8px over its block. */
  .now-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: var(--s3); }
  .now-pair > div, .now-pair .blocks { display: contents; }
  .now-pair .now-live > *, .now-pair .now-live .blocks > * { grid-column: 1; }
  .now-pair .now-done > *, .now-pair .now-done .blocks > * { grid-column: 2; }
  .now-pair .block-h, .now-pair .sub-h { margin: 0 0 calc(var(--s2) - var(--s3)); font-size: var(--t-md); }
}
/* (12px of padding and 8 of it taken back by the margin: the link is 44px to a thumb and stands where it stood at 28) */
.more { display: inline-block; padding: var(--s3) 0; margin: calc(-1 * var(--s2)) 0; font-size: var(--t-sm); font-weight: 600; white-space: nowrap; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.pad { padding: var(--s3) var(--s3); }
.panel-h { font-size: var(--t-md); padding: var(--s2) var(--s3); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.panel-note { margin: 0; padding: var(--s2) var(--s3); font-size: var(--t-xs); color: var(--muted); border-bottom: 1px solid var(--line); }
.panel-foot { position: relative; margin: 0; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); font-size: var(--t-sm); }
/* its link is as tall as the foot (it was 17px of text), and a foot holding one link is that link from edge to edge */
.panel-foot a { display: inline-block; padding: var(--s2) 0; margin: calc(-1 * var(--s2)) 0; }
.panel-foot > a:only-child::after { content: ""; position: absolute; inset: 0; }

.split { display: grid; gap: 0 var(--s4); }
.split > * { min-width: 0; }
.prose { max-width: 75ch; font-size: var(--t-md); }
.prose p { color: var(--muted); }
/* About, Contact, Privacy, Terms: reading text on a panel, in the text colour, with real bullets */
.plain-page { max-width: none; line-height: 1.55; }
.plain-page > * { max-width: 70ch; }
.plain-page p, .plain-page li { color: var(--text); }
.plain-page p { margin: 0 0 var(--s3); }
.plain-page > :last-child { margin-bottom: 0; }
.plain-page .lead { font-size: var(--t-lg); line-height: 1.45; }
.plain-page h2 { font-size: var(--t-md); margin: var(--s5) 0 var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); }
.plain-page ul { margin: 0 0 var(--s3); padding-left: 20px; list-style: disc; }
.plain-page li + li { margin-top: var(--s1); }
.plain-page h2[id] { scroll-margin-top: 64px; }
.plain-page p:has(+ ul) { margin-bottom: var(--s1); }
.info th { vertical-align: top; }
.contact-addr { font-size: var(--t-xl); font-weight: 700; margin: 0 0 var(--s3); overflow-wrap: anywhere; }
.contact-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.contact-act .btn { min-height: 44px; padding: var(--s2) var(--s4); text-align: center; font-size: var(--t-md); color: var(--link); cursor: pointer; }
.plain-page .btn, .plain-page .btn:hover { text-decoration: none; }
.contact-act .btn-main { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.contact-act .btn-main:hover { background: var(--brand); filter: brightness(1.08); }
.plain-page .contact-why { list-style: none; padding: 0; border: 1px solid var(--line); border-radius: 4px; }
.contact-why li { margin: 0; padding: var(--s2) var(--s3); }
.contact-why li + li { margin: 0; border-top: 1px solid var(--line); }
.contact-why li > a { font-weight: 600; }
.contact-why small { display: block; color: var(--muted); font-size: var(--t-sm); }

/* tabs: a plain row of links, the current one underlined */
.tabs { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: var(--s3) var(--s3) var(--s2); color: var(--text); font-weight: 600; font-size: var(--t-sm); border-bottom: 2px solid transparent; }
.tabs a:hover { text-decoration: none; background: var(--surface-2); }
/* aria-current marks the page or filter that is open; is-on only draws the first of a row of links down the page */
.tabs a[aria-current], .tabs a.is-on { color: var(--brand); border-bottom-color: var(--brand); }
/* The main page on a phone: no date under the heading (the lists name their days), and the four jumps share the
   width of their row instead of running off its edge. */
@media (max-width: 639px) {
  .home-date { display: none; }
  .home > .tabs a { flex: 1 1 auto; padding-left: 5px; padding-right: 5px; text-align: center; white-space: nowrap; }
  .home > .tabs .tab-n { min-width: 18px; margin-left: 1px; padding: 0 3px; }      /* room for "Live 12" at 360px */
}
/* (the narrowest phones have room for three: the schedule is in the bar at the foot of the screen as well) */
@media (max-width: 339px) { .home > .tabs a[href="/schedule"] { display: none; } }

/* ---------- team badge: a small square in the team's colour ---------- */
.badge {
  display: inline-grid; place-items: center; flex: none; background: var(--tb); color: var(--ti);
  font-size: var(--t-2xs); font-weight: 700; line-height: 1; min-width: 32px; height: 18px; padding: 0 var(--s1); border-radius: 2px;
}
.badge-plain { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); width: auto; min-width: 26px; padding: 0 var(--s1); }
/* (as wide as its name needs: at a fixed 30px "PNG-W" broke at its hyphen into two lines) */
.badge-m, .badge-l { min-width: 30px; height: 22px; font-size: var(--t-2xs); white-space: nowrap; }
/* With a logo: the picture fills the mark and the coloured name is underneath, unseen, in case the picture fails. */
.badge { position: relative; overflow: hidden; }
.badge.has-img { min-width: 0; width: 28px; height: 19px; padding: 0; background: transparent; color: transparent; box-shadow: none; border-radius: 0; }
.badge-m.has-img, .badge-l.has-img { width: 36px; height: 24px; }
.badge-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* a player's photo: a small square, the face at the top of the picture */
.photo { flex: none; display: block; border-radius: 4px; background: var(--surface-2); object-fit: cover; object-position: top center; }
.photo-none { width: 36px; height: 36px; box-shadow: inset 0 0 0 1px var(--line); }
.page-head.has-photo { display: flex; align-items: center; gap: var(--s3); }
.sq-who { display: flex; align-items: center; gap: var(--s3); }

/* ---------- buttons, chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: var(--s1) var(--s3); border-radius: 3px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: var(--t-sm); font-weight: 600; cursor: pointer;
}
.follow[aria-pressed="true"], .pick[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.follow[aria-pressed="true"]::after { content: " ✓"; }
.chip[hidden] { display: none; }
.follow-on, .follow[aria-pressed="true"] .follow-off { display: none; }
.follow[aria-pressed="true"] .follow-on { display: inline; }

/* ---------- match blocks (live matches) ---------- */
.blocks { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.mb { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; display: flex; flex-direction: column; }
.mb-top { margin: 0; padding: var(--s2) var(--s3) var(--s2); font-size: var(--t-xs); font-weight: 600; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-top span { color: var(--muted); font-weight: 400; }
.mb-top a { padding: var(--s2) 0; }      /* the series' name is a link 15px high: with this a thumb has the height of the line */
.mb-body { display: grid; gap: var(--s1); align-content: start; padding: var(--s2) var(--s3) var(--s2); color: var(--text); flex: 1; }      /* (a block made as high as the one beside it keeps its lines together at the top, its links at the foot) */
.mb-body:hover { text-decoration: none; background: var(--surface-2); }
.mb-row { display: flex; align-items: center; gap: var(--s2); }
/* (the lines of a block are parts of a grid: left to their own least width, a long name with its score and overs beside it
   was 298px in a block with 270, "(3.4 ov)" lay outside it and a 320px phone scrolled sideways. With this the name gives way.) */
.mb-body > * { min-width: 0; }
.mb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-score { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mb-score b { font-size: var(--t-md); }
.mb-score small { color: var(--muted); font-size: var(--t-xs); }
.is-dim { color: var(--muted); }
.is-dim b { font-weight: 600; }
.mb-status { font-size: var(--t-sm); margin-top: 2px; }
.mb-next { font-size: var(--t-xs); color: var(--muted); }      /* at stumps: when the next day starts, under the state */
.mb-links { margin: 0; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--t-sm); font-weight: 600; }
/* each link a button a thumb can hit: they were 19px tall */
.mb-links a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s3); border-radius: 4px; }
.mb-links a { border: 1px solid var(--line); background: var(--surface); }
.mb-links a:hover { text-decoration: none; background: var(--surface-2); }
/* On a phone the links under a match are words in one slim row, not two boxed buttons: the whole block already opens
   the match, and the boxes cost each block a fifth of its height, a match fewer on every screen. */
@media (max-width: 639px) {
  .mb-links { padding: 0 var(--s3); gap: var(--s4); }
  .mb-links a { border: 0; background: none; padding: 0; min-height: 36px; }
  .mb-links a:hover { background: none; text-decoration: underline; }
}
/* a name in a table is a link of one line of text: give it height */
.plain th a { display: inline-block; padding: var(--s1) 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* squads: on a phone the role and styles go under the name; four columns did not fit */
.sq-d { display: none; }
.sq-m { display: block; font-weight: 400; font-size: var(--t-xs); color: var(--muted); }
/* rankings: the position in a column of its own */
.nums.ranks thead th:first-child, .ranks td.pos { width: 1%; padding-right: 0; text-align: right; }
.nums.ranks thead th:nth-child(2) { text-align: left; }
.ranks th[scope=row] { width: 99%; }
.ranks th[scope=row] a { display: flex; align-items: center; gap: var(--s2); }
.ranks tr.is-mine > * { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.ranks tr.is-mine > .pos { box-shadow: inset 3px 0 0 var(--brand); }
.rank-grid { display: grid; gap: 0 var(--s4); align-items: start; }
.rank-h { margin-top: var(--s4); }
.rank-tabs a small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-xs); white-space: nowrap; }
@media (min-width: 700px) { .rank-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .rank-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 359px) { .ranks tr > :nth-child(3) { display: none; } }      /* the narrowest phones: matches played gives way */

/* ---------- match rows (lists) ---------- */
.day-h { font-size: var(--t-xs); font-weight: 700; padding: var(--s2) var(--s3); background: var(--surface-2); border-bottom: 1px solid var(--line); }
/* In a regrouped list the day's heading stays in view while its matches scroll. Only there: the
   list must not clip with "hidden", or the heading sticks inside it and lands on the first row. */
.panel[data-regroup] { overflow: clip; }
.panel[data-regroup] .day-h { position: sticky; top: 46px; z-index: 5; }
.page-also { white-space: normal; }
.day + .day .day-h { border-top: 1px solid var(--line); }
.mr { position: relative; display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: var(--s3); align-items: center; padding: var(--s2) var(--s3); }
.mr + .mr, .mrs-more { border-top: 1px solid var(--line); }
.mrs-more[hidden] { display: none; }
.more-btn[hidden] { display: none; }      /* (its own "display: block" kept it on the page: before the script had folded anything, and after it had been used) */
/* A team's results are folded only where the page is one column, to bring up what stands under them. From 900px
   nothing does, the side column being beside them, and folded they ended 724px short of that column on India's page and
   1,184 on Pakistan's: there they stay open, and their button is not shown. */
@media (min-width: 900px) {
  .mrs-more.in-one-col[hidden] { display: block; }
  .in-one-col + .more-btn { display: none; }
}
.fold > summary { cursor: pointer; }
.fold > summary h2 { display: inline; font: inherit; }
.fold:not([open]) > summary { border-bottom: 0; }
a.more-btn:hover { text-decoration: none; background: var(--surface-2); }
.mr:hover { background: var(--surface-2); }
.mr-when { font-size: var(--t-xs); font-weight: 700; color: var(--muted); }
.mr-when small { display: block; font-weight: 400; }
/* On a team's page: under the date of a result, how it went for that team, a square as in its form. After it the year of
   an older result, or the kind of match where the row's line does not say it (one too long to stand beside, "First class", goes under). */
.mr-when .mr-out { display: flex; flex-wrap: wrap; align-items: center; gap: 1px var(--s1); margin-top: 2px; font-size: var(--t-xs); }      /* (the size of the date: at the size of a time, 14px, "First class" was 65px in a column of 62 and took two lines under the square) */
.mr-out .form { margin: 0; width: 18px; height: 18px; font-size: var(--t-2xs); }
.mr-main { display: grid; gap: 1px; min-width: 0; color: var(--text); }
.mr-main:hover { text-decoration: none; }
.mr-main::after { content: ""; position: absolute; inset: 0; }   /* the whole row is the tap target */
/* a side: its mark, its name, and its score at the right, where the scores of a list stand in one column */
.mr-team { display: flex; align-items: center; gap: var(--s2); min-width: 0; min-height: 24px; font-weight: 600; }      /* (min-width: with a long name the row was wider than its column, and the score went out of the block) */
.mr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-score { flex: none; font-variant-numeric: tabular-nums; font-weight: 700; }
.mr-score small { font-weight: 400; font-size: var(--t-xs); color: var(--muted); }
/* a finished match: the winner stands out because the loser steps back */
.mr-team.is-dim, .mr-team.is-dim .mr-score { color: var(--muted); font-weight: 400; }
.mr-sub { font-size: var(--t-xs); color: var(--muted); }
.mr-status { font-size: var(--t-sm); margin-top: 1px; }
.mr-status.st-done { font-weight: 400; }      /* the winner is already marked by weight: the result need not be bold too */
/* In a wide list the scores stand in a column beside the names, not at the far edge of the row with the width
   of the page between a side and its score. By the width of the list itself: the same rows also sit in a narrow column. */
.mrs { container-type: inline-size; }
@container (min-width: 520px) {
  .mr-name { flex: 0 0 16rem; }
  .mr-score { min-width: 7em; text-align: right; }
}
/* The line under the sides keeps to one line: on a phone it took a second in most rows. And in a wide list the
   result and that line stand beside the sides, in the two thirds of the row that were empty, so a row is its two
   sides high. (First on the main page; then every list was made to match.) */
.mr-sub { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* (From 720px of list, not 600: the sides take 400px of it, and in a list of 600 to 700px, a series page on a screen
   of 1024px, the result had 110px beside them. It stood on three lines and the line under it was cut after "30th Match · Syd".) */
@container (min-width: 720px) {
  .mr-main { grid-template-columns: minmax(0, 25rem) minmax(0, 1fr); column-gap: var(--s4); align-items: center; }
  .mr-team { grid-column: 1; }
  .mr-status { grid-column: 2; grid-row: 1; margin-top: 0; min-width: 0; }
  .mr-sub { grid-column: 2; grid-row: 2; }
  .mr-main:not(:has(.mr-status)) .mr-sub { grid-row: 1 / span 2; }
}

/* ---------- lists of links ---------- */
.links li { position: relative; padding: var(--s2) var(--s3); }
.links li > a::after { content: ""; position: absolute; inset: 0; }      /* the whole row is the tap target, not the 18px of its first line */
.links li + li { border-top: 1px solid var(--line); }
.links a, .links b { font-weight: 600; }
.links small { display: block; color: var(--muted); }
.links a.with-mark { display: flex; align-items: center; gap: var(--s2); }      /* a side by its mark and its name, as in a row of a match */

/* ---------- match page ---------- */
.score { padding: var(--s3) var(--s3); margin-top: var(--s3); }
/* the row wraps: on a phone a long team name pushed "CRR 4.00" past the edge of the box, where it was cut off */
.score-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s2); margin: 0 0 var(--s1); font-size: var(--t-md); color: var(--muted); }
.score-row a { display: inline-block; padding: 2px 0; color: inherit; font-weight: 600; }
/* the score is what the page is for: it is the largest thing in the box, larger still for the side batting */
.score-row b { font-variant-numeric: tabular-nums; font-size: var(--t-lg); }
.score-row.is-now, .score-row:not(.is-dim) { color: var(--text); }
.score-row.is-now { font-size: var(--t-lg); }
.score-row.is-now a { font-weight: 700; }
.score-row.is-now b { font-size: var(--t-xl); line-height: 1.15; }
@media (min-width: 640px) { .score-row.is-now b { font-size: 1.75rem; } }
/* a match in play: a small dot that breathes before its status. The one thing on the page that moves. */
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--live); vertical-align: 1px; animation: live-dot 1.6s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.score-row small { color: var(--muted); font-size: var(--t-sm); }
.score-row .crr { margin-left: var(--s2); }
@media (max-width: 639px) { .score-row .crr { margin-left: auto; } }      /* on a phone the rate keeps to the right edge, on the score's line or the one under it */
.score-upd { margin: var(--s1) 0 0; font-size: var(--t-xs); color: var(--muted); }
.score-upd.is-stale { color: var(--soon); font-weight: 600; }
/* the score that just changed is tinted for a moment; nothing moves */
@keyframes fresh { from { background: color-mix(in srgb, var(--soon) 30%, transparent); } to { background: transparent; } }
.is-fresh .score-row.is-now b { animation: fresh 1.8s ease-out; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .is-fresh .score-row.is-now b { animation: none; } }
.score-row small { white-space: nowrap; }
/* A row that is not the side batting now keeps to one line: the name gives way (it breaks in two), and the total and the
   overs beside it stay where they are. Beside a long name on a narrow phone the total fell to a line under the badge. */
.score-row:not(.is-now) { flex-wrap: nowrap; }
.score-row:not(.is-now) a { flex: 0 1 auto; min-width: 0; }
.score-row .badge, .score-row b, .score-row small { flex: none; }

/* the score as one line under the header, once the score box has scrolled away */
.mini { position: fixed; top: 46px; left: 0; right: 0; z-index: 19; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.mini-row { display: flex; align-items: center; gap: var(--s1) var(--s3); min-height: 36px; font-size: var(--t-sm); }
.mini-score { flex: none; font-variant-numeric: tabular-nums; }
.mini-score small, .mini-other { color: var(--muted); }
.mini-other { display: none; margin-left: var(--s2); }
.mini-status { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-sm); font-weight: 600; }
:root:has([data-mini]) { scroll-padding-top: 96px; }
.score-status { margin: var(--s2) 0 0; font-weight: 600; }
.score-facts { margin: var(--s1) 0 0; font-size: var(--t-sm); color: var(--muted); white-space: pre-wrap; }
.score-facts .fact { white-space: nowrap; }

/* ---------- plain tables ---------- */
.plain th, .plain td { padding: var(--s2) var(--s2); border-top: 1px solid var(--line); text-align: left; vertical-align: top; font-size: var(--t-md); }
.plain tr:first-child > * { border-top: 0; }
.plain th { font-weight: 600; padding-left: var(--s3); }
.plain td:last-child { padding-right: var(--s3); }
.plain td b, .world td { white-space: nowrap; }
.world th, .world td { vertical-align: baseline; }
/* On a phone: the place, the time and the day. With the difference from GMT as a fourth column the table was 402px
   in a block of 351, and that column was cut off at the edge. */
@media (max-width: 639px) {
  .world td { padding-left: var(--s1); padding-right: var(--s1); }
  .world td:nth-child(3) { padding-right: var(--s3); font-size: var(--t-sm); }
  .world td:last-child { display: none; }
}
.plain th small { display: block; font-weight: 400; color: var(--muted); }
.plain thead th { background: var(--surface-2); font-size: var(--t-xs); color: var(--muted); font-weight: 700; border-top: 1px solid var(--line); }
.plain thead:first-child th { border-top: 0; }
.plain thead + tbody tr:first-child > * { border-top: 1px solid var(--line); }
.plain tbody + tbody tr:first-child > * { border-top: 1px solid var(--line); }      /* a table in several parts (the groups of a points table, the folded rows of a ranking): the line between two parts */
.nums td, .nums thead th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nums th:first-child { width: 99%; }
/* A row of a table of figures stands on one line of writing. A name that is a link has room over it for a finger, and
   set to the top of its cell it stood 4px lower than its own figures. */
.plain.nums tbody th, .plain.nums tbody td { vertical-align: baseline; }
/* (a name on two lines: its figures stand by the first. As a block in the line the link gave the row its last line to stand
   on; as a flex box it gives the first.) */
.plain.nums tbody th > a { display: inline-flex; }
.info th { width: 96px; color: var(--muted); font-weight: 400; white-space: nowrap; }
/* ---------- a player's page ---------- */
/* What the profile says stands under the name (.pl-fact) while the page is one column, and in the column beside the
   tables (.pl-side) from 1,024px. The page gets that column there and not at 900px, as the others do: beside it a
   screen of 900 to 1,023px left the two tables 510 to 633px, and they were 40 to 117px wider. */
.pl-side { display: none; }
.pl-teams { margin: 0 0 var(--s1); }
.pl-teams a { display: inline-block; padding: var(--s1) 0; margin: calc(-1 * var(--s1)) 0; }
@media (min-width: 900px) and (max-width: 1023px) { .split.pl-split { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1024px) { .pl-side { display: block; } .pl-fact { display: none; } }
/* The batting and the bowling by kind of match (.career), laid out by the width of their own box (.car-box), which is a
   phone's in one place and two thirds of a wide screen in another.
   - Under 620px: five figures to a kind, and the rest in a line under them (.c-rest). The table was twelve columns
     whatever the screen: a phone showed six, and the average and the strike rate were off its edge.
   - Under 330px one of the five gives way to that line (.c-x in the row, .c-n in the line): the highest score, the economy.
   - From 620px every column (.c-w), and no line under. From 760px at the size of every other table.
   The kind of match is not broken ("First-" over "class", "One-" over "day"). */
.car-box { container: car / inline-size; }
.career th, .career td { padding-left: 6px; padding-right: 6px; font-size: var(--t-sm); }
.career tbody th, .career thead th:first-child { padding-left: var(--s3); }
.career tbody th { white-space: nowrap; }
.career .c-e, .career td:last-child, .career th:last-child { padding-right: var(--s3); }
.career .c-w, .career .c-n { display: none; }
.career .c-y { font-size: var(--t-xs); }      /* the years of a kind, under its name (in a column of their own from 620px) */
.career .c-main > * { padding-bottom: 2px; }
.career .c-rest td { padding: 0 var(--s3) var(--s2); border-top: 0; text-align: left; white-space: normal; font-size: var(--t-xs); color: var(--muted); }
@container car (max-width: 329px) {
  .career .c-x { display: none; }
  .career .c-n { display: inline; }
  .career td { padding-left: 5px; padding-right: 5px; }      /* (at 6px the widest of nine careers looked at was 1px wider than a phone of 320px) */
}
@container car (min-width: 620px) {
  .career .c-w { display: table-cell; }
  .career .c-rest, .career .c-y { display: none; }
  .career .c-main > * { padding-bottom: var(--s2); }
  .career .c-e { padding-right: 6px; }
}
@container car (min-width: 760px) {
  .career tbody th, .career tbody td { font-size: var(--t-md); }
  .career th, .career td, .career .c-e { padding-left: var(--s2); padding-right: var(--s2); }
  .career tbody th, .career thead th:first-child { padding-left: var(--s3); }
  .career td:last-child, .career th:last-child { padding-right: var(--s3); }
}
/* The matches he played in, a row each, as the matches of every list are: the date, the match and what it was, and at the
   right what he did in it, an innings to a line, the batting in bold. (A table of four columns gave the match a third of a
   phone: a name on three lines, 101px a match.) Where the list is 700px or more, the batting and the bowling are two
   columns under their own headings (.pm-head) and the match and what it was are one line. (Not from 600px: the two
   columns left the name 180px there, and it broke in two.) */
.pms { container: pms / inline-size; }
.pm { position: relative; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 0 var(--s3); align-items: center; padding: var(--s2) var(--s3); }
.pm + .pm { border-top: 1px solid var(--line); }
.pm:hover { background: var(--surface-2); }
.pm-head { display: none; }
.pm-main { display: grid; gap: 1px; min-width: 0; font-weight: 600; }
.pm-main:hover { text-decoration: none; }
.pm-main::after { content: ""; position: absolute; inset: 0; }      /* the whole row is the tap target */
.pm-name { overflow-wrap: anywhere; }      /* ("Worcestershire" alone was 159px of a phone's 349) */
.pm-main small { font-size: var(--t-xs); font-weight: 400; color: var(--muted); }
.pm-figs, .pm-bat, .pm-bowl { display: grid; gap: 1px; }
.pm-figs { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-bat:empty, .pm-bowl:empty { display: none; }
.pm-figs i { font-style: normal; }
@container pms (min-width: 700px) {
  .pm { grid-template-columns: 62px minmax(0, 1fr) 9.5rem 9.5rem; align-items: baseline; }
  .pm-head { display: grid; background: var(--surface-2); font-size: var(--t-xs); font-weight: 700; color: var(--muted); }
  .pm-main { display: block; }
  .pm-main small::before { content: " · "; }
  .pm-figs { display: contents; }
  .pm-bat, .pm-bowl { text-align: left; }      /* (an innings to a line here too: "4/54 (17.3) & 3/38 (15.2)" on one line was wider than its column) */
  .pm-bat { grid-column: 3; }
  .pm-bowl { grid-column: 4; }
}
.in-top th { box-shadow: inset 3px 0 0 var(--win); }
/* The points table of a series. Its figures stand closer than a table's usually do: with a column for draws or for matches
   without a result (shown where there are any) the name keeps the room it had beside five columns. On the narrowest
   phones the table is set a size smaller: at 320px its last column, the run rate, was cut off by 13 to 27px. */
.pts td, .pts thead th:not(:first-child) { padding-left: 5px; padding-right: 5px; }
.pts td:last-child, .pts thead th:last-child { padding-right: var(--s3); }
.pts th:first-child { padding-right: var(--s1); }
/* On a phone the table is set a size smaller (on its own page: a series' page has it only where there is a column for
   it beside the matches, .side-only). A tap anywhere on a row opens the team (data-row-links), so the name need not be
   a finger high by itself. */
@media (max-width: 639px) {
  .pts tbody th, .pts td { font-size: var(--t-sm); }
  .pts tbody th a { padding: 2px 0; }
}
/* The table's own page (.pts-full): a team has the squares of its last results at every width. Under its name; and beside
   it, at the right of the first column, where the table itself is 520px wide or more (.pts-box is what is measured: two
   groups side by side are each half the page). One table alone is not drawn across a wide screen, where a name and its
   figures would be a page's width apart. */
.pts-team { display: block; }
.pts-team > a { display: inline-flex; }      /* (as "th > a" in a table of figures: the figures stand by the first line of a name on two) */
.pts-last { display: none; }
.pts-box { container: pts / inline-size; }
@container pts (min-width: 520px) {
  .pts-full .pts-team { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
  .pts-full .form-line { flex: none; margin-top: 0; white-space: nowrap; }
  .pts-full .pts-last { display: inline; }
}
.pts-one { max-width: 760px; }
.pts-notes .page-sub + .page-sub { margin-top: var(--s2); }
.pts-group { scroll-margin-top: 8px; }
@media (max-width: 359px) {
  .pts td, .pts thead th:not(:first-child) { padding-left: 3px; padding-right: 3px; }
  .pts td:last-child, .pts thead th:last-child { padding-right: var(--s2); }
  .pts th:first-child { padding-left: var(--s2); }
}
.recent { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.recent b { margin-right: var(--s1); }

/* at the crease: the batters and bowlers, with the key figures beside them on a wide screen */
.crease { display: grid; }
.crease > * { min-width: 0; }
.crease > table { align-self: start; }   /* its rows keep their own height beside a taller key stats column */
.strike { text-decoration: none; font-weight: 700; cursor: help; }
/* a name here runs as text, so the star of the batter on strike follows its last word and not on a line of its own
   (named as closely as the rule that makes a name in a table of figures a flex box, which had undone this one) */
.crease .plain.nums tbody th > a { display: inline; }
.crease .plain.nums tbody th { padding-top: var(--s3); padding-bottom: var(--s3); }     /* (the row as high as with the flex box: 48px) */
.keystats { padding: var(--s3) var(--s3) var(--s3); border-top: 1px solid var(--line); }
.keystats-h { margin: 0 0 var(--s2); font-size: var(--t-xs); font-weight: 700; color: var(--muted); }
/* Key stats: a line a figure, its name beside it, as "Match info" has them; two columns, read down, where each has room
   for a figure of 205px beside its name ("South Africa chose to bowl" is 203), one below that. (They were cells with the
   name over the figure: on a 375px phone, with the overs left in the day, five cells of three heights in three rows, the
   toss alone in the last. 23 November 2026.) The name's 106px: "Overs left today" is 102 in the Mac's own type. */
.keystats dl { margin: 0; columns: 2 325px; column-gap: var(--s5); }
.keystats dl > div { display: flex; gap: var(--s3); align-items: baseline; padding: 3px 0; break-inside: avoid; }
.keystats dt { flex: none; width: 106px; font-size: var(--t-sm); color: var(--muted); }
.keystats dd { margin: 0; min-width: 0; font-size: var(--t-md); font-weight: 600; line-height: 1.35; }
.keystats dd small { display: block; font-size: var(--t-xs); font-weight: 400; color: var(--muted); }
.keystats dd .ks-of { display: inline; }      /* "22.3 of 90": on the figure's own line */
/* Beside the batters and bowlers where the panel is 820px or more (a column of 360px, the table keeps 460 and more:
   its figures take 200); under them below that. (From a screen 1,040px wide, as it was, the column of 240px had no room
   for a name beside its figure, and the table would have had 300px beside one of 360.) */
.crease-box { container: crease / inline-size; }
@container crease (min-width: 820px) {
  .crease { grid-template-columns: minmax(0, 1fr) 360px; }
  .keystats { border-top: 0; border-left: 1px solid var(--line); padding: var(--s3) var(--s4) var(--s3); }
  .keystats dl { columns: auto; }
}

.commentary li { display: flex; align-items: baseline; gap: var(--s2); padding: var(--s2) var(--s3); }
.commentary .c-ball { flex: none; width: 44px; }      /* room for "124.6" */
.commentary p { flex: 1; min-width: 0; }

/* one ball as a small box: in "Recent" and beside each ball */
.bx { display: inline-grid; place-items: center; flex: none; min-width: 22px; height: 20px; padding: 0 var(--s1); border-radius: 3px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--t-xs); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.bx-dot { font-weight: 400; color: var(--muted); }
/* the page's own background as the ink: light on the dark green and red of the light theme, dark on their lighter shades in the dark one */
.bx-four, .bx-six { background: var(--win); color: var(--surface); box-shadow: none; }
.bx-w { background: var(--live); color: var(--surface); box-shadow: none; }
.bx-sep { flex: none; width: 1px; height: 16px; margin: 0 var(--s1); background: var(--line); }
.commentary li + li { border-top: 1px solid var(--line); }
.commentary p { margin: 0; font-size: var(--t-md); }
.c-ball { font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-WICKET { color: var(--live); }
.ev-FOUR, .ev-SIX { color: var(--win); }

.match-split > .faq { margin-top: 0; }      /* a part of its own under the match: the block over it has left its space */
.faq h3 { font-size: var(--t-md); margin: var(--s3) 0 2px; }
.faq h3:first-child { margin-top: 0; }
.faq p { margin: 0; color: var(--muted); font-size: var(--t-md); }

.tabs.sub { margin-top: var(--s3); }
.over-h { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); padding: var(--s2) var(--s3); font-size: var(--t-sm); background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.over-h span:nth-child(n+2) { font-weight: 400; color: var(--muted); }
.over-h .over-b { margin-left: auto; }
/* ---------- an innings over by over: a bar for each over's runs, a dot for each wicket ---------- */
.rpo { padding: var(--s2) var(--s3) var(--s2); border-top: 1px solid var(--line); }
.rpo-h { display: flex; justify-content: space-between; align-items: center; margin: 0 0 var(--s1); font-size: var(--t-xs); color: var(--muted); }
.rpo-h b { font-size: var(--t-sm); color: var(--text); }
.rpo-dot { display: inline-block; width: 6px; height: 6px; margin-right: var(--s1); border-radius: 50%; background: var(--live); vertical-align: 1px; }
.rpo-bars { display: flex; align-items: flex-end; gap: 2px; height: 100px; padding-top: 24px; border-bottom: 1px solid var(--line); }      /* the room above is for the dots over the tallest bar */
.rpo-bars.is-long { gap: 1px; }
.rpo-bars i { position: relative; flex: 1 1 0; min-width: 0; background: var(--brand); border-radius: 1px 1px 0 0; }
.rpo-bars i[data-w]::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 6px; height: 6px; margin: 0 0 2px -3px; border-radius: 50%; background: var(--live); }
.rpo-bars i[data-w="2"]::before { box-shadow: 0 -8px 0 var(--live); }
.rpo-bars i[data-w="3"]::before { box-shadow: 0 -8px 0 var(--live), 0 -16px 0 var(--live); }
.rpo-x { position: relative; height: 16px; margin: 0; font-size: var(--t-2xs); color: var(--muted); }
.rpo-x span { position: absolute; top: 2px; transform: translateX(-50%); }
.rpo-h, .rpo-bars, .rpo-x { max-width: 640px; }      /* on a wide screen: across the whole panel twenty overs were twenty slabs */
@media (forced-colors: active) { .rpo-bars i { forced-color-adjust: none; background: CanvasText; } .rpo-bars i[data-w]::before, .rpo-dot { background: Highlight; box-shadow: none; } }
/* how things stood when the over ended: the score in full ink, the bowler's figures, and the batters on a line of their own */
.over-h span.over-s { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.over-h .over-b b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.over-h .over-at { flex-basis: 100%; font-size: var(--t-xs); }
.xi { margin: 0; padding: var(--s2) var(--s3); font-size: var(--t-sm); }
.xi + .xi { border-top: 1px solid var(--line); }
.pos { color: var(--muted); font-variant-numeric: tabular-nums; }
.two-col { display: grid; gap: 0 var(--s4); }
.parts { padding: 0; }
.parts summary { padding: var(--s2) var(--s3); cursor: pointer; }
.parts table { border-top: 1px solid var(--line); }
.form-line { display: block; margin-top: var(--s1); }
.form-line .form { margin: 0 2px 0 0; width: 18px; height: 18px; font-size: var(--t-2xs); }
.team-grid small { display: block; color: var(--muted); font-weight: 400; }

/* ---------- scorecard ---------- */
.innings { scroll-margin-top: 38px; }      /* a tap on an innings' tab sets it just under that row (with the page's own 60px: at 56 a strip of the innings before showed over it) */
.inn-h { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s3); font-size: var(--t-md); background: var(--head-bg); color: var(--head-ink); }
.table-scroll { overflow-x: auto; }
.card .how { color: var(--muted); display: none; white-space: normal; text-align: left; }
/* On a phone: how a batter was out, on a line of its own under the name and the figures, across the row. The batter's
   row gives up the space under it and the name the room over and under it, so a batter is two close lines. */
.nums.card .how-row td { padding: 1px var(--s3) var(--s2); border-top: 0; text-align: left; white-space: normal; font-size: var(--t-xs); font-weight: 400; color: var(--muted); }
@media (max-width: 639px) {
  .card.bat tbody tr:has(+ .how-row) > * { padding-bottom: 0; }
  .card.bat tbody th > a { padding: 0; }
}
.card .sum > * { background: var(--surface-2); }
/* the batters at the crease, while an innings is going on (the rows were given a name for it and nothing to show by) */
.card .is-in th, .card .how-row.is-in td { box-shadow: inset 3px 0 0 var(--brand); }
.note { margin: 0; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--muted); }
.note b { color: var(--text); font-weight: 600; }
.note + .table-scroll { border-top: 1px solid var(--line); }

/* ---------- teams ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.team-grid a { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); font-weight: 600; color: var(--text); border-top: 1px solid var(--line); margin-top: -1px; }
/* A team's own page: its mark and its name, and the button to follow it, on one line; the form and the rankings under
   them have the whole width (beside the button "ICC rankings: Tests no. 4 · ODIs no. 1 · T20Is no. 2" took two lines). */
.team-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.team-head h1 { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.team-head .chip { flex: none; }
.find { margin: var(--s3) 0 0; }
.find input { width: 100%; max-width: 340px; padding: var(--s2) var(--s3); font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.find input:focus { outline: 2px solid var(--link); outline-offset: 0; }
.team-grid li[hidden] { display: none; }
[data-team-group-h] { margin-top: var(--s4); }
.form { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: var(--s1); border-radius: 2px; font-size: var(--t-xs); font-weight: 700; color: #fff; }
.form:hover { text-decoration: none; }
/* the best of a finished match: a figure and a side's short name are not broken ("4/23 (3 / ov)", "(BH- / W)") */
.best td, .best th span { white-space: nowrap; }
.pre td[colspan] { padding-left: var(--s3); }
.form-set { white-space: nowrap; }      /* the five squares on one line: beside a long name they broke as two and three */
@media (max-width: 639px) { .pre th { width: auto; padding-right: 0; white-space: normal; } .pre td:not([colspan]) { width: 1%; padding-left: 0; } }      /* the name has the room the squares leave, and breaks if it must */
.form-w { background: var(--win); }
.form-l { background: var(--live); }
.form-d, .form-t, .form-n { background: var(--muted); }
.plain tr.grp th { background: var(--surface-2); font-size: var(--t-xs); color: var(--muted); font-weight: 700; }

/* ---------- footer ---------- */
.site-foot { margin-top: var(--s5); padding: var(--s4) 0 var(--s3); border-top: 1px solid var(--line); background: var(--surface); font-size: var(--t-sm); }
/* On a phone the footer's parts come one under the other, each across the width: the series in two columns, the twelve
   sides in three, and the links about the site on a line. (They were two columns of links with a third alone under the
   first, half the width empty beside it.) */
.foot-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
.foot-brand { color: var(--brand); }
.foot-list { columns: 2; column-gap: var(--s3); }
.foot-teams .foot-list { columns: 3; }
.foot-list a { break-inside: avoid; }
.site-foot .foot-all { color: var(--link); }
.site-foot .foot-co a { display: inline-block; margin-right: var(--s3); }
.foot-brand .mark path { stroke: var(--surface); }
.foot-brand p { color: var(--muted); margin: var(--s2) 0 0; }
.site-foot h2 { font-size: var(--t-xs); color: var(--muted); margin-bottom: var(--s1); }
.site-foot nav a { display: block; padding: var(--s1) 0; color: var(--text); }
.foot-small { margin-top: var(--s3); font-size: var(--t-xs); color: var(--muted); }

/* ---------- larger screens ---------- */
/* ---------- shared: a button; an empty list; the More sheet; the header's search box ---------- */
.btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: 4px; background: var(--surface); font-size: var(--t-sm); font-weight: 600; }
.btn:hover { text-decoration: none; background: var(--surface-2); }
.empty { padding: var(--s4) var(--s3); color: var(--muted); }
.empty p { margin: 0; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--link); text-decoration: underline; cursor: pointer; min-height: 24px; }
.link-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.net-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s2) var(--s3); padding: var(--s2) var(--s3); background: var(--surface); border-bottom: 2px solid var(--soon); font-size: var(--t-sm); font-weight: 600; text-align: center; }
.net-bar .btn { min-height: 32px; }
/* grey rows where a list is about to be */
.skel { list-style: none; margin: 0; padding: 0; }
.skel li { height: 44px; border-bottom: 1px solid var(--line); position: relative; }
.skel li:last-child { border-bottom: 0; }
.skel li::before { content: ""; position: absolute; left: var(--s3); top: 15px; height: 14px; width: 46%; border-radius: 3px; background: var(--surface-2); animation: skel 1.2s ease-in-out infinite alternate; }
.skel li:nth-child(2n)::before { width: 62%; }
.skel li:nth-child(3n)::before { width: 34%; }
@keyframes skel { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .skel li::before { animation: none; } }
.empty-links { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3) !important; }
.head-search { display: none; margin-left: auto; }
.head-search input { width: 190px; height: 32px; padding: 0 var(--s3); font: inherit; font-size: var(--t-sm); color: var(--head-ink); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); border-radius: 4px; }
.head-search input::placeholder { color: rgba(255,255,255,.75); }
.head-search input:focus { outline: 2px solid #fff; outline-offset: 0; background: rgba(255,255,255,.22); }
.head-search + .search-btn { margin-left: auto; }
.head-search ~ .settings-btn { margin-left: 0; }
.more-menu { position: relative; }
.more-menu summary { list-style: none; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: var(--s2) 2px var(--s2); font-size: var(--t-xs); font-weight: 600; color: var(--muted); cursor: pointer; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary.is-here, .more-menu[open] summary { color: var(--brand); }
.more-sheet { position: absolute; right: var(--s2); bottom: calc(100% + var(--s2)); min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.18); overflow: hidden; }
.more-sheet a { display: block; padding: var(--s3) var(--s4); font-weight: 600; color: var(--text); }
.more-sheet a + a { border-top: 1px solid var(--line); }
.more-sheet a[aria-current] { color: var(--brand); }
/* scorecard: the links to each innings stay under the header */
.inn-nav { position: sticky; top: 46px; z-index: 6; }
.card .sum th, .card .sum td { font-weight: 700; }
/* a match page on a phone: the breadcrumb repeats the heading under it */
@media (max-width: 639px) { .wrap:has(.mh) .crumbs { display: none; } .wrap:has(.mh) .mh { margin-top: var(--s2); } }
/* A match page on a phone: the score comes first. The heading and its details stood above it for a third of the
   screen; here the heading is smaller and only the series is named (the venue and the start are in Match info). */
@media (max-width: 639px) {
  .mh { padding: var(--s1) 0 var(--s2); }
  .mh h1 { font-size: var(--t-md); }
  .mh-meta { display: flex; align-items: center; gap: var(--s2); margin-top: 2px; }
  .mh-meta b, .mh-venue, .mh-start { display: none; }
  .mh-series { flex: 1; min-width: 0; padding: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mh-meta .share-btn { flex: none; margin-left: 0; }
  .score { margin-top: var(--s2); }
  .wide-only { display: none; }
}
/* the newest ball, tinted for a moment like the score */
.commentary li.is-fresh { animation: fresh 1.8s ease-out; }
@media (prefers-reduced-motion: reduce) { .commentary li.is-fresh { animation: none; } }
/* A series page in one column: the two columns are taken apart and their blocks put in one order. (It was done so that
   the table could stand between the fixtures and the results. The table is not shown there now, .side-only: it has a page
   of its own, one tap away, and stays on this one where there is a column for it beside the matches.) */
@media (max-width: 899px) {
  .side-only { display: none; }
  .series-split > div, .series-split > aside { display: contents; }
  .series-split > * > * { min-width: 0; }      /* the blocks are the grid's items now: without this a long line widens the page */
  .series-split .block { margin: var(--s2) 0; }
  .so-1 { order: 1; } .so-2 { order: 2; } .so-3 { order: 3; } .so-4 { order: 4; } .so-5 { order: 5; } .so-6 { order: 6; }
}

@media (min-width: 640px) {
  .mini-other { display: inline; }
  /* from a tablet up the footer's three lists stand side by side, under the name until there is room beside it (900px) */
  /* (plain shares here, the sides' a little wider for its two columns: a share that may not be narrower than its names
     took the whole width of the line over it, which spans all three, and left the series a column one word wide) */
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
  .foot-list { columns: 1; }
  /* The twelve sides: two columns that stand together as one list, as wide as the names need (twelve in one column would
     make the footer 445px tall on a wide screen, not 276). Spread across a share of the width the two halves were 95px
     apart, more than the 61px between two of the footer's columns, and the second read as a column with no heading. */
  .foot-teams { padding-right: var(--s5); }
  .foot-teams .foot-list { columns: auto; display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--half, 6), auto); grid-auto-columns: max-content; column-gap: var(--s5); justify-content: start; }
  .site-foot .foot-co a { display: block; margin-right: 0; }
  .card .how { display: table-cell; }
  .card .how-row { display: none; }
  .sq-d { display: table-cell; }
  .sq-m { display: none; }
  .nums.card th:first-child { width: auto; }
  .nums.card tbody th { white-space: nowrap; }      /* "Pasindu / Sooriyabandara" stood on two lines beside a column with room to spare */
  .nums.card .how { width: 45%; }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .top-nav a { white-space: nowrap; }
  .to-top { bottom: 16px; }      /* 15px here too: at 14 a desktop screen read small */
  .tabs a { padding: var(--s2) var(--s3) var(--s2); }
  .tab-bar { display: none; }
  .top-nav { display: flex; align-self: stretch; margin-left: var(--s3); }
  .top-nav a { display: flex; align-items: center; padding: 0 var(--s3); color: var(--head-ink); font-weight: 600; font-size: var(--t-md); opacity: .88; }
  .top-nav a:hover { text-decoration: none; background: rgba(0,0,0,.14); opacity: 1; }
  .top-nav a[aria-current] { background: rgba(0,0,0,.22); opacity: 1; }
  .split { grid-template-columns: minmax(0, 1fr) 340px; }
  /* a match page: the match, beside it the side column, and under the match the quick answers (the third part, which in one
     column comes last). The second row takes what the side column needs beyond the match, so no gap opens above the answers. */
  .match-split { grid-template-rows: auto 1fr; }
  .match-split > aside { grid-column: 2; grid-row: 1 / span 2; }
  .match-split > .faq { grid-column: 1; grid-row: 2; align-self: start; }
  .two-col { grid-template-columns: 1fr 1fr; align-items: start; }
  .page-head h1, .mh h1 { font-size: var(--t-xl); }
  .foot-grid { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(max-content, 1fr) minmax(0, 1fr); }
  .foot-brand { grid-column: auto; }
}

/* The header's search box needs room beside seven menu items: from 1160px. Below that the magnifier stands in. */
@media (min-width: 1160px) {
  .head-search { display: block; }
  .search-btn { display: none; }
}

/* ---------- scorecard: a row is its player's link; batting beside bowling on a wide screen ---------- */
[data-row-links] tbody tr.is-link { cursor: pointer; }
[data-row-links] tbody tr.is-link:hover > * { background: var(--surface-2); }
.nums.card .dnb td { text-align: left; white-space: normal; padding-left: var(--s3); font-size: var(--t-sm); color: var(--muted); }      /* (.nums.card: on a phone the cells of figures are drawn in, and this line with them: it began 8px left of the names over it) */
.card .dnb b { color: var(--text); font-weight: 600; }
.card .tot > * { border-top: 2px solid var(--line); }
.glance .gl-who { text-align: left !important; white-space: nowrap; padding-left: var(--s4); }
@media (min-width: 640px) { .nums.glance th:first-child { width: auto; white-space: nowrap; } .glance .gl-who:last-child { width: 30%; } }
/* between a phone and a desk the two names of each innings may break: on one line each the table was 4px wider than its
   block, and had a bar under it to push it sideways */
@media (max-width: 1039px) { .glance .gl-who { white-space: normal; } }
/* The narrowest phones: the batting is the batter, runs, balls, fours and sixes. With the strike rate as well the table
   was up to 327px in a block of 294, and that column lay half outside it ("33.", "54."). */
@media (max-width: 359px) {
  .card.bat tr > :nth-child(7) { display: none; }
  .card.bat tr > :nth-child(6) { padding-right: var(--s3); }
}
.sq-m.always { display: block; }
.inn-side { display: flex; flex-direction: column; }
.inn-side > .table-scroll { border-top: 1px solid var(--line); }
@media (min-width: 1100px) {
  .inn-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .inn-grid > * { min-width: 0; }
  .inn-side { border-left: 1px solid var(--line); }
  .inn-side > .table-scroll { border-top: 0; }
  .inn-side > .table-scroll + .note { border-top: 1px solid var(--line); }
  .inn-bat .nums.card .how { width: 40%; }
}

/* ---------- the match before and the match after, in the series ---------- */
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.pn a { display: grid; gap: 1px; align-content: start; min-width: 0; padding: var(--s2) var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; color: var(--text); }
.pn a:hover { text-decoration: none; background: var(--surface-2); }
.pn small { font-size: var(--t-xs); font-weight: 700; color: var(--link); }
.pn b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }      /* two lines: on one, a phone showed "Desert Vipers vs ..." */
.pn time { white-space: normal; }
@media (max-width: 639px) { .pn b { -webkit-line-clamp: 3; font-size: var(--t-sm); } }      /* half a phone's width each: smaller, and a third line for "Melbourne Stars W vs Melbourne Renegades W, 32nd Match" */
.pn span { font-size: var(--t-xs); color: var(--muted); }
.pn-next { text-align: right; }
.pn-prev small::before { content: "‹ "; }
.pn-next small::after { content: " ›"; }

/* ---------- home: the counts in the strip, the last balls of a live match, a followed team's match ---------- */
.tab-n { display: inline-block; min-width: 20px; margin-left: 2px; padding: 0 var(--s1); border-radius: 9px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--t-xs); font-variant-numeric: tabular-nums; text-align: center; }
.mb-recent { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin-top: var(--s1); }
.mr.is-mine, .mb.is-mine { box-shadow: inset 3px 0 0 var(--brand); }
/* grey blocks where "Your teams" will be; a browser that follows teams shows the section from the first paint */
.skel-mb { min-height: 148px; background: var(--surface-2); animation: skel 1.2s ease-in-out infinite alternate; }
.has-mine #mine[hidden] { display: block; }
@media (prefers-reduced-motion: reduce) { .skel-mb { animation: none; } }

/* ---------- a slow page: a line that creeps along under the header ---------- */
.nav-wait { position: fixed; top: 0; left: 0; z-index: 60; height: 3px; width: 100%; background: var(--accent); transform-origin: left; animation: nav-wait 8s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes nav-wait { from { transform: scaleX(.05); } to { transform: scaleX(.92); } }
@media (prefers-reduced-motion: reduce) { .nav-wait { animation: none; transform: scaleX(.6); } }

/* ---------- Windows high contrast and other forced colours: what colour alone said gets a border or the system's own colours ---------- */
@media (forced-colors: active) {
  .badge, .bx, .form, .tab-count, .tab-n, .chip, .btn, .panel, .mb, .pn a, .net-bar { border: 1px solid CanvasText; }
  .badge, .bx, .form { forced-color-adjust: none; background: Canvas; color: CanvasText; box-shadow: none; }
  .bx-four, .bx-six, .bx-w, .form-w, .form-l { background: CanvasText; color: Canvas; }
  .badge.has-img { border: 0; background: transparent; }
  .follow[aria-pressed="true"], .pick[aria-pressed="true"] { background: Highlight; color: HighlightText; border-color: Highlight; }
  .tabs a[aria-current], .tabs a.is-on, .tab-bar a[aria-current] { border-bottom-color: Highlight; color: Highlight; }
  .mr.is-mine, .mb.is-mine, .in-top th, .card .is-in th, .card .how-row.is-in td { box-shadow: none; border-left: 3px solid Highlight; }
  .st-live, .ev-WICKET { color: CanvasText; font-weight: 700; }
  .skel li::before, .skel-mb, .nav-wait { background: GrayText; }
  :focus-visible { outline-color: Highlight; }
}
/* a scorecard on a phone: tighter figures, so a name keeps to one line more often; the same for the batters at the crease */
@media (max-width: 639px) { .nums.card td, .nums.card thead th:not(:first-child), .crease .nums td, .crease .nums thead th:not(:first-child) { padding-left: var(--s1); padding-right: var(--s1); } .nums.card td:last-child, .nums.card thead th:last-child, .crease .nums td:last-child, .crease .nums thead th:last-child { padding-right: var(--s3); } }
/* At the crease on a 320px phone, in a Test: with three figures of balls faced and "18.3" overs the table was 300px in a
   box of 294 (the last column 5px past the edge), and the name had 95px: the star of the batter on strike fell to a
   line of its own under "Daryl Mitchell", and "Glenn Phillips" took two lines. The figures stand closer there. */
@media (max-width: 339px) { .crease .nums td, .crease .nums thead th:not(:first-child) { padding-left: 2px; padding-right: 2px; } .crease .nums td:last-child, .crease .nums thead th:last-child { padding-right: var(--s2); } .crease .plain th { padding-left: var(--s2); } }

/* match alerts, under the teams to follow */
/* the settings page: the box that finds a team, the lines of "On this device", and what is said where alerts cannot be had */
.st-find { margin: var(--s3) 0; }
.st-find[hidden] { display: none; }
.st-find input { width: 100%; max-width: 340px; height: 40px; padding: 0 var(--s3); font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.st-find input:focus { outline: 2px solid var(--brand); outline-offset: 0; }
.st-none { margin: var(--s2) 0 0; }
.st-line { margin: 0 0 var(--s3); }
.st-line[hidden], .alerts:not([hidden]) + .alerts-off { display: none; }
.alerts-off { margin: var(--s3) 0 0; }
.alerts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: var(--s3) 0 0; }
.alerts[hidden] { display: none; }
.alerts .btn { color: var(--link); cursor: pointer; }
.alerts .btn[aria-pressed="true"] { color: var(--text); }

/* a link inside a line of text is underlined: colour alone does not mark it for everyone */
.prose a, .page-sub a, .mh-meta a, .note a, .mb-top a, .empty p a, .plain-page p a, .plain-page li a, .watch-note a { text-decoration: underline; text-underline-offset: 2px; }
.page-sub a.form { text-decoration: none; }      /* (a square of a side's form is a link in that line too: its letter was underlined) */
.rank-line a { display: inline-block; padding: var(--s1) 0; margin: calc(-1 * var(--s1)) 0; }      /* 17px high: 25 now, and nothing moves */
