/* Tambola Pro website. "Festive" design system, see docs/visual-design.md.
   System fonts only. No external assets. Every colour is a token below. */

:root {
  /* Colour tokens (docs/visual-design.md) */
  --plum: #4527A0;
  --plum-dark: #311B92;
  --plum-light: #6A3FC0;
  --lilac: #F1ECFB;
  --marigold: #FFB300;
  --marigold-dark: #FF8F00;
  --marigold-light: #FFE082;
  --teal: #00695C;
  --cream: #FFF8EC;
  --paper: #FFFDF5;
  --paper-shade: #EFE7D6;
  --ink: #1F1633;
  --ink-soft: #4A4360;
  --line: #D9D0EC;
  --danger: #C62828;
  --success: #2E7D32;

  /* Derived tokens used only on the website */
  --white: #FFFFFF;
  --zebra: #FAF7FF;
  --teal-dark: #004D40;
  --danger-dark: #B71C1C;
  --danger-bg: #FFEBEE;
  --success-dark: #1B5E20;
  --success-bg: #E8F5E9;
  --decor: rgba(255, 255, 255, 0.12);
  --hatch: rgba(31, 22, 51, 0.07);

  /* Shape and depth */
  --r-btn: 20px;
  --r-card: 20px;
  --r-sheet: 28px;
  --r-ticket: 14px;
  --r-hero: 32px;
  --r-pill: 999px;
  --lip: 4px;
  --shadow-card: 0 6px 20px rgba(49, 27, 146, 0.08);
  --hero-grad: linear-gradient(135deg, var(--plum-light) 0%, var(--plum) 48%, var(--plum-dark) 100%);

  /* Type and layout */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --col: 820px;
  --wide: 1080px;
  --gutter: 20px;
  --focus: var(--marigold);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 500 19px/1.65 var(--font); }
[id] { scroll-margin-top: 130px; }

a { color: var(--plum); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--plum-dark); }
strong, b { font-weight: 800; }

h1 { font-size: 40px; line-height: 1.15; margin: 8px 0 12px; color: var(--plum); font-weight: 900; overflow-wrap: break-word; }
h2 { font-size: 28px; line-height: 1.25; margin: 44px 0 14px; font-weight: 800; color: var(--ink); overflow-wrap: break-word; }
h3 { font-size: 22px; line-height: 1.3; margin: 26px 0 6px; font-weight: 800; color: var(--ink); overflow-wrap: break-word; }
p, li { font-size: 19px; overflow-wrap: break-word; }
li { margin-bottom: 8px; }
.lead { font-size: 22px; line-height: 1.6; color: var(--ink-soft); }
.updated { color: var(--ink-soft); font-size: 16px; }
.center { text-align: center; }

/* Focus: marigold ring, with a thin ink ring inside it so it also shows on white */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ink);
}
a:focus-visible { border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 50; background: var(--white); color: var(--plum); font-weight: 800; padding: 12px 18px; border-radius: 0 0 var(--r-btn) 0; }
.skip:focus { left: 0; }

