/*
Theme Name: TheCasinoRank
Theme URI: https://thecasinorank.com
Author: TheCasinoRank
Description: Comparison theme for TheCasinoRank. Plain CSS with design tokens — deliberately no Tailwind build step, so any class can be added later without a toolchain.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: thecasinorank
*/

/* ---------------------------------------------------------------- tokens */
:root {
  --page: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #eff1f4;
  --border: #e3e7ea;
  --border-strong: #d3d7dd;
  --hairline: #eceef1;

  --text: #16181d;
  --muted: #5a646e;
  --faint: #8a9099;

  --navy-900: #0b1b24;
  --navy-700: #16303d;

  --teal: #00c2a8;
  --teal-bright: #16d9bc;
  --teal-ink: #04302a;
  --teal-tint: #e1f5ee;
  --teal-deep: #0f6e56;

  --gold: #e0a800;
  --gold-ink: #412402;
  --gold-tint: #ffb020;

  --radius: 10px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(16, 20, 26, .06), 0 2px 8px rgba(16, 20, 26, .05);
  --shadow-hover: 0 2px 4px rgba(16, 20, 26, .08), 0 4px 14px rgba(16, 20, 26, .07);

  --sans: "Space Grotesk", "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1200px;
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: clamp(18px, 2vw, 21px); }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; border: 1px solid transparent; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal); color: var(--teal-ink); }
.btn-primary:hover { background: var(--teal-bright); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #2a2e36; }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-link { color: var(--teal-deep); font-weight: 500; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; }

/* ------------------------------------------------------------- utilities */
.eyebrow { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--teal-deep); font-weight: 600; margin: 0 0 6px; }
.lede { font-size: 17px; color: var(--muted); max-width: 70ch; }
.meta { font-size: 13px; color: var(--muted); }
.card { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }
.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

