/* ===========================================================================
   Online Casino India  ::  v4, portal
   ---------------------------------------------------------------------------
   Reference : casino.org information architecture (top nav + dropdowns, rank-row
               toplist, methodology block, expert box, certification footer).
               Layout conventions only. None of their marks, copy or metrics.
   Ground    : white. Light is the default theme; dark is opt-in via the toggle.
   Colour roles (locked, never decorative):
               --brand  blue   structure, links, headings accents
               --go     green  the operator action, and nothing else
               --star   amber  rating glyphs, and nothing else
   Type      : Figtree (headings) / Plus Jakarta Sans (body), tabular figures
   Shape     : 8px radius everywhere. Buttons included.
   Dials     : VARIANCE 5 / MOTION 4 / DENSITY 5
   =========================================================================== */

/* -------------------------------------------------------------- 1. TOKENS */
:root {
  color-scheme: light;

  --bg:        #ffffff;
  --bg-2:      #f8f6fd;
  --bg-3:      #ede8f8;
  --surface:   #ffffff;

  --ink:       #1c1830;
  --ink-2:     #56516b;
  --ink-3:     #837d97;

  --brand:      #6d28d9;   /* 7.14:1 on white */
  --brand-2:    #8b5cf6;   /* hover / decorative only, never body text on white */
  --brand-wash: #f3eefe;
  --brand-ink:  #ffffff;

  --go:        #0d8244;
  --go-2:      #0a6b37;
  --go-ink:    #ffffff;

  --star:      #f0a020;

  --line:      #e4e0ee;
  --line-2:    #f0edf8;

  --shadow-1:  0 1px 2px rgba(22, 32, 46, .06);
  --shadow-2:  0 2px 4px rgba(22, 32, 46, .06), 0 10px 24px -12px rgba(109, 40, 217, .18);
  --shadow-3:  0 4px 8px rgba(22, 32, 46, .07), 0 18px 40px -16px rgba(109, 40, 217, .26);

  --r:    8px;
  --r-sm: 6px;

  --ff-head: "Figtree", system-ui, -apple-system, sans-serif;
  --ff-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: .16s;
  --mid:  .28s;

  --shell:  1200px;
  --gutter: clamp(1rem, 3.5vw, 2rem);
  --nav-h:  68px;
}

/* Dark is opt-in only: the brief asks for a light background, so the default
   theme does not follow prefers-color-scheme. The toggle still offers dark. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #120f1c; --bg-2: #191527; --bg-3: #241f36; --surface: #191527;
  --ink: #f1eefa; --ink-2: #b0a9c4; --ink-3: #837c99;
  --brand: #a78bfa; --brand-2: #c4b5fd; --brand-wash: #241a3d; --brand-ink: #16082e;
  --go: #24b268; --go-2: #34c078; --go-ink: #06180e;
  --star: #f5b544;
  --line: #302a45; --line-2: #221d33;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 2px 4px rgba(0,0,0,.45), 0 10px 24px -12px rgba(0,0,0,.6);
  --shadow-3: 0 4px 8px rgba(0,0,0,.5), 0 18px 40px -16px rgba(0,0,0,.7);
}

/* ---------------------------------------------------------------- 2. BASE */
*, *::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; padding-top: var(--nav-h);
  font-family: var(--ff-body); font-size: 1rem; line-height: 1.62;
  color: var(--ink-2); background: var(--bg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-2); }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
::selection { background: var(--brand-wash); color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--ff-head); color: var(--ink);
  font-weight: 700; line-height: 1.16; letter-spacing: -.021em; margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); letter-spacing: -.027em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.95rem); }
h3 { font-size: 1.06rem; line-height: 1.3; }
h1 em, h2 em, h3 em { font-style: italic; line-height: 1.2; padding-bottom: .05em; }
p  { margin: 0 0 1em; }
p:last-child, ul:last-child { margin-bottom: 0; }
strong { color: var(--ink); font-weight: 600; }

/* The container is the ONLY width cap. Headings and body text are never given a
   max-width of their own: they fill whatever column they sit in. */
.container { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding: clamp(2.75rem, 5.5vw, 4.5rem) 0; }
.section--tint { background: var(--bg-2); }
.section--line { border-top: 1px solid var(--line); }

.head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.head p { color: var(--ink-2); }
.head--center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .6rem;
}

