/* ============================================================
   WAVE 2 — coolness upgrades (interactions, widgets, content)
   ============================================================ */

/* Accessibility: visible focus + reduced motion */
a:focus-visible, button:focus-visible, input:focus-visible, .op-visit:focus-visible, .faq-q:focus-visible {
  outline: 3px solid var(--blue-light); outline-offset: 3px; border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Scroll progress bar */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 300;
  background: linear-gradient(90deg, var(--blue-light), var(--gold-light)); transition: width .1s linear; }

/* Back-to-top FAB */
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 250; width: 50px; height: 50px; border-radius: 50%;
  background: var(--ink); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(10,27,46,.35); opacity: 0; visibility: hidden; transform: translateY(14px); transition: .3s; }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--blue); transform: translateY(-3px); }

/* Sticky mobile CTA */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 240; display: none;
  background: rgba(10,27,46,.96); backdrop-filter: blur(10px); border-top: 1px solid rgba(255,255,255,.1);
  padding: 12px 16px; align-items: center; justify-content: space-between; gap: 12px; transform: translateY(110%); transition: transform .35s; }
.sticky-cta.show { transform: translateY(0); }
.sticky-cta .sc-txt { color: #fff; font-size: 13px; font-weight: 700; line-height: 1.3; }
.sticky-cta .sc-txt span { color: var(--blue-light); display: block; font-size: 11px; font-weight: 600; }
.sticky-cta a { background: linear-gradient(135deg, var(--blue-light), var(--blue)); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 800; font-size: 14px; white-space: nowrap; }
@media (max-width: 720px) { .sticky-cta { display: flex; } .to-top { bottom: 78px; } }

/* Hero animated mesh + glyphs */
.hero-mesh { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-mesh span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; animation: meshFloat 16s ease-in-out infinite; }
.hero-mesh span:nth-child(1){ width: 360px; height: 360px; background: rgba(0,114,206,.55); top: -80px; right: 6%; }
.hero-mesh span:nth-child(2){ width: 300px; height: 300px; background: rgba(74,155,232,.4); bottom: -60px; left: 8%; animation-delay: -6s; }
.hero-mesh span:nth-child(3){ width: 220px; height: 220px; background: rgba(201,154,46,.28); top: 40%; right: 30%; animation-delay: -11s; }
@keyframes meshFloat { 0%,100%{ transform: translate(0,0) scale(1);} 33%{ transform: translate(30px,-24px) scale(1.1);} 66%{ transform: translate(-20px,18px) scale(.95);} }
.hero-glyphs { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.hero-glyphs svg { position: absolute; opacity: .1; color: #fff; animation: glyphDrift 22s ease-in-out infinite; }
.hero-glyphs svg:nth-child(1){ top: 15%; left: 5%; width: 62px; }
.hero-glyphs svg:nth-child(2){ top: 63%; left: 11%; width: 50px; animation-delay: -5s; }
.hero-glyphs svg:nth-child(3){ top: 22%; right: 42%; width: 42px; animation-delay: -9s; }
.hero-glyphs svg:nth-child(4){ bottom: 18%; right: 46%; width: 54px; animation-delay: -13s; }
@keyframes glyphDrift { 0%,100%{ transform: translateY(0) rotate(0);} 50%{ transform: translateY(-18px) rotate(8deg);} }

/* Button gloss sweep */
.btn-primary, .op-visit, .btn-white { position: relative; overflow: hidden; }
.btn-primary::after, .op-visit::after, .btn-white::after { content:''; position:absolute; top:0; left:-120%; width:60%; height:100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-18deg); transition: left .6s; pointer-events:none; }
.btn-primary:hover::after, .op-visit:hover::after, .btn-white:hover::after { left: 160%; }

/* Payment & security strip */
.pay-strip { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pay-inner { display: flex; align-items: center; justify-content: center; gap: 30px; flex-wrap: wrap; padding: 26px 0; }
.pay-group { display: flex; align-items: center; gap: 14px; }
.pay-group .plabel { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-2); }
.pay-logos { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pay-logos .pl { height: 32px; display: flex; align-items: center; padding: 0 12px; background: var(--cream); border: 1px solid var(--line); border-radius: 8px; font-weight: 800; font-size: 12.5px; color: var(--ink); letter-spacing: .2px; }
.pay-sep { width: 1px; height: 34px; background: var(--line); }
.sec-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--green); }

/* Operator card v2: brand accent + pros/cons + best tag */
.op-card { border-left: 4px solid transparent; }
.op-card[data-accent] { border-left-color: var(--accent-c, var(--blue)); }
.op-best { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .3px;
  color: var(--gold-deep); background: rgba(201,154,46,.12); border: 1px solid rgba(201,154,46,.3); padding: 3px 10px; border-radius: 20px; }
.op-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 18px; margin-top: 12px; }
.op-proscons .pc { font-size: 12.5px; color: var(--muted); display: flex; align-items: flex-start; gap: 7px; line-height: 1.4; }
.op-proscons .pc .mk { font-weight: 900; flex-shrink: 0; }
.op-proscons .pc.pro .mk { color: var(--green); }
.op-proscons .pc.con .mk { color: var(--red); }
@media (max-width: 760px){ .op-proscons { grid-template-columns: 1fr; } }

