/* UK Spin Ranker — one small utility sheet, composed in markup.
   Tokens first, then utilities (.stack, .cluster, .card, .badge …), then a few page hooks. */

:root {
  --mint-page: #eef7f1;
  --mint-band: #e2f1e8;
  --mint-soft: #d3eadd;
  --mint-line: #bcdfcd;
  --teal: #0d5c55;
  --teal-deep: #08423d;
  --teal-soft: #12756c;
  --ink: #172b27;
  --ink-soft: #3d5650;
  --cream: #f8f3e6;
  --white: #fdfffe;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 72px;
  --space-7: 104px;
  --radius-s: 14px;
  --radius-m: 22px;
  --radius-l: 34px;
  --shadow-tile: 0 10px 28px rgba(13, 92, 85, 0.10);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--mint-page);
  padding-bottom: 52px; /* room for the fixed age bar */
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 var(--space-2); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 var(--space-2); }
p:last-child { margin-bottom: 0; }

/* ---------- links: dot-prefixed motif ---------- */

a { color: var(--teal); text-decoration: none; }

.link {
  font-weight: 700;
  position: relative;
  padding-left: 0.9em;
  transition: color 0.2s ease;
}
.link::before {
  content: "·";
  position: absolute;
  left: 0.15em;
  font-weight: 700;
  color: var(--teal-soft);
}
.link::after {
  content: "";
  position: absolute;
  left: 0.9em; right: 0; bottom: -2px;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.link:hover::after, .link:focus-visible::after { transform: scaleX(1); }

.prose a {
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.prose a::before { content: "· "; color: var(--teal-soft); }
.prose a:hover, .prose a:focus-visible { border-bottom-color: var(--teal); }

/* ---------- layout utilities ---------- */

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--space-3); }
.wrap-narrow { max-width: 780px; margin-inline: auto; padding-inline: var(--space-3); }

.stack > * + * { margin-top: var(--space-3); }
.stack-s > * + * { margin-top: var(--space-2); }
.stack-l > * + * { margin-top: var(--space-5); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.cluster-tight { display: flex; flex-wrap: wrap; gap: var(--space-1); align-items: center; }

.grid-2 { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: var(--space-3); grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: var(--space-3); grid-template-columns: repeat(4, 1fr); }
.split { display: grid; gap: var(--space-5); grid-template-columns: 3fr 2fr; align-items: center; }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- section bands: alternating tints, curved organic transitions ---------- */

.band { padding-block: var(--space-6); }
.band-white { background: var(--white); }
.band-mint  { background: var(--mint-band); }
.band-curve {
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  margin-top: calc(-1 * var(--radius-l));
  position: relative;
}

.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-soft);
  margin-bottom: var(--space-1);
}

.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }
.measure { max-width: 68ch; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

/* ---------- cards: soft tiles, subtle shadow; 2px borders on key elements ---------- */

.card {
  background: var(--white);
  border: 2px solid var(--mint-line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-tile);
  padding: var(--space-4);
}
.card-featured { border-color: var(--teal); }
.card-flat { box-shadow: none; background: var(--white); border: 2px solid var(--mint-line); border-radius: var(--radius-m); padding: var(--space-3); }

/* ---------- badges: subtle tinted background, low contrast ---------- */

.badge {
  display: inline-block;
  background: var(--mint-soft);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 3px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-teal { background: rgba(13, 92, 85, 0.10); color: var(--teal); }

/* ---------- buttons: solid accent fill, smooth hover ---------- */

.btn {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  border: 2px solid var(--teal);
  border-radius: 999px;
  padding: 12px 30px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--teal-soft); border-color: var(--teal-soft); transform: translateY(-1px); }
.btn-s { padding: 8px 22px; font-size: 0.92rem; }

/* ---------- score: percentage match ---------- */

.score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--teal);
  font-weight: 700;
}
.score b { font-size: 1.9rem; letter-spacing: -0.02em; }
.score span { font-size: 0.8rem; color: var(--ink-soft); font-weight: 700; }

