/* LottoShark. A reference table, nothing more: system type, one link colour,
   green/red only where a number moved. */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f6f6;
  --text: #111111;
  --muted: #666666;
  --rule: #d8d8d8;
  --rule-strong: #111111;
  --link: #0645ad;
  --up: #106b2c;
  --down: #b3261e;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131313;
    --bg-alt: #1c1c1c;
    --text: #e6e6e6;
    --muted: #9b9b9b;
    --rule: #333333;
    --rule-strong: #e6e6e6;
    --link: #8ab4f8;
    --up: #5fcf7f;
    --down: #ff8a80;
  }
}
:root[data-theme="dark"] {
  --bg: #131313;
  --bg-alt: #1c1c1c;
  --text: #e6e6e6;
  --muted: #9b9b9b;
  --rule: #333333;
  --rule-strong: #e6e6e6;
  --link: #8ab4f8;
  --up: #5fcf7f;
  --down: #ff8a80;
}

* { box-sizing: border-box; }
html { color-scheme: light dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
}
a { color: var(--link); }
h2 { font-size: 17px; margin: 0 0 8px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.num { text-align: right; }

/* header */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 14px 16px; }
.wordmark { font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.sub { color: var(--muted); font-size: 14px; }

/* status line + filters */
.status { margin: 16px 0 12px; color: var(--muted); font-size: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; margin-bottom: 14px; }
.filters label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.filters .search { flex: 1 1 220px; }
.filters .check { flex-direction: row; align-items: center; gap: 6px; min-height: 36px; color: var(--text); }
.filters input[type="search"], .filters select {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--rule);
  border-radius: 3px; padding: 6px 8px; min-height: 36px; width: 100%;
}
.filters input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }

/* table */
.scroller { overflow-x: auto; }
.games { width: 100%; border-collapse: collapse; }
.games th, .games td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
.games thead th { border-bottom: 2px solid var(--rule-strong); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.games th[data-sort] { cursor: pointer; user-select: none; }
.games th[data-sort]:hover { color: var(--text); }
.games th[aria-sort]::after { content: " ▾"; }
.games th[aria-sort="ascending"]::after { content: " ▴"; }
.games tbody tr.row { cursor: pointer; }
.games tbody tr.row:hover { background: var(--bg-alt); }
.games tbody tr.row[aria-expanded="true"] { background: var(--bg-alt); }
.games tbody tr.row[aria-expanded="true"] td { border-bottom-color: transparent; }
.c-rank { color: var(--muted); width: 2.5em; }
.game-cell { display: flex; gap: 10px; align-items: center; }
.logo { flex: none; width: 58px; height: 38px; object-fit: cover; border: 1px solid var(--rule); background: var(--bg-alt); display: block; }
.logo-empty { visibility: hidden; }
.name { font-weight: 600; }
.meta { color: var(--muted); font-size: 13px; }
.off { color: var(--muted); font-weight: 400; }
.up { color: var(--up); }
.down { color: var(--down); }
.strong { font-weight: 700; }
.dag { color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; }
.legend { color: var(--muted); font-size: 13px; max-width: 72ch; margin: 12px 0 0; }

/* expanded detail row */
.detail td { background: var(--bg-alt); padding: 4px 8px 18px; }
.detail-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 32px; max-width: 900px; }
.detail-inner > * { min-width: 0; }
.verdict { grid-column: 1 / -1; margin: 6px 0 0; max-width: 72ch; }
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; font-size: 14px; align-content: start; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.tiers { border-collapse: collapse; width: 100%; font-size: 14px; }
.tiers th, .tiers td { padding: 3px 6px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.tiers th { font-weight: 600; color: var(--muted); font-size: 12px; }
.tiers th:first-child, .tiers td:first-child { text-align: left; }
.tiers tfoot td { border-bottom: 0; color: var(--muted); font-size: 12px; white-space: normal; text-align: left; padding-top: 6px; }
.links { grid-column: 1 / -1; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.art { grid-column: 1 / -1; max-width: 220px; border: 1px solid var(--rule); display: block; }
.note { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin: 0; }

/* method */
.method { margin: 40px 0 48px; border-top: 1px solid var(--rule); padding-top: 18px; }
.method p, .method li { max-width: 72ch; }
.method ol { padding-left: 22px; }
.sources { color: var(--muted); font-size: 13px; }

/* The Game column stays put while the rest of the table slides sideways. */
.games .c-game { position: sticky; left: 0; z-index: 1; background: var(--bg); }
.games thead .c-game { background: var(--bg); }
.games tbody tr.row:hover .c-game, .games tbody tr.row[aria-expanded="true"] .c-game { background: var(--bg-alt); }

/* phones: the table keeps every column at full size and runs off the right edge;
   swipe sideways to see the rest. */
@media (max-width: 680px) {
  body { font-size: 14px; }
  .wrap { padding: 0 12px; }
  .top .wrap { padding: 12px; }
  .scroller { margin: 0 -12px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .games { min-width: 700px; }
  .games th, .games td { white-space: nowrap; padding: 9px 10px; }
  .games .c-rank { display: none; }
  .games .c-game { min-width: 168px; max-width: 176px; padding-left: 12px; padding-right: 8px; box-shadow: 1px 0 0 var(--rule); }
  .games .c-game .name { white-space: normal; font-size: 13px; line-height: 1.25; }
  .games .c-game .meta { white-space: normal; font-size: 11.5px; line-height: 1.3; }
  .games .c-odds { padding-right: 12px; }
  .logo { width: 40px; height: 26px; }
  .game-cell { gap: 7px; }
  .detail td { padding: 4px 12px 18px; white-space: normal; }
  .detail-inner { position: sticky; left: 0; width: calc(100vw - 24px); grid-template-columns: 1fr; }
  .facts { grid-template-columns: max-content 1fr; }
  .tiers td, .tiers th { white-space: nowrap; }
  .filters label { flex: 1 1 100%; }
  .filters .check { flex-basis: auto; }
}
