:root {
  /* ============================================================
     TOKENS — Dark premium editorial newspaper theme
     Base palette is expressed with the requested brand hex values
     so the graphite / ivory / gold identity stays exact.
     ============================================================ */

  /* Graphite surfaces */
  --graphite-900: #1a1a1a;
  --graphite-800: #222222;
  --graphite-700: #2a2a2a;
  --graphite-600: #333333;

  /* Ivory / cream text */
  --ivory-100: #f4f1ea;
  --ivory-200: #e8e4da;
  --ivory-300: #d6d0c2;

  /* Restrained gold accent */
  --gold-400: #c9a227;
  --gold-500: #b8941f;
  --gold-600: #9a7a1a;

  /* Semantic color aliases */
  --background: var(--graphite-900);
  --foreground: var(--ivory-100);

  --surface: var(--graphite-800);
  --surface-hover: var(--graphite-700);
  --surface-raised: var(--graphite-600);

  --muted: var(--ivory-200);
  --muted-foreground: var(--ivory-300);

  --accent: var(--gold-400);
  --accent-hover: var(--gold-500);
  --accent-active: var(--gold-600);
  --accent-text: var(--graphite-900);

  --border: var(--graphite-600);
  --ring: var(--gold-400);

  --warning-bg: var(--gold-500);
  --warning-text: var(--graphite-900);

  /* Typography — system stacks only; no external font libraries */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Geometry */
  --radius-sm: 0.25rem;
  --radius: 0.375rem;
  --radius-lg: 0.5rem;

  --shadow-sm: 0 1px 2px 0 hsl(0 0% 0% / 0.15);
  --shadow: 0 4px 6px -1px hsl(0 0% 0% / 0.2), 0 2px 4px -2px hsl(0 0% 0% / 0.15);
  --shadow-lg: 0 10px 15px -3px hsl(0 0% 0% / 0.25), 0 4px 6px -4px hsl(0 0% 0% / 0.2);

  /* Layout */
  --container: 72rem;
  --container-narrow: 48rem;
  --header-height: 4rem;
}

/* ============================================================
   BASE & RESET
   ============================================================ */

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

* {
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--foreground);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p {
  margin-block-end: 1rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul, ol {
  list-style: none;
}

/* ============================================================
   ACCESSIBILITY HELPERS
   ============================================================ */

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

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem;
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: 3rem;
}

.section--alt {
  background-color: var(--surface);
}

.section__title {
  margin-block-end: 1rem;
}

.section__lead {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 65ch;
}

.text-center {
  text-align: center;
}

.flow > * + * {
  margin-block-start: 1rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background-color: var(--accent);
  color: var(--accent-text);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  color: var(--accent-text);
}

.btn--primary:active {
  background-color: var(--accent-active);
}

.btn--outline {
  background-color: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn--outline:hover {
  background-color: var(--accent);
  color: var(--accent-text);
}

.btn--small {
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  min-height: 36px;
}

/* ============================================================
   WARNING BANNER (France responsible-use notice)
   ============================================================ */

.warning-banner {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 0.75rem 1rem;
  line-height: 1.4;
}

.warning-banner a {
  color: var(--warning-text);
  text-decoration: underline;
}

.warning-banner a:hover {
  color: var(--graphite-900);
}

/* ============================================================
   MAGAZINE MASTHEAD HEADER
   ============================================================ */

.site-header {
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
}

.masthead {
  text-align: center;
  padding: 1.5rem 1rem;
}

.masthead__logo {
  display: block;
  margin-inline: auto;
  max-width: 16rem;
  height: auto;
}

.masthead__brand {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  text-decoration: none;
}

.masthead__tagline {
  margin-block-start: 0.5rem;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.04em;
}

/* ============================================================
   SPLIT MENU NAVIGATION
   Desktop: left group | centered logo | right group
   Mobile: collapses into hamburger drawer
   ============================================================ */

.split-menu {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "left center right";
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.split-menu__group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.split-menu__group--left {
  grid-area: left;
  justify-self: start;
}

.split-menu__group--right {
  grid-area: right;
  justify-self: end;
}

.split-menu__brand {
  grid-area: center;
  justify-self: center;
}

.split-menu__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--foreground);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.split-menu__link:hover,
.split-menu__link[aria-current="page"] {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  cursor: pointer;
}

.menu-toggle:hover {
  background-color: var(--surface);
}

/* Mobile behaviour */
@media (max-width: 767px) {
  .split-menu {
    grid-template-columns: 1fr auto;
    grid-template-areas: "center toggle";
  }

  .split-menu__group {
    display: none;
  }

  .split-menu__brand {
    grid-area: center;
    justify-self: start;
  }

  .menu-toggle {
    grid-area: toggle;
    justify-self: end;
    display: inline-flex;
  }
}

/* ============================================================
   MOBILE MENU DRAWER
   ============================================================ */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background-color: var(--background);
  transform: translateX(-100%);
  transition: transform 250ms ease;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.mobile-menu__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  cursor: pointer;
}