/* Header: white, sticky, plum wordmark, "Play" pill */
header.top { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
header.top .in { max-width: var(--wide); margin: 0 auto; padding: 8px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 0 16px; flex-wrap: wrap; position: relative; }
.brand { display: inline-flex; align-items: center; min-height: 48px; font-weight: 900; letter-spacing: 3px; color: var(--plum); text-decoration: none; font-size: 22px; white-space: nowrap; }
.brand:hover { color: var(--plum-dark); }
nav.main { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
nav.main a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 18px; color: var(--ink); white-space: nowrap; }
nav.main a:hover { background: var(--lilac); color: var(--plum-dark); }
nav.main a.play { min-height: 48px; margin: 0 0 var(--lip) 8px; padding: 0 24px; border-radius: var(--r-pill); background: var(--plum); color: var(--white); font-weight: 800; box-shadow: 0 var(--lip) 0 var(--plum-dark); }
nav.main a.play:hover { background: var(--plum-dark); color: var(--white); box-shadow: 0 var(--lip) 0 var(--ink); }
nav.main a.play:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--plum-dark); }
nav.main a.play:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
@media (max-width: 760px) {
  header.top .in { padding: 6px 12px 4px; }
  nav.main { width: 100%; justify-content: space-between; gap: 0; }
  nav.main a { padding: 0 8px; font-size: 17px; }
  nav.main a.play { position: absolute; top: 6px; right: 12px; margin: 0; padding: 0 22px; }
  .brand { min-height: 52px; font-size: 20px; letter-spacing: 2.5px; }
}
@media (max-width: 350px) {
  nav.main a { padding: 0 5px; font-size: 16px; }
  nav.main a.play { padding: 0 18px; }
  .brand { font-size: 19px; letter-spacing: 2px; }
}
/* Short screens (a phone held sideways): let the header scroll away */
@media (max-height: 520px) { header.top { position: static; } [id] { scroll-margin-top: 16px; } }

/* Page frame */
main { display: block; }
.page-hero { background: radial-gradient(circle at calc(100% - 36px) 0, var(--decor) 0, var(--decor) 70px, transparent 71px), radial-gradient(circle at calc(100% - 170px) 100%, var(--decor) 0, var(--decor) 46px, transparent 47px), radial-gradient(circle at calc(100% - 300px) 8px, var(--decor) 0, var(--decor) 22px, transparent 23px), var(--hero-grad); color: var(--white); border-radius: 0 0 var(--r-hero) var(--r-hero); }
/* The band text lines up with the text inside the white column below it */
.page-hero .in { max-width: var(--col); margin: 0 auto; padding: 30px 41px 34px; }
.page-hero h1 { color: var(--white); margin: 0; font-size: 40px; }
.page-hero .lead { color: var(--lilac); margin: 12px 0 0; }
.sheet { max-width: var(--col); margin: 24px auto 64px; padding: 34px 40px 40px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.sheet > :first-child { margin-top: 0; }
.sheet > :last-child { margin-bottom: 0; }
@media (max-width: 860px) { .sheet { margin: 16px 10px 48px; } .page-hero .in { padding-left: 51px; padding-right: 51px; } }
@media (max-width: 760px) {
  h1, .page-hero h1 { font-size: 32px; }
  h2 { font-size: 26px; margin-top: 38px; }
  .lead { font-size: 20px; }
  .page-hero .in { padding: 22px 23px 26px; }
  .sheet { margin: 14px 8px 40px; padding: 22px 14px 26px; }
}
@media (max-width: 350px) { h1, .page-hero h1 { font-size: 29px; } }

/* Section headings carry a short marigold bar */
h2::after { content: ""; display: block; width: 48px; height: 5px; margin-top: 8px; border-radius: 3px; background: var(--marigold); }
h2.center::after, .center > h2::after { margin-left: auto; margin-right: auto; }

/* Buttons: solid fill, 4px darker lip, sink 2px when pressed */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 60px; background: var(--plum); color: var(--white); text-decoration: none; text-align: center; font-family: inherit; font-weight: 800; font-size: 22px; line-height: 1.25; padding: 14px 28px; border: 0; border-radius: var(--r-btn); box-shadow: 0 var(--lip) 0 var(--plum-dark); margin: 8px 12px 12px 0; cursor: pointer; transition: transform 80ms ease-out, box-shadow 80ms ease-out, background-color 120ms ease-out; }
.btn:hover { background: var(--plum-dark); color: var(--white); box-shadow: 0 var(--lip) 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--plum-dark); }
.btn.alt { background: var(--teal); color: var(--white); box-shadow: 0 var(--lip) 0 var(--teal-dark); }
.btn.alt:hover { background: var(--teal-dark); color: var(--white); box-shadow: 0 var(--lip) 0 var(--ink); }
.btn.alt:active { box-shadow: 0 2px 0 var(--teal-dark); }
.btn.gold { background: var(--marigold); color: var(--ink); box-shadow: 0 var(--lip) 0 var(--marigold-dark); }
.btn.gold:hover { background: var(--marigold-light); color: var(--ink); box-shadow: 0 var(--lip) 0 var(--marigold-dark); }
.btn.gold:active { box-shadow: 0 2px 0 var(--marigold-dark); }
.btn.ghost { background: var(--white); color: var(--plum); border: 3px solid var(--plum); box-shadow: 0 var(--lip) 0 var(--plum); }
.btn.ghost:hover { background: var(--lilac); color: var(--plum-dark); box-shadow: 0 var(--lip) 0 var(--plum-dark); }
.btn.ghost:active { box-shadow: 0 2px 0 var(--plum); }
button.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn:focus-visible, .btn.alt:focus-visible, .btn.gold:focus-visible, .btn.ghost:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ink); }
@media (max-width: 560px) { .btn { display: flex; width: 100%; margin-right: 0; padding: 14px 18px; } }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; box-shadow: var(--shadow-card); }
.card > :last-child { margin-bottom: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid3 { grid-template-columns: 1fr; gap: 14px; } }
.grid3 .card h3 { margin-top: 0; }
.grid3 .card p { margin: 6px 0 0; }
.card[data-icon]::before { content: attr(data-icon); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 0 12px; border-radius: 50%; background: var(--lilac); color: var(--plum); font-size: 22px; font-weight: 900; line-height: 1; }
.card h3 a { display: inline-block; padding: 4px 0; }

