/*
 * Mejor Casinos — static build of prime.mejorcasinos-ar.com.
 * Order: tokens → reset → shell → home blocks → footer → legal pages → 404.
 * CSS-module classes are expanded as `<module>-<class>` in kebab-case; rules are verbatim.
 */

/* ── Tokens (app/theme.css) ───────────────────────────────────────────── */
/*
 * Theme tokens. Every colour of the site goes through these variables; `*.module.css` files
 * never carry hex literals (only `global-error.module.css`, rendered without the layout).
 *
 * Logic of the palette: the cold axis (blue → sky → cyan) is structure and trust — links,
 * focus, frames of the ranked cards, regular CTAs. The warm axis (sun → amber → ember) is
 * action and value — rating stars, the top-ranked card and its CTA. Cream is the soft 18+ plate.
 */
:root {
  /* next/font set this on <html>; here the family comes from Google Fonts */
  --font-archivo: 'Archivo';

  /* palette */
  --c-night: #071634;
  --c-night-2: #0a1d42;
  --c-navy: #0e2a5a;
  --c-navy-2: #12346b;
  --c-navy-3: #17407f;
  --c-blue: #0b5cff;
  --c-sky: #18bdf2;
  --c-cyan: #3fe0ff;
  --c-sun: #ffc928;
  --c-amber: #ff9f1c;
  --c-ember: #f47b20;
  --c-cream: #fff4c2;
  --c-ice: #f5f8ff;
  --c-mist: #d9e6f5;
  --c-white: #ffffff;

  /* surfaces and text */
  --bg: var(--c-night);
  --surface: var(--c-navy);
  --surface-raised: var(--c-navy-2);
  --surface-sunken: var(--c-night-2);
  --surface-hover: var(--c-navy-3);
  --text: var(--c-ice);
  --text-strong: var(--c-white);
  --text-muted: rgba(217, 230, 245, 0.78);
  --text-faint: rgba(217, 230, 245, 0.6);
  --line: rgba(217, 230, 245, 0.14);
  --line-strong: rgba(217, 230, 245, 0.28);
  --grid-line: rgba(217, 230, 245, 0.07);

  /* accents */
  --accent-cold: var(--c-sky);
  --accent-cold-strong: var(--c-blue);
  --accent-cold-light: var(--c-cyan);
  --accent-cold-glow: rgba(63, 224, 255, 0.28);
  --accent-warm: var(--c-sun);
  --accent-warm-mid: var(--c-amber);
  --accent-warm-strong: var(--c-ember);
  --accent-warm-glow: rgba(255, 159, 28, 0.5);
  --accent-warm-glow-soft: rgba(255, 201, 40, 0.18);
  --cta-cold: linear-gradient(135deg, var(--c-blue), var(--c-sky));
  --cta-warm: linear-gradient(135deg, var(--c-sun), var(--c-amber) 55%, var(--c-ember));
  --cta-cold-text: var(--c-white);
  --cta-warm-text: var(--c-night);
  --rule-gradient: linear-gradient(90deg, var(--c-blue), var(--c-sky) 35%, var(--c-sun) 70%, var(--c-ember));
  --star: var(--c-sun);
  --star-empty: rgba(217, 230, 245, 0.22);
  --focus: var(--c-cyan);

  /* plates */
  --mark-plate: var(--c-ice);
  --logo-plate: var(--c-night-2);
  --notice-bg: var(--c-cream);
  --notice-text: var(--c-night);
  --notice-marker-bg: var(--c-night);
  --notice-marker-text: var(--c-cream);
  --overlay: rgba(4, 12, 30, 0.88);
  --shadow: rgba(2, 8, 22, 0.55);

  /* layout */
  --gutter: 1rem;
  --content-max: 72rem;
  --prose-max: 46rem;
  --radius: 4px;
  --header-height: 4.25rem;

  /* type */
  --font-sans: var(--font-archivo), system-ui, sans-serif;
  --wdth-display: 125;
  --wdth-text: 100;
  --wdth-label: 88;
}