/* ------------------------------------------------------------- 3. BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font-family: var(--ff-body); font-size: .9rem; font-weight: 700; white-space: nowrap;
  padding: .72rem 1.25rem; border: 1.5px solid transparent; border-radius: var(--r);
  text-decoration: none; cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease),
              border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

/* green is reserved for the operator action and appears nowhere else */
.btn--go { background: var(--go); color: var(--go-ink); box-shadow: var(--shadow-1); }
.btn--go:hover { background: var(--go-2); color: var(--go-ink); box-shadow: var(--shadow-2); }

.btn--brand { background: var(--brand); color: var(--brand-ink); }
.btn--brand:hover { background: var(--brand-2); color: var(--brand-ink); }

.btn--outline { background: var(--surface); color: var(--brand); border-color: var(--line); }
.btn--outline:hover { border-color: var(--brand-2); color: var(--brand-2); }

.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { color: var(--brand); background: var(--brand-wash); }

.btn--sm { padding: .5rem .9rem; font-size: .82rem; }
.btn--lg { padding: .85rem 1.6rem; font-size: .95rem; }
.btn--block { width: 100%; }

/* -------------------------------------------------------------- 4. HEADER */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 90; height: var(--nav-h);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled { box-shadow: var(--shadow-1); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; flex: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-word {
  font-family: var(--ff-head); font-weight: 800; font-size: 1.06rem;
  letter-spacing: -.032em; color: var(--ink); line-height: 1;
}
.brand-word i { font-style: normal; color: var(--brand-2); }

.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list > li > a:not(.btn) {
  display: block; padding: .55rem .8rem; border-radius: var(--r-sm);
  font-size: .9rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
  white-space: nowrap; transition: color var(--fast), background var(--fast);
}
.nav-list > li > a:not(.btn):hover { color: var(--brand); background: var(--brand-wash); }
.nav-list > li > a:not(.btn).active { color: var(--brand); }

.nav-item--has-submenu > a::after {
  content: ''; display: inline-block; width: .34rem; height: .34rem; margin-left: .4rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform var(--fast) var(--ease);
}
.nav-item--has-submenu:hover > a::after { transform: translateY(1px) rotate(225deg); }
.nav-item--has-submenu::after {
  content: ''; position: absolute; top: 100%; left: 0; right: 0; height: .8rem; pointer-events: auto;
}
.nav-submenu {
  position: absolute; top: calc(100% + .65rem); left: 50%; z-index: 20; margin: 0;
  width: min(34rem, calc(100vw - 2rem));
  padding: .55rem; list-style: none;
  display: grid; grid-template-columns: 1fr 1fr; gap: .1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-3);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, .3rem);
  transition: opacity var(--fast), transform var(--mid) var(--ease), visibility var(--fast);
}
/* caret tying the panel to its trigger */
.nav-submenu::before {
  content: ''; position: absolute; top: -6px; left: 50%; margin-left: -6px;
  width: 11px; height: 11px; background: var(--surface);
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.nav-submenu--single { grid-template-columns: 1fr; width: min(17rem, calc(100vw - 2rem)); }
.nav-item--has-submenu:hover > .nav-submenu,
.nav-item--has-submenu:focus-within > .nav-submenu,
.nav-item--has-submenu.is-open > .nav-submenu { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.nav-submenu a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: .7rem; padding: .5rem .7rem; font-size: .88rem; font-weight: 600;
  border-radius: var(--r-sm); color: var(--ink); text-decoration: none;
}
.nav-submenu .tile { width: 2rem; }
.nav-submenu .sub-score { font-size: .78rem; color: var(--ink-3); font-weight: 700; justify-self: end; }

.header-actions { display: flex; align-items: center; gap: .6rem; flex: none; }
.theme-toggle {
  display: grid; place-items: center; width: 2.35rem; height: 2.35rem; flex: none; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--ink-2); cursor: pointer; transition: color var(--fast), border-color var(--fast);
}
.theme-toggle:hover { color: var(--brand); border-color: var(--brand-2); }
.theme-toggle svg { width: 1.05rem; height: 1.05rem; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .i-sun  { display: none; }

.menu-toggle {
  display: none; width: 2.35rem; height: 2.35rem; flex: none; padding: 0; position: relative;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); cursor: pointer;
}
.menu-toggle span {
  position: absolute; left: 50%; width: 1rem; height: 2px; background: currentColor; border-radius: 2px;
  transform: translateX(-50%); transition: transform var(--mid) var(--ease), opacity var(--fast);
}
.menu-toggle span:nth-child(1) { top: .78rem; }
.menu-toggle span:nth-child(2) { top: 1.1rem; }
.menu-toggle span:nth-child(3) { top: 1.42rem; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 1.1rem; transform: translateX(-50%) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { top: 1.1rem; transform: translateX(-50%) rotate(-45deg); }

/* operator logo tile: white plate so light and dark marks both read */
.tile {
  display: inline-grid; place-items: center; flex: none; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  aspect-ratio: 1 / 1; padding: 0; margin: 0;
}
.tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile--lg { width: 5.5rem; }
.tile--md { width: 4.25rem; }
.tile--sm { width: 2.3rem; }

/* ----------------------------------------------------------------- 5. HERO */
.hero { background: linear-gradient(180deg, var(--brand-wash), var(--bg) 78%); border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center; padding: clamp(2.5rem, 5vw, 4rem) 0;
}
.hero h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.hero-lede { font-size: 1.08rem; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.hero-media { border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-3); aspect-ratio: 4 / 3; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.trust-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; margin-top: .5rem; margin-bottom: 2.5rem;
}
.trust-strip div { background: var(--surface); padding: 1.1rem 1rem; }
.trust-strip > div > b { display: block; font-family: var(--ff-head); font-size: 1.5rem; color: var(--brand); line-height: 1; }
.trust-strip > div > span { display: block; margin-top: .35rem; font-size: .78rem; color: var(--ink-3); }

/* -------------------------------------------------------------- 6. TOPLIST */
.toplist { display: grid; gap: .85rem; }
.toprow {
  display: grid; grid-template-columns: 3rem 4.25rem minmax(0, 1fr) 8.5rem 11rem;
  gap: 1.25rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.15rem 1.35rem; box-shadow: var(--shadow-1);
  transition: box-shadow var(--mid) var(--ease), border-color var(--mid) var(--ease), transform var(--mid) var(--ease);
}
.toprow:hover { box-shadow: var(--shadow-2); border-color: var(--brand-2); transform: translateY(-1px); }
.toprow--lead { border-color: var(--brand); box-shadow: var(--shadow-2); }
.toprow--lead .rank { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

.rank {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem;
  font-family: var(--ff-head); font-weight: 800; font-size: 1rem; color: var(--brand);
  background: var(--brand-wash); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.top-badge {
  position: absolute; top: -.7rem; left: 1.2rem;
  background: var(--brand); color: var(--brand-ink); border-radius: var(--r-sm);
  font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: .22rem .6rem;
}
.toprow--lead { position: relative; }

.top-main h3 { margin-bottom: .3rem; font-size: 1.15rem; }
.top-main h3 a { color: var(--ink); text-decoration: none; }
.top-main h3 a:hover { color: var(--brand); }
.top-bonus { font-size: .92rem; color: var(--ink-2); margin-bottom: .5rem; }
.top-feats { display: flex; flex-wrap: wrap; gap: .35rem .5rem; list-style: none; margin: 0; padding: 0; }
.top-feats li {
  font-size: .74rem; font-weight: 600; color: var(--ink-2);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 999px; padding: .18rem .6rem;
}

.top-score { text-align: center; }
.top-score > b { display: block; font-family: var(--ff-head); font-size: 1.85rem; color: var(--ink); line-height: 1; }
.top-score .stars { margin-top: .3rem; }
.top-score > span { display: block; margin-top: .3rem; font-size: .72rem; color: var(--ink-3); }

.top-cta { display: grid; gap: .45rem; }

.stars { display: inline-flex; gap: .06em; line-height: 1; font-size: .84rem; }
.star { color: var(--line); }
.star--full { color: var(--star); }
.star--half { position: relative; color: var(--line); }
.star--half::before { content: '\2605'; position: absolute; left: 0; top: 0; width: 50%; overflow: hidden; color: var(--star); }

/* ------------------------------------------------- 7. CARDS AND CRITERIA */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.25rem, 2.4vw, 1.75rem); box-shadow: var(--shadow-1);
}
.card h3 { margin-bottom: .45rem; }
.card p { font-size: .93rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.criteria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.criterion { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.35rem; }
.criterion .n {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; margin-bottom: .8rem;
  font-family: var(--ff-head); font-weight: 800; font-size: .85rem;
  color: var(--brand); background: var(--brand-wash); border-radius: 50%;
}
.criterion h3 { font-size: 1rem; margin-bottom: .35rem; }
.criterion p { font-size: .88rem; margin: 0; }

/* expert box */
.expert {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.35rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.25rem, 2.4vw, 1.75rem); box-shadow: var(--shadow-1);
}
.expert img { width: 5rem; height: 5rem; border-radius: 50%; object-fit: cover; }
.expert h3 { margin-bottom: .2rem; }
.expert .role { font-size: .82rem; color: var(--brand); font-weight: 700; margin-bottom: .6rem; }
.expert p { font-size: .92rem; margin: 0; }

/* --------------------------------------------------------- 8. REVIEW PAGE */
.crumb { font-size: .82rem; color: var(--ink-3); padding: 1.85rem 0 1.35rem; }
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--brand); }