/* Home page */
.hero { background: radial-gradient(circle at 6% 102%, var(--decor) 0, var(--decor) 90px, transparent 91px), radial-gradient(circle at 99% 8%, var(--decor) 0, var(--decor) 120px, transparent 121px), radial-gradient(circle at 58% -4%, var(--decor) 0, var(--decor) 40px, transparent 41px), radial-gradient(circle at 46% 100%, var(--decor) 0, var(--decor) 26px, transparent 27px), var(--hero-grad); color: var(--white); border-radius: 0 0 var(--r-hero) var(--r-hero); }
.hero .in { max-width: var(--wide); margin: 0 auto; padding: 44px var(--gutter) 52px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "text balls" "text ticket"; gap: 8px 44px; align-items: center; }
.hero-text { grid-area: text; min-width: 0; }
.hero h1 { color: var(--white); font-size: 52px; line-height: 1.08; margin: 0 0 16px; }
.hero .lead { color: var(--lilac); margin: 0 0 18px; }
.hero .updated { color: var(--lilac); margin: 6px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hero-actions .btn { margin: 8px 0 10px; }
.hero .btn.ghost { background: transparent; color: var(--white); border-color: var(--white); box-shadow: 0 var(--lip) 0 var(--plum-dark); }
.hero .btn.ghost:hover { background: var(--decor); color: var(--white); border-color: var(--white); box-shadow: 0 var(--lip) 0 var(--plum-dark); }
.hero .btn:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.hero a:focus-visible { box-shadow: 0 0 0 2px var(--plum-dark); }
.hero .ticket-card { grid-area: ticket; min-width: 0; background: var(--paper); color: var(--ink); border: 0; box-shadow: 0 10px 30px rgba(31, 22, 51, 0.28); padding: 18px 18px 12px; }
.hero .ticket-card p { margin: 0 0 6px; font-size: 19px; line-height: 1.65; }
.home .wrap { max-width: var(--wide); margin: 0 auto; padding: 4px var(--gutter) 64px; }
.home .wrap > section > p, .home .wrap > section > ul, .home .wrap > section > ol { max-width: var(--col); }
.home .wrap > section > .btn { margin-top: 4px; }
.home .cta { text-align: center; margin-top: 44px; }
.home .cta .btn { margin-right: 0; }
@media (max-width: 900px) {
  .hero .in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "balls" "text" "ticket"; gap: 14px; padding: 22px 16px 30px; }
  .hero h1 { font-size: 36px; }
  .hero .ticket-card { padding: 16px 12px 8px; }
  .hero .ticket-card p { padding: 0 4px; }
  .home .wrap { padding: 0 16px 48px; }
}
@media (max-width: 350px) { .hero h1 { font-size: 32px; } }

