/* Countdowns (/countdowns/, /<event>-countdown/ and their language copies, lib/countdowns.js).
   The GTA 6 countdown stylesheet (gta6-countdown.css) made general: same tokens, header, boxes and
   footer, plus the full screen card, the "More countdowns" list, the hub list and the New Year list
   of places. System fonts, light by default, dark from <html data-theme="dark">. */

:root {
    color-scheme: light;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-ar: system-ui, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --accent: #b93a0e; --bg: #f2f4f7; --card: #ffffff; --field: #f7f8fa;
    --text: #1b1f24; --text-2: #3d434c; --muted: #57606a; --border: #dde1e6; --border-2: #b9c0c8;
    --tld: #c62a3c; --focus: #2563eb; --radius: 12px; --shadow: 0 1px 3px rgba(16, 24, 40, .1);
    --sun: linear-gradient(135deg, #ff5f8f 0%, #ff8a3d 55%, #ffc24b 100%);
    --box: #1d1330; --box-ink: #ffffff; --box-sub: #f6c7da;
    --past: #177245; --next: #b93a0e;
    --wrap: 1040px;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --accent: #fb923c; --bg: #0f1113; --card: #181a1e; --field: #121417;
    --text: #eceef1; --text-2: #c3c7cf; --muted: #a3a8b2; --border: #2c3036; --border-2: #4a5059;
    --tld: #ff5c6c; --focus: #8ab4ff; --shadow: 0 0 0 1px #24272c;
    --box: #24173b; --past: #5fd38d; --next: #fb923c;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
html[lang="ar"] body { font-family: var(--font-ar); }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -200px; inset-inline-start: 8px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--card); color: var(--text); }
.skip-link:focus { top: 8px; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header ---------- */
.site-head { position: relative; z-index: 40; background: var(--card); border-bottom: 1px solid var(--border); }
.head-row { display: flex; align-items: center; gap: 20px; max-width: var(--wrap); height: 56px; margin: 0 auto; padding: 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 17px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: block; width: 28px; height: 28px; }
.tld { color: var(--tld); }
.head-nav { display: flex; gap: 20px; min-width: 0; margin-inline-start: auto; overflow: hidden; }
.head-nav a { padding-block: 17px; border-bottom: 2px solid transparent; color: var(--text-2); font-size: 14px; text-decoration: none; white-space: nowrap; }
.head-nav a:hover { color: var(--text); }
.head-nav a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.head-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--border-2); }
.theme-toggle .ico-sun, :root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
.lang { position: relative; }
.lang summary { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-2); font-size: 12.5px; font-weight: 600; list-style: none; cursor: pointer; }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; z-index: 50; inset-inline-end: 0; top: calc(100% + 6px); min-width: 180px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); box-shadow: 0 18px 48px -12px rgba(16, 24, 40, .28); }
.lang a { display: block; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; text-decoration: none; }
.lang a:hover { background: var(--field); }
.lang a[aria-current="true"] { font-weight: 650; }