/* ── Reset (app/globals.css) ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
}

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

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-variation-settings: 'wdth' var(--wdth-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--accent-cold-strong);
  color: var(--text-strong);
}

/* Every anchor of the home page (SECTION_IDS in app/content.ts). */
#plataformas,
#criterios,
#antes-de-registrarte,
#preguntas,
#sobre-este-sitio {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

/* ── Home main (app/page.module.css) ──────────────────────────────────── */
.page-main {
  position: relative;
  z-index: 1;
  flex: 1;
}

/* ── Site background (SiteBackground) ─────────────────────────────────── */
.site-bg {
  position: absolute;
  inset: 0 0 auto;
  height: 70rem;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  color: var(--grid-line);
  -webkit-mask-image: linear-gradient(to bottom, var(--text) 0%, var(--text) 35%, transparent 100%);
  mask-image: linear-gradient(to bottom, var(--text) 0%, var(--text) 35%, transparent 100%);
}

.site-bg-plan {
  width: 100%;
  height: 100%;
}

/* ── Header ───────────────────────────────────────────────────────────── */
.header {
  position: relative;
  z-index: 2;
  background: var(--surface-sunken);
}

.header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--rule-gradient);
}

.header-inner {
  max-width: var(--content-max);
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
}

.header-home-link {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
}

.header-logo {
  width: auto;
  height: 2.5rem;
}

@media (max-width: 520px) {
  .header-logo {
    height: 2rem;
  }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding: 1.25rem 0 1.25rem;
}

.hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  justify-items: start;
  gap: 1rem;
}

/* Width is the accent, not colour: the first line is set expanded and heavy, the second
   condensed and lighter, in the same colour. */
.hero-title {
  display: grid;
  gap: 0.15rem;
  max-width: 18ch;
  color: var(--text-strong);
  line-height: 1.02;
}

.hero-title-main {
  font-size: clamp(2.125rem, 6.2vw, 4rem);
  font-weight: 800;
  font-variation-settings: 'wdth' var(--wdth-display);
  letter-spacing: -0.01em;
}

.hero-title-narrow {
  font-size: clamp(1.75rem, 5.2vw, 3.375rem);
  font-weight: 500;
  font-variation-settings: 'wdth' 72;
  color: var(--text);
}

.hero-description {
  max-width: 44ch;
  font-size: clamp(1rem, 1.8vw, 1.1875rem);
  line-height: 1.5;
  color: var(--text-muted);
}

@media (min-width: 769px) {
  .hero {
    padding: 3.25rem 0 1.75rem;
  }

  .hero-title {
    max-width: none;
  }
}