/* The number ball: marigold sphere, white disc, plum ring, plum number */
.balls { grid-area: balls; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 6px; }
.ball { --d: 104px; flex: none; width: var(--d); height: var(--d); border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, var(--marigold-light) 0%, var(--marigold) 45%, var(--marigold-dark) 100%); box-shadow: 0 8px 18px rgba(31, 22, 51, 0.35); animation: ball-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.ball .disc { width: 66%; height: 66%; border-radius: 50%; background: var(--white); border: 3px solid var(--plum); display: flex; align-items: center; justify-content: center; color: var(--plum); font-weight: 900; font-size: calc(var(--d) * 0.36); line-height: 1; letter-spacing: -0.5px; overflow: hidden; }
.ball.b1 { --d: 92px; margin: 0 -10px 18px 0; animation-delay: 60ms; }
.ball.b2 { --d: 128px; z-index: 1; animation-delay: 140ms; }
.ball.b3 { --d: 104px; margin: 0 0 30px -12px; animation-delay: 220ms; }
@keyframes ball-pop { from { transform: scale(0.8); } to { transform: scale(1); } }
@media (max-width: 900px) {
  .balls { justify-content: flex-start; padding: 0; }
  .ball.b1 { --d: 60px; margin: 0 -6px 8px 0; }
  .ball.b2 { --d: 80px; }
  .ball.b3 { --d: 66px; margin: 0 0 14px -8px; }
  .ball .disc { border-width: 2.5px; }
}

/* Numbered steps and checklists */
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 58px; margin-bottom: 16px; min-height: 42px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--plum); color: var(--white); font-weight: 900; font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.check { list-style: none; padding: 0; }
.check li { position: relative; padding-left: 46px; margin-bottom: 12px; min-height: 32px; }
.check li::before { content: "\2713"; position: absolute; left: 0; top: 1px; width: 32px; height: 32px; border-radius: 10px; background: var(--teal); color: var(--white); font-weight: 900; line-height: 1; display: flex; align-items: center; justify-content: center; }

/* Questions */
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; }
.faq summary { display: list-item; font-weight: 800; cursor: pointer; font-size: 20px; line-height: 1.4; padding: 12px 16px; min-height: 52px; border-radius: 14px; }
.faq summary:hover { background: var(--lilac); }
.faq details[open] summary { border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; background: var(--lilac); }
.faq details p { margin: 0; padding: 12px 16px 14px; }

/* Advertisement: plain, labelled, height reserved */
.ad { margin: 36px 0; padding: 0 0 8px; min-height: 280px; background: var(--cream); text-align: center; overflow: hidden; }
.ad::before { content: "Advertisement"; display: block; padding: 6px 0 4px; font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--ink-soft); }
.ad ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* Footer */
footer { background: var(--plum-dark); color: var(--white); font-size: 17px; }
footer .in { max-width: var(--wide); margin: 0 auto; padding: 40px var(--gutter) 28px; }
footer .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 40px; }
footer .col { display: flex; flex-direction: column; align-items: flex-start; }
footer .fh { margin: 0 0 6px; font-size: 15px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--marigold-light); }
footer a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 4px; margin: 0 -4px; color: var(--white); font-size: 18px; font-weight: 600; text-decoration: none; }
footer a:hover { color: var(--marigold-light); text-decoration: underline; }
footer a:focus-visible { box-shadow: none; }
footer .copy { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--plum-light); color: var(--lilac); font-size: 16px; }
@media (max-width: 700px) {
  footer .in { padding: 30px 16px 24px; }
  footer .cols { grid-template-columns: 1fr 1fr; gap: 22px 18px; }
}
@media (max-width: 350px) { footer .cols { grid-template-columns: 1fr; } }