/* ---------- page ---------- */
.main { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 40px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
h1 { font-size: 1.9rem; font-weight: 750; line-height: 1.15; letter-spacing: -.02em; }
.lede { max-width: 68ch; margin-top: 8px; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.lede strong { color: var(--text); }
.card { padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }

/* ---------- the countdown ---------- */
.cd-card { margin-top: 20px; overflow: hidden; }
.cd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cd-hl { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; min-width: 0; }
.cd-title { font-size: 15px; font-weight: 650; }
.cd-date { color: var(--muted); font-size: 14px; }
/* shown by countdown.js where the Fullscreen API exists; it keeps its place either way */
.cd-fs { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; margin-top: -4px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; visibility: hidden; }
.cd-fs.is-ready { visibility: visible; }
.cd-fs:hover { color: var(--text); border-color: var(--border-2); }
.cd-fs .ico { width: 16px; height: 16px; }
.cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.cd > div { display: grid; place-items: center; min-height: 128px; padding: 14px 6px; border-radius: 12px; background: var(--box); color: var(--box-ink); position: relative; overflow: hidden; }
.cd > div::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--sun); }
.cd b { display: block; font: 750 clamp(34px, 7vw, 64px)/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cd span { display: block; margin-top: 6px; color: var(--box-sub); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
html[lang="ar"] .cd span { letter-spacing: 0; }
/* the sentence under the boxes answers in words; without the boxes (reduced motion, the day
   itself, an unknown date) it is the big line and takes the boxes' height, so nothing moves */
.cd-text { min-height: 2.7em; margin-top: 14px; font-size: 17px; font-weight: 650; line-height: 1.35; }
.cd-card[data-mode="today"] .cd, .cd-card[data-mode="off"] .cd { display: none; }
.cd-card[data-mode="today"] .cd-text, .cd-card[data-mode="off"] .cd-text { display: flex; align-items: center; min-height: 144px; margin-top: 16px; font-size: 26px; }
.cd-card[data-mode="today"] .cd-text { color: var(--accent); font-size: clamp(28px, 5vw, 44px); font-weight: 750; }
@media (prefers-reduced-motion: reduce) {
    .cd-card[data-mode="live"] .cd { display: none; }
    .cd-card[data-mode="live"] .cd-text { display: flex; align-items: center; min-height: 144px; margin-top: 16px; font-size: 24px; }
}
.cd-sleeps { margin-top: 4px; color: var(--text-2); font-size: 15px; font-weight: 600; }
.cd-card[data-mode="today"] .cd-sleeps, .cd-card[data-mode="off"] .cd-sleeps { display: none; }
.cd-note { min-height: 3em; margin-top: 10px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* full screen: the card alone, big digits for a TV or a classroom board */
.cd-card:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 4vmin 5vmin; border: 0; border-radius: 0; background: var(--bg); overflow: auto; }
.cd-card:-webkit-full-screen { display: flex; flex-direction: column; justify-content: center; padding: 4vmin 5vmin; border: 0; border-radius: 0; background: var(--bg); }
.cd-card:fullscreen .cd-title { font-size: clamp(20px, 3.4vmin, 44px); }
.cd-card:fullscreen .cd-date { font-size: clamp(16px, 2.6vmin, 32px); }
.cd-card:fullscreen .cd { gap: 2vmin; margin-top: 4vmin; }
.cd-card:fullscreen .cd > div { min-height: 30vmin; border-radius: 2vmin; }
.cd-card:fullscreen .cd b { font-size: clamp(48px, 13vmin, 240px); }
.cd-card:fullscreen .cd span { font-size: clamp(13px, 2.4vmin, 30px); }
.cd-card:fullscreen .cd-text { font-size: clamp(18px, 3.6vmin, 48px); }
.cd-card:fullscreen .cd-sleeps, .cd-card:fullscreen .cd-note { font-size: clamp(14px, 2.4vmin, 30px); }
.cd-card:-webkit-full-screen .cd > div { min-height: 30vmin; }
.cd-card:-webkit-full-screen .cd b { font-size: 13vmin; }

/* ---------- ads: space reserved up front, labelled ---------- */
.ad { min-width: 0; margin: 32px auto 0; text-align: center; }
.ad-label { margin-bottom: 6px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
html[lang="ar"] .ad-label { letter-spacing: 0; }
.ad-infeed { min-height: 270px; }
.ad-infeed ins { min-height: 250px; }
.ad-bottom { max-width: 728px; min-height: 110px; }
.ad-bottom ins { min-height: 90px; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }

/* ---------- facts, text ---------- */
.sec { margin-top: 32px; }
.sec h2 { font-size: 1.35rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.facts { display: grid; margin-top: 12px; border-top: 1px solid var(--border); }
.facts > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted); font-size: 14px; font-weight: 600; }
.facts dd { font-size: 15px; }
.facts dd small { color: var(--muted); font-size: 13px; }
.facts a { color: var(--text); text-underline-offset: 3px; }
.facts.years > div { grid-template-columns: 120px minmax(0, 1fr); }
.facts-h3 { margin-top: 22px; font-size: 16px; font-weight: 650; }
.src { max-width: 75ch; margin-top: 10px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.prose p { max-width: 70ch; margin-top: 10px; color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.go { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.go a { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); text-decoration: none; }
.go a:hover { border-color: var(--border-2); }
.go b { display: block; font-size: 15px; }
.go small { display: block; margin-top: 4px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* ---------- lists of countdowns: "More countdowns" and the hub ---------- */
.cd-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-top: 12px; }
.cd-more a, .cd-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); text-decoration: none; }
.cd-more a:hover, .cd-list a:hover { border-color: var(--border-2); }
.m-name, .l-name { min-width: 0; font-weight: 650; }
.m-days, .l-days { flex: none; color: var(--accent); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.more-all { margin-top: 12px; font-size: 14px; }
.more-all a { color: var(--text-2); text-underline-offset: 3px; }
.cd-list { display: grid; gap: 8px; margin-top: 20px; }
.cd-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n d" "w d"; align-items: center; column-gap: 16px; padding: 14px 16px; }
.l-name { grid-area: n; font-size: 16px; }
.l-date { grid-area: w; color: var(--muted); font-size: 13.5px; }
.l-days { grid-area: d; font-size: 16px; }
.cd-list + .ad { margin-bottom: 0; }
.ad + .cd-list { margin-top: 32px; }

/* ---------- New Year: places reaching midnight ---------- */
.zones { display: grid; margin-top: 12px; border-top: 1px solid var(--border); counter-reset: none; }
.zones li { display: grid; grid-template-columns: 92px minmax(0, 1fr) 150px; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.z-off { color: var(--muted); font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.z-when { color: var(--text-2); font-variant-numeric: tabular-nums; text-align: end; }
.zones li.is-past .z-when { color: var(--past); font-weight: 650; }
.zones li.is-next { background: linear-gradient(90deg, rgba(255, 138, 61, .10), transparent 70%); }
html[dir="rtl"] .zones li.is-next { background: linear-gradient(270deg, rgba(255, 138, 61, .10), transparent 70%); }
.zones li.is-next .z-when { color: var(--next); font-weight: 700; }
.z-you { display: inline-block; margin-inline-start: 8px; padding: 0 8px; border: 1px solid var(--border-2); border-radius: 999px; color: var(--text-2); font-size: 12px; font-weight: 600; }

/* "More live counters", rendered by the server into the page: link chips */
.creator-spotlight { margin-top: 32px; }
.creator-spotlight h2 { font-size: 1.35rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.creator-spotlight h3 { margin: 20px 0 0; font-size: 15px; font-weight: 650; }
.creator-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.creator-links a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); font-size: 13.5px; text-decoration: none; }
.creator-links a:hover { border-color: var(--border-2); }
.creator-spotlight, .site-footer { content-visibility: auto; contain-intrinsic-size: auto 500px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; padding: 24px 16px 32px; border-top: 1px solid var(--border); background: var(--card); }
.site-footer nav { max-width: var(--wrap); margin: 0 auto; }
.site-footer span { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 650; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { display: inline-block; padding-block: 10px; color: var(--text-2); font-size: 13.5px; text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer p { max-width: var(--wrap); margin: 12px auto 0; color: var(--muted); font-size: 12.5px; }

@media (max-width: 860px) {
    .cd-more { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 719.98px) {
    .head-row { height: 52px; gap: 10px; }
    .head-nav { display: none; }
    .head-tools { margin-inline-start: auto; }
    h1 { font-size: 1.55rem; }
    .lede { font-size: 15px; }
    .card { padding: 16px; }
    .cd-card { margin-top: 16px; }
    .cd-hl { display: block; }
    .cd-title { font-size: 14.5px; }
    .cd-date { font-size: 13px; }
    .cd-fs { width: 32px; padding: 0; justify-content: center; }
    .cd-fs span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    .cd { gap: 8px; margin-top: 12px; }
    .cd > div { min-height: 88px; padding: 10px 2px; border-radius: 10px; }
    .cd b { font-size: clamp(26px, 8.4vw, 40px); }
    .cd span { font-size: 11px; letter-spacing: .02em; }
    .cd-text { margin-top: 10px; font-size: 15.5px; }
    .cd-card[data-mode="today"] .cd-text, .cd-card[data-mode="off"] .cd-text { min-height: 104px; font-size: 21px; }
    .cd-note { margin-top: 6px; font-size: 13px; }
    .ad { margin-top: 24px; }
    .facts > div, .facts.years > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .zones li { grid-template-columns: 76px minmax(0, 1fr); }
    .z-when { grid-column: 2; text-align: start; }
    .cd-list a { padding: 12px 14px; }
}
@media (max-width: 719.98px) and (prefers-reduced-motion: reduce) {
    .cd-card[data-mode="live"] .cd-text { min-height: 104px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
    .cd > div { border: 1px solid CanvasText; }
}
