/* Ball Arcade site chrome (16 Nov, "Option A - Programme"): the slim header used on every page, the footer, and the
   home page. Colours and fonts come from the tokens in styles.css (so light/dark mode keep working). */

/* ---- Slim header ---- */
.bar { position: relative; z-index: 20; background: var(--brand); color: var(--chalk); border-bottom: 3px solid var(--pin); }
.bar-in { max-width: 1160px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-wm { font: 800 1.65rem/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; white-space: nowrap; }
.brand-wm .dot { color: var(--pin); }
.brand .beta { padding: 3px 6px 2px; border-radius: 4px; background: var(--pin); color: var(--on-pin); font: 800 0.72rem/1 var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.bar-tools { display: flex; align-items: center; gap: 4px; }
.nav a { white-space: nowrap; color: inherit; text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 0; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--pin); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.brand:focus-visible, .nav a:focus-visible { outline: 3px solid var(--pin); outline-offset: 3px; border-radius: 4px; }
.theme-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.theme-btn:hover { background: var(--brand-deep); }
.theme-btn:focus-visible { outline: 3px solid var(--pin); outline-offset: 2px; }
.theme-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun, .theme-btn[data-mode="dark"] .i-moon { display: none; }
.theme-btn[data-mode="dark"] .i-sun { display: block; }
.menu-btn { display: none; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; place-items: center; }
.menu-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.menu-btn:focus-visible { outline: 3px solid var(--pin); outline-offset: 2px; }
.menu-btn[aria-expanded="true"] { background: var(--brand-deep); }
@media (max-width: 640px) {
  .brand-wm { font-size: 1.4rem; } .brand-mark { width: 30px; height: 30px; }
  .menu-btn { display: grid; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 6px 0 10px;
    background: var(--brand); border-bottom: 3px solid var(--pin); margin-top: 3px; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25); }
  .nav.open { display: flex; }
  .nav a { padding: 14px max(16px, env(safe-area-inset-left, 0px)); font-size: 1.05rem; }
  .nav a:hover, .nav a[aria-current="page"] { text-decoration: none; background: var(--brand-deep); box-shadow: inset 4px 0 0 var(--pin); }
}

/* ---- Footer ---- */
.sfoot { margin-top: 24px; padding: 22px 0 calc(36px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.88rem; }
.sfoot-in { max-width: 1160px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 6px; }
.sfoot p { margin: 0; }
.sfoot b { color: var(--ink); }
.sfoot-links { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.sfoot-links a { color: var(--good); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }

/* ---- Home ---- */
.hm { max-width: 1160px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.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; }
.hm-hero { padding: 36px 0 8px; }
.hm-sub { margin: 12px 0 0; font-size: 1rem; max-width: 60ch; color: var(--muted); }
.hm-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.hm-mode { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: var(--card); border: 1px solid var(--rule);
  color: inherit; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
a.hm-mode:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(14, 68, 40, 0.16); }
a.hm-mode:focus-visible { outline: 3px solid var(--pin); outline-offset: 3px; }
.hm-pic { position: relative; aspect-ratio: 12 / 5; overflow: hidden; background: #1f4f63; }
.hm-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
a.hm-mode:hover .hm-pic img { transform: scale(1.03); }
.hm-mode-soon .hm-pic img.hm-map { filter: grayscale(1) brightness(0.62) contrast(0.9); }
.hm-padlock { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(11, 26, 18, 0.78); border: 3px solid rgba(243, 246, 239, 0.85); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.hm-padlock svg { width: 40px; height: 40px; fill: none; stroke: #f3f6ef; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hm-flag { position: absolute; top: 12px; left: 12px; padding: 6px 10px; border-radius: 6px; background: var(--card); color: var(--ink);
  font: 700 0.78rem/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.hm-txt { display: grid; gap: 6px; justify-items: start; padding: 14px 18px 18px; }
.hm-txt h3 { margin: 0; font: 800 1.6rem/1 var(--f-display); text-transform: uppercase; }
.hm-txt p { margin: 0; font-size: 0.98rem; }
.hm-cta { margin-top: 6px; display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 6px;
  background: var(--brand); color: var(--chalk); font: 800 1.15rem/1 var(--f-display); letter-spacing: 0.06em; text-transform: uppercase; }
.hm-cta-off { background: transparent; color: var(--muted); border: 1.5px solid var(--rule); }
.hm-lock { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }

.hm-games { padding: 40px 0 8px; }
.hm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 3px solid var(--ink); }
.hm-head h2 { margin: 0; font: 800 2rem/1 var(--f-display); text-transform: uppercase; }
.hm-note { color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.hm-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.hm-game { padding: 16px; border-radius: 8px; background: var(--card); border: 1px solid var(--rule); display: grid; gap: 6px; align-content: start; }
.hm-gtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hm-gico { width: 30px; height: 30px; fill: none; stroke: var(--sel); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hm-game h3 { margin: 4px 0 0; font: 800 1.4rem/1 var(--f-display); text-transform: uppercase; color: var(--muted); }
.hm-game p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.hm-game.is-live { padding: 0; border-color: var(--sel); box-shadow: inset 0 3px 0 var(--sel); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hm-game.is-live:hover { transform: translateY(-2px); box-shadow: inset 0 3px 0 var(--sel), 0 10px 22px rgba(14, 68, 40, 0.14); }
.hm-game-link { display: grid; gap: 6px; align-content: start; height: 100%; padding: 16px; color: inherit; text-decoration: none; border-radius: 8px; }
.hm-game-link:focus-visible { outline: 3px solid var(--pin); outline-offset: 2px; }
.hm-game.is-live h3 { color: var(--ink); }
.hm-game.is-live p { color: var(--ink); }
.hm-play { justify-self: start; margin-top: 8px; display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 6px; background: var(--brand); color: var(--chalk); font: 800 1.05rem/1 var(--f-display); letter-spacing: 0.06em; text-transform: uppercase; }
.hm-soon { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 5px 10px; border-radius: 6px;
  background: var(--rule-soft); color: var(--ink); font: 700 0.78rem/1 var(--f-body); letter-spacing: 0.04em; text-transform: uppercase; }
.hm-soon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hm-daily { justify-self: start; margin-top: 4px; padding: 1px 8px; border: 1.5px solid var(--rule); border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
/* feedback call-out at the bottom of the home page */
.hm-fb { margin-top: 32px; display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap;
  padding: 18px 20px; background: var(--card); border: 1px solid var(--rule); border-left: 6px solid var(--pin); border-radius: 8px; }
.hm-fb > div { flex: 1 1 420px; }
.hm-fb h2 { margin: 0 0 6px; font: 800 1.5rem/1.05 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; }
.hm-fb p { margin: 0; max-width: 62ch; }
.hm-fb-btn { min-height: 48px; display: inline-flex; align-items: center; padding: 0 22px; border-radius: 6px; background: var(--pin); color: var(--on-pin);
  font: 800 1.05rem/1 var(--f-display); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.hm-fb-btn:hover { filter: brightness(1.06); }
.hm-fb-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.hm-follow { margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: 8px; background: var(--card); border: 1px solid var(--rule); }
.hm-follow p { margin: 0; font-weight: 600; }
.hm-soc { display: flex; gap: 8px; flex-wrap: wrap; }
.hm-soc a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 6px; background: var(--brand); color: var(--chalk);
  text-decoration: none; font: 800 1rem/1 var(--f-display); letter-spacing: 0.06em; text-transform: uppercase; }
.hm-soc a:hover { background: var(--brand-deep); }
.hm .ad-slot { margin-top: 28px; }
@media (max-width: 760px) { .hm-modes { grid-template-columns: 1fr; } .hm-pic { aspect-ratio: 2 / 1; } .hm-hero { padding-top: 24px; } }
@media (prefers-reduced-motion: reduce) { .hm-mode, .hm-pic img { transition: none; } }

.hm-mine { display: flex; gap: 14px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--rule-soft); font-size: 0.85rem; color: var(--muted); }
.hm-mine b { font: 800 1.15rem/1 var(--f-display); color: var(--ink); margin-right: 3px; }
.hm-mine[hidden] { display: none; }
/* every card's button sits on the same line at the bottom (the description takes up the slack) */
.hm-game, .hm-game-link { display: flex; flex-direction: column; }
.hm-game > p, .hm-game-link > p { flex-grow: 1; }
.hm-play, .hm-soon, .hm-daily { align-self: flex-start; }
.hm-gtop { align-self: stretch; }
.hm-soon { min-height: 40px; margin-top: 8px; padding: 0 14px; }

/* 18 Nov: the live daily cards get a little moving picture of the game on a pitch-green panel, and say whether
   today's is done. */
.hm-game.is-live { overflow: hidden; }
.hm-game.is-live .hm-game-link { padding: 0 0 16px; }
.hm-game.is-live .hm-game-link > :not(.hm-art) { margin-left: 16px; margin-right: 16px; }
.hm-art { position: relative; height: 92px; margin-bottom: 6px; background: var(--brand);
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 22px, transparent 22px 44px);
  display: grid; place-items: center; overflow: hidden; color: #f3f6ef; }
.hm-art::after { content: ""; position: absolute; inset: 8px; border: 1.5px solid rgba(243,246,239,.22); border-radius: 4px; pointer-events: none; }
/* Remember the Game!: a scoreline and a date to fill in */
.hm-art-rtg { grid-auto-flow: column; gap: 14px; justify-content: center; }
.hm-art-rtg .sb { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 5px; background: #16211b; font: 800 1.9rem/1 var(--f-display); }
.hm-art-rtg .sb i { font-style: normal; color: var(--pin); }
.hm-art-rtg .dt { display: flex; gap: 4px; }
.hm-art-rtg .dt span { padding: 5px 6px; border-radius: 4px; background: rgba(243,246,239,.14); font: 800 1.1rem/1 var(--f-display); letter-spacing: .04em; }
/* Career Path: a career line with clubs along it */
.hm-art-cp { display: flex; justify-content: center; gap: 0; padding: 0 26px; }
.hm-art-cp .ln { position: absolute; left: 40px; right: 40px; top: 50%; height: 2px; margin-top: -1px; background: rgba(243,246,239,.5); }
.hm-art-cp { align-items: stretch; }
.hm-art-cp .c { position: relative; flex: 1; display: grid; place-items: center; z-index: 1; }
.hm-art-cp .c i { width: 14px; height: 14px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2.5px #f3f6ef; }
.hm-art-cp .c b { position: absolute; left: 50%; width: 46px; margin-left: -23px; height: 7px; border-radius: 3px; background: rgba(243,246,239,.35); top: calc(50% - 22px); }
.hm-art-cp .c:nth-child(odd) b { top: calc(50% + 15px); }
/* Top 10: a list filling in */
.hm-art-t10 { display: grid; gap: 4px; align-content: center; justify-items: stretch; padding: 0 30px; place-items: stretch; }
.hm-art-t10 span { display: flex; align-items: center; gap: 6px; }
.hm-art-t10 i { width: 18px; font: 800 .85rem/1 var(--f-display); font-style: normal; text-align: center; color: rgba(243,246,239,.7); }
.hm-art-t10 b { height: 11px; width: var(--w); border-radius: 3px; background: rgba(243,246,239,.2); }
.hm-art-t10 .on b { background: var(--pin); }
@media (prefers-reduced-motion: no-preference) {
  .hm-art-rtg .dt span { animation: hmFlip 4.2s ease-in-out infinite; }
  .hm-art-rtg .dt span:nth-child(2) { animation-delay: .15s; } .hm-art-rtg .dt span:nth-child(3) { animation-delay: .3s; }
  .hm-art-cp .c i { animation: hmDot 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * .35s); }
  .hm-art-t10 b { transform-origin: left; animation: hmBar 4.8s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
  .hm-art-t10 .on b { animation-name: hmBarOn; }
  .hm-game.is-live:hover .hm-art > * { animation-duration: 1.6s; }
}
@keyframes hmFlip { 0%, 70%, 100% { transform: none; background: rgba(243,246,239,.14); } 78% { transform: rotateX(90deg); } 86% { transform: none; background: var(--pin); color: var(--on-pin); } }
@keyframes hmDot { 0%, 60%, 100% { background: var(--brand); transform: none; } 70% { background: var(--pin); transform: scale(1.35); } 80% { background: var(--pin); transform: none; } }
@keyframes hmBar { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.92); } }
@keyframes hmBarOn { 0%, 15% { transform: scaleX(0); } 35%, 85% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
.hm-daily.is-done { border-color: var(--sel); background: var(--sel); color: var(--on-sel); }
.hm-daily.is-new { border-color: var(--pin); background: var(--pin); color: var(--on-pin); }
.hm-game.is-live .hm-gtop { margin-top: 4px; }
