*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
article, aside, figcaption, figure, footer, header, nav, section { display: block; }
h1, h2, h3, h4, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { background-color: transparent; text-decoration: none; color: inherit; }
img { border-style: none; max-width: 100%; height: auto; display: block; }
table { border-collapse: collapse; width: 100%; }
svg { display: block; }
/* ============================================================
   NewOnlineCasinoSites.ca — "The Tracker" design system (D-017, Phase 4)
   Data-forward / fintech-clean. Tokens + components.
   Fonts: Inter (UI) + IBM Plex Mono (data) — loaded per-page.
   ============================================================ */

:root {
  /* Color */
  --ink:        #0B1220;   /* near-black navy — text, dark surfaces */
  --ink-2:      #16213A;   /* panel dark */
  --cobalt:     #2F6BFF;   /* primary action */
  --cobalt-700: #1E4FCC;   /* hover */
  --cobalt-050: #EAF0FF;   /* tint */
  --signal:     #00B37E;   /* live / positive */
  --signal-050: #E3F7F0;
  --ca-red:     #E5484D;   /* sparingly — age/alert */
  --paper:      #F7F9FC;   /* page bg */
  --surface:    #FFFFFF;
  --line:       #E4E9F2;   /* borders */
  --line-2:     #D3DAE8;
  --text:       #16213A;
  --muted:      #5E6B82;
  --muted-2:    #8A95A8;

  /* Type */
  --font-ui:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Radius / shadow / space */
  --r:    12px;
  --r-lg: 16px;
  --r-pill: 40px;
  --shadow:   0 8px 26px rgba(11, 18, 32, 0.07);
  --shadow-h: 0 14px 34px rgba(11, 18, 32, 0.12);
}

/* Base */
body.tg { font-family: var(--font-ui); background: var(--paper); color: var(--text); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.tg .container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.tg h1, .tg h2, .tg h3, .tg h4 { font-family: var(--font-ui); font-weight: 800; line-height: 1.12; letter-spacing: -0.025em; color: var(--ink); }
.tg h1 { font-size: 40px; }
.tg h2 { font-size: 28px; }
.tg h3 { font-size: 20px; }
.tg .num, .tg .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* Eyebrow / label */
.tg .eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cobalt); }

/* ---- Logo lockup ---- */
.tg .brand-lock { display: inline-flex; align-items: center; gap: 10px; }
.tg .brand-lock .mark { width: 30px; height: 30px; display: block; }
.tg .brand-lock .word { font-weight: 800; font-size: 19px; letter-spacing: -0.04em; color: var(--ink); }
.tg .brand-lock .word .tld { color: var(--cobalt); }

/* ---- Top bar ---- */
.tg .topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; border-bottom: 1px solid var(--line); background: rgba(247,249,252,0.9); backdrop-filter: blur(8px); }
.tg .topbar nav { display: flex; gap: 22px; }
.tg .topbar nav a { font-size: 14px; font-weight: 600; color: var(--text); }
.tg .topbar nav a:hover { color: var(--cobalt); }

