/* Self-hosted fonts (SIL Open Font License 1.1; licenses in /fonts/). Latin + Latin Extended only. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/bricolage-grotesque-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/bricolage-grotesque-latin-ext-800-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Bingo Card Maker Free — site styles
   Light mode is the default. Dark mode only when the visitor turns it on (data-theme="dark").
   Cards are always light because they print on white paper. */

:root {
  --bg: #F3F4FA;
  --surface: #FFFFFF;
  --ink: #1D1B3A;
  --muted: #5A5878;
  --line: #DEDFEE;
  --magenta: #D6246E;
  --magenta-ink: #FFFFFF;
  --blue: #2F5BEA;
  --green: #0E7C62;
  --yellow: #FFC53D;
  --warn-bg: #FFF6DC;
  --error-bg: #FCE8EF;
  --ok-bg: #E6F4EF;
  --dab-b: rgba(47, 91, 234, .45);
  --head: "Bricolage Grotesque", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", Verdana, Tahoma, system-ui, sans-serif;
  --radius: 14px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #15142B;
  --surface: #201E3D;
  --ink: #EEEAFB;
  --muted: #B4B0D3;
  --line: #3A3760;
  --magenta: #FF5C9A;
  --magenta-ink: #15142B;
  --blue: #9DB2FF;
  --green: #3CC9A0;
  --yellow: #FFD467;
  --warn-bg: #3A3217;
  --error-bg: #3D1B2A;
  --ok-bg: #15332B;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Header and footer */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.wordmark { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.wm-free { margin-left: 4px; display: inline-grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: 50%; background: rgba(214, 36, 110, .5); color: #fff; font-size: .6em; transform: rotate(-8deg); }
.site-nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.site-foot { margin-top: 64px; background: var(--surface); border-top: 1px solid var(--line); padding: 24px 0; font-size: .9rem; color: var(--muted); }
.site-foot a { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 999px; font-family: var(--head); font-weight: 700; font-size: 1rem; border: 2px solid transparent; text-decoration: none; cursor: pointer; background: none; color: var(--ink); }
.btn-primary { background: var(--magenta); color: var(--magenta-ink); }
.btn-ghost { border-color: var(--ink); }
.btn-quiet { border-color: var(--line); background: var(--surface); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lg { min-height: 60px; font-size: 1.2rem; padding: 12px 28px; }
.icon-btn { min-height: 44px; min-width: 44px; padding: 8px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }

/* Forms */
.field { margin-bottom: 20px; }
.field > .label, .field > label.label { display: block; font-weight: 700; margin-bottom: 8px; }
.hint { display: block; font-size: .9rem; color: var(--muted); margin-top: 6px; }
input[type="text"], input[type="number"], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 48px;
}
textarea { min-height: 220px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(47, 91, 234, .25); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: .95rem; }
.chip input:checked + span { border-color: var(--magenta); box-shadow: inset 0 0 0 1px var(--magenta); }
.chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.chip input:disabled + span { opacity: .45; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--green); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 140px; }

/* Messages */
.msgs { display: grid; gap: 8px; margin: 0 0 16px; }
.msg { padding: 10px 14px; border-radius: 10px; border-left: 4px solid var(--yellow); background: var(--warn-bg); font-size: .95rem; }
.msg-error { border-left-color: var(--magenta); background: var(--error-bg); }
.msg-ok { border-left-color: var(--green); background: var(--ok-bg); }
.msg-note { border-left-color: var(--blue); background: var(--surface); }

