/* KooraCall website (D-083). Colours match the apps (night theme), with a light theme for light-mode visitors. */
:root {
  --night: #0b1020; --card: #131a31; --line: #252e4f; --ink: #f4f6fb; --muted: #9aa3bd; --lime: #c6ff3d; --on-lime: #0b1020;
  --danger: #ff6b6b; --radius: 16px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --night: #eaf3e3; --card: #ffffff; --line: #c9ddc5; --ink: #0e2a1b; --muted: #4a6355; --lime: #0e733a; --on-lime: #ffffff; --danger: #b3261e; color-scheme: light; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--ink); line-height: 1.6;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Noto Sans", sans-serif;
}
a { color: var(--lime); }
img { max-width: 100%; height: auto; }
main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.5rem; } h3 { margin: 8px 0 4px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 6px; }

/* header */
.top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line);
  max-width: 1040px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand img { border-radius: 10px; }
.top nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 640px) { .top nav { order: 3; flex-basis: 100%; flex-wrap: wrap; } .lang { margin-inline-start: auto; } }
.top nav a { color: var(--ink); text-decoration: none; padding: 6px 10px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
.top nav a[aria-current="page"] { background: var(--card); color: var(--lime); }
.lang { border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink);
  min-height: 44px; display: inline-flex; align-items: center; }
.brand { min-height: 44px; }

/* home */
.hero { display: grid; gap: 24px; align-items: center; grid-template-columns: 1fr; padding: 16px 0 8px; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr 1fr; } }
.hero-art { border-radius: var(--radius); border: 1px solid var(--line); }
.lead { font-size: 1.1rem; color: var(--muted); }
.stores { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.store { display: inline-flex; flex-direction: column; padding: 10px 18px; border-radius: 12px; background: var(--ink); color: var(--night);
  text-decoration: none; font-weight: 700; min-width: 170px; }
.store small { font-weight: 400; font-size: .75rem; }
.store.soon { opacity: .7; cursor: default; }
.links { display: flex; flex-wrap: wrap; column-gap: 16px; }
.links a { min-height: 44px; display: inline-flex; align-items: center; }
.features { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 24px 0; }
.feature, .product, .match, .notice, .promise, .kits, .legal .table, .board, .match-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.feature { padding: 16px; } .feature p { color: var(--muted); margin: 0; }
/* Task 6: the feature and product names are h2 (no level skipped under the page's h1) but keep their smaller size. */
.feature h2, .product h2 { font-size: 1.17em; margin: 8px 0 4px; }
.icon { font-size: 1.8rem; }
.promise { padding: 20px; border-color: var(--lime); }
.promise h2 { color: var(--lime); margin-top: 0; }

/* matches */
.day { margin: 20px 0 8px; color: var(--muted); font-weight: 700; }
.matches { display: grid; gap: 8px; }
.match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.match .team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.match .team:last-child { justify-content: flex-end; text-align: end; }
/* Task 16i: club names are shown in full. A long name (Arabic names are often several words) wraps onto a second line
   instead of being cut with "…"; a single word longer than its half of the row still breaks rather than spill over. */
.match .name { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
@media (max-width: 480px) { .match .name { font-size: .9375rem; } .match { gap: 6px; padding: 10px 12px; } }
.crest { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .62rem; font-weight: 800;
  border: 2px solid; white-space: nowrap; letter-spacing: -.02em; } /* task 17a: wide codes ("DAM", "AJM") stay on one line */
/* Task 17a: a thin outline when a club's two colours both fade into the page or card of the theme (set by app.js). */
.crest[data-ring~="dark"] { box-shadow: 0 0 0 1px var(--muted); }
@media (prefers-color-scheme: light) {
  .crest[data-ring~="dark"] { box-shadow: none; }
  .crest[data-ring~="light"] { box-shadow: 0 0 0 1px var(--muted); }
}
.centre { text-align: center; font-weight: 800; min-width: 72px; }
.centre small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }
.live { color: var(--lime); }
/* Read by screen readers, not shown (the live match status line, task 2). */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; }
.comp { grid-column: 1 / -1; font-size: .75rem; color: var(--muted); }
.match-card { padding: 20px; }
/* Club and competition pages (task 5): names and our own colour chips only, never a crest or logo. */
.match a.name { color: inherit; text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px;
  min-height: 44px; display: inline-flex; align-items: center; }