/* Rankings sort/filter controls */
.rank-controls { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.rank-controls .rc-label { font-size: 13px; font-weight: 700; color: var(--muted-2); }
.chip { border: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 13px; font-weight: 700;
  padding: 8px 16px; border-radius: 30px; cursor: pointer; transition: .2s; font-family: inherit; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.op-card.op-hidden { display: none; }

/* Odds calculator */
.calc-wrap { max-width: 760px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 22px;
  padding: 34px; box-shadow: var(--shadow-md); }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.calc-field label { display: block; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-2); margin-bottom: 8px; }
.calc-field input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 18px; font-weight: 700;
  font-family: inherit; color: var(--ink); background: var(--cream); transition: .2s; }
.calc-field input:focus { outline: none; border-color: var(--blue); background: var(--paper); }
.calc-result { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calc-out { background: linear-gradient(135deg, var(--sky-soft), var(--sky)); border: 1px solid rgba(0,114,206,.2); border-radius: 14px; padding: 18px 20px; text-align: center; }
.calc-out .co-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--blue-deep); }
.calc-out .co-val { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 800; color: var(--ink); line-height: 1.1; margin-top: 4px; }
.calc-out.profit .co-val { color: var(--green); }
.calc-note { text-align: center; font-size: 12.5px; color: var(--muted-2); margin-top: 16px; }
@media (max-width: 620px){ .calc-grid, .calc-result { grid-template-columns: 1fr; } }

/* Compare */
.op-compare { position: absolute; top: 14px; right: 16px; z-index: 4; display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--muted-2); cursor: pointer; user-select: none; background: var(--paper);
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 20px; }
.op-compare input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; margin: 0; }
.compare-bar { position: fixed; left: 50%; transform: translate(-50%, 160%); bottom: 20px; z-index: 260;
  background: var(--ink); color: #fff; border-radius: 16px; padding: 14px 20px; display: flex; align-items: center; gap: 18px;
  box-shadow: 0 20px 50px rgba(10,27,46,.4); transition: transform .35s cubic-bezier(.2,.8,.3,1); max-width: calc(100vw - 32px); }
