/* ==========================================================================
   Site Styles — Affiliate Referral Website
   Layer order matters: tokens → reset → layout → components → utilities → print
   ========================================================================== */
@import url("tokens.css");

/* --------------------------------------------------------------------------
   1. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-ink);
  background: var(--c-canvas);
}

img, svg { max-width: 100%; display: block; }
a { color: var(--c-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: var(--lh-tight); margin: 0 0 var(--sp-3); color: var(--c-ink); }
h1 { font-size: var(--fs-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-2xl); letter-spacing: -0.015em; }
h3 { font-size: var(--fs-lg); }
p  { margin: 0 0 var(--sp-4); }
ul, ol { margin: 0 0 var(--sp-4); padding-left: var(--sp-5); }
button { font: inherit; cursor: pointer; }

/* --------------------------------------------------------------------------
   2. Layout primitives
   -------------------------------------------------------------------------- */
.wrap        { width: 100%; max-width: var(--w-base); margin-inline: auto; padding-inline: var(--sp-4); }
.wrap--wide  { max-width: var(--w-wide); }
.wrap--narrow{ max-width: var(--w-narrow); }

.section      { padding-block: var(--sp-7); }
.section--alt { background: var(--c-surface); border-block: 1px solid var(--c-border); }

.grid        { display: grid; gap: var(--sp-5); }
.grid--2     { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.grid--3     { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

.stack > * + * { margin-top: var(--sp-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* --------------------------------------------------------------------------
   3. Skip link (a11y)
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: calc(var(--z-gate) + 1);
  background: var(--c-ink); color: var(--c-ink-inv); padding: var(--sp-2) var(--sp-4);
  border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   4. Age gate — blocking interstitial, 21+ (configurable)
   -------------------------------------------------------------------------- */
.age-gate {
  position: fixed; inset: 0; z-index: var(--z-gate);
  display: grid; place-items: center;
  background: rgba(19, 26, 36, 0.92);
  backdrop-filter: blur(4px);
  padding: var(--sp-4);
}
.age-gate[hidden] { display: none; }

.age-gate__panel {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: var(--sp-6);
  max-width: 30rem;
  width: 100%;
  text-align: center;
}
.age-gate__badge {
  display: inline-block; font-family: var(--f-mono); font-size: var(--fs-sm);
  font-weight: 700; letter-spacing: 0.08em;
  background: var(--c-brand-soft); color: var(--c-brand);
  border: 1px solid var(--c-brand); border-radius: var(--r-pill);
  padding: var(--sp-1) var(--sp-3); margin-bottom: var(--sp-4);
}
.age-gate__title { font-size: var(--fs-xl); margin-bottom: var(--sp-3); }
.age-gate__copy  { color: var(--c-ink-2); font-size: var(--fs-sm); }
.age-gate__actions { display: flex; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-5); }
.age-gate__legal {
  margin-top: var(--sp-5); padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border);
  font-size: var(--fs-xs); color: var(--c-ink-3);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid transparent; border-radius: var(--r-md);
  font-weight: 600; font-size: var(--fs-sm); line-height: 1;
  text-decoration: none; transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 2px; }

.btn--primary { background: var(--c-accent); color: var(--c-ink-inv); }
.btn--primary:hover { background: var(--c-accent-hover); }
.btn--brand   { background: var(--c-brand); color: var(--c-ink-inv); }
.btn--brand:hover { background: var(--c-brand-hover); }
.btn--ghost   { background: transparent; color: var(--c-ink); border-color: var(--c-border-strong); }
.btn--ghost:hover { background: var(--c-surface-alt); }
.btn--block   { width: 100%; }
.btn--sm      { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-xs); }

/* --------------------------------------------------------------------------
   6. Disclosure banner — monetization transparency (Wirecutter lineage)
   -------------------------------------------------------------------------- */
.disclosure {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--c-ink-2);
}
.disclosure strong { color: var(--c-ink); }

