/* Candy Swipe Guide: shared styles */

:root {
  --bg: #1a0b2e;
  --bg-2: #210f3a;
  --surface: #2a1548;
  --surface-2: #34195a;
  --line: #4b2c7c;
  --text: #f7efff;
  --muted: #c8b6e6;
  --pink: #ff5fa8;
  --pink-2: #ff8cc4;
  --yellow: #ffd34d;
  --mint: #45e3b8;
  --sky: #5cc8ff;
  --orange: #ff9a3d;
  --ice: #bfe9ff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px rgb(8 2 20 / 45%);
  --font-head: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgb(255 95 168 / 18%), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgb(92 200 255 / 12%), transparent 60%),
    radial-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px);
  background-size: auto, auto, 22px 22px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img, svg { max-width: 100%; }

a { color: var(--pink-2); text-underline-offset: 3px; }
a:hover { color: var(--yellow); }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p, ul, ol, dl, table { margin: 0 0 1.1em; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--yellow); color: #1a0b2e; padding: 10px 16px; border-radius: 10px; font-weight: 800;
}
.skip-link:focus { top: 12px; }

main:focus { outline: none; }

/* Buttons */

.btn {
  display: inline-flex; white-space: nowrap; align-items: center; justify-content: center; gap: .4em;
  padding: .8em 1.4em; border-radius: 999px; border: 2px solid transparent;
  background: linear-gradient(180deg, #ff7dba, var(--pink));
  color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  text-decoration: none; box-shadow: 0 6px 0 #c22f77, 0 12px 24px rgb(255 95 168 / 30%);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 0 #c22f77, 0 16px 28px rgb(255 95 168 / 35%); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #c22f77; }
.btn-ghost {
  background: transparent; border-color: rgb(255 255 255 / 70%); box-shadow: none; color: var(--text);
}
.btn-ghost:hover { background: rgb(255 255 255 / 8%); color: var(--text); box-shadow: none; border-color: #fff; }
.btn-small { padding: .5em 1.1em; font-size: .95rem; box-shadow: 0 4px 0 #c22f77; }
a.btn:not([href]) { cursor: default; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(26 11 46 / 88%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: grid; line-height: 1.15; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; }
.brand-accent { color: var(--yellow); }
.brand-tag { font-size: .75rem; color: var(--muted); }

.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  display: block; white-space: nowrap; padding: .45em .8em; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.site-nav a:hover { background: rgb(255 255 255 / 8%); color: var(--text); }
.site-nav a[aria-current="page"] { background: rgb(255 95 168 / 18%); color: var(--pink-2); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.age-badge {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--yellow); color: var(--yellow); font-weight: 800; font-size: .8rem;
  text-decoration: none; cursor: help;
}

.menu-button {
  display: none; font: inherit; font-weight: 800; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .45em 1em; cursor: pointer;
}

@media (max-width: 1100px) {
  .menu-button { display: inline-block; order: 3; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .header-actions { order: 2; }
  .site-nav { order: 4; }
  .header-actions .btn { display: none; }
  .js .site-nav { display: none; flex-basis: 100%; padding-bottom: 14px; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: .7em 1em; }
}
@media (max-width: 480px) {
  .brand-tag { display: none; }
  .brand-name { font-size: 1.08rem; }
  .brand-mark { width: 34px; height: 34px; }
  .age-badge { width: 34px; height: 34px; }
}

/* Breadcrumbs */

.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0 0; margin: 0; font-size: .9rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--line); }
.breadcrumbs a { color: var(--muted); }

/* Shared text pieces */

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: .8em;
  font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pink-2);
}
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--pink), var(--yellow)); }

.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.byline { font-size: .9rem; color: var(--muted); }
.byline a { color: var(--muted); }

/* Hero */

.hero { padding: 48px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero hgroup { margin-bottom: 22px; }
.hero h1 { margin-bottom: .15em; }
.subtitle { font-family: var(--font-head); font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 600; color: var(--yellow); margin: 0; }

.verdict {
  display: flex; gap: 18px; align-items: flex-start;
  background: rgb(255 255 255 / 5%); border: 1px solid var(--line); border-left: 4px solid var(--pink);
  border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 22px;
}
.verdict p:last-child { margin: 0; }

.score {
  flex: none; display: grid; place-items: center; align-content: center;
  width: 74px; height: 74px; margin: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff2a8, var(--yellow) 55%, #e8a400);
  color: #3a1a00; font-family: var(--font-head); font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 4px rgb(255 211 77 / 25%);
}
.score data { font-size: 1.6rem; }
.score .out-of { font-size: .75rem; }

.hero-shot { max-width: 500px; margin: 0 auto; }
.hero-shot figcaption { text-align: center; }

/* Stats */

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 34px 0 18px;
}
.stats > div {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 18px; position: relative; overflow: hidden;
}
.stats > div::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--pink), var(--yellow), var(--mint), var(--sky));
}
.stats dt { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; color: var(--yellow); line-height: 1.2; }
.stats dd small { display: block; font-family: var(--font-body); font-size: .82rem; font-weight: 600; color: var(--muted); }

