/* ClubUno's own look (2026-11 mockups): fresh green on white, neon green on deep navy. Text is always
   bright on colour and dark on light; never grey. Headers and buttons reach at least
   7:1 contrast, body text too (tests-node/contrast.test.ts checks every pair below). */

:root {
  color-scheme: light;
  /* tokens:light */
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #ecf5ee;
  --text: #0b1220;
  --text-soft: #24324a;
  --link: #0a5a26;
  --primary: #22c55e;
  --on-primary: #0b1220;
  --danger: #991b1b;
  --on-danger: #ffffff;
  --border: #6f8197;
  --focus: #b45309;
  --accent: #facc15;
  --warn-bg: #fef3c7;
  --warn-text: #0b1220;
  --sun: #ffd166;
  --mint: #8ee3c8;
  --sky: #a9cbff;
  --rose: #ffb7c9;
  --lilac: #d6c6ff;
  --on-tile: #0b1220;
  --soft: #dcf7e4;
  --on-soft: #0a5a26;
  --line: #dfe8e3;
  --bar: #138a3e;
  /* /tokens */
  --club: var(--primary);
  --club-2: var(--accent);
  --radius: 14px;
  /* Cards lift off the page: a hairline ring and two soft drops (the mockups are not flat). */
  --shadow: 0 0 0 1px rgb(11 18 32 / 4%), 0 1px 2px rgb(11 18 32 / 8%), 0 8px 24px -6px rgb(11 18 32 / 12%);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    /* tokens:dark */
    --bg: #070d14;
    --surface: #0e1621;
    --surface-2: #152131;
    --text: #f4f8fb;
    --text-soft: #d3dde8;
    --link: #3df58a;
    --primary: #22e57a;
    --on-primary: #04140a;
    --danger: #f87171;
    --on-danger: #1a0505;
    --border: #64788f;
    --focus: #fbbf24;
    --accent: #facc15;
    --warn-bg: #3b3208;
    --warn-text: #fff7d1;
    --sun: #ffd166;
    --mint: #8ee3c8;
    --sky: #a9cbff;
    --rose: #ffb7c9;
    --lilac: #d6c6ff;
    --on-tile: #0b1220;
    --soft: #0f3a22;
    --on-soft: #5cf59a;
    --line: #233246;
    --bar: #22e57a;
    /* /tokens */
    --shadow: 0 0 0 1px rgb(255 255 255 / 6%), 0 8px 24px -8px rgb(0 0 0 / 60%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070d14;
  --surface: #0e1621;
  --surface-2: #152131;
  --text: #f4f8fb;
  --text-soft: #d3dde8;
  --link: #3df58a;
  --primary: #22e57a;
  --on-primary: #04140a;
  --danger: #f87171;
  --on-danger: #1a0505;
  --border: #64788f;
  --focus: #fbbf24;
  --accent: #facc15;
  --warn-bg: #3b3208;
  --warn-text: #fff7d1;
  --sun: #ffd166;
  --mint: #8ee3c8;
  --sky: #a9cbff;
  --rose: #ffb7c9;
  --lilac: #d6c6ff;
  --on-tile: #0b1220;
  --soft: #0f3a22;
  --on-soft: #5cf59a;
  --line: #233246;
  --bar: #22e57a;
  --shadow: 0 0 0 1px rgb(255 255 255 / 6%), 0 8px 24px -8px rgb(0 0 0 / 60%);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.55 var(--font);
  /* Any language wraps instead of running off the screen (long words, no spaces in Chinese). */
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Scripts with their own fonts and line height. */
:root:lang(zh) {
  --font: system-ui, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
}

:root:lang(ar) {
  --font: system-ui, "Segoe UI", "Noto Sans Arabic", "Geeza Pro", "Noto Naskh Arabic", sans-serif;
}

:root:lang(ar) body {
  line-height: 1.7;
}

h1,
h2,
h3 {
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 0.5rem;
}

h1:focus {
  outline: none;
}

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

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  background: var(--primary);
  color: var(--on-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}

.skip:focus {
  top: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: 600 1rem/1.2 var(--font);
  cursor: pointer;
  text-decoration: none;
}

.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-danger);
}

.button.small {
  min-height: 36px;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
}

.button:disabled,
.button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.75;
}

@media (prefers-reduced-motion: no-preference) {
  .button {
    transition: transform 0.08s ease;
  }

  .button:active {
    transform: scale(0.97);
  }
}

/* "Zoals het ontwerp" (Instellingen, Kees 2026-11-07): white text on a slightly deeper green
   in light mode, as in the mockups. A viewer's own choice; below 7:1 on purpose, so it is
   not the default and not in the contrast test. */
@media (prefers-color-scheme: light) {
  :root[data-buttons="design"]:not([data-theme="dark"]) {
    --primary: #16a34a;
    --on-primary: #ffffff;
  }
}

:root[data-buttons="design"][data-theme="light"] {
  --primary: #16a34a;
  --on-primary: #ffffff;
}

/* The privacy centre's own layout (tokens.css is put in front of this at build). */

.p-head,
.p-main,
.p-foot {
  max-width: 820px;
  margin: 0 auto;
  padding: 1rem;
}

.p-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
}

.langs {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.langs a[aria-current="true"] {
  font-weight: 800;
  text-decoration: none;
}

.topics {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.topics a {
  display: block;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border);
  border-left: 8px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.topics strong {
  display: block;
  color: var(--link);
  font-size: 1.1rem;
}

.note {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 10px 10px 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  background: var(--surface);
}

th,
td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--surface-2);
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--primary);
  color: var(--on-primary);
}

.back::before {
  content: "← ";
}

.p-foot {
  border-top: 1px solid var(--border);
}

.small {
  font-size: 0.9rem;
}

/* Phones: every row becomes a card, each cell with its column name. */
@media (max-width: 640px) {
  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  tr {
    margin-bottom: 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }

  tbody th {
    background: var(--primary);
    color: var(--on-primary);
  }

  td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
  }
}