.pill { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: var(--radius-sm); }
.pill-licence { background: var(--teal-tint); color: var(--teal-deep); font-weight: 500; }
.pill-feature { background: var(--surface-2); color: #3f454c; padding: 3px 8px; }
.pill-more { background: #f1f3f5; color: #55606b; padding: 0 8px; height: 24px; }

/* ---------------------------------------------------------------- header */
.utility { background: var(--navy-900); color: rgba(255,255,255,.72); font-size: 12px; }
.utility .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 40px; flex-wrap: wrap; }
.utility a { display: inline-flex; align-items: center; min-height: 40px; }
.utility a { color: rgba(255,255,255,.86); }
.utility-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.age-badge { border: 1px solid rgba(255,255,255,.4); border-radius: 3px; padding: 0 6px; font-size: 11px; }

.masthead { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 60; }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 66px; }
.brand { font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.brand span { color: var(--teal-deep); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav > li { position: relative; list-style: none; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > li > a { display: block; padding: 13px 12px; font-size: 15px; font-weight: 500; border-radius: var(--radius-sm); }
.nav > li > a:hover { background: var(--surface-2); text-decoration: none; }
.nav .sub {
  position: absolute; top: 100%; left: 0; min-width: 260px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-hover);
  padding: 10px; display: none; z-index: 70; columns: 1;
}
.nav > li:hover > .sub, .nav > li:focus-within > .sub { display: block; }
.nav .sub.wide { min-width: 460px; columns: 2; column-gap: 10px; }
.nav .sub a { display: block; padding: 7px 10px; font-size: 14px; border-radius: var(--radius-sm); break-inside: avoid; }
.nav .sub a:hover { background: var(--surface-2); text-decoration: none; }
.nav-toggle { display: none; }

/* ----------------------------------------------------------------- hero */
.hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: #fff; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; top: -30%; right: -10%; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(0,194,168,.20) 0%, transparent 68%); pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; padding-top: 56px; padding-bottom: 56px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; }
.hero h1 .accent { color: var(--teal-bright); }
.hero p { color: rgba(255,255,255,.74); font-size: 17px; max-width: 54ch; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500;
  color: var(--teal-bright); background: rgba(0,194,168,.12); border: 1px solid rgba(0,194,168,.3);
  border-radius: 999px; padding: 6px 14px; margin-bottom: 18px;
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.hero-stat { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 7px 14px; }
.hero-stat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal-bright); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn-outline { border-color: rgba(255,255,255,.25); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,.08); }

.pick-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 22px; }
.pick-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 10px; }
.pick-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pick-head img, .pick-head .mono { width: 52px; height: 52px; border-radius: 10px; }
.pick-name { font-size: 21px; font-weight: 700; }
.pick-score { font-size: 38px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.pick-offer { font-size: 16px; margin: 12px 0; }
.pick-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pick-chips span { font-size: 11px; background: rgba(255,255,255,.09); border-radius: var(--radius-sm); padding: 3px 9px; }
.pick-note { font-size: 11px; color: rgba(255,255,255,.55); margin: 10px 0 0; }

/* ---------------------------------------------------------- casino cards */
.casino-list { display: flex; flex-direction: column; gap: 9px; }
.ccard {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 11px 14px; display: flex; align-items: center; gap: 12px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.ccard:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.ccard.is-pick { border-left: 3px solid var(--gold); }
.ccard-rank { width: 24px; flex: none; text-align: center; font-size: 15px; font-weight: 600; }
.ccard-logo { width: 40px; height: 40px; flex: none; border-radius: 8px; object-fit: contain; background: var(--surface-2); }
.mono { display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: var(--navy-700); }
.ccard-id { width: 168px; flex: none; min-width: 0; }
.ccard-kicker { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 0 0 2px; }
.ccard.is-pick .ccard-kicker { color: #b07d12; }
.ccard-name { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.ccard-main { flex: 1; min-width: 0; border-left: 1px solid var(--hairline); padding-left: 13px; }
.ccard-offer { font-size: 14.5px; margin: 0 0 5px; }
.ccard-tags { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ccard-div { width: 1px; height: 16px; background: #e7eaee; margin: 0 3px; }
.pay { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
.pay img, .pay span.tile {
  flex: 0 0 42px; width: 42px; height: 24px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: -.03em; line-height: 1; object-fit: contain; padding: 1px; overflow: hidden;
}
.ccard-tags { flex-wrap: nowrap; overflow: hidden; }
.ccard-rate { width: 52px; flex: none; text-align: center; }
.score { display: block; width: 46px; height: 36px; margin: 0 auto 3px; border-radius: 6px; background: var(--text); color: #fff;
  font-size: 19px; font-weight: 700; line-height: 36px; letter-spacing: -.03em; }
.stars { font-size: 11px; color: var(--gold); letter-spacing: .5px; }
.stars .off { color: #d8dce1; }
.ccard-act { width: 120px; flex: none; display: flex; flex-direction: column; gap: 5px; }
.ccard-act .btn { min-height: 34px; font-size: 12px; padding: 0 10px; }
.ccard-act .btn-ghost { min-height: 30px; font-size: 11.5px; }

/* ------------------------------------------------------------ layout/aside */
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.aside { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.aside-box { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 16px; }
.aside-box h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.mini { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--hairline); }
.mini:last-child { border-bottom: 0; }
.mini img, .mini .mono { width: 28px; height: 28px; border-radius: 6px; flex: none; font-size: 12px; }
.mini-name { font-size: 13.5px; font-weight: 500; flex: 1; min-width: 0; }
.mini-score { font-size: 13px; font-weight: 700; }

/* ---------------------------------------------------------------- prose */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 1.6em; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 3px solid var(--teal); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 14.5px; background: var(--surface); }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.prose th { background: var(--surface-2); font-weight: 600; }
.table-scroll { overflow-x: auto; }

.verdict-box { background: var(--teal-tint); border: 1px solid #b7e3d5; border-radius: 12px; padding: 18px 20px; margin: 0 0 24px; }
.verdict-box .score-inline { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }

/* ----------------------------------------------------------------- faq */
.faq details { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 8px; }
.faq summary { padding: 14px 18px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 18px 16px; color: var(--muted); }

/* ---------------------------------------------------------------- grids */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; transition: box-shadow .15s ease, transform .15s ease; }
.tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tile h3 { font-size: 16px; margin-bottom: 4px; }
.tile p { font-size: 13.5px; color: var(--muted); margin: 0; }

.post-card { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.post-card .cover { aspect-ratio: 16/9; background: var(--navy-700); }
.post-card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 16.5px; margin-bottom: 6px; }
.post-card p { font-size: 13.5px; color: var(--muted); }
.post-card .btn-link { margin-top: auto; font-size: 13.5px; }

/* --------------------------------------------------------------- footer */
.trust { background: var(--surface); border-top: 1px solid var(--border); }
.trust .wrap { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 16px 20px; }
.trust span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; }

.site-footer { background: var(--navy-900); color: rgba(255,255,255,.7); padding: 44px 0 0; }
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer h4 { color: #fff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.footer-cols { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 28px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 7px; font-size: 13.5px; }
.footer-brand .brand { color: #fff; display: inline-block; margin-bottom: 10px; }
.footer-brand p { font-size: 13.5px; }
.socials { display: flex; gap: 14px; margin-top: 14px; }
.socials a { color: rgba(255,255,255,.55); }
.socials a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding: 18px 0 30px; font-size: 12.5px; }
.footer-bottom .links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }

/* ------------------------------------------------------------ misc chrome */
.crumbs { font-size: 13px; color: var(--muted); padding: 14px 0 0; }
.crumbs a { color: var(--muted); }

#to-top {
  position: fixed; right: 24px; bottom: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--text); color: #fff; border: 0; display: none; align-items: center; justify-content: center;
  z-index: 80; box-shadow: var(--shadow-hover); font-size: 20px; line-height: 1;
}
#to-top.show { display: flex; }

.cookiebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--surface);
  border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(16,20,26,.08);
}
.cookiebar .wrap { display: flex; align-items: center; gap: 16px; padding: 12px 20px; flex-wrap: wrap; }
.cookiebar p { margin: 0; font-size: 13px; flex: 1; min-width: 260px; }
.cookiebar .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cookiebar .btn { min-height: 44px; font-size: 13px; padding: 0 16px; }
.btn-consent { background: var(--surface); border-color: var(--text); color: var(--text); }
.btn-consent:hover { background: var(--surface-2); }
body { padding-bottom: 0; }
body.has-cookiebar { padding-bottom: 132px; }
@media (min-width: 700px) { body.has-cookiebar { padding-bottom: 76px; } }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .with-aside { grid-template-columns: 1fr; }
  .aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .aside-box { flex: 1 1 260px; }
  .footer-cols { grid-template-columns: 1fr 1fr 1fr; }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); }
  .nav { position: fixed; inset: 0 0 0 auto; width: min(360px, 88vw); background: var(--surface);
    flex-direction: column; align-items: stretch; gap: 0; padding: 18px; overflow-y: auto; z-index: 100;
    transform: translateX(100%); transition: transform .2s ease; box-shadow: -8px 0 24px rgba(0,0,0,.12); }
  .nav.open { transform: none; }
  .nav > li > a { padding: 12px 8px; font-size: 16px; }
  .nav .sub { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 8px 12px; min-width: 0; columns: 1; }
  .nav .sub.wide { columns: 1; min-width: 0; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(11,27,36,.5); z-index: 99; display: none; }
  .nav-backdrop.open { display: block; }

  .hero .wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; padding-bottom: 40px; }
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols { grid-template-columns: 1fr 1fr; }

  .ccard { flex-wrap: wrap; padding: 12px; }
  .ccard-id { width: auto; flex: 1; }
  .ccard-main { flex-basis: 100%; border-left: 0; padding-left: 0; order: 3; }
  .ccard-rate { order: 2; margin-left: auto; }
  .ccard-act { order: 4; flex-basis: 100%; width: auto; flex-direction: row; }
  .ccard-act .btn { flex: 1; min-height: 44px; font-size: 13px; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .ccard-kicker, .pill { font-size: 11px; }
  .pay img:nth-child(n+5), .pay span.tile:nth-child(n+5) { display: none; }
}

/* ------------------------------------------------------- disclosure bar */
.disclosure { background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.disclosure .wrap { padding: 8px 20px; }
.disclosure a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 2px; }

/* ----------------------------------------------------------- facts table */
.facts { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 14.5px; background: var(--surface); }
.facts th, .facts td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.facts th { background: var(--surface-2); font-weight: 600; width: 40%; }