/* --------------------------------------------------------------------------
   7. Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: var(--sp-3); font-family: var(--f-display); font-size: var(--fs-md); font-weight: 700; color: var(--c-ink); }
.brand__mark {
  width: 2rem; height: 2rem; border-radius: var(--r-sm);
  background: var(--c-brand); color: var(--c-ink-inv);
  display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 700;
}
.site-nav ul { display: flex; flex-wrap: wrap; gap: var(--sp-5); list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--c-ink-2); font-size: var(--fs-sm); font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--c-brand); }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero { padding-block: var(--sp-8); background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
/* Featured hero: full-bleed licensed background image with dark overlay for legibility */
.hero--featured {
  position: relative;
  background-image: linear-gradient(rgba(6, 20, 14, 0.82), rgba(6, 20, 14, 0.86)),
    url("https://images.unsplash.com/photo-1522778119026-d647f0596c20?auto=format&fit=crop&w=1600&q=70");
  background-size: cover;
  background-position: center;
  color: #f4f7f5;
  border-bottom: 1px solid var(--c-border);
}
.hero--featured .hero__eyebrow { color: #9fe0c0; }
.hero--featured .hero__title { color: #ffffff; }
.hero--featured .hero__lede { color: #d7e4dc; }
.hero--featured .btn--ghost { border-color: rgba(255,255,255,0.35); color: #ffffff; }
.hero--featured .btn--ghost:hover { background: rgba(255,255,255,0.12); }
.hero__eyebrow {
  font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--c-brand); margin-bottom: var(--sp-3);
}
.hero__title { font-size: var(--fs-3xl); max-width: 22ch; }
.hero__lede { font-size: var(--fs-md); color: var(--c-ink-2); max-width: 58ch; }

/* --------------------------------------------------------------------------
   9. Operator card — core repeating unit
   -------------------------------------------------------------------------- */
.op-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-4);
  position: relative;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.op-card:hover { box-shadow: var(--sh-md); border-color: var(--c-border-strong); }

.op-card--top { border-color: var(--c-brand); border-width: 2px; }
.op-card__rank {
  position: absolute; top: calc(-1 * var(--sp-3)); left: var(--sp-5);
  background: var(--c-brand); color: var(--c-ink-inv);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em;
  padding: var(--sp-1) var(--sp-3); border-radius: var(--r-pill);
}

.op-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); }
.op-card__name { font-size: var(--fs-lg); margin: 0; }
.op-card__type { font-size: var(--fs-xs); color: var(--c-ink-3); text-transform: uppercase; letter-spacing: 0.06em; }

.op-card__rating { display: flex; align-items: center; gap: var(--sp-2); font-family: var(--f-mono); font-size: var(--fs-sm); font-weight: 700; }
.op-card__stars { color: var(--c-caution); letter-spacing: -0.1em; }

.op-card__bonus {
  background: var(--c-brand-soft);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  text-align: center;
}
.op-card__bonus-value { font-family: var(--f-display); font-size: var(--fs-xl); font-weight: 700; color: var(--c-brand); }
.op-card__bonus-label { font-size: var(--fs-xs); color: var(--c-ink-2); text-transform: uppercase; letter-spacing: 0.06em; }

.op-card__code {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  border: 1px dashed var(--c-border-strong); border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-3); font-family: var(--f-mono); font-size: var(--fs-sm);
}
.op-card__code-copy { background: none; border: 0; color: var(--c-brand); font-size: var(--fs-xs); font-weight: 700; }
.op-card__code-copy:hover { text-decoration: underline; }

.op-card__states { font-size: var(--fs-xs); color: var(--c-ink-3); }
.op-card__states--restricted { color: var(--c-caution); }

.op-card__pros, .op-card__cons { margin: 0; padding-left: var(--sp-5); font-size: var(--fs-sm); }
.op-card__pros li::marker { color: var(--c-positive); }
.op-card__cons li::marker { color: var(--c-critical); }

.op-card__foot { margin-top: auto; }
.op-card__meta { font-size: var(--fs-xs); color: var(--c-ink-3); margin-top: var(--sp-2); text-align: center; }

/* --------------------------------------------------------------------------
   10. Comparison table
   -------------------------------------------------------------------------- */
.cmp-scroll { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--r-lg); background: var(--c-surface); }
.cmp-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 44rem; }
.cmp-table th, .cmp-table td { padding: var(--sp-3) var(--sp-4); text-align: left; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.cmp-table thead th {
  background: var(--c-surface-alt); font-family: var(--f-mono); font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-ink-2);
  position: sticky; top: 0; z-index: 1;
}
.cmp-table tbody tr:hover { background: var(--c-surface-alt); }
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table .is-best { color: var(--c-brand); font-weight: 700; }
.cmp-table__op { display: flex; align-items: center; gap: var(--sp-3); font-weight: 600; color: var(--c-ink); }

/* --------------------------------------------------------------------------
   11. Tool widgets (PCPartPicker lineage)
   -------------------------------------------------------------------------- */