.compare-bar.show { transform: translate(-50%, 0); }
.compare-bar .cb-txt { font-size: 14px; font-weight: 700; }
.compare-bar .cb-txt b { color: var(--blue-light); }
.compare-bar button { border: none; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 13.5px; border-radius: 10px; padding: 10px 18px; }
.cb-go { background: linear-gradient(135deg, var(--blue-light), var(--blue)); color: #fff; }
.cb-clear { background: rgba(255,255,255,.1); color: #cdddef; }
.compare-modal { position: fixed; inset: 0; z-index: 400; background: rgba(6,18,34,.72); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 20px; }
.compare-modal.show { display: flex; }
.compare-inner { background: var(--paper); border-radius: 22px; max-width: 900px; width: 100%; max-height: 88vh; overflow: auto; padding: 30px; box-shadow: var(--shadow-lg); }
.compare-inner h3 { font-size: 26px; margin-bottom: 6px; }
.compare-inner .ci-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.compare-close { float: right; border: none; background: var(--cream); width: 38px; height: 38px; border-radius: 10px; font-size: 18px; cursor: pointer; color: var(--ink); }
.ctable { width: 100%; border-collapse: collapse; }
.ctable th, .ctable td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; vertical-align: top; }
.ctable th { background: var(--sky-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted-2); }
.ctable td:first-child { font-weight: 700; color: var(--muted-2); width: 130px; }

/* Trust / testimonials */
.trust-sec { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: 1.05fr 1.45fr; gap: 46px; align-items: center; padding: 66px 0; }
.trust-left h2 { font-size: 36px; letter-spacing: -.6px; margin-bottom: 14px; }
.trust-left p { color: var(--muted); font-size: 16px; margin-bottom: 22px; }
.trust-points { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.trust-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; font-weight: 600; }
.trust-points .ti { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; background: var(--sky); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.testi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.testi { background: var(--cream); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.testi .stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; margin-bottom: 10px; }
.testi .quote { font-size: 14.5px; line-height: 1.6; color: var(--ink); margin-bottom: 14px; }
.testi .who { display: flex; align-items: center; gap: 10px; }
.testi .av { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 14px; }
.testi .who b { font-size: 13.5px; display: block; }
.testi .who span { font-size: 12px; color: var(--muted-2); }
@media (max-width: 900px){ .trust-grid { grid-template-columns: 1fr; gap: 30px; } .testi-grid { grid-template-columns: 1fr; } }

/* Newsletter */
.news-box { position: relative; overflow: hidden; border-radius: 26px; padding: 52px; text-align: center;
  background: linear-gradient(135deg, #0A2540, #0059A6); }
.news-box::before { content:''; position:absolute; inset:0; background: radial-gradient(600px 260px at 50% -30%, rgba(255,255,255,.14), transparent 60%); }
.news-box > * { position: relative; }
.news-box h2 { color: #fff; font-size: 32px; margin-bottom: 10px; }
.news-box p { color: #cfe2f4; font-size: 16px; max-width: 520px; margin: 0 auto 26px; }
.news-form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.news-form input { flex: 1; padding: 15px 18px; border: none; border-radius: 12px; font-size: 15px; font-family: inherit; min-width: 0; }
.news-form button { background: var(--gold); color: #2b2005; border: none; border-radius: 12px; padding: 15px 24px; font-weight: 800; font-size: 15px; cursor: pointer; font-family: inherit; white-space: nowrap; transition: .2s; }
.news-form button:hover { background: var(--gold-light); }
.news-ok { color: #bff0d5; font-weight: 700; margin-top: 14px; min-height: 20px; }
.news-fine { color: #93b0cf; font-size: 12px; margin-top: 14px; }
@media (max-width: 560px){ .news-form { flex-direction: column; } .news-box { padding: 36px 24px; } }

/* Glossary */
.gloss-search { max-width: 520px; margin: 0 auto 30px; }
.gloss-search input { width: 100%; padding: 15px 20px; border: 1.5px solid var(--line); border-radius: 40px; font-size: 15px; font-family: inherit; background: var(--paper); }
.gloss-search input:focus { outline: none; border-color: var(--blue); }
.gloss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; margin: 0 auto; }
.gloss-item { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; transition: .2s; }
.gloss-item:hover { border-color: rgba(0,114,206,.3); box-shadow: var(--shadow-sm); }
.gloss-item h3 { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 800; margin-bottom: 6px; color: var(--blue-deep); }
.gloss-item p { font-size: 14px; color: var(--muted); line-height: 1.55; }
.gloss-item.gh { display: none; }
@media (max-width: 700px){ .gloss-grid { grid-template-columns: 1fr; } }

/* Self-test (responsible page) */
.selftest { max-width: 720px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-sm); }
.selftest .q { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.selftest .q:last-of-type { border-bottom: none; }
.selftest .q p { font-size: 15px; font-weight: 600; }
.selftest .q label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.selftest .st-result { margin-top: 20px; padding: 18px; border-radius: 12px; font-size: 14.5px; line-height: 1.6; display: none; }
.selftest .st-result.show { display: block; }

/* Related articles cards */
.related { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 22px; }
@media (max-width: 800px){ .related { grid-template-columns: 1fr; } }

/* Author / editor bios */
.bio-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.bio { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 26px; text-align: center; }
.bio .av { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 26px; color: #fff; font-family: 'Playfair Display', serif; }
.bio h3 { font-family: 'Inter', sans-serif; font-size: 17px; font-weight: 800; margin-bottom: 3px; }
.bio .role { font-size: 12.5px; color: var(--blue); font-weight: 700; margin-bottom: 10px; }
.bio p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
@media (max-width: 800px){ .bio-grid { grid-template-columns: 1fr; } }


/* ============================================================
   DARK MODE (token overrides + surface fixes)
   ============================================================ */
:root[data-theme="dark"]{
  --cream:#0b1626; --cream-2:#0f1d30; --paper:#13233a; --line:#26384f; --line-soft:#1b2a40;
  --ink:#e9f1fa; --muted:#a6b6ca; --muted-2:#7f90a6;
  --sky:#123152; --sky-soft:#0f2846;
  --green-soft:#123a2b; --red-soft:#3a1c18;
  --shadow-sm:0 4px 14px rgba(0,0,0,.4); --shadow-md:0 18px 44px rgba(0,0,0,.5); --shadow-lg:0 30px 70px rgba(0,0,0,.6);
}
:root[data-theme="dark"] body{ background:var(--cream); }
:root[data-theme="dark"] .nav{ background:rgba(11,22,38,.85); border-bottom-color:var(--line); }
:root[data-theme="dark"] .nav.on-dark{ background:rgba(8,22,40,.5); }
:root[data-theme="dark"] .nav-cta{ background:var(--blue); }
:root[data-theme="dark"] footer{ background:#08131f; }
:root[data-theme="dark"] table.cmp thead th{ background:#0a1a2e; }
:root[data-theme="dark"] .chip.active{ background:#0a1a2e; border-color:#0a1a2e; }
:root[data-theme="dark"] .compare-bar, :root[data-theme="dark"] .to-top{ background:#0a1a2e; }
:root[data-theme="dark"] .pc-visit{ background:#0a1a2e; }
:root[data-theme="dark"] .feat-box.dark{ background:linear-gradient(140deg,#0a1f38,#04203c); }
:root[data-theme="dark"] .pay-logos .pl{ background:var(--cream-2); }
:root[data-theme="dark"] .op-lic{ color:#6fe0b3; }
.wavefill{ fill: var(--cream); }

/* Theme toggle button (injected into nav by JS) */
.theme-toggle{ background:none; border:1px solid var(--line); color:inherit; width:38px; height:38px; border-radius:10px;
  cursor:pointer; display:inline-flex; align-items:center; justify-content:center; margin-left:6px; transition:.2s; flex-shrink:0; }
.theme-toggle:hover{ border-color:var(--blue); color:var(--blue); }
.nav.on-dark .theme-toggle{ border-color:rgba(255,255,255,.25); color:#fff; }
@media (max-width:720px){ .theme-toggle{ margin-left:auto; } }