/* Data tables */
.table-wrap { overflow-x: auto; margin: 18px 0; border-radius: 14px; -webkit-overflow-scrolling: touch; }
.data { border-collapse: collapse; width: 100%; background: var(--white); font-size: 19px; }
.data th, .data td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
.data th { background: var(--plum); color: var(--white); font-weight: 800; border-color: var(--plum); }
.data tr:nth-child(even) td { background: var(--zebra); }
.data td.num { font-weight: 900; font-size: 22px; text-align: center; white-space: nowrap; color: var(--plum-dark); }
@media (max-width: 760px) { .data th, .data td { padding: 10px 10px; } }
@media (max-width: 420px) { .data th, .data td { padding: 9px 7px; -webkit-hyphens: auto; hyphens: auto; } }
.data caption { caption-side: top; text-align: left; font-weight: 800; padding: 0 0 8px; color: var(--ink); }

/* Ticket diagrams with captions */
.fig { margin: 20px 0; text-align: center; }
.fig figcaption { color: var(--ink-soft); font-size: 17px; max-width: 560px; margin: 6px auto 0; }
.figs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.figs .fig { flex: 1 1 300px; min-width: 0; max-width: 100%; margin: 8px 0; }
@media (min-width: 700px) { .figs .fig { flex: 0 1 calc((100% - 24px) / 2); } }

/* 75-ball bingo card, used for comparison only */
.bingo { border-collapse: collapse; margin: 12px auto; width: 100%; max-width: 330px; table-layout: fixed; }
.bingo th { background: var(--plum); color: var(--white); font-size: 22px; font-weight: 900; border: 2px solid var(--plum-dark); height: 46px; text-align: center; padding: 0; }
.bingo td { border: 2px solid var(--line); height: 52px; text-align: center; font-weight: 800; font-size: 20px; background: var(--white); color: var(--ink); padding: 0; }
.bingo td.free { background: var(--marigold-light); font-size: 15px; letter-spacing: 0.5px; }

/* Notes */
.note { background: var(--lilac); border: 1px solid var(--line); border-left: 8px solid var(--plum); border-radius: 14px; padding: 14px 18px; margin: 22px 0; color: var(--ink); }
.note p { margin: 0; }

/* Contact form */
.form { max-width: 640px; }
.form .field { margin: 0 0 22px; }
.form label { display: block; font-weight: 800; font-size: 20px; margin-bottom: 6px; }
.form .hint { display: block; color: var(--ink-soft); font-size: 17px; font-weight: 500; }
.form input[type="text"], .form textarea { display: block; width: 100%; min-height: 58px; font: 500 20px/1.4 var(--font); color: var(--ink); background: var(--white); border: 2px solid var(--ink-soft); border-radius: 14px; padding: 12px 14px; }
.form input[type="text"]:focus, .form textarea:focus { border-color: var(--plum); }
.form textarea { min-height: 200px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: var(--r-card); padding: 18px 22px; margin: 20px 0; font-size: 21px; }
.notice.ok { background: var(--success-bg); border: 2px solid var(--success); color: var(--success-dark); font-size: 24px; }
.notice.ok h2 { margin: 0 0 6px; color: var(--success-dark); }
.notice.ok h2::after { display: none; }
.notice.err { background: var(--danger-bg); border: 2px solid var(--danger); color: var(--danger-dark); font-weight: 700; }
.notice[hidden] { display: none; }

