/* The website's look: a results desk. White paper, navy ink, hairline rules, figures set in a fixed-width face,
   and lottery balls drawn the way the games draw them. Each game carries its own colour as a rule along the top
   of its panels. The number tools (tools.css) take their colours and type from the tokens below. */
:root {
  --bg: #F3F5F8; --surface: #FFFFFF; --ink: #0B1F33; --muted: #55657A; --line: #D5DCE4;
  --accent: #0A5C9C; --accent-ink: #FFFFFF; --bar: #0B1F33; --bar-ink: #DCE6F1; --good: #1B7F4B;
  --powerball: #C8102E; --mega: #1B57A6; --mega-gold: #E0A300;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  /* Names the number tools use. */
  --teal: var(--accent); --teal-soft: #E3EEF8; --coral: #B3261E; --heat: 10, 92, 156; --on-teal: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A131E; --surface: #111D2B; --ink: #E8EEF5; --muted: #9BACBF; --line: #263647;
    --accent: #6DB3F2; --accent-ink: #0A131E; --bar: #060D15; --bar-ink: #C3D2E2; --good: #5FCB93;
    --powerball: #F0495B; --mega: #7FB0F0; --mega-gold: #FFCB47;
    --teal-soft: #17324C; --coral: #F08A7E; --heat: 109, 179, 242; --on-teal: #0A131E; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55; }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.label { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0; }
h1 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h2 { font-size: 20px; line-height: 1.3; font-weight: 700; margin: 0; text-wrap: balance; }
h3 { font-size: 16px; font-weight: 600; margin: 0; }
p { margin: 0; max-width: 72ch; }
.lead { font-size: 17px; color: var(--muted); }

/* ---- header ---- */
.topline { background: var(--bar); color: var(--bar-ink); font-size: 12px; }
.topline-inner { max-width: 1120px; margin: 0 auto; padding: 6px 16px; display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between; }
.topline a { color: inherit; }
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-bar { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.brand strong { font-weight: 700; }
.brand-mark { width: 30px; height: 30px; border-radius: 6px; background: var(--ink); color: var(--surface); display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a { padding: 7px 12px; border-radius: 6px; color: var(--muted); font-weight: 500; text-decoration: none; font-size: 15px; }
.site-nav a:hover { color: var(--ink); background: var(--bg); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
/* On a phone the header stays in view, so it is kept to two short rows: the name, then the links on one line that scrolls sideways. */
@media (max-width: 640px) {
  .site-bar { padding: 6px 16px 0; gap: 0; }
  .brand { font-size: 16px; gap: 8px; }
  .brand-mark { width: 24px; height: 24px; font-size: 10px; border-radius: 5px; }
  .site-nav { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 32px); margin: 0 -16px; padding: 0 6px; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; padding: 6px 10px; font-size: 14px; }
}

/* ---- layout ---- */
.inner { max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.inner.narrow { max-width: 780px; }
.sec { padding: 32px 0; }
.sec > .inner { display: flex; flex-direction: column; gap: 18px; }
.sec.paper { background: var(--surface); border-block: 1px solid var(--line); }
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cols > * { min-width: 0; }
.notice { border-left: 3px solid var(--coral); padding: 6px 0 6px 12px; color: var(--muted); font-size: 14px; }

/* ---- game panels ---- */
.panel { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--ink); border-radius: 4px; display: flex; flex-direction: column; min-width: 0; }
.panel.g-powerball { border-top-color: var(--powerball); }
.panel.g-mega { border-top-color: var(--mega); }
.panel-head { padding: 14px 18px 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.panel-head h2, .panel-head h1 { font-size: 22px; }
.panel-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.panel-foot { border-top: 1px solid var(--line); padding: 10px 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; font-weight: 600; }
.panel-foot a { text-decoration: none; }
.panel-foot a:hover { text-decoration: underline; }
dl.meta { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 14px; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; font-weight: 500; }
.count { font-family: var(--mono); color: var(--good); font-weight: 600; }
.verified { display: inline-flex; align-items: center; gap: 6px; }
.verified::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }

/* ---- balls: white for the main numbers, the game's own colour for its bonus ball ---- */
.balls { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ball { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  font-family: var(--mono); font-weight: 600; font-size: 17px; color: #0B1F33;
  background: radial-gradient(circle at 32% 28%, #FFFFFF 0, #F1F4F8 55%, #D6DDE6 100%); border: 1px solid #B9C4D0; }
.ball.b-powerball { color: #FFFFFF; background: radial-gradient(circle at 32% 28%, #F25A6A 0, #C8102E 55%, #8F0C1F 100%); border-color: #7A0A1A; }
.ball.b-mega { color: #2B1F00; background: radial-gradient(circle at 32% 28%, #FFE08A 0, #F0B400 55%, #B98500 100%); border-color: #9A6F00; }
.balls.sm { gap: 5px; } .balls.sm .ball { width: 32px; height: 32px; font-size: 13px; }
.balls.lg { gap: 10px; } .balls.lg .ball { width: 62px; height: 62px; font-size: 24px; }
@media (max-width: 420px) { .balls.lg .ball { width: 46px; height: 46px; font-size: 18px; } .balls.lg { gap: 6px; } }
.plus { font-family: var(--mono); color: var(--muted); font-size: 12px; }

/* ---- buttons, chips ---- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.off { opacity: .45; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 11px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-family: var(--mono); font-size: 13px; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.ext::after { content: " \2197"; }

/* ---- frequency strips ---- */
.freq { width: 100%; height: auto; display: block; }
.freq text { font-family: var(--mono); font-size: 10px; fill: var(--muted); }

/* ---- tools list ---- */
.tool-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 32px; }
.tool { display: grid; grid-template-columns: 96px 1fr; gap: 4px 14px; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); align-items: baseline; }
.tool:hover h3 { color: var(--accent); }
.tool .label { color: var(--accent); }
.tool p { color: var(--muted); font-size: 15px; grid-column: 2; }

/* ---- results tables ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
table.results { border-collapse: collapse; width: 100%; }
table.results th, table.results td { padding: 9px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
table.results tr:last-child td { border-bottom: 0; }
table.results th { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
table.results td.date a { font-family: var(--mono); font-size: 14px; }
table.results tbody tr:hover { background: var(--bg); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); overflow: hidden; }
.fact { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.fact strong { font-size: 19px; font-weight: 600; }

/* ---- check my numbers ---- */
.check { display: flex; flex-direction: column; gap: 10px; }
.check-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.check input { width: 52px; height: 44px; text-align: center; font-family: var(--mono); font-size: 17px; font-weight: 600; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; }
.check input.bonus { border-color: var(--powerball); }
.g-mega .check input.bonus { border-color: var(--mega-gold); }
.check output { font-weight: 600; min-height: 1.5em; }

/* ---- store buttons ---- */
.store-row { display: flex; flex-wrap: wrap; gap: 10px; }
.store { display: inline-flex; flex-direction: column; padding: 8px 18px; border-radius: 6px; background: var(--ink); color: var(--surface); text-decoration: none; min-width: 170px; }
.store.off { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.store-small { font-size: 11px; letter-spacing: .04em; }
.store-big { font-size: 17px; font-weight: 600; line-height: 1.2; }

/* ---- prose pages ---- */
.prose { display: flex; flex-direction: column; gap: 14px; }
.prose h2 { margin-top: 10px; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; max-width: 72ch; }

/* ---- footer ---- */
.site-foot { background: var(--bar); color: var(--bar-ink); margin-top: 40px; }
.site-foot a { color: var(--bar-ink); }
.foot-inner { max-width: 1120px; margin: 0 auto; padding: 28px 16px 32px; display: flex; flex-direction: column; gap: 20px; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.foot-cols div { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.foot-cols .label { color: #8FA3B8; }
.foot-note { margin: 0; font-size: 13px; max-width: 90ch; color: #9FB1C4; }
.foot-rule { border: 0; border-top: 1px solid rgba(255, 255, 255, .14); margin: 0; }

/* ---- the lattice: always on the dark stage, in both themes ---- */
.stage-band { background: #0B1F33; color: #DCE6F1; background-image: radial-gradient(900px 420px at 78% 40%, rgba(64, 132, 214, .22), transparent 70%); }
.stage-band .inner { padding-top: 36px; padding-bottom: 36px; }
.stage-band h1, .stage-band h2 { color: #FFFFFF; }
.stage-band .lead { color: #B4C6D9; }
.stage-band .label { color: #8FB4DC; }
.stage-band .btn { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .32); }
.stage-band .btn:hover { border-color: #FFFFFF; }
.stage-band .btn.primary, .stage-band .btn[aria-pressed="true"] { background: #FFFFFF; color: #0B1F33; border-color: #FFFFFF; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 16px; }
.stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stage canvas { display: block; width: 100%; touch-action: manipulation; }
.stage-cap { font-family: var(--mono); font-size: 12px; color: #9DB5CE; min-height: 1.5em; margin: 0; max-width: none; }
.pick-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .hero-grid, .pick-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.pick-panel { background: var(--surface); color: var(--ink); border-radius: 4px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pick-panel .label { color: var(--muted); }
.pick-panel h2 { color: var(--ink); font-size: 18px; }
.pick-panel .btn { background: var(--surface); color: var(--ink); border-color: var(--line); }
.pick-panel .btn:hover { border-color: var(--accent); }
.pick-panel .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pick-status { font-weight: 600; }
.ball.empty { background: transparent; border: 1px dashed var(--line); }
.bonus-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.bchip { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 12px; cursor: pointer; }
.bchip:hover { border-color: var(--accent); }
.bchip[aria-pressed="true"] { background: var(--powerball); border-color: var(--powerball); color: #FFFFFF; }
.hist { display: flex; flex-direction: column; gap: 5px; }
.hist-row { display: grid; grid-template-columns: 82px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; }
.hist-track { position: relative; height: 14px; background: var(--bg); border-radius: 2px; }
.hist-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 2px; min-width: 1px; }
.hist-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.hist-n { text-align: right; }
.hit-list { display: flex; flex-direction: column; gap: 4px; }
.hit { font-size: 13px; }
.pick-panel .facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pick-panel .facts { grid-template-columns: 1fr 1fr; } .pick-panel .facts .fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
.stage-band > .inner:not(.hero-grid) { display: flex; flex-direction: column; gap: 16px; }
.stage-band .crumbs, .stage-band .crumbs a { color: #9DB5CE; }
[data-game="mega"] .bchip[aria-pressed="true"] { background: var(--mega-gold); border-color: var(--mega-gold); color: #2B1F00; }
.stage { scroll-margin-top: 130px; }


/* ---- the draws that contained the picked numbers ---- */
.draw-hist { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.draw-list { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; }
.draw-item { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.draw-item:last-child { border-bottom: 0; }
.draw-item.on { background: var(--teal-soft); }
.draw-row { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 6px 10px; border: 0; background: transparent;
  font: inherit; color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; }
.draw-row:hover { background: var(--bg); }
.draw-open { display: flex; align-items: center; padding: 0 10px; font-size: 12px; border-left: 1px solid var(--line); text-decoration: none; }
.draw-open:hover { text-decoration: underline; }
.ball.mine { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ---- wheels: the slider from fewest tickets to every combination ---- */
.wheel { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; min-width: 0; }
.wheel input[type="range"] { width: 100%; accent-color: var(--accent); margin: 4px 0 0; }
.wheel-ends { display: flex; justify-content: space-between; }
.wheel-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ticket-list { margin: 0; max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; padding: 6px; font-size: 13px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 2px 8px; background: var(--bg); }
.ticket-list .tk { font: inherit; text-align: left; padding: 3px 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; white-space: nowrap; }
.ticket-list .tk:hover { border-color: var(--line); background: var(--surface); }
.ticket-list .tk.on { background: var(--ink); color: var(--surface); }
.wheel-bar { position: sticky; top: var(--head-h, 60px); z-index: 5; background: var(--surface); padding: 10px 0 8px; display: flex; flex-direction: column; gap: 6px;
  border-bottom: 1px solid var(--line); }
.wheel-sum { margin: 0; font-size: 13px; font-weight: 600; max-width: none; }
table.mini { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
table.mini th, table.mini td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.mini th:first-child, table.mini td:first-child { text-align: left; }
table.mini th { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg); white-space: normal; vertical-align: bottom; }
table.mini tr:last-child td { border-bottom: 0; }

/* ---- what to expect, in plain words ---- */
.expect { border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.expect-if { margin: 0; font-weight: 700; }
.expect-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; font-size: 14px; }
.expect-what { color: var(--muted); }
.expect-how { font-weight: 600; }
.expect-row .hist-track { height: 8px; }
@media (min-width: 560px) { .expect-row { grid-template-columns: 170px minmax(60px, 1fr) minmax(170px, auto); gap: 12px; align-items: center; } }

/* On wide screens the lattice stays in view beside the panel as the panel scrolls. */
@media (min-width: 901px) { .pick-grid > .stage { position: sticky; top: calc(var(--head-h, 60px) + 12px); } }

/* ---- every "match if drawn" case in one grid ---- */
.case-grid { display: grid; grid-template-columns: minmax(58px, 0.7fr) repeat(3, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.case-head, .case-side { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; }
.case-head { justify-content: center; text-align: center; padding-bottom: 2px; }
.case { border: 1px solid var(--line); border-radius: 4px; padding: 8px 6px; display: flex; flex-direction: column; gap: 1px; align-items: center; text-align: center; min-width: 0; background: var(--surface); }
.case.empty { border-style: dashed; background: transparent; opacity: .5; }
.case.sure { background: var(--teal-soft); border-color: var(--accent); }
.case.none strong { color: var(--muted); }
.case-name { font-size: 11px; color: var(--muted); }
.case strong { font-size: 17px; line-height: 1.25; }
.case-note { font-size: 11px; color: var(--muted); line-height: 1.3; }

/* ---- advertising: a quiet band between sections, with room kept so the page does not jump when an ad loads ---- */
.ad-band { padding: 14px 0; background: var(--bg); }
.ad { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 110px; }
.ad .label { font-size: 10px; color: var(--muted); }
.ad ins { width: 100%; }
.ad-demo { width: 100%; max-width: 728px; height: 90px; border: 1px dashed var(--line); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }

/* The number tools under the lattice: a link to them stops below the header that stays in view. */
#tools { scroll-margin-top: var(--head-h, 60px); }