/* ── 18+ plate under the hero (AgeNotice) ─────────────────────────────── */
.age-notice {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.age-notice-plate {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.625rem 0.375rem 0.375rem;
  border-radius: var(--radius);
  background: var(--notice-bg);
  color: var(--notice-text);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.age-notice-marker {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 1.75rem;
  padding: 0 0.375rem;
  border-radius: calc(var(--radius) - 1px);
  background: var(--notice-marker-bg);
  color: var(--notice-marker-text);
  font-weight: 800;
  font-variation-settings: 'wdth' var(--wdth-display);
}

.age-notice-text {
  font-weight: 600;
}

.age-notice-legend {
  font-weight: 400;
}

.age-notice-phone {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Offers list ──────────────────────────────────────────────────────── */
.offers {
  padding: 2.5rem 0 3rem;
}

.offers-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.offers-grid {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem;
  padding-top: 1.75rem;
}

.offers-slot {
  min-width: 0;
}

.offers-end {
  width: 100%;
  height: 1px;
}

/* ── Offer card ───────────────────────────────────────────────────────── */
/*
 * Ranked card ("ticket"): one notched corner, a tab badge above the left edge.
 * .offer-frame carries the border (its background shows through a 1px gap around .offer-inner),
 * so the notch keeps a border line along the diagonal too.
 * .offer-inner is pointer-events: none; the CTA anchor turns events back on.
 */
.offer-card {
  --notch: 18px;
  position: relative;
}

.offer-frame {
  position: relative;
  padding: 1px;
  background: var(--line-strong);
  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}

.offer-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  /* Mobile: number and rating stacked on the left, the mark spans both rows on the right. */
  grid-template-areas:
    'rank logo'
    'rating logo'
    'offer offer'
    'cta cta';
  align-items: center;
  gap: 0.625rem 1rem;
  padding: 1.125rem 1rem 1rem;
  background: var(--surface);
  border-radius: calc(var(--radius) - 1px);
  clip-path: polygon(
    0 0,
    calc(100% - var(--notch) + 0.5px) 0,
    100% calc(var(--notch) - 0.5px),
    100% 100%,
    0 100%
  );
  pointer-events: none;
}

.offer-rank {
  grid-area: rank;
  min-width: 2.25rem;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  font-variation-settings: 'wdth' var(--wdth-display);
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.offer-logo-cell {
  grid-area: logo;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--logo-plate);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.offer-logo {
  width: 100%;
  max-width: 180px;
  height: 100%;
  max-height: 80px;
  object-fit: contain;
}

.offer-rating {
  grid-area: rating;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.offer-stars {
  display: inline-flex;
  gap: 2px;
}

.offer-star {
  color: var(--star);
}

.offer-star-empty {
  color: var(--star-empty);
}

.offer-score {
  font-size: 1.125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' var(--wdth-display);
  color: var(--text-strong);
}

.offer-deal {
  grid-area: offer;
  display: grid;
  gap: 0.125rem;
}

.offer-caption {
  font-size: 0.8125rem;
  font-weight: 600;
  font-variation-settings: 'wdth' var(--wdth-label);
  color: var(--text-faint);
}

.offer-line {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-strong);
}

.offer-cta-area {
  grid-area: cta;
}

.offer-cta-wrap {
  position: relative;
  display: block;
}

.offer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.5rem;
  border-radius: var(--radius);
  background: var(--cta-cold);
  color: var(--cta-cold-text);
  font-size: 1rem;
  font-weight: 700;
  font-variation-settings: 'wdth' 110;
  white-space: nowrap;
  text-decoration: none;
  pointer-events: auto;
  box-shadow: 0 8px 20px -10px var(--accent-cold-glow);
  transition: filter 160ms ease, box-shadow 160ms ease;
}

.offer-cta-wrap:hover .offer-cta {
  filter: brightness(1.08);
  box-shadow: 0 10px 26px -10px var(--accent-cold-glow);
}

/* ── Rank badge (tab above the left edge) ─────────────────────────────── */
.offer-badge {
  position: absolute;
  top: 0;
  left: 1rem;
  z-index: 1;
  transform: translateY(-100%);
  padding: 0.25rem 0.75rem 0.2rem;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface-raised);
  color: var(--accent-cold-light);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
  font-variation-settings: 'wdth' var(--wdth-label);
}

/* ── Top 2 / 3: identical, moderate, no card animation ────────────────── */
.offer-card-top23 .offer-frame {
  background: linear-gradient(135deg, var(--accent-cold), var(--line-strong) 60%);
}

.offer-card-top23 {
  filter: drop-shadow(0 10px 22px var(--shadow));
}

.offer-card-top23 .offer-rank {
  color: var(--accent-cold);
}

/* ── Top 1: aggressive — card beacon, badge shine, warm CTA with a stronger glow ── */
.offer-card-top1::before {
  content: '';
  position: absolute;
  inset: -10px -6px -12px;
  z-index: 0;
  border-radius: 12px;
  background: radial-gradient(ellipse at 30% 50%, var(--accent-warm-glow), transparent 70%);
  filter: blur(14px);
  opacity: 0.45;
  pointer-events: none;
  animation: beacon 2.6s ease-in-out infinite alternate;
}

.offer-card-top1 .offer-frame {
  background: var(--cta-warm);
}

.offer-card-top1 .offer-inner {
  background: linear-gradient(160deg, var(--surface-raised), var(--surface) 55%);
}

.offer-card-top1 .offer-rank {
  color: var(--accent-warm);
}

.offer-card-top1 .offer-badge {
  background: linear-gradient(110deg, var(--c-sun) 0%, var(--c-cream) 45%, var(--c-amber) 60%, var(--c-ember) 100%);
  background-size: 220% 100%;
  color: var(--cta-warm-text);
  animation: badgeShine 3.2s ease-in-out infinite alternate;
}

.offer-card-top1 .offer-cta {
  background: var(--cta-warm);
  color: var(--cta-warm-text);
  box-shadow:
    0 0 0 1px var(--accent-warm-glow-soft),
    0 12px 32px -8px var(--accent-warm-glow);
}

.offer-card-top1 .offer-cta-wrap:hover .offer-cta {
  box-shadow:
    0 0 0 1px var(--accent-warm-glow-soft),
    0 14px 38px -8px var(--accent-warm-glow);
}

@keyframes beacon {
  from {
    opacity: 0.3;
    transform: scale(0.985);
  }
  to {
    opacity: 0.85;
    transform: scale(1.01);
  }
}

@keyframes badgeShine {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .offer-card-top1::before,
  .offer-card-top1 .offer-badge {
    animation: none;
  }
}

/* ── Desktop: one row ─────────────────────────────────────────────────── */
@media (min-width: 769px) {
  .offer-inner {
    grid-template-columns: 3rem 10.5rem minmax(8.5rem, auto) minmax(0, 1fr) auto;
    grid-template-areas: 'rank logo rating offer cta';
    gap: 1.25rem;
    padding: 1.125rem 1.5rem;
  }

  .offer-logo-cell {
    align-self: center;
    min-height: 0;
    height: 3.5rem;
  }

  .offer-rating {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .offer-score {
    font-size: 1.375rem;
  }

  .offer-cta {
    min-width: 11rem;
  }
}

/* ── Home sections (HomeSections) ─────────────────────────────────────── */
.sections-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sections-title {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  font-variation-settings: 'wdth' var(--wdth-display);
  color: var(--text-strong);
}

.sections-lead {
  max-width: 48ch;
  margin-top: 0.5rem;
  color: var(--text-muted);
}

/* ── Criteria: heading column + definition list on rules ─────────────── */
.criteria {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.criteria-grid {
  display: grid;
  gap: 1.75rem;
}

.criteria-list {
  display: grid;
}

.criterion {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.criterion:last-child {
  border-bottom: 1px solid var(--line);
}

.criterion-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  color: var(--text-strong);
}

.criterion-icon {
  flex-shrink: 0;
  color: var(--accent-cold);
}

.criterion-text {
  padding-left: calc(22px + 0.625rem);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ── Steps: a real sequence, numbered nodes on a track ────────────────── */
.steps {
  padding: 3.5rem 0;
  background: var(--surface-sunken);
}

.steps-head {
  margin-bottom: 2rem;
}

.steps-track {
  position: relative;
  list-style: none;
  display: grid;
  gap: 1.5rem;
}

.steps-track::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 1.125rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cold-strong), var(--accent-cold-light));
}

.step {
  position: relative;
  display: grid;
  gap: 0.375rem;
  padding-left: 3.5rem;
}

.step-number {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--accent-cold);
  color: var(--accent-cold-light);
  font-weight: 800;
  font-variation-settings: 'wdth' var(--wdth-display);
}