.rev-head { background: var(--bg-2); border-bottom: 1px solid var(--line); padding-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.rev-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.5rem; align-items: start; }
.rev-title h1 { margin-bottom: .5rem; }
.rev-lede { color: var(--ink-2); }
.rev-badge {
  text-align: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1rem 1.4rem; min-width: 9rem; box-shadow: var(--shadow-1);
}
.rev-badge > b { display: block; font-family: var(--ff-head); font-size: 2.2rem; color: var(--brand); line-height: 1; }
.rev-badge .stars { margin-top: .4rem; }
.rev-badge > span { display: block; margin-top: .4rem; font-size: .72rem; color: var(--ink-3); }

.byline { display: flex; align-items: center; gap: .6rem; margin-top: 1.1rem; font-size: .84rem; color: var(--ink-3); }
.byline img { width: 2.1rem; height: 2.1rem; border-radius: 50%; object-fit: cover; }
.byline b { color: var(--ink); font-weight: 700; }

.keyfacts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; margin-top: 1.5rem;
}
.keyfacts > div { background: var(--surface); padding: .95rem 1.1rem; }
.keyfacts dt { font-size: .72rem; color: var(--ink-3); margin-bottom: .3rem; }
.keyfacts dd { margin: 0; font-size: .9rem; font-weight: 600; color: var(--ink); }