/* Card preview (always light) */
.bcard { --c-head: #D6246E; --c-head-ink: #fff; --c-free: #FFC53D; --c-free-ink: #1D1B3A; --c-line: #1D1B3A;
  background: #fff; color: #1D1B3A; border: 3px solid var(--c-line); border-radius: 14px; overflow: hidden; box-shadow: 6px 6px 0 var(--c-line); width: 100%; }
.bcard .bhead { background: var(--c-head); color: var(--c-head-ink); padding: 10px 8px 8px; text-align: center; }
.bcard .btitle { font-family: var(--head); font-weight: 700; font-size: clamp(.8rem, 1.6vw, 1rem); overflow-wrap: anywhere; }
.bcard .bletters { display: grid; font-family: var(--head); font-weight: 800; font-size: clamp(1.4rem, 3.4vw, 2.1rem); line-height: 1; }
.bcard .bgrid { display: grid; }
.bcard .bcell { position: relative; aspect-ratio: 1; border-top: 2px solid var(--c-line); border-right: 2px solid var(--c-line); display: grid; place-items: center; text-align: center; padding: 4px; font-weight: 700; line-height: 1.12; overflow: hidden; overflow-wrap: normal; word-break: normal; hyphens: none; }
.bcard .bcell.last { border-right: 0; }
.bcard .bcell.free { background: var(--c-free); color: var(--c-free-ink); font-family: var(--head); font-weight: 800; }
.bcard .bcell.num { font-family: var(--head); font-weight: 800; }
.bcard .bcell.prompt { align-content: start; font-weight: 400; }
.bcard .bcell.prompt::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: 14%; border-bottom: 1px solid #9A98B5; }
.bcard .bfoot { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; font-size: .7rem; color: #5A5878; border-top: 2px solid var(--c-line); }

/* Reserved ad space (stays hidden until ads are approved) */
.ad-slot { min-height: 280px; margin: 32px auto; }

/* Progress moment */
.progress-overlay { position: fixed; inset: 0; background: rgba(21, 20, 43, .55); display: grid; place-items: center; z-index: 50; padding: 20px; }
.progress-box { background: var(--surface); color: var(--ink); border-radius: 20px; padding: 28px; width: min(420px, 100%); text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.mini-card { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; width: 150px; margin: 0 auto 18px; padding: 8px; border: 3px solid var(--ink); border-radius: 10px; background: #fff; }
.mini-card i { aspect-ratio: 1; border-radius: 3px; background: #EEF0F8; position: relative; }
.mini-card i.on::after { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: rgba(214, 36, 110, .6); }
.progress-line { font-family: var(--head); font-weight: 700; font-size: 1.2rem; min-height: 1.6em; }
.progress-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 14px; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--magenta); transition: width .3s; }
@media (prefers-reduced-motion: no-preference) {
  .mini-card i.on::after { animation: dab .35s cubic-bezier(.2, 1.6, .4, 1) both; }
  @keyframes dab { from { transform: scale(0); } to { transform: scale(1); } }
}
@media (prefers-reduced-motion: reduce) { .mini-card { display: none; } }

@media print { .site-head, .site-foot, .ad-slot, .no-print { display: none !important; } }

/* Consent banner */
.consent-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 640px; margin: 0 auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: 0 12px 40px rgba(29, 27, 58, .2); font-size: .95rem; }
.consent-banner p { margin: 0 0 12px; }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.consent-actions .btn { min-width: 120px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* Sticky header */
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); }
@supports not (background: color-mix(in srgb, white 50%, transparent)) { .site-head { background: var(--surface); } }
.site-nav a.nav-cta { color: var(--magenta); }
@media (max-width: 700px) {
  .site-head .wrap { flex-wrap: nowrap; min-height: 56px; gap: 10px; }
  .wordmark { font-size: 1rem; flex: none; }
  .site-nav { flex-wrap: nowrap; overflow-x: auto; gap: 14px; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 0; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a, .site-nav .icon-btn { white-space: nowrap; flex: none; }
  .site-nav .icon-btn { min-height: 40px; padding: 6px 10px; font-size: .85rem; }
}
[id] { scroll-margin-top: 80px; }
.logo-mark { width: 36px; height: 36px; flex: none; }
@media (max-width: 700px) { .logo-mark { width: 30px; height: 30px; } }
html, body { overflow-x: clip; }

/* Current page in nav */
.site-nav a[aria-current="page"] { color: var(--magenta); box-shadow: inset 0 -3px 0 var(--magenta); padding-bottom: 4px; }
/* Stronger edge under colored bands so gray never blends into gray */
:root { --band-edge: #D9DBEC; }
:root[data-theme="dark"] { --band-edge: #3A3760; }
.site-head { border-bottom: 1px solid var(--band-edge); }

/* Wordmark logo */
.wordmark { display: inline-flex; align-items: center; flex: none; }
.logo-wordmark { display: block; height: 54px; width: auto; }
@media (max-width: 700px) { .logo-wordmark { height: 36px; } }
@media (max-width: 380px) { .logo-wordmark { height: 32px; } }
:root[data-theme="dark"] .logo-wordmark { background: #fff; border-radius: 12px; padding: 3px 8px; box-sizing: content-box; }
.bcard .bcell.force-wrap { overflow-wrap: anywhere; }
.bfoot strong { font-weight: 800; color: var(--c-ink, #1D1B3A); }

/* ===== Accessibility pass: contrast fixes (WCAG AA) ===== */
.site-nav a[aria-current="page"] { color: #B81B5C; box-shadow: inset 0 -3px 0 #B81B5C; }
:root[data-theme="dark"] .site-nav a[aria-current="page"] { color: #FF7DB0; box-shadow: inset 0 -3px 0 #FF7DB0; }

/* Consent banner: both choices equally prominent (UK and EU guidance) */
.consent-banner .btn-consent { background: var(--ink); color: var(--bg); border: 2px solid var(--ink); min-width: 110px; }
.consent-banner .btn-consent:hover, .consent-banner .btn-consent:focus-visible { filter: brightness(1.15); }
.site-foot .brandline { font-size: .82rem; color: var(--muted); margin-top: 6px; }