/* Table of contents */

.toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.toc summary {
  cursor: pointer; padding: 14px 18px; font-weight: 800; font-size: .85rem;
  letter-spacing: .12em; text-transform: uppercase; list-style-position: inside;
}
.toc summary::marker { color: var(--pink); }
.toc ol { columns: 2; column-gap: 32px; margin: 0; padding: 0 18px 18px 40px; }
.toc li { break-inside: avoid; padding: 3px 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--yellow); text-decoration: underline; }

.toc-static { padding: 18px; align-self: start; position: sticky; top: 92px; }
.toc-static h2 { font-size: .85rem; font-family: var(--font-body); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc-static ol { columns: 1; padding: 0 0 0 22px; }

/* Sections */

.section { padding: 56px 0; }
.section + .section { border-top: 1px dashed rgb(255 255 255 / 8%); }
.section > .wrap > h2:first-child,
.section > .wrap > .eyebrow + h2 { max-width: 30ch; }

.prose { max-width: 72ch; }
.wrap.prose { max-width: none; }
.wrap.prose > * { max-width: 72ch; }
.wrap.prose > .cta-card { max-width: none; }
.prose li { margin-bottom: .35em; }

.split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 44px; align-items: start; }

.page-head { padding: 28px 0 8px; }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }

/* Cards */

.card, .casino-card, .cta-card, .glance, .game-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}

.casino-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px 28px; align-items: center;
  padding: 22px 26px; position: relative; margin-bottom: 1.1em;
}
.casino-card .rank {
  position: absolute; top: -12px; left: -12px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--yellow); color: #3a1a00; font-weight: 800; margin: 0;
}
.casino-logo {
  display: grid; place-items: center; width: 132px; height: 72px; margin: 0; border-radius: 12px;
  background: #0f212e; color: #fff; font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; letter-spacing: -.02em;
}
.casino-card h3 { margin-bottom: .2em; }
.casino-card p { margin: 0 0 .4em; }
.casino-card .fine { font-size: .82rem; color: var(--muted); }
.casino-card .kv { grid-column: 1 / -1; }

.defs { display: grid; gap: 10px; }
.defs > div { padding-left: 14px; border-left: 3px solid var(--pink); }
.defs dt { font-weight: 800; }
.defs dd { margin: 2px 0 0; color: var(--muted); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: .95rem; }
.kv dt { color: var(--muted); font-weight: 700; }
.kv dd { margin: 0; }

.glance { padding: 20px 22px; }
.glance h3 { font-size: 1.2rem; }
.glance table { margin: 0; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; list-style: none; padding: 0; }
.game-card { padding: 18px 20px; }
.game-card h3 { font-size: 1.15rem; margin-bottom: .3em; }
.game-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.game-card .provider { color: var(--pink-2); font-weight: 700; font-size: .85rem; margin-bottom: .4em; }

.cta-card {
  padding: 26px 28px; margin-top: 28px;
  background: linear-gradient(135deg, rgb(255 95 168 / 22%), rgb(92 200 255 / 12%)), var(--surface);
}
.cta-card h2 { font-size: 1.6rem; }
.cta-card p:last-child { margin-bottom: 0; }

/* Game images */

.shot { margin: 0 0 1.4em; }
.shot img {
  display: block; width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.shot figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); }
.shot-cover { max-width: 240px; }

.shot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 1.4em; }
.shot-pair .shot { margin: 0; }

.media { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; margin-bottom: 1.4em; }
.media .shot { margin: 0; }

@media (max-width: 640px) {
  .media, .shot-pair { grid-template-columns: 1fr; gap: 18px; }
  .shot-cover { max-width: 200px; }
}

/* Callouts */

.callout {
  border: 1px solid rgb(255 211 77 / 40%); background: rgb(255 211 77 / 8%);
  border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 1.1em; max-width: 72ch;
}
.callout p:last-child { margin: 0; }
.callout strong:first-child { color: var(--yellow); }

/* Tables */

.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.table-wrap table { margin: 0; }