/* Task 15c: a match row is not one big link. Each club name is its own link and the middle (time or result) links to
   the match; that link's ::after covers the whole row, so a tap anywhere else still opens the match. Club links sit
   above it. Every link is at least 44 px tall (tap targets). */
.match.row { position: relative; }
.match.row a.name { position: relative; z-index: 1; }
.match.row a.open { color: inherit; text-decoration: none; display: grid; place-items: center; min-height: 44px; min-width: 72px; border-radius: 8px; }
.match.row a.open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.group h2 { font-size: 1.1rem; margin: 20px 0 10px; }
.match-page section { margin: 24px 0; }
h3.day { font-size: 1rem; }
.club-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.club-head .crest { width: 48px; height: 48px; font-size: .8rem; }
.club-head h1 { margin: 0; overflow-wrap: anywhere; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; min-height: 44px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink); text-decoration: none; max-width: 100%; overflow-wrap: anywhere; }
.chips a:hover { border-color: var(--lime); }
.chips .crest { width: 26px; height: 26px; font-size: .55rem; } /* 26 px: room for the widest real codes ("WAH", "MOH") inside the edge */
.bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 8px 0; }
.bar span { display: block; } .bar .h { background: var(--lime); } .bar .d { background: var(--muted); } .bar .a { background: var(--ink); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .875rem; color: var(--muted); }
.cta { margin-top: 16px; }

/* leaderboard */
.tabs { display: flex; gap: 8px; margin: 8px 0 12px; }
.tabs button { font: inherit; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .875rem; }
.board { overflow-x: auto; }
.board td:first-child { font-weight: 800; width: 3em; }
.anon { color: var(--muted); font-style: italic; }

/* shop */
.notice { padding: 14px 16px; margin: 12px 0; border-color: var(--lime); }
.products { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 16px 0; }
/* Task 7: each card's name links to the item's page, and that link covers the card (a tap anywhere opens it). */
.product { padding: 16px; text-align: center; position: relative; }
.product img { display: block; margin: 0 auto 8px; width: 100%; max-width: 240px; border-radius: 12px; }
.product h2 a { color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.product h2 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
@media (prefers-reduced-motion: no-preference) { .product:hover { border-color: var(--lime); } }
.fair { font-weight: 600; }
/* One item's page: the drawing beside the details on wide screens, above them on phones. */
.item { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; margin: 8px 0 24px; }
@media (min-width: 860px) { .item { grid-template-columns: 1fr 1.1fr; } }
.item-art img { display: block; width: 100%; max-width: 440px; margin: 0 auto; border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 640px) { .item-art img { max-width: 280px; } }
/* Task 18: each drawing is a figure captioned with its design's name (both show without JavaScript). */
.item-art figure { margin: 0 0 16px; }
.item-art figure[hidden] { display: none; }
.item-art figcaption { text-align: center; font-weight: 600; margin-top: 8px; }
.item-info .lead { margin-top: 8px; }
/* Size picker: native radio buttons (keyboard and screen readers work as usual), each in a 44 px pill. */
.sizes, .designs { border: 1px solid var(--line); border-radius: 12px; margin: 16px 0 4px; padding: 8px 12px 12px; min-width: 0; }
.designs { margin-top: 0; }
.designs[hidden], #design-hint[hidden] { display: none; }
.sizes legend, .designs legend { font-weight: 700; padding: 0 6px; }
.size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.size-options label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card); cursor: pointer; }
.size-options input { width: 20px; height: 20px; margin: 0; accent-color: var(--lime); }
.size-options label:has(input:checked) { border-color: var(--lime); color: var(--lime); font-weight: 700; }
.chosen { font-weight: 700; margin: 8px 0; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--line); font-size: .8rem; }
.kits { padding: 16px; }