.offer-bar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--go);
  border-radius: var(--r); padding: 1.1rem 1.3rem; margin-top: 1.25rem; box-shadow: var(--shadow-1);
}
.offer-bar span:not(.star) { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .25rem; }
.offer-bar p { margin: 0; font-size: .95rem; color: var(--ink); font-weight: 600; }

/* two-column body with a sticky contents rail, the portal convention */
.rev-body { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: clamp(1.75rem, 3.5vw, 3rem); align-items: start; padding: clamp(2rem, 4vw, 3rem) 0; }
.toc { position: sticky; top: calc(var(--nav-h) + 1.25rem); }
.toc-inner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-1); }
.toc h2 { font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .8rem; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: .1rem; }
.toc ol a {
  display: grid; grid-template-columns: 1.35rem 1fr; gap: .3rem; padding: .35rem .3rem;
  border-radius: var(--r-sm); font-size: .82rem; line-height: 1.35; color: var(--ink-2);
  text-decoration: none; transition: background var(--fast), color var(--fast);
}
.toc ol a::before { counter-increment: toc; content: counter(toc); color: var(--ink-3); font-weight: 700; font-size: .74rem; }
.toc ol a:hover { background: var(--brand-wash); color: var(--brand); }
.toc ol a.is-current { background: var(--brand-wash); color: var(--brand); font-weight: 700; }

.sticky-cta { margin-top: .85rem; }