.meter {
  height: 8px;
  background: var(--mint-soft);
  border-radius: 999px;
  overflow: hidden;
}
.meter > i { display: block; height: 100%; background: var(--teal); border-radius: 999px; }

/* ---------- header ---------- */

.site-head { background: var(--mint-page); padding-block: var(--space-2); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.18rem; color: var(--ink); }
.brand img { width: 34px; height: 34px; }
.site-nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.site-nav a {
  font-weight: 700; font-size: 0.95rem; color: var(--ink-soft);
  position: relative; padding-bottom: 2px; transition: color 0.2s ease;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { color: var(--teal); }
.site-nav a:hover::after, .site-nav a:focus-visible::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- hero ---------- */

.hero {
  background: linear-gradient(160deg, rgba(238, 247, 241, 0.92) 8%, rgba(190, 228, 209, 0.55) 45%, rgba(13, 92, 85, 0.22) 100%), url("/images/hero-glow.jpg") center / cover no-repeat;
  padding: var(--space-6) 0 calc(var(--space-7) + var(--radius-l));
}
.hero-title {
  font-size: clamp(2.6rem, 7.6vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.04;
  max-width: 17ch;
  margin: var(--space-2) 0 var(--space-3);
}
.hero-title em { font-style: normal; color: var(--teal); }
.hero-answer { font-size: clamp(1.05rem, 1.8vw, 1.3rem); max-width: 58ch; }

.stat-strip { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-4); }
.stat-strip b { display: block; font-size: 1.6rem; color: var(--teal); letter-spacing: -0.02em; }
.stat-strip span { font-size: 0.85rem; color: var(--ink-soft); font-weight: 700; }

/* ---------- comparison table ---------- */

.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border: 2px solid var(--mint-line);
  border-radius: var(--radius-m);
  overflow: hidden;
  min-width: 640px;
}
.tbl th, .tbl td { padding: 14px 18px; text-align: left; vertical-align: middle; }
.tbl thead th {
  background: var(--mint-band);
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft);
}
.tbl tbody tr + tr td, .tbl tbody tr + tr th { border-top: 1px solid var(--mint-soft); }
.tbl td.num { font-weight: 700; color: var(--teal); font-variant-numeric: tabular-nums; text-align: right; }
.tbl .tbl-logo { width: 84px; height: 30px; object-fit: contain; object-position: left; }
.tbl tr.is-featured { background: rgba(13, 92, 85, 0.06); }
.tbl tr.is-featured td:first-child { border-left: 4px solid var(--teal); }

/* ---------- casino tiles ---------- */

.casino { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3); }
.casino-body { min-width: 0; }
.casino-side {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-2); text-align: center;
  border-left: 2px solid var(--mint-soft); padding-left: var(--space-3); min-width: 172px;
}
.casino-logo {
  height: 44px; width: 168px; object-fit: contain; object-position: left;
  margin-bottom: var(--space-2);
}
.logo-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding-inline: 16px; border-radius: var(--radius-s);
  background: var(--mint-soft); color: var(--teal); font-weight: 700;
  margin-bottom: var(--space-2);
}
.offer-line { font-size: 0.92rem; color: var(--ink-soft); }
.legal-line { font-size: 0.78rem; color: var(--ink-soft); }
@media (max-width: 720px) {
  .casino { grid-template-columns: 1fr; }
  .casino-side { border-left: 0; border-top: 2px solid var(--mint-soft); padding-left: 0; padding-top: var(--space-3); }
}

/* ---------- methodology band: the one textured section ---------- */

.texture-dots {
  background-image: radial-gradient(rgba(13, 92, 85, 0.07) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
}

/* ---------- figures ---------- */

.figure { margin: 0; }
.figure img { border-radius: var(--radius-l); border: 2px solid var(--mint-line); }
.figure figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: var(--space-1); }