/* ---- Buttons ---- */
.tg .btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: var(--r); font-weight: 700; font-size: 15px; background: var(--cobalt); color: #fff; box-shadow: 0 6px 16px rgba(47,107,255,0.24); transition: background .15s, transform .15s, box-shadow .15s; }
.tg .btn:hover { background: var(--cobalt-700); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(47,107,255,0.30); }
.tg .btn svg { width: 16px; height: 16px; stroke: #fff; }
.tg .btn-ghost { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: var(--r); font-weight: 600; font-size: 15px; background: transparent; color: var(--ink); border: 1px solid var(--line-2); transition: border-color .15s, color .15s; }
.tg .btn-ghost:hover { border-color: var(--cobalt); color: var(--cobalt); }

/* ---- Tags / badges ---- */
.tg .tag { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: #EEF2F8; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px 10px; }
.tg .tag-new { color: #066b4c; background: var(--signal-050); border-color: #BBE8D8; }
.tg .tag-new::before { content: "● "; color: var(--signal); }
.tg .age-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 3px 9px; border: 1px solid var(--ca-red); border-radius: var(--r-pill); color: var(--ca-red); font-weight: 800; font-size: 11px; }

/* ---- Timestamp chip (signature motif) ---- */
.tg .stamp { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: -0.01em; }
.tg .stamp svg { width: 13px; height: 13px; stroke: var(--signal); }

/* ---- Score chip + meter ---- */
.tg .score { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 14px; background: var(--ink); color: #fff; flex-shrink: 0; }
.tg .score .v { font-family: var(--font-mono); font-size: 19px; font-weight: 700; line-height: 1; }
.tg .score .m { font-size: 10px; color: var(--muted-2); margin-top: 3px; }
.tg .score.high { background: linear-gradient(160deg, #0E5C42, #073d2c); }
.tg .meter { display: inline-flex; gap: 3px; align-items: center; }
.tg .meter i { width: 14px; height: 6px; border-radius: 2px; background: var(--line-2); }
.tg .meter i.on { background: var(--signal); }

/* ---- Ranking row ---- */
.tg .row { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tg .row:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.tg .row .rank { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--cobalt); text-align: center; }
.tg .row .name { font-weight: 800; font-size: 17px; color: var(--ink); letter-spacing: -0.02em; }
.tg .row .facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 5px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.tg .row .facts b { color: var(--ink); font-weight: 600; }
.tg .row .actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* ---- Card ---- */
.tg .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tg .card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.tg .card .art { aspect-ratio: 16/8; background: linear-gradient(135deg, var(--ink-2), var(--ink) 72%); position: relative; display: flex; align-items: flex-end; padding: 16px; }
.tg .card .art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 100% 22px; opacity: .5; }
.tg .card .art .k { position: relative; z-index: 1; color: #E7ECF5; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.tg .card .art .k em { color: #6FA0FF; font-style: normal; }
.tg .card .body { padding: 16px 18px 18px; }
.tg .card .body h3 { font-size: 17px; margin-bottom: 8px; }
.tg .card .body p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---- Data table ---- */
.tg .table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tg .table th { text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; background: #EEF2F8; border-bottom: 1px solid var(--line); }
.tg .table td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tg .table td.n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.tg .table tr:last-child td { border-bottom: 0; }

/* ---- Swatch (styleguide only) ---- */
.tg .swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.tg .swatch { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.tg .swatch .chip { height: 64px; }
.tg .swatch .meta { padding: 8px 10px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.tg .swatch .meta b { display: block; color: var(--ink); font-size: 12.5px; }

/* ---- Styleguide layout helpers ---- */
.tg .sg-sec { padding: 30px 0; border-top: 1px solid var(--line); }
.tg .sg-sec:first-of-type { border-top: 0; }
.tg .sg-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.tg .sg-h h2 { font-size: 22px; }
.tg .sg-h span { font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); }
.tg .sg-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .tg .sg-2 { grid-template-columns: 1fr 1fr; } .tg .sg-3 { grid-template-columns: 1fr 1fr 1fr; } }
.tg .stack { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* Base — "The Tracker" identity (D-017). Tokens live in brand.css (:root). */
body { font-family: var(--font-ui); background-color: var(--paper); color: var(--text); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }

.wrapper { overflow-x: hidden; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { font-family: var(--font-ui); line-height: 1.13; font-weight: 800; letter-spacing: -0.025em; color: var(--ink); }
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

.label { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cobalt); }

.numeric { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

@media (min-width: 768px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 60px; }
}
/* Layout — header / footer / shell — "The Tracker" identity (D-017). Compliance shell preserved. */

/* Region notice bar (ON-baseline — D-012) */
.region-notice { background-color: var(--ink); color: #c7d0e0; }
.region-notice .region-notice-inner { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 20px; font-size: 12px; letter-spacing: 0.01em; text-align: center; }
.region-notice .age-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 2px 8px; border: 1px solid var(--ca-red); border-radius: var(--r-pill); color: #ff9b9e; font-weight: 800; font-size: 11px; }
.region-notice .region-notice-text { color: #aab4c6; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background-color: rgba(247, 249, 252, 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.site-header .brand { display: flex; align-items: center; gap: 10px; }
.site-header .brand .brand-mark { width: 30px; height: 30px; }
.site-header .brand .brand-mark { flex-shrink: 0; }
.site-header .brand .brand-name { font-weight: 800; font-size: 15px; letter-spacing: -0.04em; color: var(--ink); white-space: nowrap; }
.site-header .brand .brand-name .brand-tld { color: var(--cobalt); }

.site-nav .nav-list { display: none; }
.site-nav .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; background-color: var(--surface); }
.site-nav .nav-toggle svg { width: 20px; height: 20px; stroke: var(--ink); }

.mobile-nav { display: none; border-bottom: 1px solid var(--line); background-color: var(--surface); }
.mobile-nav.open { display: block; }
.mobile-nav .mobile-nav-list { display: flex; flex-direction: column; padding: 8px 0; }
.mobile-nav .mobile-nav-list li a { display: block; padding: 12px 20px; font-weight: 600; font-size: 15px; border-bottom: 1px solid var(--line); }
.mobile-nav .mobile-nav-list li a:hover { color: var(--cobalt); }
.mobile-nav .mobile-nav-list li.mobile-group a { color: var(--ink); }
.mobile-nav .mobile-nav-list li.mobile-sub a { padding-left: 38px; font-weight: 500; font-size: 14px; color: var(--muted); }
.mobile-nav .mobile-nav-list li.mobile-sub a:hover { color: var(--cobalt); }

/* Buttons / CTAs (measured copy — D-012) */
.cta { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; background-color: var(--cobalt); color: #ffffff; font-weight: 700; font-size: 15px; border-radius: var(--r); letter-spacing: 0.01em; transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease; box-shadow: 0 6px 16px rgba(47, 107, 255, 0.24); }
.cta:hover { background-color: var(--cobalt-700); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(47, 107, 255, 0.30); }
.cta svg { width: 16px; height: 16px; stroke: #ffffff; }
.cta-ghost { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; background-color: transparent; color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r); font-weight: 600; font-size: 15px; transition: border-color 0.15s ease, color 0.15s ease; }
.cta-ghost:hover { border-color: var(--cobalt); color: var(--cobalt); }
.cta-ghost svg { width: 16px; height: 16px; stroke: currentColor; }

/* Score chip + tested stamp (data-forward motif) */
.score-chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 14px; background-color: var(--ink); color: #ffffff; flex-shrink: 0; }
.score-chip .score-value { font-family: var(--font-mono); font-size: 19px; font-weight: 700; line-height: 1; }
.score-chip .score-max { font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.score-chip.tier-high { background: linear-gradient(160deg, #0E5C42, #073d2c); }
.score-chip.tier-mid { background-color: var(--ink-2); }

.tested-stamp { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); }
.tested-stamp svg { width: 13px; height: 13px; stroke: var(--signal); }
.tested-stamp.unverified { color: #9a6b1f; }

/* Footer (compliance shell preserved — D-012) */
.site-footer { background-color: var(--ink); color: #aab4c6; margin-top: 64px; }
.site-footer .footer-top { display: grid; grid-template-columns: 1fr; gap: 32px; padding: 48px 0 36px; }
.site-footer .footer-brand .brand-name { color: #ffffff; font-weight: 800; font-size: 18px; letter-spacing: -0.04em; white-space: nowrap; }
.site-footer .footer-brand .brand-name .brand-tld { color: #6FA0FF; }
.site-footer .footer-brand p { font-size: 13px; line-height: 1.6; margin-top: 12px; max-width: 360px; }
.site-footer .footer-col h4 { color: #ffffff; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer .footer-col ul li { margin-bottom: 9px; }
.site-footer .footer-col ul li a { font-size: 14px; color: #aab4c6; transition: color 0.15s ease; }
.site-footer .footer-col ul li a:hover { color: #ffffff; }

.site-footer .responsible-bar { border-top: 1px solid #243049; padding: 26px 0; }
.site-footer .responsible-bar .rg-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 16px; }
.site-footer .responsible-bar .age-badge { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid var(--ca-red); border-radius: 50%; color: #ff9b9e; font-weight: 800; font-size: 14px; }
.site-footer .responsible-bar .rg-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #c7d0e0; }
.site-footer .responsible-bar .rg-link svg { width: 15px; height: 15px; stroke: #6FA0FF; }
.site-footer .responsible-bar .rg-statement { font-size: 12px; line-height: 1.7; color: #8593aa; }
.site-footer .responsible-bar .rg-statement a { color: #c7d0e0; text-decoration: underline; }
.site-footer .footer-legal { border-top: 1px solid #243049; padding: 18px 0 30px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.site-footer .footer-legal p { font-size: 12px; color: #728197; }
.site-footer .footer-legal .legal-links { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer .footer-legal .legal-links a { font-size: 12px; color: #728197; }
.site-footer .footer-legal .legal-links a:hover { color: #ffffff; }

@media (min-width: 768px) {
  .site-header .brand .brand-name { font-size: 18px; }
  .site-nav .nav-toggle { display: none; }
  .site-nav .nav-list { display: flex; align-items: center; gap: 26px; }
  .site-nav .nav-list li a { font-size: 14px; font-weight: 600; color: var(--text); transition: color 0.15s ease; }
  .site-nav .nav-list li a:hover { color: var(--cobalt); }
  .site-nav .nav-list .has-dropdown { position: relative; }
  .site-nav .nav-list .has-dropdown > a { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
  .site-nav .nav-list .nav-caret { width: 13px; height: 13px; stroke: currentColor; transition: transform 0.15s ease; }
  .site-nav .nav-list .has-dropdown:hover .nav-caret,
  .site-nav .nav-list .has-dropdown:focus-within .nav-caret { transform: rotate(180deg); }
  .site-nav .nav-list .has-dropdown::after { content: ""; position: absolute; left: -14px; right: -14px; top: 100%; height: 16px; }
  .site-nav .nav-list .nav-dropdown {
    position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%);
    min-width: 244px; background-color: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 8px; margin: 0;
    display: flex; flex-direction: column; gap: 2px; list-style: none;
    opacity: 0; visibility: hidden; transition: opacity 0.15s ease; z-index: 60;
  }
  .site-nav .nav-list .has-dropdown:hover .nav-dropdown,
  .site-nav .nav-list .has-dropdown:focus-within .nav-dropdown { opacity: 1; visibility: visible; }
  .site-nav .nav-list .nav-dropdown li a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
  .site-nav .nav-list .nav-dropdown li a:hover { background-color: var(--paper); color: var(--cobalt); }
  .mobile-nav { display: none !important; }
  .site-footer .footer-top { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
}