.tool {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--sh-sm);
}
.tool__title { font-size: var(--fs-md); margin-bottom: var(--sp-4); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink-2); }
.field input, .field select {
  font: inherit; padding: var(--sp-3); border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md); background: var(--c-surface); color: var(--c-ink);
}
.field input:focus, .field select:focus { outline: 3px solid var(--c-brand-soft); border-color: var(--c-brand); }
.tool__out {
  background: var(--c-surface-sunk); border-radius: var(--r-md);
  padding: var(--sp-4); font-family: var(--f-mono); font-size: var(--fs-sm);
  white-space: pre-wrap; word-break: break-word;
}
.tool__out--empty { color: var(--c-ink-3); }

/* --------------------------------------------------------------------------
   12. Callouts / trust blocks
   -------------------------------------------------------------------------- */
.callout { border-left: 4px solid var(--c-brand); background: var(--c-surface); border-radius: 0 var(--r-md) var(--r-md) 0; padding: var(--sp-4) var(--sp-5); }
.callout--caution  { border-left-color: var(--c-caution); }
.callout--critical { border-left-color: var(--c-critical); }
.callout__title { font-size: var(--fs-sm); font-weight: 700; margin-bottom: var(--sp-2); }

.rg-strip {
  background: var(--c-ink); color: var(--c-ink-inv);
  padding: var(--sp-4) 0; font-size: var(--fs-sm);
}
.rg-strip a { color: #8fd4b4; text-decoration: underline; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--c-surface); border-top: 1px solid var(--c-border); padding-block: var(--sp-7) var(--sp-5); }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--sp-6); }
.site-footer h4 { font-family: var(--f-body); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-ink-3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--sp-2); }
.site-footer a { font-size: var(--fs-sm); color: var(--c-ink-2); }
.site-footer__legal { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--c-border); font-size: var(--fs-xs); color: var(--c-ink-3); }
.site-footer__newsletter { margin-top: var(--sp-6); padding: var(--sp-4); border: 1px solid var(--c-border); border-radius: var(--rad-2, 10px); background: var(--c-surface-2, rgba(255,255,255,0.02)); }
.site-footer__newsletter h4 { margin-bottom: var(--sp-1); }
.site-footer__newsletter p { margin-bottom: var(--sp-2); }
.newsletter-form { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.newsletter-form input[type="email"] { flex: 1 1 220px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--c-border); border-radius: var(--r-sm); background: var(--c-surface); color: var(--c-ink); }
.newsletter-form__msg { flex-basis: 100%; font-size: var(--fs-sm); margin: var(--sp-1) 0 0; }
.newsletter-form__msg.is-ok { color: #15803d; }
.newsletter-form__msg.is-err { color: var(--c-critical); }

/* --------------------------------------------------------------------------
   14. Badges
   -------------------------------------------------------------------------- */
.badge { display: inline-block; font-size: var(--fs-xs); font-weight: 700; padding: var(--sp-1) var(--sp-2); border-radius: var(--r-sm); }
.badge--state  { background: var(--c-brand-soft); color: var(--c-brand); }
.badge--warn   { background: #fef3c7; color: var(--c-caution); }
.badge--stop   { background: #fee2e2; color: var(--c-critical); }
.badge--sample { background: #e0e7ff; color: var(--c-info); }
.badge--ok     { background: #dcfce7; color: #15803d; }

/* --------------------------------------------------------------------------
   15. Utilities
   -------------------------------------------------------------------------- */
.u-muted   { color: var(--c-ink-3); }
.u-small   { font-size: var(--fs-sm); }
.u-mono    { font-family: var(--f-mono); }
.u-center  { text-align: center; }
.u-mt-0    { margin-top: 0; }
.u-mb-0    { margin-bottom: 0; }
.u-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   16. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 48rem) {
  :root { --fs-3xl: 2rem; --fs-2xl: 1.6rem; }
  .site-header__inner { flex-direction: column; align-items: flex-start; padding-block: var(--sp-3); }
  .site-nav ul { gap: var(--sp-4); }
  .hero { padding-block: var(--sp-6); }
}

/* --------------------------------------------------------------------------
   17. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .age-gate, .rg-strip, .btn { display: none !important; }
  body { background: #fff; }
}

/* ==========================================================================
   18. Visual polish (BetCompass)
   ========================================================================== */

/* --- Brand mark: richer logo tile --- */
.brand__mark {
  background: linear-gradient(135deg, var(--c-brand), var(--c-brand-hover));
  box-shadow: 0 1px 3px rgba(19, 26, 36, 0.25);
  letter-spacing: 0.02em;
}

/* --- Card hover lift --- */
.op-card {
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.op-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
  border-color: var(--c-brand);
}

/* --- Sticky header scroll shadow --- */
.site-header.is-scrolled {
  box-shadow: 0 2px 12px rgba(19, 26, 36, 0.10);
}

/* --- Hero background: subtle gradient + radial glow --- */
.hero {
  background:
    radial-gradient(60rem 20rem at 85% -10%, rgba(11, 93, 59, 0.10), transparent 60%),
    radial-gradient(40rem 18rem at 10% 110%, rgba(194, 65, 12, 0.06), transparent 60%),
    var(--c-surface);
}

/* --- Scroll-reveal (progressive enhancement; hidden only when JS runs) --- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Back-to-top button --- */
.back-to-top {
  position: fixed; right: var(--sp-5); bottom: var(--sp-5);
  z-index: var(--z-sticky);
  width: 2.75rem; height: 2.75rem; border-radius: var(--r-pill);
  border: 1px solid var(--c-border-strong);
  background: var(--c-surface); color: var(--c-brand);
  font-size: var(--fs-lg); line-height: 1;
  box-shadow: var(--sh-md);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--c-brand); color: var(--c-ink-inv); }

/* --- Age-gate fade-out --- */
.age-gate.is-leaving { opacity: 0; transition: opacity .3s ease; }

/* --- Dark mode (tokens are already variable-driven) --- */
@media (prefers-color-scheme: dark) {
  :root {
    --c-canvas: #0f141b;
    --c-surface: #161d26;
    --c-surface-alt: #1c2530;
    --c-surface-sunk: #232e3b;
    --c-border: #2a3644;
    --c-border-strong: #3a4a5c;
    --c-ink: #e8edf3;
    --c-ink-2: #b6c2d0;
    --c-ink-3: #7d8b9c;
    --c-brand: #3fae7a;
    --c-brand-hover: #4fc08a;
    --c-brand-soft: #12301f;
    --c-accent: #e07a3f;
    --c-accent-hover: #f08a4f;
    --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --sh-md: 0 2px 8px rgba(0, 0, 0, 0.45);
    --sh-lg: 0 8px 28px rgba(0, 0, 0, 0.5);
  }
  .rg-strip a { color: #7fd4a8; }
  .badge--warn { background: #3a2f12; }
  .badge--stop { background: #3a1515; }
  .badge--sample { background: #1a2440; }
    .badge--ok { background: #0f2e1c; color: #4ade80; }
}

/* ==========================================================================
   19. BetCompass schematic depth theme
   ========================================================================== */

/* --- Blueprint grid backdrop (technical/schematic feel) --- */
body {
  background-color: var(--c-canvas);
  background-image:
    linear-gradient(var(--c-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-border) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.5;
  background-repeat: repeat;
}
/* Restore readability: main content sits on opaque raised surfaces */
.site-header, .site-main, .site-footer {
  position: relative;
}
.site-header, .site-footer {
  background-color: var(--c-canvas);
}
.site-main {
  background-color: transparent;
}
.wrap > section, .panel, .card, .op-card, .tool, .age-gate, .callout {
  background-color: var(--c-surface);
}

/* --- Schematic corner ticks on key panels --- */
.panel, .age-gate {
  position: relative;
}
.panel::before, .panel::after, .age-gate::before, .age-gate::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid var(--c-brand);
  opacity: 0.35;
  pointer-events: none;
}
.panel::before, .age-gate::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after, .age-gate::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* --- Brand logo --- */
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); }
.brand__logo {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  transition: transform .25s ease;
}
.brand:hover .brand__logo { transform: rotate(12deg) scale(1.04); }

/* --- Depth layering on cards (extra visual depth) --- */
.op-card, .panel, .card {
  border: 1px solid var(--c-border);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 40%),
    var(--c-surface);
  box-shadow: var(--sh-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.op-card {
  border-top: 3px solid var(--c-brand);
}
.op-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-top-color: var(--c-accent);
}
/* Rank badge accent on cards */
.op-card .rank-badge, .rank-badge {
  background:
    linear-gradient(135deg, var(--c-brand), var(--c-brand-hover));
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* --- Hero depth --- */
.hero {
  background:
    linear-gradient(180deg, rgba(11, 93, 59, 0.10), rgba(11, 93, 59, 0) 55%),
    radial-gradient(60rem 22rem at 88% -10%, rgba(194, 65, 12, 0.08), transparent 60%),
    var(--c-canvas) !important;
  border-bottom: 1px solid var(--c-border);
}
.hero__headline {
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

/* --- Section headline with schematic divider line --- */
.section__title, .h-section {
  position: relative;
  padding-bottom: var(--sp-3);
}
.section__title::after, .h-section::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 3rem; height: 3px;
  background: linear-gradient(90deg, var(--c-brand), var(--c-accent));
  border-radius: var(--r-pill);
}

/* --- Buttons: subtle gradient + inner sheen --- */
.btn--brand {
  background-image:
    linear-gradient(180deg, var(--c-brand-hover) 0%, var(--c-brand) 100%);
  box-shadow: 0 2px 6px rgba(11, 93, 59, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.btn--brand:hover {
  background-image: linear-gradient(180deg, var(--c-brand) 0%, var(--c-brand-hover) 100%);
  box-shadow: 0 4px 12px rgba(11, 93, 59, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* --- Dark mode adjustments for the blueprint grid + depth --- */
@media (prefers-color-scheme: dark) {
  body {
    background-image:
      linear-gradient(rgba(42, 54, 68, 0.35) 1px, transparent 1px),
      linear-gradient(90deg, rgba(42, 54, 68, 0.35) 1px, transparent 1px);
  }
  .op-card, .panel, .card {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 45%), var(--c-surface);
  }
}

/* --------------------------------------------------------------------------
   Visual polish: reading progress, TOC, scrollspy, card hover lift
   -------------------------------------------------------------------------- */

/* Reading progress bar (fixed, very top) */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--c-accent, #4ade80), var(--c-brand, #22c55e));
  z-index: 1000;
  pointer-events: none;
  transition: width 0.1s linear;
}

/* "On this page" table of contents */
.toc {
  border: 1px solid var(--c-border, rgba(128,128,128,0.25));
  border-radius: 12px;
  padding: var(--sp-4);
  margin-bottom: var(--sp-6);
  background: var(--c-surface, #fff);
}
.toc__label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted, #666);
  margin-bottom: var(--sp-2);
}
.toc ul {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: var(--sp-1);
}
.toc a {
  display: inline-block;
  padding: 0.25rem 0;
  color: var(--c-link, #2563eb);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
  transition: border-color 0.2s, color 0.2s;
}
.toc a:hover { text-decoration: underline; }
.toc a.is-active {
  border-left-color: var(--c-accent, #4ade80);
  color: var(--c-text, #111);
  font-weight: 600;
}

/* Card hover lift (subtle, respects reduced motion) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .op-card, .panel, .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  .op-card:hover, .panel:hover, .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  }
}

/* Inline responsible-gambling note in the disclosure block (conversion path) */
.disclosure__rg {
  display: block;
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--c-border, rgba(128,128,128,0.2));
  font-size: var(--fs-sm, 0.875rem);
  color: var(--c-muted, #666);
}
/* Anchor/TOC links: keep section headings clear of the sticky header when jumped to */
[id] { scroll-margin-top: 5.5rem; }
/* Cross-document View Transitions: app-like cross-fade between pages.
   Progressive enhancement — unsupported browsers fall back to instant nav.
   Only enabled when the user has not requested reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) {
    animation-duration: 0.28s;
  }
}
/* Glass sticky header — translucent blur, shadow only when stuck (progressive) */
.site-header {
  background: color-mix(in srgb, var(--c-surface) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
@supports (container-type: scroll-state) {
  .site-header { container-type: scroll-state; }
  @container scroll-state(stuck: top) {
    .site-header { box-shadow: 0 1px 0 var(--c-border), 0 6px 20px -12px rgba(0,0,0,0.5); }
  }
}

/* Bento grid — asymmetric feature tiles (research-backed: ~23% more scroll depth) */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(7rem, auto);
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}
.bento__tile {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--rad-2, 12px);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transition: transform 0.25s var(--ease, ease), box-shadow 0.25s var(--ease, ease);
}
.bento__tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -14px rgba(0,0,0,0.35);
}
.bento__tile--wide { grid-column: span 2; grid-row: span 2; }
.bento__tile--tall { grid-row: span 2; }
.bento__tile--accent { background: linear-gradient(135deg, var(--c-brand), var(--c-brand-hover)); color: var(--c-ink-inv, #fff); border: none; }
.bento__tile--accent .bento__kicker { color: rgba(255,255,255,0.8); }
.bento__kicker {
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.72rem; font-weight: 700; color: var(--c-ink-3, #666);
}
.bento__tile h3 { margin: 0; font-size: 1.15rem; }
.bento__tile p { margin: 0; font-size: 0.9rem; color: var(--c-ink-2, #444); line-height: 1.5; }
.bento__tile--accent p { color: rgba(255,255,255,0.9); }
.bento__stat { font-size: 2rem; font-weight: 800; line-height: 1; }
@media (max-width: 720px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento__tile--wide, .bento__tile--tall { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 480px) {
  .bento { grid-template-columns: 1fr; }
  .bento__tile--wide, .bento__tile--tall { grid-column: span 1; }
}
