/* und.am football quizzes. Calm dark theme like the other und.am games. Found = solid tile + check mark,
   missed = dashed border + cross + italic, empty = dotted outline: never by colour alone. */
/* colours come from /games/assets/theme.css (dark "Calm Navy" / light "Polar"); old names point to the tokens.
   Fallbacks keep the page dark if theme.css is missing. */
:root { --bg: var(--page, #0F1A2E); --bg2: var(--page2, #18243D); --card: var(--panel, #22304D); --card2: var(--raised, #2C3E62); --muted: var(--dim, #A3AFC4); --yellow: var(--pri-bg, #FFD43B); --blue: #3B8CFF; --dark: var(--pri-ink, #0A1220); --ok: var(--ink, #DDE9FF); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 500 16px/1.5 Manrope, "Noto Sans Armenian", system-ui, sans-serif; }
a { color: inherit; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.mk { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 880px; margin: 0 auto; padding: 16px 16px 64px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 800; text-decoration: none; min-height: 44px; padding-right: 8px; }
.back:hover, .back:focus-visible { color: var(--ink); }
.langs { display: flex; gap: 6px; }
.langs button { border: 2px solid transparent; background: var(--card); color: var(--muted); font-family: inherit; font-weight: 700; font-size: 14px; line-height: 1; padding: 10px 12px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.langs button[aria-pressed="true"] { background: var(--sel-bg, #FFD43B); color: var(--sel-ink, #0A1220); border-color: transparent; }
.kicker { margin: 28px 0 4px; color: var(--accent-text, #FFD43B); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; font-weight: 700; margin: 0 0 10px; }
.hub h1 { margin-top: 28px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 22px; max-width: 640px; }
.small { color: var(--muted); font-size: 14px; }

/* input panel: stays on top while the board scrolls */
.panel { position: sticky; top: 0; z-index: 3; margin: 0 -16px 18px; padding: 12px 16px; background: color-mix(in srgb, var(--page, #0F1A2E) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.row1 { display: flex; gap: 8px; }
#ans { flex: 1; min-width: 0; height: 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--sunk, #0A1220); color: var(--ink); font-family: inherit; font-weight: 700; font-size: 18px; padding: 0 14px; outline: none; }
#ans:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pri-bg, #FFD43B) 35%, transparent); }
#ans:disabled { opacity: .6; }
.btn { font-family: inherit; font-weight: 800; font-size: 16px; line-height: 1.2; background: var(--yellow); color: var(--dark); border: 2px solid transparent; border-radius: 14px; min-height: 52px; padding: 0 20px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; flex: none; }
.btn:active { transform: scale(.97); }
.btn.alt { background: var(--card2); color: var(--ink); }
.btn.confirm { background: var(--ink); color: var(--dark); border-color: var(--yellow); }
.btn:focus-visible, .qcard:focus-visible, .langs button:focus-visible { outline: 3px solid var(--link, #FFD43B); outline-offset: 2px; }
.row2 { display: flex; align-items: center; gap: 14px; margin-top: 10px; min-height: 26px; flex-wrap: wrap; }
.stat { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 15px; }
.stat b { color: var(--ink); font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.msg { flex: 1 1 220px; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; min-width: 0; }
.msg.good { color: var(--ink); }
.msg.bad, .msg.info { color: var(--muted); }
.best { color: var(--muted); font-size: 15px; margin: 14px 0 0; min-height: 1em; }

/* list */
.slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 8px; }
.slot { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 12px; border-radius: 12px; border: 2px dotted var(--line); background: color-mix(in srgb, var(--panel, #22304D) 45%, transparent); }
.slot .no { color: var(--muted); font-size: 13px; font-weight: 700; min-width: 20px; font-variant-numeric: tabular-nums; }
.slot .v { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.slot .h { color: var(--muted); font-size: 13px; font-weight: 700; text-align: right; max-width: 55%; }
.ok { border-style: solid; border-color: var(--ok); background: var(--card2); }
.miss { border-style: dashed; border-color: var(--muted); background: transparent; }
.miss .nm { font-style: italic; color: var(--muted); }
.nm { min-width: 0; overflow-wrap: anywhere; }
.pop { animation: pop .35s ease-out; }
@keyframes pop { 0% { transform: scale(.96); } 60% { transform: scale(1.03); } }

/* grid */
.gwrap { overflow-x: auto; }
.gt { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.gt th { font-size: 13px; color: var(--muted); font-weight: 800; text-align: left; padding: 4px 6px; }
.gt thead th { text-align: center; }
.gt tbody th { width: 76px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gt.c5 { min-width: 560px; }
.gt.c5 tbody th { width: 64px; position: sticky; left: 0; background: var(--bg); z-index: 1; }
.cell .nm { overflow-wrap: normal; word-break: normal; hyphens: auto; }
.cell { height: 40px; border-radius: 10px; border: 2px dotted var(--line); background: color-mix(in srgb, var(--panel, #22304D) 45%, transparent); padding: 3px 6px; font-weight: 700; font-size: 14px; line-height: 1.2; }
.cell .v { display: flex; align-items: center; gap: 4px; }
.cell svg.mk { width: 14px; height: 14px; }
.gt.c5 .cell { font-size: 12px; padding: 3px 4px; }
.gt.c5 .cell svg.mk { display: none; }
.gt.c5 .cell.miss .nm::before { content: "✗ "; font-style: normal; }
.gt.c5 .cell.ok .nm::before { content: "✓ "; }

/* A to Z */
.az { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 46%), 1fr)); gap: 8px; }
.tile { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; border-radius: 12px; border: 2px dotted var(--line); background: color-mix(in srgb, var(--panel, #22304D) 45%, transparent); }
.tile b { font-size: 22px; font-weight: 800; width: 24px; text-align: center; flex: none; }
.tile .v { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14px; line-height: 1.2; min-width: 0; }
.tile.none { opacity: .75; border-style: solid; border-color: transparent; }
.tile.none .v { font-weight: 500; color: var(--muted); font-size: 13px; }

/* line-up */
.pitch { --ink: #F5F7FA; --dark: #0A1220; --yellow: #FFD43B; --muted: #A3AFC4; position: relative; width: min(100%, 440px); aspect-ratio: 68 / 100; margin: 0 auto; border-radius: 16px; background: repeating-linear-gradient(180deg, #1F4A3A 0 10%, #234F3E 10% 20%); overflow: hidden; }
.pitch .lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(245,247,250,.45); stroke-width: .4; }
.pl { position: absolute; transform: translate(-50%, -40%); width: 25%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; }
.shirt { width: 44px; height: 40px; }
.shirt path { fill: var(--ink); stroke: var(--dark); stroke-width: 1.5; stroke-linejoin: round; }
.shirt text { font: 800 13px/1 Manrope, system-ui, sans-serif; fill: var(--dark); }
.pl .pos { font-size: 11px; font-weight: 800; color: var(--ink); background: rgba(10,18,32,.55); border-radius: 6px; padding: 0 5px; }
.pl .v { font-size: 12.5px; font-weight: 800; line-height: 1.15; min-height: 1.2em; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 2px 5px; border-radius: 6px; }
.pl .v svg.mk { width: 12px; height: 12px; }
.pl.ok { border: 0; background: none; }
.pl.ok .v { background: var(--ink); color: var(--dark); }
.pl.ok .shirt path { fill: var(--yellow); }
.pl.miss { border: 0; }
.pl.miss .v { background: rgba(10,18,32,.75); border: 1.5px dashed var(--muted); color: var(--ink); }
.pl.miss .nm { color: var(--ink); }

/* sources */
.src { margin-top: 40px; color: var(--muted); font-size: 14px; }
.src h2 { font-size: 15px; margin: 0 0 6px; color: var(--ink); }
.src ul { margin: 0; padding-left: 18px; }

/* end card */
.ov { position: fixed; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10,18,32,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ov[hidden] { display: none; }
.card { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; width: min(100%, 400px); max-height: 100%; overflow: auto; padding: 26px 20px 20px; border-radius: 18px; background: var(--panel, #22304D); border: 1px solid var(--line, transparent); box-shadow: var(--shadow-pop, 0 12px 40px rgba(0,0,0,.45)); }
.card h2 { margin: 0; font-size: 28px; line-height: 1.15; color: var(--ink); }
.card p { margin: 0; }
.card .big { font-size: 20px; font-weight: 800; }
.card .btn { width: 100%; }
.rowb { display: flex; gap: 8px; width: 100%; }
.rowb .btn { flex: 1; padding: 0 10px; }

/* hub */
.group { font-size: 22px; font-weight: 700; margin: 34px 0 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.qcard { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 14px; border-radius: 16px; background: var(--card); text-decoration: none; border: 1px solid var(--line, transparent); box-shadow: var(--shadow, 0 4px 14px rgba(0,0,0,.22)); transition: transform .15s, box-shadow .15s; }
a.qcard:hover { transform: translateY(-2px); border-color: var(--line-strong, transparent); }
.qcard .type { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text, #FFD43B); font-size: 13px; font-weight: 800; }
.qcard h3 { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 800; }
.qcard p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.qcard .meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; font-weight: 700; margin-top: 6px; }
.res { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.res.done { background: var(--ink); color: var(--dark); padding: 1px 8px; border-radius: 999px; }
.res svg.mk { width: 14px; height: 14px; }
ul.plain { list-style: none; padding: 0; }
@media (max-width: 480px) {
  .kicker { margin-top: 18px; }
  .lead { font-size: 16px; }
  .row1 .btn { padding: 0 14px; }
  .gt { border-spacing: 3px; }
  .gt tbody th { width: 62px; font-size: 12px; padding: 2px; }
  .gt.c5 tbody th { width: 56px; font-size: 11px; }
  .gt.c5 .cell { font-size: 12px; height: 40px; padding: 2px 4px; }
  .langs { gap: 4px; }
  .langs button { padding: 8px 9px; font-size: 13px; }
  .back { min-width: 0; overflow: hidden; }
  .back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw; }
  .pl .v { font-size: 11px; }
  .shirt { width: 36px; height: 33px; }
}
@media (prefers-reduced-motion: reduce) { .pop { animation: none; } .qcard { transition: none; } a.qcard:hover { transform: none; } }
/* sources: small and quiet, they list the answers */
.src { margin-top: 48px; }
.srcbtn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; opacity: .9; }
.srcbtn .i { width: 15px; height: 15px; }
.srcbtn:hover, .srcbtn:focus-visible { opacity: 1; text-decoration: underline; }
.srcask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 8px; }
.srcask span { flex: 1 1 100%; }
.src .btn.sm { min-height: 36px; padding: 4px 14px; font-size: 14px; }
.src ul { margin-top: 4px; }

/* hub: topic chips and a compact sortable list */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 14px; }
.chips button { font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); background: var(--card); border: 1px solid var(--line, transparent); border-radius: 999px; min-height: 38px; padding: 4px 14px; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--sel-bg, #FFD43B); color: var(--sel-ink, #0A1220); }
.chips button:focus-visible, .qlist th button:focus-visible, .qlist a:focus-visible { outline: 3px solid var(--link, #FFD43B); outline-offset: 2px; }
.qlist { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 16px; overflow: hidden; }
.qlist th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 700; padding: 0; border-bottom: 2px solid var(--card2); }
.qlist th button { font: inherit; color: inherit; background: none; border: 0; padding: 12px 10px; width: 100%; text-align: inherit; cursor: pointer; white-space: nowrap; }
.qlist th[aria-sort="ascending"] button, .qlist th[aria-sort="descending"] button { color: var(--ink); }
.qlist td { padding: 0 10px; border-top: 1px solid var(--card2); vertical-align: middle; }
.qlist tbody tr:first-child td { border-top: 0; }
.qlist tbody tr:hover { background: var(--card2); }
.qlist .st { width: 40px; padding-left: 12px; padding-right: 0; }
.qlist .tt, .qlist .ta { width: 1%; white-space: nowrap; color: var(--muted); font-size: 14px; font-weight: 700; text-align: right; }
.qlist th.tt, .qlist th.ta { text-align: right; }
.qlist td.tq a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 0; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; line-height: 1.3; }
.qlist td.tq a .i { color: var(--accent-text, #FFD43B); width: 18px; height: 18px; }
.qlist .new { font-style: normal; font-size: 11px; font-weight: 800; color: var(--dark); background: var(--yellow); border-radius: 6px; padding: 1px 6px; flex: none; }
.stc { display: inline-flex; flex-direction: column; align-items: center; }
.stc svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.stc.none { color: var(--muted); opacity: .85; }
.stc.part { color: var(--ink); } .stc.part path { fill: currentColor; stroke: none; }
.stc.part small { font-size: 10px; font-weight: 800; color: var(--muted); }
.stc.done { color: var(--sel-bg, #FFD43B); } .stc.done circle { fill: var(--sel-bg, #FFD43B); } .stc.done path { stroke: var(--sel-ink, #0A1220); stroke-width: 2.6; }
@media (max-width: 480px) {
  .qlist th button { padding: 10px 6px; }
  .qlist td { padding: 0 6px; }
  .qlist td.tq a { font-size: 15px; gap: 8px; }
  .qlist td.tq a .i { display: none; }
  .qlist .tt, .qlist .ta { font-size: 13px; }
}
.qlist th .hi { display: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
@media (max-width: 480px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { flex: none; }
  .qlist th .hi { display: inline-block; } .qlist th.tt .lbl, .qlist th.ta .lbl { display: none; }
  .qlist .st { width: 30px; padding-left: 8px; }
  .qlist .new { font-size: 10px; padding: 1px 4px; }
}

/* theme toggle next to the language buttons */
.top .th-btn { margin-left: 8px; }
.top { gap: 8px; }
.top .langs { margin-left: auto; }
/* title row with the share button */
.trow { display: flex; align-items: flex-start; gap: 10px; }
.trow h1 { flex: 1 1 auto; min-width: 0; }
.sharebtn { flex: none; width: 42px; height: 42px; margin-top: 4px; border-radius: 999px; border: 1px solid var(--line, #3A4D75); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.sharebtn .i { width: 20px; height: 20px; }
.sharebtn:hover { border-color: var(--line-strong, var(--ink)); }
.sharebtn:focus-visible { outline: 3px solid var(--link, #FFD43B); outline-offset: 2px; }

/* audit 2026-11-24: board not hidden under the sticky panel, quicker taps, a fade shows more topic chips */
#board { scroll-margin-top: 96px; }
button, .chips button, .qlist a { touch-action: manipulation; }
@media (max-width: 480px) {
  .chips { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}