/* how to play + FAQ */
.howto { max-width: 820px; }
.howto section { margin: 28px 0; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--lime); color: var(--on-lime); font-weight: 800; }
.steps h3 { margin: 10px 0 4px; } .steps p { margin: 0; color: var(--muted); }
.example { font-weight: 700; }
.points { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.pts { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.pts .num { flex: none; width: 64px; text-align: center; font-size: 2rem; font-weight: 800; line-height: 1; color: var(--lime); }
.pts .num small { display: block; font-size: .7rem; font-weight: 400; color: var(--muted); margin-top: 4px; }
.pts.zero .num { color: var(--muted); }
.ticks { padding-inline-start: 20px; } .ticks li { margin: 6px 0; }
.promise .ticks { margin-bottom: 0; }
/* points calculator (task 1b) */
.calc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.calc h2 { margin-top: 0; }
.calc-inputs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.calc fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 0; padding: 8px 12px 12px; min-width: 0; }
.calc legend { font-weight: 700; padding: 0 6px; }
.calc-pair { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.calc-field { display: grid; gap: 4px; min-width: 0; }
.calc-field label { font-size: .875rem; color: var(--muted); }
.calc select { font: inherit; font-size: 1.25rem; font-weight: 700; width: 100%; min-height: 44px; padding: 6px 10px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--night); color: var(--ink); }
.calc-label { font-size: 1rem; margin: 16px 0 8px; }
.calc-result { background: var(--night); }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.faq details[open] summary { color: var(--lime); }
.faq details p { margin: 0 0 14px; color: var(--muted); }

/* about and contact (task 8) */
.about, .contact { max-width: 760px; }
.about section { margin: 24px 0; }
.about section.promise h2 { font-size: 1.25rem; }
/* Fan Store (task 13, only built while switched on): the three ways to get items and a card for each kind. */
.fanstore { max-width: 900px; }
.fanstore section { margin: 28px 0; }
.ways, .kinds { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ways { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.kinds { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ways li, .kinds li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.ways h3, .kinds h3 { margin: 0 0 4px; font-size: 1.05rem; } .ways p, .kinds p { margin: 0; color: var(--muted); }
.kinds li { text-align: center; }
.kinds img { display: block; width: 96px; height: 96px; margin: 0 auto 10px; border-radius: 12px; }
.contact-form { display: grid; gap: 16px; margin: 20px 0; }
.field { display: grid; gap: 4px; }
.field label { font-weight: 700; }
.field p { margin: 0; }
.field input, .field textarea { font: inherit; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--muted); background: var(--card); color: var(--ink); }
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border: 2px solid var(--danger); }
.field-error, .form-errors { color: var(--danger); font-weight: 700; }
.form-errors { margin: 16px 0 0; }
.form-errors:empty { margin: 0; }
/* The honeypot: a field robots fill in and people never see (hidden from screen readers too, and skipped by Tab). */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.send { justify-self: start; font: inherit; font-weight: 700; min-height: 44px; padding: 10px 24px; border-radius: 999px; border: 1px solid var(--lime);
  background: var(--lime); color: var(--on-lime); cursor: pointer; }
.send:disabled { opacity: .7; cursor: default; }

/* legal */
.legal { max-width: 760px; }
.legal .table { overflow-x: auto; margin: 12px 0; }
.legal td, .legal th { font-size: .9rem; }

footer { border-top: 1px solid var(--line); padding: 24px 16px; max-width: 1040px; margin: 0 auto; color: var(--muted); font-size: .875rem; }
footer nav { display: flex; column-gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
footer nav a { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.promise-line { color: var(--lime); font-weight: 700; }
@media (prefers-reduced-motion: no-preference) { .match:hover { border-color: var(--lime); } }
/* Follow KooraCall (task 9): plain text links, shown only once the accounts exist */
.follow { margin: 8px 0 12px; }
.follow h2 { font-size: 1rem; margin: 0 0 2px; color: var(--ink); }
.follow p { margin: 0 0 8px; }
.follow ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.follow a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; min-height: 44px; min-width: 44px; text-align: center; line-height: 30px; }
.follow a:hover, .follow a:focus-visible { border-color: var(--lime); }
/* Task 11: our own drawn icons (website/social.mjs). The apps' platform colours (SocialLinks.kt) where they keep at least
   3:1 against the page; in the light theme X, Snapchat and WhatsApp fall below that, so they take the link colour. */
.follow .ico { width: 18px; height: 18px; flex: none; }
.follow .ico-facebook { color: #1877f2; }
.follow .ico-telegram { color: #26a5e4; }
.follow .ico-x { color: #8899a6; }
.follow .ico-instagram { color: #e1306c; }
.follow .ico-tiktok { color: #fe2c55; }
.follow .ico-snapchat { color: #fffc00; }
.follow .ico-whatsapp { color: #25d366; }
@media (prefers-color-scheme: light) {
  .follow .ico-telegram, .follow .ico-x, .follow .ico-snapchat, .follow .ico-whatsapp { color: inherit; }
}
@media (forced-colors: active) { .follow .ico { color: inherit; } }
/* Task 12: the same links as one row under the download buttons on the home page (wraps on phones) */
.follow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.follow-label { color: var(--ink); font-weight: 600; }
/* How to play in 14 languages (task 10): the language switcher, each name in its own language */
.langs ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.langs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.langs a:hover, .langs a:focus-visible { border-color: var(--lime); }
.langs a[aria-current="page"] { border-color: var(--lime); color: var(--lime); font-weight: 700; }
/* Scripts the default stack may not name: fonts already on the visitor's device only (nothing is downloaded). The lang
   attribute also lets the browser pick Japanese or Simplified Chinese shapes for the same characters. */
:lang(hi) { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", "Noto Sans", sans-serif; }
:lang(bn) { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", "Nirmala UI", "Kohinoor Bangla", "Noto Sans", sans-serif; }
:lang(ur) { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Naskh Arabic", "Noto Sans Arabic", "Noto Sans", sans-serif; }
:lang(ja) { font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif; }
:lang(zh-Hans) { font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; }
/* Share button (task 14d): 44 px tall, the status line beside it (wraps under it on a narrow phone). */
.share-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.share-row p { margin: 0; }
.share { font: inherit; font-weight: 700; min-height: 44px; padding: 8px 20px; border-radius: 999px; border: 1px solid var(--lime);
  background: var(--card); color: var(--lime); cursor: pointer; }
.share:hover { background: var(--lime); color: var(--on-lime); }

/* Task 6: speed and accessibility. */
/* "Skip to content": the first thing Tab reaches on every page; hidden until focused, then shown at the top. */
.skip { position: absolute; inset-inline-start: 8px; top: -100px; z-index: 10; padding: 10px 16px; min-height: 44px; border-radius: 999px;
  background: var(--lime); color: var(--on-lime); font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }
.skip:focus-visible { outline-color: var(--ink); }
/* People who ask for less motion get none (no smooth scrolling, transitions or animations anywhere). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important;
    scroll-behavior: auto !important; }
}
/* Windows high-contrast mode: the selected tab keeps a visible edge (other buttons keep their own borders) and the focus ring shows. */
@media (forced-colors: active) {
  .tabs button[aria-selected="true"], .size-options label:has(input:checked) { border: 2px solid CanvasText; }
  :focus-visible { outline-color: Highlight; }
}

/* Approved calculator examples remain comfortable touch targets on phones. */
.calc-examples{display:flex;flex-wrap:wrap;gap:.5rem;margin-block:1rem}.calc-examples button{min-height:44px;padding:.5rem .9rem;cursor:pointer}