table { width: 100%; border-collapse: collapse; font-size: .97rem; }
caption { text-align: left; font-weight: 800; padding: 12px 16px; background: var(--surface-2); caption-side: top; }
th, td { padding: 10px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid rgb(255 255 255 / 7%); }
thead th { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
tbody tr:nth-child(even) { background: rgb(255 255 255 / 3%); }
tbody th { font-weight: 700; color: var(--muted); }
.glance tbody th { width: 42%; }
.glance td { text-align: right; font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.sym { display: inline-flex; align-items: center; gap: 10px; }
.sym svg { width: 30px; height: 30px; flex: none; }

/* Steps */

.steps { list-style: none; counter-reset: step; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.steps > li {
  counter-increment: step; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 18px 74px;
}
.steps > li::before {
  content: counter(step); position: absolute; left: 20px; top: 20px;
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(180deg, #ff7dba, var(--pink)); font-family: var(--font-head); font-weight: 700;
}
.steps h3 { font-size: 1.15rem; margin-bottom: .3em; }
.steps p { margin: 0; color: var(--muted); }

.calc-steps { padding-left: 1.4em; }

/* Myths, pros and cons, verdict */

.myths { display: grid; gap: 14px; }
.myths > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; }
.myths dt { font-weight: 800; color: var(--pink-2); }
.myths dt::before { content: "Myth: "; color: var(--muted); }
.myths dd { margin: 6px 0 0; }
.myths dd::before { content: "Fact: "; font-weight: 800; color: var(--mint); }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pros-cons > section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.pros-cons ul { list-style: none; padding: 0; margin: 0; }
.pros-cons li { padding: 6px 0 6px 30px; position: relative; }
.pros-cons li::before { position: absolute; left: 0; top: 6px; font-weight: 800; }
.pros li::before { content: "+"; color: var(--mint); font-size: 1.2rem; line-height: 1.3; }
.cons li::before { content: "–"; color: var(--pink); font-size: 1.2rem; line-height: 1.3; }
.pros h3 { color: var(--mint); }
.cons h3 { color: var(--pink-2); }

.verdict-box { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.score-list { display: grid; gap: 10px; max-width: 520px; }
.score-list > div { display: grid; grid-template-columns: 150px 1fr 48px; gap: 12px; align-items: center; }
.score-list dt { font-weight: 700; color: var(--muted); }
.score-list dd { margin: 0; display: contents; }
.score-list meter { width: 100%; height: 12px; }
.score-list .val { text-align: right; font-weight: 800; }

meter { appearance: none; border-radius: 999px; background: var(--surface-2); border: 0; }
meter::-webkit-meter-bar { background: var(--surface-2); border-radius: 999px; border: 0; height: 12px; }
meter::-webkit-meter-optimum-value { background: linear-gradient(90deg, var(--pink), var(--yellow)); border-radius: 999px; }
meter::-webkit-meter-suboptimum-value { background: linear-gradient(90deg, var(--orange), var(--yellow)); border-radius: 999px; }
meter::-moz-meter-bar { background: linear-gradient(90deg, var(--pink), var(--yellow)); border-radius: 999px; }

/* FAQ */

.faq-list { display: grid; gap: 12px; max-width: 80ch; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; }
.faq-item h3 { font-size: 1.12rem; margin-bottom: .35em; }
.faq-item p { margin: 0; color: var(--muted); }

.faq-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; padding: 28px 0 56px; }
.faq-group { margin-bottom: 34px; display: grid; gap: 12px; }
.faq-group h2 { font-size: 1.6rem; margin-bottom: .2em; }

/* Calculator */

.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; max-width: 640px; }
.calc fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; }
.calc legend { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; padding: 0; margin-bottom: 6px; }
.calc p { margin: 0; display: grid; gap: 6px; }
.calc label { font-weight: 700; font-size: .92rem; color: var(--muted); }
.calc input, .calc select {
  font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 10px; padding: .6em .8em; width: 100%;
}
.calc .calc-result { display: block; font-size: 1.1rem; padding-top: 8px; border-top: 1px dashed var(--line); }
.calc output { font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; color: var(--yellow); }
.calc .calc-note { margin-top: 14px; display: block; color: var(--muted); }

/* Legal pages */

.legal { padding: 20px 0 56px; }
.legal h2 { font-size: 1.5rem; margin-top: 1.6em; }
.legal address { font-style: normal; }

/* Footer */

.site-footer { margin-top: 40px; padding: 48px 0 32px; background: var(--bg-2); border-top: 1px solid var(--line); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-family: var(--font-body); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.site-footer nav a { color: var(--text); text-decoration: none; }
.site-footer nav a:hover { color: var(--yellow); text-decoration: underline; }
.footer-about p { color: var(--muted); max-width: 40ch; }
.footer-rg { margin-top: 32px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgb(255 255 255 / 3%); }
.footer-rg h2 { color: var(--yellow); }
.footer-rg h2 abbr { text-decoration: none; }
.footer-rg p { margin: 0; color: var(--muted); }
.footer-legal { margin: 24px 0 0; color: var(--muted); }

/* Responsive */

@media (max-width: 900px) {
  .hero-grid, .split, .verdict-box, .faq-layout { grid-template-columns: 1fr; }
  .hero-grid { gap: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .toc ol { columns: 1; }
  .toc-static { position: static; }
  .pros-cons { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .casino-card { grid-template-columns: auto 1fr; }
  .casino-card .casino-actions { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .section { padding: 40px 0; }
  .stats dd { font-size: 1.45rem; }
  .verdict { flex-direction: column; }
  .casino-card { grid-template-columns: 1fr; padding: 20px; }
  .score-list > div { grid-template-columns: 110px 1fr 40px; }
  .footer-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  th, td { padding: 9px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