.step-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.35;
  padding-top: 0.375rem;
}

.step-text {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.step-link {
  justify-self: start;
  color: var(--accent-cold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  font-size: 0.9375rem;
}

/* ── FAQ: native details / summary ────────────────────────────────────── */
.faq {
  padding: 3.5rem 0;
}

.faq-inner {
  display: grid;
  gap: 1.5rem;
  max-width: var(--prose-max);
}

.faq-list {
  display: grid;
}

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  font-weight: 700;
  color: var(--text-strong);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  flex-shrink: 0;
  color: var(--accent-cold);
  transition: transform 180ms ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: grid;
  gap: 0.5rem;
  padding: 0 2.25rem 1.125rem 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.faq-link {
  justify-self: start;
  color: var(--accent-cold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .faq-icon {
    transition: none;
  }
}

@media (min-width: 769px) {
  .criteria-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 3rem;
  }

  .criteria-head {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }

  .criteria-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }

  .criterion:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .steps-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .steps-track::before {
    top: 1.125rem;
    bottom: auto;
    left: 1.125rem;
    right: 1.125rem;
    width: auto;
    height: 2px;
    background: linear-gradient(to right, var(--accent-cold-strong), var(--accent-cold-light));
  }

  .step {
    padding-left: 0;
    padding-top: 3.25rem;
  }

  .step-title {
    padding-top: 0;
  }
}

/* ── Closing block (ClosingNotice) ────────────────────────────────────── */
.closing {
  padding: 2.5rem 0 3.5rem;
}

.closing-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 1.25rem;
}

