/* TrainYourOdds. One stylesheet, system fonts, light and dark mode from the visitor's
   setting. Text colours are at least 4.5:1 on their background. No inline styles are
   used anywhere, so the security policy could drop 'unsafe-inline' for styles later. */
:root {
  --ty-bg: #ffffff;
  --ty-surface: #f4f7f5;
  --ty-border: #d5dfda;
  --ty-text: #15211d;
  --ty-muted: #4b5b55;
  --ty-link: #0a6b4d;
  --ty-gold-text: #8a5d00;
  --ty-jackpot: #fbf4e1;
  --ty-brand: #0f2b23;
  --ty-on-brand: #f1f5f2;
  --ty-on-brand-muted: #b5c8c0;
  --ty-gold: #e3b341;
  --ty-radius: 0.6rem;
  --ty-wide: 60rem;
  --ty-read: 44rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ty-bg: #0d1512;
    --ty-surface: #14201b;
    --ty-border: #2a3a33;
    --ty-text: #e4ebe7;
    --ty-muted: #a5b5ae;
    --ty-link: #74d4ae;
    --ty-gold-text: #e9bf57;
    --ty-jackpot: #2a2513;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; background: var(--ty-bg); color: var(--ty-text); font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body > main { flex: 1 0 auto; }
a { color: var(--ty-link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ty-gold); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 { margin: 0.4rem 0 0.8rem; font-size: clamp(1.8rem, 5vw, 2.5rem); letter-spacing: -0.015em; }
h2 { margin: 2.4rem 0 0.8rem; font-size: 1.4rem; }
h3 { margin: 1.6rem 0 0.4rem; font-size: 1.1rem; }
p, li { max-width: var(--ty-read); }
.ty-skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; padding: 0.5rem 0.8rem; background: var(--ty-bg); color: var(--ty-text); border-radius: var(--ty-radius); }
.ty-skip:focus { top: 1rem; }

/* ---- Header ------------------------------------------------------------------- */
.ty-header { background: var(--ty-brand); color: var(--ty-on-brand); }
.ty-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; max-width: var(--ty-wide); min-height: 3.5rem; margin: 0 auto; padding: 0.5rem 1rem; }
.ty-brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ty-on-brand); font-size: 1.1rem; font-weight: 650; text-decoration: none; }
.ty-logo { width: 1.8rem; height: 1.8rem; border-radius: 0.4rem; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.ty-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; margin-left: auto; font-size: 0.95rem; }
.ty-nav a { color: var(--ty-on-brand-muted); text-decoration: none; }
.ty-nav a:hover, .ty-nav a[aria-current="page"] { color: var(--ty-on-brand); }
.ty-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--ty-gold); text-underline-offset: 0.35em; }
.ty-lang { padding: 0.15rem 0.6rem; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; }

/* ---- Page --------------------------------------------------------------------- */
.ty-page { width: 100%; max-width: var(--ty-wide); margin: 0 auto; padding: 1rem 1rem 3rem; }
.ty-crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; color: var(--ty-muted); font-size: 0.9rem; }
.ty-crumbs a { color: var(--ty-muted); }
.ty-lead { font-size: 1.2rem; color: var(--ty-text); }
.ty-note, .ty-quiet { color: var(--ty-muted); font-size: 0.95rem; }
.ty-facts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.ty-facts li { padding: 0.25rem 0.75rem; border: 1px solid var(--ty-border); border-radius: 999px; background: var(--ty-surface); font-size: 0.95rem; }
.ty-prose { max-width: var(--ty-read); }

/* ---- Odds tables -------------------------------------------------------------- */
.ty-table-wrap { overflow-x: auto; margin: 0.5rem 0; border: 1px solid var(--ty-border); border-radius: var(--ty-radius); }
.ty-odds { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ty-odds th, .ty-odds td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--ty-border); white-space: nowrap; }
.ty-odds thead th { background: var(--ty-surface); color: var(--ty-muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.ty-odds tbody th { font-weight: 600; }
.ty-odds .ty-prize { white-space: normal; min-width: 7rem; }
.ty-odds .ty-jackpot { background: var(--ty-jackpot); }
.ty-odds .ty-jackpot .ty-chance { color: var(--ty-gold-text); font-weight: 650; }
.ty-odds tfoot th, .ty-odds tfoot td { border-bottom: 0; font-weight: 650; }
@media (max-width: 30rem) {
  .ty-odds { font-size: 0.9rem; }
  .ty-odds th, .ty-odds td { padding: 0.5rem 0.35rem; white-space: normal; hyphens: auto; }
  .ty-odds thead th { letter-spacing: 0; text-transform: none; font-size: 0.8rem; }
  .ty-odds .ty-chance { white-space: nowrap; }
  .ty-odds .ty-prize { min-width: 0; }
}

/* ---- Cards and steps ---------------------------------------------------------- */
.ty-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.75rem; margin: 0.75rem 0; padding: 0; list-style: none; }
.ty-cards li { max-width: none; }
.ty-cards a { display: flex; flex-direction: column; gap: 0.15rem; height: 100%; padding: 0.9rem 1rem; border: 1px solid var(--ty-border); border-radius: var(--ty-radius); background: var(--ty-surface); color: var(--ty-text); text-decoration: none; }
.ty-cards a:hover { border-color: var(--ty-link); }
.ty-cards strong { font-size: 1.1rem; color: var(--ty-link); }
.ty-cards span { color: var(--ty-muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.ty-steps { padding-left: 1.3rem; }
.ty-steps li { margin: 0.5rem 0; }
.ty-checked ul { padding-left: 1.3rem; }
.ty-disclaimer { margin-top: 2.5rem; color: var(--ty-muted); font-size: 0.9rem; }

/* ---- Footer ------------------------------------------------------------------- */
.ty-footer { margin-top: 2rem; padding: 2rem 0 1.5rem; background: var(--ty-brand); color: var(--ty-on-brand-muted); font-size: 0.95rem; }
.ty-footer a { color: var(--ty-on-brand); }
.ty-footer-grid { display: grid; gap: 1.5rem; max-width: var(--ty-wide); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .ty-footer-grid { grid-template-columns: 1.2fr 1.4fr 0.6fr; } }
.ty-footer p { margin: 0 0 0.6rem; }
.ty-footer ul { margin: 0; padding: 0; list-style: none; }
.ty-footer li { margin: 0.3rem 0; }
.ty-footer-promise { color: var(--ty-on-brand); font-weight: 600; }
.ty-footer-title { color: var(--ty-gold); font-weight: 650; }
.ty-footer .ty-footer-small { width: calc(100% - 2rem); max-width: calc(var(--ty-wide) - 2rem); margin: 1.5rem auto 0; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.85rem; }