/* ---------- safety cards ---------- */

.safety-card {
  display: flex; flex-direction: column; gap: var(--space-1);
  background: var(--white); border: 2px solid var(--mint-line); border-radius: var(--radius-m);
  padding: var(--space-3); color: var(--ink);
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.safety-card:hover, .safety-card:focus-visible { border-color: var(--teal); transform: translateY(-2px); }
.safety-card img { height: 34px; width: auto; max-width: 170px; object-fit: contain; object-position: left; }
.safety-card b { font-size: 1.02rem; }
.safety-card span { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- FAQ ---------- */

.faq { border-top: 2px solid var(--mint-line); }
.faq details { border-bottom: 2px solid var(--mint-line); padding: var(--space-2) 0; }
.faq summary {
  font-weight: 700; font-size: 1.08rem; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-2);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--teal); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); margin-top: var(--space-1); max-width: 70ch; }

/* ---------- page hero band for subpages ---------- */

.page-hero {
  background: linear-gradient(rgba(238, 247, 241, 0.35), rgba(238, 247, 241, 0.35)), url("/images/band-soft.jpg") center / cover no-repeat;
  padding: var(--space-5) 0 calc(var(--space-6) + var(--radius-l));
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; max-width: 22ch; }

/* ---------- footer ---------- */

.site-foot { background: var(--teal-deep); color: #cfe8de; padding: var(--space-6) 0 var(--space-4); border-radius: var(--radius-l) var(--radius-l) 0 0; margin-top: calc(-1 * var(--radius-l)); position: relative; }
.site-foot a { color: #eafaf3; font-weight: 700; transition: color 0.2s ease; }
.site-foot a:hover { color: #9fd9c4; }
.site-foot .foot-grid { display: grid; gap: var(--space-4); grid-template-columns: 2fr 1fr 1fr 1fr; }
.site-foot h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li + li { margin-top: 8px; }
.site-foot li a { font-size: 0.95rem; }
.foot-legal { border-top: 1px solid rgba(255, 255, 255, 0.18); margin-top: var(--space-4); padding-top: var(--space-3); font-size: 0.83rem; color: #a8cfc1; }
@media (max-width: 900px) { .site-foot .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-foot .foot-grid { grid-template-columns: 1fr; } }

/* ---------- age notice bar (fixed, non-blocking, works without JS) ---------- */

.age-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--ink); color: #dff0e8;
  font-size: 0.83rem; line-height: 1.4;
  padding: 8px var(--space-3);
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  text-align: center;
}
.age-bar strong { color: var(--white); }
.age-bar a { color: #9fd9c4; font-weight: 700; text-decoration: underline; }
.age-bar button {
  background: none; border: 1px solid rgba(255, 255, 255, 0.35); color: #dff0e8;
  border-radius: 999px; font-family: inherit; font-size: 0.75rem; padding: 2px 10px; cursor: pointer;
}
.age-bar.is-compact span.age-text { display: none; }
@media (max-width: 640px) {
  body { padding-bottom: 92px; }
  .age-bar { font-size: 0.76rem; padding-block: 6px; }
  .cookie-banner { bottom: 96px; }
}

/* ---------- cookie banner (JS-driven) ---------- */

.cookie-banner {
  position: fixed; left: var(--space-2); right: var(--space-2); bottom: 56px; z-index: 70;
  max-width: 560px; margin-inline: auto;
  background: var(--white); border: 2px solid var(--teal); border-radius: var(--radius-m);
  box-shadow: var(--shadow-tile);
  padding: var(--space-3);
  display: none;
}
.cookie-banner.is-open { display: block; }
.cookie-banner p { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- misc ---------- */

.divider-soft { border: none; height: 2px; background: var(--mint-soft); border-radius: 999px; margin: var(--space-4) 0; }

.watermark { opacity: 0.35; width: 56px; height: 56px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