/* Printable tickets tool: controls (the tickets themselves are further down) */
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.controls .label { font-weight: 800; font-size: 20px; }
.controls .btn { margin: 6px 0 10px; }
.controls + .controls { margin-top: 12px; }
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper button { width: 64px; height: 64px; border-radius: var(--r-btn); border: 3px solid var(--plum); background: var(--white); color: var(--plum); font-size: 34px; font-weight: 800; line-height: 1; cursor: pointer; font-family: inherit; box-shadow: 0 var(--lip) 0 var(--plum); margin-bottom: var(--lip); }
.stepper button:hover { background: var(--lilac); color: var(--plum-dark); }
.stepper button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--plum); }
.stepper button:disabled { opacity: 0.4; cursor: default; transform: none; }
.stepper button:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.stepper output { display: inline-block; min-width: 64px; text-align: center; font-size: 34px; font-weight: 900; color: var(--ink); }

/* Tickets on screen: a printed paper ticket.
   Everything here is screen-only so that nothing can leak into print. */
@media screen {
  .ticket { width: 100%; max-width: 486px; margin: 14px auto; table-layout: fixed; border-collapse: separate; border-spacing: 0; background: var(--paper); border: 2.5px solid var(--plum); border-top: 0; border-radius: 0 0 var(--r-ticket) var(--r-ticket); padding: 6px; }
  .ticket::before { content: "TICKET"; display: table-caption; caption-side: top; background: var(--lilac); color: var(--plum); border: 2.5px solid var(--plum); border-bottom: 1px solid var(--line); border-radius: var(--r-ticket) var(--r-ticket) 0 0; font-size: 14px; line-height: 1; font-weight: 800; letter-spacing: 2px; text-align: center; padding: 7px 0 6px; }
  .ticket td { width: auto; height: 52px; height: clamp(30px, 9.6vw, 52px); padding: 0; border: 0 solid var(--line); border-width: 0 1px 1px 0; background: var(--white); color: var(--ink); text-align: center; vertical-align: middle; font-weight: 800; font-size: 22px; font-size: clamp(15px, 4.8vw, 22px); line-height: 1; overflow: hidden; }
  .ticket tr:first-child td { border-top-width: 1px; }
  .ticket td:first-child { border-left-width: 1px; }
  .ticket td.blank { background: var(--paper-shade); background: repeating-linear-gradient(135deg, var(--hatch) 0, var(--hatch) 1px, transparent 1px, transparent 6px), var(--paper-shade); }
  /* Marked number: marigold disc with a plum ring; the number turns extra bold */
  .ticket td.hit { font-weight: 900; letter-spacing: -0.3px; background: var(--marigold); background: radial-gradient(circle closest-side at 50% 50%, var(--marigold) 0, var(--marigold) 84%, var(--plum) 87%, var(--plum) 95%, rgba(69, 39, 160, 0) 99%), var(--white); }
  /* Side-by-side diagrams have narrower cells, so the numbers are a little smaller */
  .figs .ticket td { font-size: clamp(15px, 4.8vw, 19px); }

  .tool { margin: 24px 0; padding: 18px 20px 20px; background: var(--lilac); border: 1px solid var(--line); border-radius: var(--r-card); }
  .ticket-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin: 16px 0 0; }
  .ticket-box { min-width: 0; text-align: center; background: var(--paper); border: 2.5px solid var(--plum); border-radius: var(--r-ticket); overflow: hidden; }
  .ticket-box .ticket-label { margin: 0; padding: 7px 0 6px; background: var(--lilac); color: var(--plum); border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.2; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
  .ticket-box .ticket { max-width: none; margin: 0; border: 0; border-radius: 0; background: transparent; }
  .ticket-box .ticket::before { display: none; }
  .ticket-box .ticket td { height: clamp(30px, 9.6vw, 46px); }
}
@media screen and (max-width: 900px) { .ticket-sheet { grid-template-columns: minmax(0, 1fr); } }
@media screen and (max-width: 760px) {
  .tool { padding: 14px 8px 12px; }
  .controls { padding: 0 4px; }
  .ticket { padding: 4px; }
  .ticket-box .ticket { padding: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:active, .stepper button:active, nav.main a.play:active { transform: none; }
}

/* Print base for tickets. These are the values the previous stylesheet applied
   to every medium; they are kept for print so the printed tickets are unchanged. */
@media print {
  .ticket { border-collapse: collapse; margin: 12px auto; }
  .ticket td { border: 2px solid #9E9E9E; width: 46px; height: 46px; text-align: center; font-weight: 700; font-size: 20px; background: #fff; }
  .ticket td.blank { background: #E0E0E0; }
  .tool { margin: 24px 0; }
  .ticket-sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 24px; margin: 24px 0; }
  .ticket-box { text-align: center; }
  .ticket-box .ticket-label { font-weight: 700; font-size: 18px; color: #616161; margin: 0; }
  .ticket-box .ticket { margin: 4px auto 0; }
}

/* Printing */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; color: #000; font-size: 12pt; }
  header.top, footer, .ad, .adsbygoogle, .google-auto-placed, .no-print, .controls { display: none !important; }
  main { max-width: none; margin: 0; padding: 0; }
  a { color: #000; text-decoration: none; }
  .ticket, .fig, .ticket-box, .data tr { break-inside: avoid; page-break-inside: avoid; }
  .ticket td { border: 1.5pt solid #000; }
  .ticket td.blank { background: #DDD; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* The printable tickets page prints only the tickets, six to an A4 page */
  body.print-tickets main > *:not(.tool) { display: none !important; }
  body.print-tickets .tool > *:not(.ticket-sheet) { display: none !important; }
  body.print-tickets .tool { margin: 0; }
  body.print-tickets .ticket-sheet { display: block; margin: 0; }
  body.print-tickets .ticket-box { height: 43mm; margin: 0 0 2mm; padding: 0; overflow: hidden; break-inside: avoid; page-break-inside: avoid; }
  body.print-tickets .ticket-box:nth-child(6n) { break-after: page; page-break-after: always; }
  body.print-tickets .ticket-box:last-child { break-after: auto; page-break-after: auto; }
  body.print-tickets .ticket-box .ticket-label { font-size: 10pt; line-height: 5mm; height: 5mm; color: #000; text-align: left; }
  body.print-tickets .ticket-box .ticket { width: 100%; margin: 0; table-layout: fixed; }
  body.print-tickets .ticket td { width: auto; height: 11.5mm; padding: 0; font-size: 22pt; line-height: 1; }
}

/* Print overrides for the new layout: no bands, no cards, no shadows, no decoration */
@media print {
  body { font-weight: 400; }
  .skip, .balls { display: none !important; }
  .page-hero, .hero { background: none; color: #000; border-radius: 0; }
  .page-hero .in, .hero .in { display: block; max-width: none; margin: 0; padding: 0; }
  .page-hero h1, .hero h1, h1, h2, h3 { color: #000; }
  .page-hero .lead, .hero .lead, .hero .updated, .lead, .updated { color: #000; }
  .sheet, .home .wrap { max-width: none; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
  .card, .hero .ticket-card, .faq details, .note, .table-wrap { box-shadow: none; }
  .hero .ticket-card { background: none; border: 1px solid #000; }
  h2::after { display: none; }
  .btn, .btn.alt, .btn.gold, .btn.ghost, .hero .btn.ghost, .stepper button { background: #fff; color: #000; border: 1.5pt solid #000; box-shadow: none; }
  .ticket td.hit { font-weight: 800; background: #FFE082; outline: 2pt solid #000; outline-offset: -4pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* The article wrapper must not hide the ticket tool on the tickets page */
  body.print-tickets main > div.sheet { display: block !important; }
  body.print-tickets main > div.sheet > *:not(.tool) { display: none !important; }
}
