/* GTA 6 countdown (/gta-6-countdown/ and its es, pt, de, fr, id, it, ar copies). One file, system
   fonts, light by default, dark from <html data-theme="dark">. The same tokens, header and footer
   as the FiveM pages (fivem.css); the countdown boxes are the only place with the sunset colours. */

: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: #c2410c; --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;
    --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;
}

*, *::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, as on the FiveM pages ---------- */
.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; margin-inline-start: auto; }
.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; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.cd-title { font-size: 15px; font-weight: 650; }
.cd-date { color: var(--muted); font-size: 14px; }
.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; }
.cd-text { margin-top: 16px; font-size: 22px; font-weight: 700; line-height: 1.35; }
.cd-note { margin-top: 14px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
/* reduced motion: one sentence, updated once a minute, no boxes (also before the script runs,
   so nothing moves); after the date the sentence says it is out */
.cd-text { display: none; }
.cd-card[data-mode="text"] .cd, .cd-card[data-mode="out"] .cd { display: none; }
.cd-card[data-mode="text"] .cd-text, .cd-card[data-mode="out"] .cd-text { display: block; }
@media (prefers-reduced-motion: reduce) {
    .cd-card:not([data-mode="boxes"]) .cd { display: none; }
    .cd-card:not([data-mode="boxes"]) .cd-text { display: block; }
}

/* ---------- 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, links, 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: 200px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted); font-size: 14px; font-weight: 600; }
.facts dd { font-size: 15px; }
.src { margin-top: 10px; color: var(--muted); font-size: 13px; }
.src a { color: var(--text-2); text-underline-offset: 3px; }
.go { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.go a { display: block; height: 100%; 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; }
.prose p { max-width: 70ch; margin-top: 10px; color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.main > .spacenode-promo-card { margin: 32px 0 0; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-of-type { margin-top: 12px; border-top: 1px solid var(--border); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--muted); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.faq details p { max-width: 70ch; padding-bottom: 14px; color: var(--text-2); line-height: 1.65; }

/* "More live counters", rendered by the server into the page: link chips as on the FiveM pages */
.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, .faq, .site-footer { content-visibility: auto; contain-intrinsic-size: auto 500px; }

/* ---------- footer, as on the FiveM pages ---------- */
.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) {
    .go { 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 { gap: 8px; }
    .cd > div { min-height: 96px; padding: 12px 2px; border-radius: 10px; }
    .cd b { font-size: clamp(26px, 8.4vw, 40px); }
    .cd span { font-size: 11px; letter-spacing: .02em; }
    .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@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; }
}
