/* =========================================================
   Olympiad platform — public site
   Palette: Bangladesh green + marigold on cool paper.
   Type: Baloo Da 2 (display, Bangla + Latin) / Hind Siliguri (text)
   ========================================================= */
:root {
  --brand: #0b6e4f;
  --accent: #f2a541;
  --ink: #16232e;
  --ink-2: #4a5a63;
  --paper: #fbfcf8;
  --surface: #ffffff;
  --tint: #eef5f0;
  --line: #d9e2dc;
  --red: #c8373f;
  --grid: rgba(11, 110, 79, .09);
  --radius-s: 6px;
  --radius-m: 12px;
  --shadow: 0 1px 0 rgba(22, 35, 46, .06), 0 8px 24px -12px rgba(22, 35, 46, .18);
  --font-d: "Baloo Da 2", "Hind Siliguri", system-ui, sans-serif;
  --font-t: "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --ink: #e6eee8;
  --ink-2: #a3b3ab;
  --paper: #0e1916;
  --surface: #15231f;
  --tint: #12211c;
  --line: #2a3b35;
  --grid: rgba(242, 165, 65, .07);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
  color-scheme: dark;
}
[data-theme="dark"] .btn-primary { color: #0e1916; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-t); font-size: 17px; line-height: 1.65;
}
body.lang-bn { font-size: 17.5px; line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
[data-theme="dark"] a { color: #6fd3ab; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, .h4 { font-family: var(--font-d); line-height: 1.15; margin: 0 0 .4em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.22rem; }
.h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }
.mt { margin-top: 1.6rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 99; }
.skip:focus { left: 8px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.hp { position: absolute; left: -9999px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  font: 600 1rem/1 var(--font-t); padding: .85em 1.3em; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 85%, #000); }
[data-theme="dark"] .btn-primary { background: var(--accent); }
[data-theme="dark"] .btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--tint); }
.btn-small { padding: .6em 1em; font-size: .92rem; background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; margin-top: 1rem; }
.btn .count { background: var(--accent); color: var(--ink); border-radius: 999px; padding: .25em .6em; font-size: .85em; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.logo { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-family: var(--font-d); font-weight: 800; font-size: 1.3rem; }
[data-theme="dark"] .logo { color: var(--ink); }
.logo img { max-height: 46px; width: auto; }
.logo-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 1.35rem; transform: rotate(-6deg); box-shadow: 3px 3px 0 var(--accent); }
.mainnav { display: flex; align-items: center; gap: 1.2rem; }
.mainnav ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.mainnav ul a { display: block; padding: .45rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.mainnav ul a:hover { background: var(--tint); }
.mainnav ul a[aria-current] { background: var(--ink); color: var(--paper); }
.head-tools { display: flex; align-items: center; gap: .5rem; }
.lang-switch { display: flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px; }
.lang-switch a { padding: .2rem .65rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.lang-switch a[aria-current] { background: var(--accent); color: #16232e; }
.theme-toggle { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); padding: 8px; cursor: pointer; }
.ico { flex: none; vertical-align: middle; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .mainnav { position: fixed; inset: 68px 0 auto 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 1rem 20px 1.4rem; display: none; max-height: calc(100vh - 68px); overflow: auto; }
  .mainnav.open { display: flex; }
  .mainnav ul { flex-direction: column; }
  .mainnav ul a { padding: .7rem .6rem; font-size: 1.05rem; }
}

/* ---------- Notices ---------- */
.flash-wrap { padding-top: 1rem; }
.notice { padding: .8rem 1rem; border-radius: var(--radius-s); margin-bottom: .8rem; border-left: 4px solid var(--brand); background: var(--tint); }
.notice-error { border-color: var(--red); background: color-mix(in srgb, var(--red) 10%, var(--surface)); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 3rem; }
.hero-grid > *, .split > *, .detail-grid > *, .game-layout > * { min-width: 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.3rem); font-weight: 800; max-width: 14ch; margin-bottom: .35em; }
.lang-bn .hero h1 { max-width: 16ch; line-height: 1.25; }
.hero .lead { margin-bottom: 1.8rem; }
.season-chip { display: inline-block; background: var(--ink); color: var(--paper); padding: .25rem .8rem; border-radius: 999px; font-size: .9rem; font-weight: 600; margin-bottom: 1.2rem; }

/* The memorable element: a page from a maths exercise book */
.potd {
  position: relative; padding: 1.8rem 1.8rem 1.5rem 3.4rem; border-radius: 4px var(--radius-m) var(--radius-m) 4px;
  background-color: var(--surface);
  background-image:
    linear-gradient(90deg, transparent 2.3rem, color-mix(in srgb, var(--red) 55%, transparent) 2.3rem, color-mix(in srgb, var(--red) 55%, transparent) calc(2.3rem + 1.5px), transparent calc(2.3rem + 1.5px)),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px, 22px 22px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  transform: rotate(1.2deg);
}
.potd::before { content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 28px; margin-left: -55px; background: color-mix(in srgb, var(--accent) 70%, transparent); transform: rotate(-3deg); border-radius: 2px; }
.potd-label { font-family: var(--font-d); font-weight: 700; color: var(--brand); font-size: 1.05rem; margin-bottom: .6rem; }
[data-theme="dark"] .potd-label { color: var(--accent); }
.potd-q { font-size: 1.18rem; line-height: 1.55; font-weight: 500; }
.potd-form { display: flex; gap: .6rem; margin-top: 1rem; }
.potd-form input { flex: 1; min-width: 0; font: 600 1.15rem var(--font-d); padding: .55rem .9rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--surface); color: var(--ink); }
.potd-msg { min-height: 1.6em; margin: .7rem 0 .3rem; font-weight: 600; }
.potd-msg.right { color: var(--brand); } .potd-msg.wrong { color: var(--red); }
[data-theme="dark"] .potd-msg.right { color: #6fd3ab; }
.potd.solved { animation: pop .5s ease; }
@keyframes pop { 40% { transform: rotate(0deg) scale(1.03); } 100% { transform: rotate(1.2deg); } }
.potd-hint summary { cursor: pointer; color: var(--ink-2); }

/* ---------- Level bar ---------- */
.level-bar { background: var(--ink); color: var(--paper); }
.level-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; padding: .9rem 0; }
.level-bar-label { font-family: var(--font-d); font-weight: 700; margin-right: .5rem; font-size: 1.1rem; }
.level-bar a { color: var(--paper); text-decoration: none; padding: .3rem .85rem; border: 1.5px solid color-mix(in srgb, var(--paper) 30%, transparent); border-radius: 999px; font-size: .95rem; }
.level-bar a:hover { background: var(--accent); color: #16232e; border-color: var(--accent); }
[data-theme="dark"] .level-bar { color: var(--ink); background: #08110e; border-block: 1px solid var(--line); }
[data-theme="dark"] .level-bar a { color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: clamp(2.8rem, 6vw, 4.5rem) 0; }
.section-tint { background: var(--tint); }
.section-tight { margin-top: 1.4rem; margin-bottom: 3rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; }
.section-sub { margin-top: -.6rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }

/* ---------- Ticket cards (competitions) ---------- */
.ticket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.2rem; }
.ticket { --c: var(--brand); position: relative; display: grid; grid-template-columns: 1fr 112px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.ticket::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--c); }
.ticket-main { padding: 1.15rem 1.1rem 1rem 1.4rem; }
.ticket-main h3 { margin: .35rem 0 .35rem; }
.ticket-main h3 a { color: var(--ink); text-decoration: none; }
.ticket-main h3 a::after { content: ""; position: absolute; inset: 0; }
.ticket-main h3 a:hover { text-decoration: underline; }
.ticket-main p.muted { margin: 0; font-size: .95rem; }
.ticket-meta { display: flex; gap: .6rem; align-items: center; font-size: .85rem; color: var(--ink-2); margin: 0; flex-wrap: wrap; }
.ticket-stub { position: relative; border-left: 2px dashed var(--line); padding: 1rem .6rem; display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; background: color-mix(in srgb, var(--c) 7%, var(--surface)); }
.ticket-stub::before, .ticket-stub::after { content: ""; position: absolute; left: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.section-tint .ticket-stub::before, .section-tint .ticket-stub::after { background: var(--tint); }
.ticket-stub::before { top: -10px; } .ticket-stub::after { bottom: -10px; }
.stub-level { font-family: var(--font-d); font-weight: 700; line-height: 1.15; font-size: 1rem; }
.stub-date { font-family: var(--font-d); font-weight: 700; font-size: 1.15rem; line-height: 1.1; color: var(--c); }
[data-theme="dark"] .stub-date { color: var(--accent); }
.stub-date small { display: block; font: 500 .75rem var(--font-t); color: var(--ink-2); }
.status { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--tint); color: var(--ink-2); }
.status-open { background: var(--brand); color: #fff; }
.status-open::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #9ff0c9; margin-right: .35rem; vertical-align: middle; }
.status-upcoming { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); color: var(--ink); }
.status-completed { background: var(--ink); color: var(--paper); }

/* ---------- Games ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.game-card { display: flex; align-items: center; gap: 1rem; padding: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.game-card:hover { border-color: var(--ink); }
.game-card img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.game-card { --g: var(--brand); }
.game-glyph { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--g); color: #fff; font: 800 1.5rem var(--font-d); }
.game-info { display: flex; flex-direction: column; line-height: 1.35; }
.game-info strong { font-family: var(--font-d); font-size: 1.1rem; }
[data-theme="dark"] .game-card { color: var(--ink); }
.game-card.subj-math, .subj-math { --g: #0b6e4f; } .subj-physics { --g: #2d5fa8; } .subj-chemistry { --g: #8a4fbf; } .subj-biology { --g: #3f8f3a; }
.subj-gk { --g: #c26b1a; } .subj-english { --g: #b8323a; } .subj-bangla { --g: #7a3a18; } .subj-ict { --g: #1d6f7a; } .subj-other { --g: #555; }

/* ---------- Mini leaderboard / upcoming ---------- */
.mini-board { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.mini-board li { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.mini-board .rank { font: 800 1.4rem var(--font-d); color: var(--ink-2); text-align: center; }
.mini-board li:nth-child(1) .rank { color: #b8860b; } .mini-board li:nth-child(2) .rank { color: #7d8a93; } .mini-board li:nth-child(3) .rank { color: #a0522d; }
.mini-board .who { display: flex; flex-direction: column; line-height: 1.3; }
.mini-board .who small { color: var(--ink-2); }
.mini-board .score { font: 700 1.2rem var(--font-d); }
.mini-board.compact li { padding: .45rem 0; grid-template-columns: 30px 1fr auto; }
.mini-board.compact .rank { font-size: 1.1rem; }
.upcoming-list { list-style: none; padding: 0; margin: 0; }
.upcoming-list li { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.upcoming-list .up-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #16232e; flex: none; }
.upcoming-list a { color: var(--ink); text-decoration: none; font-family: var(--font-d); font-size: 1.15rem; }
.upcoming-list a:hover { text-decoration: underline; }
.upcoming-list p { margin: .1rem 0 0; }

/* ---------- Generic cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.6rem; }
.post-card img, .project-img img { aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-m); width: 100%; margin-bottom: .8rem; }
.post-card h3 a, .project-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover, .project-card h3 a:hover { text-decoration: underline; }
.post-card p.small { margin-bottom: .3rem; }
.project-img { display: block; }
.project-img > span { display: grid; place-items: center; aspect-ratio: 16/9; border-radius: var(--radius-m); background: var(--surface); border: 1px dashed var(--line); color: var(--accent); margin-bottom: .8rem; }
.project-card p.small { margin-bottom: .3rem; font-weight: 600; }

/* ---------- Page heads, filters ---------- */
.page-head { padding: clamp(2.2rem, 5vw, 3.6rem) 0 1.6rem; border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; background: var(--hero-img, none) center/cover; }
.page-head h1 { max-width: 22ch; }
.comp-head { border-bottom: 5px solid var(--c); }
.game-head { background: linear-gradient(135deg, color-mix(in srgb, var(--g) 14%, var(--paper)), var(--paper)); }
.head-with-action { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; }
.crumbs { font-size: .9rem; color: var(--ink-2); margin-bottom: .6rem; }
.tabs { display: flex; gap: .2rem; border-bottom: 2px solid var(--line); margin-bottom: 1.2rem; overflow-x: auto; }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a[aria-current] { color: var(--ink); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { padding: .35rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; }
.chips a[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.filters input, .filters select, .form-grid input, .form-grid select, .form-grid textarea {
  font: inherit; font-size: 1rem; padding: .6rem .8rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%;
}
.filters input, .filters select { width: auto; min-width: 170px; }
.filters input:focus, .filters select:focus, .form-grid :is(input, select, textarea):focus { border-color: var(--brand); outline: 2px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.empty { text-align: center; padding: 4rem 1rem; }
.empty h1 { font-size: 1.8rem; }
.pager { display: flex; gap: .4rem; justify-content: center; margin: 2rem 0 3rem; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pager span { background: var(--ink); color: var(--paper); }

/* ---------- Detail pages ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; margin-bottom: 3rem; }
.side { position: sticky; top: 90px; }
.facts { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: .4rem 1.1rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border: 0; }
.facts dt { color: var(--ink-2); } .facts dd { margin: 0; font-weight: 600; text-align: right; }
.prose { max-width: 70ch; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose img { border-radius: var(--radius-m); margin: 1rem 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { border-left: 4px solid var(--accent); margin: 1.2em 0; padding: .2em 1.2em; color: var(--ink-2); }
.prose pre { background: var(--ink); color: var(--paper); padding: 1rem; border-radius: 8px; overflow-x: auto; }
.cover { border-radius: var(--radius-m); margin-bottom: 1.6rem; width: 100%; }
.single { padding: 2.5rem 0 3rem; }
.byline { font-size: 1.05rem; }
.share { margin-top: 2rem; }
.video { position: relative; aspect-ratio: 16/9; margin: 1rem 0 1.6rem; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius-m); }

/* ---------- Forms ---------- */
.register-box { margin-bottom: 4rem; padding: 2rem; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius-m); box-shadow: 6px 6px 0 var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.form-grid label > span { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.form-grid .check input { width: auto; margin-top: .35rem; }
.reg-success { text-align: center; padding: 1rem; }
.reg-success .tick { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--brand); color: #fff; margin-bottom: 1rem; }
.reg-code { font: 800 clamp(1.8rem, 5vw, 2.6rem) var(--font-d); letter-spacing: .06em; background: var(--tint); display: inline-block; padding: .3rem 1.2rem; border-radius: 10px; border: 2px dashed var(--brand); }
.closed-note { text-align: center; }

/* ---------- Leaderboard table ---------- */
.board-title { margin-top: 1rem; }
.table-scroll { overflow-x: auto; margin-bottom: 3rem; border: 1px solid var(--line); border-radius: var(--radius-m); }
.board { width: 100%; border-collapse: collapse; background: var(--surface); }
.board th, .board td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board th { font-size: .88rem; color: var(--ink-2); font-weight: 600; background: var(--tint); }
.board .num { text-align: right; font-variant-numeric: tabular-nums; }
.board .rank { font: 800 1.15rem var(--font-d); width: 60px; }
.board tr.p1 .rank { color: #b8860b; } .board tr.p2 .rank { color: #7d8a93; } .board tr.p3 .rank { color: #a0522d; }
.board tr.podium td { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.medal { padding: .15rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--tint); }
.medal-champion { background: var(--ink); color: var(--accent); }
.medal-gold { background: #f6dd8a; color: #5a4300; } .medal-silver { background: #dfe4e8; color: #39444c; } .medal-bronze { background: #efc8a6; color: #5c2f0c; }

/* ---------- Game stage ---------- */
.game-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; margin-bottom: 4rem; align-items: start; }
.game-stage { background: var(--surface); border: 2px solid var(--ink); border-radius: 18px; padding: clamp(1.2rem, 4vw, 2.2rem); min-height: 380px; box-shadow: 6px 6px 0 var(--g, var(--brand)); }
.g-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.4rem; font-weight: 600; }
.g-pill { background: var(--tint); padding: .3rem .9rem; border-radius: 999px; font-variant-numeric: tabular-nums; }
.g-pill.warn { background: var(--red); color: #fff; }
.g-timer { height: 6px; background: var(--tint); border-radius: 99px; overflow: hidden; margin-bottom: 1.6rem; }
.g-timer i { display: block; height: 100%; background: var(--g, var(--brand)); transition: width 1s linear; }
.g-q { font: 700 clamp(1.3rem, 3vw, 1.75rem)/1.35 var(--font-d); margin-bottom: 1.4rem; }
.g-big { font: 800 clamp(2.6rem, 8vw, 4.4rem)/1 var(--font-d); text-align: center; margin: 1rem 0 1.6rem; font-variant-numeric: tabular-nums; }
.g-opts { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.g-opt { font: 600 1.05rem var(--font-t); text-align: left; padding: .95rem 1.1rem; border-radius: 12px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.g-opt:hover:not(:disabled) { border-color: var(--ink); }
.g-opt.right { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 16%, var(--surface)); }
.g-opt.wrong { border-color: var(--red); background: color-mix(in srgb, var(--red) 14%, var(--surface)); }
.g-input { display: flex; gap: .6rem; justify-content: center; }
.g-input input { font: 700 1.6rem var(--font-d); text-align: center; width: min(260px, 100%); padding: .5rem; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); letter-spacing: .08em; }
.g-feedback { min-height: 3.2em; margin-top: 1rem; padding: .7rem 1rem; border-radius: 10px; }
.g-feedback.right { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
.g-feedback.wrong { background: color-mix(in srgb, var(--red) 12%, var(--surface)); }
.g-feedback:empty { visibility: hidden; }
.g-center { text-align: center; }
.g-letters { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin: 1rem 0 1.4rem; }
.g-letters span { width: 50px; height: 56px; display: grid; place-items: center; border-radius: 10px; background: var(--g, var(--brand)); color: #fff; font: 800 1.6rem var(--font-d); box-shadow: 0 4px 0 color-mix(in srgb, var(--g, var(--brand)) 60%, #000); }
.g-end .g-big { color: var(--g, var(--brand)); }
.g-save { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 1.4rem 0; }
.g-save input { font: inherit; padding: .6rem .8rem; border-radius: 8px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); }
.g-tf { display: flex; gap: 1rem; justify-content: center; }
.g-tf .btn { min-width: 140px; font-size: 1.1rem; }
.game-list-small { display: grid; gap: .6rem; }
.game-list-small .game-card { padding: .6rem; }
.game-list-small .game-glyph, .game-list-small img { width: 46px; height: 46px; font-size: 1.1rem; }

/* ---------- Sponsors & footer ---------- */
.sponsors { padding: 2rem 0; border-top: 1px solid var(--line); text-align: center; }
.sponsor-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2.5rem; }
.sponsor-row img { max-height: 48px; width: auto; filter: grayscale(1); opacity: .8; }
.sponsor-row a:hover img { filter: none; opacity: 1; }
.site-foot { background: var(--ink); color: color-mix(in srgb, var(--paper) 80%, transparent); padding: 3rem 0 1.4rem; }
[data-theme="dark"] .site-foot { background: #08110e; color: var(--ink-2); border-top: 1px solid var(--line); }
.site-foot a { color: var(--paper); }
[data-theme="dark"] .site-foot a { color: var(--ink); }
.site-foot .muted { color: inherit; opacity: .8; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.foot-name { font: 800 1.4rem var(--font-d); color: var(--paper); }
[data-theme="dark"] .foot-name { color: var(--ink); }
.foot-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.foot-links a, .social a, .foot-contact a { text-decoration: none; } .foot-links a:hover { text-decoration: underline; }
.social { display: flex; gap: 1rem; flex-wrap: wrap; }
.foot-bottom { border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent); margin-top: 2rem; padding-top: 1.2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split, .detail-grid, .game-layout { grid-template-columns: minmax(0, 1fr); }
  .potd { transform: none; margin-top: 1rem; }
  .side { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .ticket-grid { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 1fr 92px; }
  .form-grid, .g-opts { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .filters input, .filters select { width: 100%; }
  .register-box { padding: 1.3rem; box-shadow: 4px 4px 0 var(--accent); }
  .potd { padding-left: 2.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-head, .site-foot, .sponsors, .detail-grid, .page-head .lead, button { display: none !important; }
  .register-box { box-shadow: none; border: 2px solid #000; }
}