.closing-title {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.closing-blocks {
  display: grid;
  gap: 1.25rem;
}

.closing-block {
  display: grid;
  gap: 0.375rem;
}

.closing-block-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.closing-block-text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-faint);
}

@media (min-width: 769px) {
  .closing-blocks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* Separated from the content by a gradient, not a grey line. */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--rule-gradient);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 2rem;
  display: grid;
  gap: 2rem;
}

/* ── 1. Licensed-only statement: first block, framed ───────────────────── */
.footer-statement {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 1rem 1.125rem;
  border: 1px solid var(--accent-cold);
  border-radius: var(--radius);
  background: var(--surface);
}

.footer-statement-icon {
  flex-shrink: 0;
  color: var(--accent-cold-light);
}

.footer-statement-body {
  display: grid;
  gap: 0.25rem;
}

.footer-statement-text {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-strong);
}

.footer-statement-sub {
  color: var(--text-muted);
}

/* ── Columns ───────────────────────────────────────────────────────────── */
.footer-columns {
  display: grid;
  gap: 2rem;
}

.footer-block {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.footer-block-title {
  font-size: 1rem;
  font-weight: 800;
  font-variation-settings: 'wdth' var(--wdth-display);
  color: var(--text-strong);
}

.footer-licence-list,
.footer-contact-list,
.footer-help-list,
.footer-help-contacts {
  list-style: none;
  display: grid;
}

.footer-licence-list {
  gap: 0.75rem;
}

.footer-licence {
  display: grid;
  gap: 0.125rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--line-strong);
}

.footer-licence-domain {
  font-weight: 700;
  color: var(--text);
}