.mobile-menu__close:hover {
  background-color: var(--surface);
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  overflow-y: auto;
}

.mobile-menu__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  color: var(--foreground);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
}

.mobile-menu__link:hover,
.mobile-menu__link[aria-current="page"] {
  background-color: var(--surface);
  color: var(--accent);
}

/* Backdrop for mobile menu */
.mobile-menu__backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background-color: hsl(0 0% 0% / 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
}

.mobile-menu__backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

body:has(.mobile-menu.is-open) {
  overflow: hidden;
}

/* ============================================================
   HERO — Editorial magazine style
   ============================================================ */

.hero {
  position: relative;
  padding-block: 4rem 3.5rem;
  text-align: center;
  background-color: var(--background);
}

.hero__title {
  max-width: 20ch;
  margin-inline: auto;
  margin-block-end: 1rem;
}

.hero__lead {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 60ch;
  margin-inline: auto;
  margin-block-end: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ============================================================
   CARDS
   Surfaces are intentionally lighter than the page background.
   ============================================================ */

.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.card__header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.card__meta {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.card__meta strong,
.card__meta span {
  display: block;
  color: var(--muted);
}

.card__summary {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card__actions {
  margin-block-start: auto;
  padding-block-start: 0.5rem;
}

/* ============================================================
   GRIDS
   ============================================================ */

.grid {
  display: grid;
  gap: 1.5rem;
}

/* 3+2 layout for platform and criteria cards */
.grid--3-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid--3-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid--3-2 {
    grid-template-columns: repeat(6, 1fr);
  }

  .grid--3-2 > * {
    grid-column: span 2;
  }

  /* Center the final two cards on the second row */
  .grid--3-2 > *:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .grid--3-2 > *:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

/* Footer resource images: 3+3 on desktop/tablet, responsive on mobile */
.grid--resources {
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .grid--resources {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .grid--resources {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   PLATFORM CARDS
   ============================================================ */

.platform-logo {
  width: auto;
  max-width: 120px;
  max-height: 48px;
  object-fit: contain;
}

.platform-card .card__meta {
  border-left: 2px solid var(--accent);
  padding-left: 0.75rem;
}

.mini-criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.mini-criteria__item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background-color: var(--surface-hover);
  border-radius: 9999px;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ============================================================
   CRITERIA CARDS
   ============================================================ */

.criteria-card {
  text-align: center;
}

.criteria-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-block-end: 1rem;
  background-color: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--accent);
}

.criteria-card__title {
  font-size: 1.125rem;
  margin-block-end: 0.5rem;
}

.criteria-card__text {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */

.faq {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq__item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.25rem;
  background: transparent;
  border: 0;
  color: var(--foreground);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq__question:hover {
  background-color: var(--surface-hover);
}

.faq__question::after {
  content: "+";
  flex-shrink: 0;
  margin-left: 1rem;
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
}

.faq__item.is-open .faq__question::after {
  content: "−";
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease;
}

.faq__item.is-open .faq__answer {
  max-height: 50rem;
}

.faq__content {
  padding: 0 1.25rem 1.25rem;
  color: var(--muted);
}

/* ============================================================
   PRE-FOOTER EDITORIAL BLOCK
   ============================================================ */

.editorial-block {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.editorial-block__body {
  color: var(--muted);
  line-height: 1.7;
}

.editorial-block__body p:last-child {
  margin-block-end: 0;
}

/* ============================================================
   FOOTER RESOURCE IMAGES
   ============================================================ */

.resource-grid {
  display: grid;
  gap: 1rem;
}

.resource-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  min-height: 80px;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.resource-item:hover {
  background-color: var(--surface-hover);
  border-color: var(--accent);
}

.resource-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.resource-img {
  max-width: 100%;
  max-height: 56px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.85;
  transition: filter 150ms ease, opacity 150ms ease;
}

.resource-item:hover .resource-img,
.resource-link:focus-visible .resource-img {
  filter: grayscale(0%);
  opacity: 1;
}

/* ============================================================
   MAIN FOOTER
   ============================================================ */

.site-footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: 3rem 1.5rem;
}

.footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-block-end: 2rem;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer__heading {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin-block-end: 1rem;
  color: var(--foreground);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.footer__link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ============================================================
   AGE-GATE & COOKIE BANNER
   Visibility utility classes handled by JS toggles.
   ============================================================ */

.age-gate,
.cookie-banner {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: hsl(0 0% 0% / 0.75);
}

.age-gate.is-hidden,
.cookie-banner.is-hidden,
.age-gate[aria-hidden="true"],
.cookie-banner[aria-hidden="true"] {
  display: none;
}

.age-gate__dialog,
.cookie-banner__inner {
  width: 100%;
  max-width: 28rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.age-gate__title,
.cookie-banner__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-block-end: 0.75rem;
}

.age-gate__text,
.cookie-banner__text {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-block-end: 1.25rem;
}

.age-gate__actions,
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.cookie-banner {
  inset: auto 0 0 0;
  top: auto;
  justify-content: center;
  background-color: hsl(0 0% 0% / 0.85);
}

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--container);
}

.cookie-banner__text {
  margin-block-end: 0;
  flex: 1 1 18rem;
}

/* ============================================================
   SELECTION / INTERNAL TRANSITION PAGE
   ============================================================ */

.transition-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.transition-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 40rem;
}

.transition-card__loader {
  width: 2.5rem;
  height: 2.5rem;
  margin-inline: auto;
  margin-block-end: 1.5rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   TURNSTILE VERIFICATION MODAL
   ============================================================ */

.turnstile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background-color: hsl(0 0% 0% / 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.turnstile-modal {
  position: fixed;
  inset: 0;
  z-index: 301;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.turnstile-modal__card {
  width: 100%;
  max-width: 22rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.turnstile-modal__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-block-end: 0.5rem;
  color: var(--foreground);
}

.turnstile-modal__text {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-block-end: 1.25rem;
}

.turnstile-modal #turnstile-widget {
  display: flex;
  justify-content: center;
}

/* Ensure no scroll on body when modal is open */
body.no-scroll {
  overflow: hidden;
}

/* ============================================================
   LEGAL CONTENT PAGES
   ============================================================ */

.legal-content {
  padding-block: 3rem 4rem;
}

.legal-content h2 {
  margin-block: 2rem 0.75rem;
}

.legal-content p,
.legal-content li {
  color: var(--muted);
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-block-end: 1rem;
}

.legal-content li + li {
  margin-top: 0.5rem;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.is-hidden {
  display: none !important;
}

.no-scroll {
  overflow: hidden;
}

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

.text-small {
  font-size: 0.875rem;
}

.divider {
  height: 1px;
  background-color: var(--border);
  margin-block: 2rem;
}