/* scorecard */
.score-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.score-list { display: grid; gap: .1rem; }
.score-row { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 2.6rem; gap: .8rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.score-row:last-child { border-bottom: 0; }
.meter { height: 6px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.score-row b { text-align: right; font-weight: 700; color: var(--ink); font-size: .86rem; }
.score-row--total { border-bottom: 2px solid var(--line); padding-bottom: .9rem; margin-bottom: .4rem; }
.score-row--total > :first-child { font-family: var(--ff-head); font-size: 1.05rem; color: var(--ink); font-weight: 700; }
.score-row--total b { font-size: 1.15rem; color: var(--brand); }

.take { background: var(--bg-2); border-radius: var(--r); padding: 1.35rem 1.5rem; }
.take p { font-size: .98rem; color: var(--ink); margin: 0; }
.take cite { display: block; margin-top: .9rem; font-style: normal; font-size: .78rem; color: var(--ink-3); }

/* --------------------------------------------- 9. BUILDER SECTION FAMILIES */
.content-block { margin-bottom: clamp(2rem, 4vw, 2.75rem); scroll-margin-top: calc(var(--nav-h) + 1rem); }
.content-block > h2 { margin-bottom: .9rem; }
.content-block > .intro { color: var(--ink-2); margin-bottom: 1.25rem; }

.f-grid { display: grid; gap: .85rem; }
.f-grid[data-cols="1"] { grid-template-columns: 1fr; }
.f-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.f-grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.f-grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.f-grid > article {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.15rem 1.25rem;
}
.f-grid > article h3 { margin-bottom: .4rem; }
.f-grid > article p { font-size: .9rem; }

.f-ledger { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.f-ledger > article { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); column-gap: clamp(.8rem, 2.5vw, 2rem); row-gap: .3rem; padding: 1.1rem 1.25rem; }
.f-ledger > article > h3 { grid-column: 1; }
.f-ledger > article > *:not(h3) { grid-column: 2; min-width: 0; }
.f-ledger > article + article { border-top: 1px solid var(--line-2); }
.f-ledger > article:nth-child(even) { background: var(--bg-2); }
.f-ledger > article h3 { margin: 0; font-size: .95rem; color: var(--brand); }
.f-ledger > article p { font-size: .92rem; }

.f-stack { display: grid; gap: .7rem; counter-reset: st; }
.f-stack > article {
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr);
  column-gap: 1rem; row-gap: .3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.25rem;
}
/* Children must never auto-place into the numeral column, whatever their count. */
.f-stack > article > * { grid-column: 2; min-width: 0; }
.f-stack > article::before {
  counter-increment: st; content: counter(st);
  display: grid; place-items: center; width: 2rem; height: 2rem;
  font-family: var(--ff-head); font-weight: 800; font-size: .82rem;
  color: var(--brand); background: var(--brand-wash); border-radius: 50%;
}
.f-stack > article h3 { margin-bottom: .35rem; }
.f-stack > article p { font-size: .92rem; }

.f-feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: .85rem; }
.f-feature > article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.15rem 1.25rem; }
.f-feature > article:first-child { grid-row: 1 / -1; background: var(--brand-wash); border-color: var(--line); }
.f-feature > article:first-child h3 { font-size: 1.25rem; }
.f-feature > article p { font-size: .9rem; }

.f-prose { }
.f-prose p { font-size: 1rem; }

.f-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.f-checks li {
  position: relative; padding: .75rem .95rem .75rem 2.4rem; font-size: .89rem; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.f-checks li::before {
  content: ''; position: absolute; left: .9rem; top: 1.15rem;
  width: .42rem; height: .72rem; border-right: 2px solid var(--go); border-bottom: 2px solid var(--go);
  transform: rotate(45deg);
}
.f-checks li strong { color: var(--ink); }
.f-checks--single { grid-template-columns: 1fr; }

.f-split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 1.25rem; align-items: stretch; }
.f-split__media { border-radius: var(--r); overflow: hidden; min-height: 18rem; box-shadow: var(--shadow-1); }
.f-split__media img { width: 100%; height: 100%; object-fit: cover; }
.f-split__body .f-checks { grid-template-columns: 1fr; }

.figure { border-radius: var(--r); overflow: hidden; aspect-ratio: 21 / 8; box-shadow: var(--shadow-1); margin-bottom: 1.5rem; }
.figure img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------ 10. TABLES */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: .87rem; min-width: 34rem; }
.data-table th {
  text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); padding: .85rem 1rem; background: var(--bg-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td { padding: .8rem 1rem; color: var(--ink-2); vertical-align: top; }
.data-table tbody tr + tr td { border-top: 1px solid var(--line-2); }
.data-table td:first-child { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------ 11. FOOTER */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); margin-top: clamp(3rem, 6vw, 5rem); }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: clamp(1.5rem, 3vw, 2.5rem); padding: clamp(2.5rem, 5vw, 3.5rem) 0 2.5rem; }
.footer-brand p { font-size: .87rem; color: var(--ink-3); margin-top: .9rem; }
.footer-col h4 { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin-bottom: .9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-col a { font-size: .87rem; color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--brand); }