.footer-licence-line {
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.footer-inline-link {
  color: var(--accent-cold-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.footer-mark-plate,
.footer-mark-plate-small {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: var(--mark-plate);
}

.footer-mark-plate-small {
  padding: 0.375rem 0.625rem;
}

.footer-mark {
  display: block;
  width: auto;
}

/* `width: auto` above lets next/image's srcset candidate set the size in the original
   (1x/2x of the nearest configured width). The static files are not resized, so the
   rendered widths are fixed here. */
.footer-mark-pba {
  width: 256px;
}

.footer-mark-sedronar {
  width: 128px;
}

.footer-mark-jaa {
  width: 48px;
}

@media (min-resolution: 1.5dppx) {
  .footer-mark-pba {
    width: 192px;
  }
}

.footer-org-name {
  font-weight: 700;
  color: var(--text);
}

.footer-org-link {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.footer-contact-list {
  gap: 0.375rem;
}

.footer-contact-list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.footer-contact-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--accent-cold);
}

.footer-help-list {
  gap: 1.25rem;
}

.footer-help {
  display: grid;
  gap: 0.375rem;
}

.footer-help-text {
  font-size: 0.8125rem;
}

.footer-help-contacts {
  gap: 0.125rem;
  font-size: 0.8125rem;
}

/* ── Age warning: visible text, not a glyph ───────────────────────────── */
.footer-age {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.footer-age-marker {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: var(--radius);
  background: var(--notice-bg);
  color: var(--notice-text);
  font-weight: 800;
  font-variation-settings: 'wdth' var(--wdth-display);
}

.footer-age-text {
  color: var(--text);
}

/* ── Brand + navigation ───────────────────────────────────────────────── */
.footer-bottom {
  display: grid;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.footer-brand {
  justify-self: start;
}

.footer-brand-logo {
  width: auto;
  height: 2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-nav-link {
  color: var(--text);
}

.footer-nav-link:hover {
  color: var(--accent-cold-light);
}

/* ── Compact line + company line ──────────────────────────────────────── */
.footer-compact,
.footer-company {
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.footer-company {
  margin-top: -1.25rem;
}

@media (min-width: 769px) {
  .footer-columns {
    grid-template-columns: 1.3fr 1fr 1.2fr;
    gap: 2.5rem;
  }

  .footer-bottom {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .footer-nav {
    justify-content: flex-end;
  }
}

/* ── Legal pages (LegalPage) ──────────────────────────────────────────── */
.legal {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 2.5rem 0 3.5rem;
}

.legal-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.legal-head {
  display: grid;
  gap: 0.5rem;
  max-width: var(--prose-max);
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.legal-title {
  font-size: clamp(1.875rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.08;
  font-variation-settings: 'wdth' var(--wdth-display);
  color: var(--text-strong);
}

.legal-updated {
  font-size: 0.8125rem;
  font-weight: 600;
  font-variation-settings: 'wdth' var(--wdth-label);
  color: var(--text-faint);
}

.legal-intro {
  margin-top: 0.5rem;
  font-size: 1.0625rem;
  color: var(--text-muted);
}

.legal-prose {
  max-width: var(--prose-max);
  color: var(--text-muted);
}

.legal-prose h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.3125rem;
  font-weight: 800;
  line-height: 1.25;
  font-variation-settings: 'wdth' 112;
  color: var(--text-strong);
}

.legal-prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.legal-prose p,
.legal-prose li {
  font-size: 1rem;
  line-height: 1.7;
}

.legal-prose p + p {
  margin-top: 0.75rem;
}

.legal-prose ul,
.legal-prose ol {
  display: grid;
  gap: 0.375rem;
  margin: 0.75rem 0;
  padding-left: 1.25rem;
}

.legal-prose a {
  color: var(--accent-cold-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.legal-prose strong {
  color: var(--text);
}

.legal-prose details {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.legal-prose summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.legal-prose details[open] summary {
  margin-bottom: 0.5rem;
}

.legal-callout {
  margin: 1.25rem 0;
  padding: 0.875rem 1rem;
  border-left: 3px solid var(--accent-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
  color: var(--text);
}

.legal-table-wrap {
  margin: 1rem 0;
  overflow-x: auto;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.legal-table th,
.legal-table td {
  padding: 0.625rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal-table th {
  color: var(--text);
  font-weight: 700;
}

.legal-prose .legal-contacts {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
  list-style: none;
  padding-left: 0;
}

.legal-contact {
  padding: 0.875rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.legal-contact p + p {
  margin-top: 0.25rem;
}

/* ── 404 (app/not-found) ──────────────────────────────────────────────── */
.not-found {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  align-items: center;
  padding: 4rem 0;
}

.not-found-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  justify-items: start;
  gap: 0.75rem;
}

.not-found-code {
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 800;
  line-height: 0.9;
  font-variation-settings: 'wdth' var(--wdth-display);
  background: var(--rule-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.not-found-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  font-variation-settings: 'wdth' var(--wdth-display);
  color: var(--text-strong);
}

.not-found-text {
  max-width: 44ch;
  color: var(--text-muted);
}

.not-found-back {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  margin-top: 0.5rem;
  padding: 0 1.375rem;
  border-radius: var(--radius);
  background: var(--cta-cold);
  color: var(--cta-cold-text);
  font-weight: 700;
}