.safety { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.safety span {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .85rem;
}
.footer-legal { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; }
.footer-legal p { font-size: .78rem; color: var(--ink-3); }
.footer-legal p + p { margin-top: .5rem; }

/* --------------------------------------------------------------- 12. 404 */
.page-404 { padding: clamp(3.5rem, 8vw, 6rem) 0; text-align: center; }
.page-404 .code { font-family: var(--ff-head); font-weight: 800; font-size: clamp(3.5rem, 10vw, 6rem); color: var(--brand-wash); line-height: 1; }
.page-404 .row { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1.75rem; }

/* ------------------------------------------------------------ 13. MOTION */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* -------------------------------------------------------- 14. RESPONSIVE */
@media (max-width: 1080px) {
  .rev-body { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .toprow { grid-template-columns: 2.6rem 4.25rem minmax(0, 1fr) 6.5rem 9.5rem; gap: .9rem; }
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .header-cta { display: none; }
  body.nav-open .site-header { box-shadow: none; }
  .brand, .menu-toggle, .theme-toggle { position: relative; z-index: 95; }
  .site-nav {
    position: fixed; inset: 0; margin: 0; background: var(--bg); z-index: 88;
    padding: calc(var(--nav-h) + 1.25rem) var(--gutter) 3rem; overflow-y: auto;
    transform: translateX(100%); transition: transform var(--mid) var(--ease);
  }
  .site-nav.is-open { transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line-2); }
  .nav-list > li > a:not(.btn) { padding: .95rem .2rem; font-size: 1rem; border-radius: 0; }
  .nav-item--has-submenu::after { display: none; }
  .nav-submenu {
    position: static; width: auto; max-width: none; border: 0; box-shadow: none;
    background: transparent; grid-template-columns: 1fr; gap: 0; padding: 0 0 .7rem; display: none;
  }
  .nav-submenu::before { display: none; }
  .nav-item--has-submenu:hover > .nav-submenu,
  .nav-item--has-submenu:focus-within > .nav-submenu,
  .nav-item--has-submenu:hover > .nav-submenu,
  .nav-item--has-submenu:focus-within > .nav-submenu,
  .nav-item--has-submenu.is-open > .nav-submenu { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-item--has-submenu.is-open > .nav-submenu { display: grid; }
  .nav-cta { display: block !important; border-bottom: 0 !important; padding-top: 1.25rem; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; aspect-ratio: 16 / 9; }
  .toprow { grid-template-columns: 2.4rem 4.25rem minmax(0, 1fr); grid-template-areas: "rank tile main" ". score score" ". cta cta"; row-gap: .8rem; }
  .toprow .rank { grid-area: rank; } .toprow .tile { grid-area: tile; }
  .top-main { grid-area: main; } .top-score { grid-area: score; text-align: left; display: flex; align-items: center; gap: .6rem; }
  .top-score > b { font-size: 1.3rem; } .top-score > span { margin: 0; }
  .top-cta { grid-area: cta; grid-template-columns: 1fr 1fr; }
  .rev-top { grid-template-columns: auto minmax(0, 1fr); }
  .rev-badge { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-start; gap: 1rem; text-align: left; }
  .rev-badge > b { font-size: 1.7rem; }
  .rev-badge > span { margin: 0; }
  .criteria, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-grid[data-cols="3"], .f-grid[data-cols="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-feature { grid-template-columns: 1fr; }
  .f-feature > article:first-child { grid-row: auto; }
  .f-split { grid-template-columns: 1fr; }
  .f-split__media { min-height: 0; aspect-ratio: 16 / 9; }
  .score-grid { grid-template-columns: 1fr; }
  .keyfacts { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .toprow { grid-template-columns: 2.2rem minmax(0, 1fr); grid-template-areas: "rank tile" "main main" "score score" "cta cta"; }
  .criteria, .grid-3, .grid-2, .f-grid[data-cols="2"], .f-grid[data-cols="3"], .f-grid[data-cols="4"],
  .f-checks, .footer-top, .toc ol, .trust-strip { grid-template-columns: 1fr; }
  .f-ledger > article { grid-template-columns: 1fr; gap: .35rem; }
  .expert { grid-template-columns: 1fr; text-align: left; }
  .rev-top { grid-template-columns: 1fr; }
  .top-cta { grid-template-columns: 1fr; }
}
