/* Verify — public register: living pastel field behind a floating card.
 * Self-contained (tokens, reset, layout). Motion animates only transform, filter and background-position. */

@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/PlusJakartaSans-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/PlusJakartaSans-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/PlusJakartaSans-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/PlusJakartaSans-Bold.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/IBMPlexMono-Regular.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/IBMPlexMono-Medium.ttf') format('truetype'); }

/* ---------- 1. Tokens ---------- */
:root {
  --color-canvas: oklch(98.5% 0.006 260);
  --color-pastel-blue: oklch(87% 0.075 250);
  --color-pastel-violet: oklch(86% 0.078 292);
  --color-pastel-blue-0: oklch(87% 0.075 250 / 0);
  --color-pastel-violet-0: oklch(86% 0.078 292 / 0);
  --color-shell: oklch(100% 0 0);
  --shadow-shell: 0 30px 80px -30px oklch(37% 0.20 292 / 0.28), 0 2px 6px oklch(20% 0.03 292 / 0.05);

  --color-accent: #4A00A5;
  --color-accent-hover: oklch(31% 0.19 292);
  --color-accent-soft: oklch(94.5% 0.035 292);
  --color-accent-ink: oklch(98.5% 0.008 292);

  --color-paper-2: oklch(96.2% 0.007 292);
  --color-rule: oklch(88.5% 0.012 292);
  --color-rule-2: oklch(80% 0.016 292);
  --color-muted: oklch(49% 0.028 292);
  --color-ink-2: oklch(34% 0.035 292);
  --color-ink: oklch(19% 0.035 292);

  --color-valid: oklch(47% 0.13 152);
  --color-revoked: oklch(48% 0.17 32);
  --color-revoked-soft: oklch(95.5% 0.028 32);
  --color-warn: oklch(46% 0.12 75);
  --color-warn-soft: oklch(96% 0.04 85);

  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.25rem;
  --text-display: clamp(2rem, 1.25rem + 2.4vw, 3.25rem);

  --space-3xs: .125rem;
  --space-2xs: .25rem;
  --space-xs: .5rem;
  --space-sm: .75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-card: 8px;
  --radius-panel: 4px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 400ms;
}

/* ---------- Dark theme: follows the system unless the visitor chose Light; data-theme="dark" forces it. ---------- */
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-canvas: oklch(15% 0.02 285);
    --color-pastel-blue: oklch(36% 0.07 250);
    --color-pastel-violet: oklch(36% 0.08 292);
    --color-pastel-blue-0: oklch(36% 0.07 250 / 0);
    --color-pastel-violet-0: oklch(36% 0.08 292 / 0);
    --color-shell: oklch(20% 0.02 292);
    --shadow-shell: 0 30px 80px -30px oklch(0% 0 0 / 0.7), 0 2px 6px oklch(0% 0 0 / 0.4);
    --color-accent: oklch(76% 0.13 292);
    --color-accent-hover: oklch(84% 0.1 292);
    --color-accent-soft: oklch(31% 0.08 292);
    --color-accent-ink: oklch(17% 0.05 292);
    --color-paper-2: oklch(24.5% 0.022 292);
    --color-rule: oklch(33% 0.025 292);
    --color-rule-2: oklch(44% 0.03 292);
    --color-muted: oklch(72% 0.025 292);
    --color-ink-2: oklch(84% 0.02 292);
    --color-ink: oklch(95% 0.01 292);
    --color-valid: oklch(78% 0.14 152);
    --color-revoked: oklch(74% 0.15 32);
    --color-revoked-soft: oklch(29% 0.06 32);
    --color-warn: oklch(83% 0.12 75);
    --color-warn-soft: oklch(30% 0.05 85);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-canvas: oklch(15% 0.02 285);
  --color-pastel-blue: oklch(36% 0.07 250);
  --color-pastel-violet: oklch(36% 0.08 292);
  --color-pastel-blue-0: oklch(36% 0.07 250 / 0);
  --color-pastel-violet-0: oklch(36% 0.08 292 / 0);
  --color-shell: oklch(20% 0.02 292);
  --shadow-shell: 0 30px 80px -30px oklch(0% 0 0 / 0.7), 0 2px 6px oklch(0% 0 0 / 0.4);
  --color-accent: oklch(76% 0.13 292);
  --color-accent-hover: oklch(84% 0.1 292);
  --color-accent-soft: oklch(31% 0.08 292);
  --color-accent-ink: oklch(17% 0.05 292);
  --color-paper-2: oklch(24.5% 0.022 292);
  --color-rule: oklch(33% 0.025 292);
  --color-rule-2: oklch(44% 0.03 292);
  --color-muted: oklch(72% 0.025 292);
  --color-ink-2: oklch(84% 0.02 292);
  --color-ink: oklch(95% 0.01 292);
  --color-valid: oklch(78% 0.14 152);
  --color-revoked: oklch(74% 0.15 32);
  --color-revoked-soft: oklch(29% 0.06 32);
  --color-warn: oklch(83% 0.12 75);
  --color-warn-soft: oklch(30% 0.05 85);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
img, svg { display: block; max-width: 100%; }
input, button { font: inherit; color: inherit; }
h1, h2, h3, p, dt, dd { overflow-wrap: break-word; }

body {
  min-height: 100dvh;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ---------- 3. Moving bands (paper-stock, not orbs) ---------- */
.field-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--color-canvas);
}
.field-rotor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 180vmax;
  height: 180vmax;
  margin: -90vmax 0 0 -90vmax;
  will-change: transform;
  animation: rotor 48s linear infinite;
}
@keyframes rotor { to { transform: rotate(1turn); } }

.slat {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 18vmax;
  margin-top: -9vmax;
  background: linear-gradient(90deg, transparent, var(--color-pastel-violet), transparent);
  opacity: .38;
  filter: blur(2px);
}
.slat--a { width: 90vmax; margin-left: -45vmax; transform: rotate(22deg) translate3d(-8vmax, -18vmax, 0); }
.slat--b { width: 70vmax; margin-left: -35vmax; background: linear-gradient(90deg, transparent, var(--color-pastel-blue), transparent); transform: rotate(-14deg) translate3d(12vmax, 16vmax, 0); opacity: .32; }
.slat--c { width: 36vmax; height: 36vmax; margin: -18vmax 0 0 -18vmax; background: color-mix(in oklch, var(--color-pastel-violet) 55%, transparent); transform: rotate(45deg) translate3d(28vmax, -6vmax, 0); opacity: .22; }

/* ---------- 4. Layout ---------- */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(.75rem, 3vw, 2.5rem);
}

.shell {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  max-width: 68rem;
  background: var(--color-shell);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-shell);
  display: grid;
  grid-template-areas: "brief" "panel" "foot";
}

.shell::before,
.shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  animation: wash 9s ease-in-out infinite alternate;
}
.shell::before {
  inset: -20% auto auto -18%;
  width: 46%;
  height: 70%;
  opacity: .16;
  background: linear-gradient(135deg, var(--color-pastel-blue), transparent 70%);
  transform: rotate(-8deg);
}
.shell::after {
  inset: auto -16% -28% auto;
  width: 42%;
  height: 58%;
  opacity: .14;
  background: linear-gradient(320deg, var(--color-pastel-violet), transparent 72%);
  transform: rotate(12deg);
  animation-duration: 11s;
  animation-direction: alternate-reverse;
}
@keyframes wash { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(8%, 6%, 0); } }
.shell--record { max-width: 78rem; }

.brief, .panel, .shell__foot { position: relative; z-index: 1; }

@media (min-width: 60rem) {
  .shell {
    grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "brief panel" "foot panel";
    min-height: 36rem;
  }
}

/* Brief */
.brief {
  grid-area: brief;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--space-xl);
  padding: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: var(--space-md);
}
.brief__logo { display: inline-block; justify-self: start; }
.brief__logo img { height: clamp(4rem, 2.75rem + 3vw, 6rem); width: auto; }
.brief__text { align-self: center; }
.brief h1 {
  font-weight: 700;
  font-size: var(--text-display);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 16ch;
  text-wrap: balance;
}
.brief .lede {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-ink-2);
  max-width: 42ch;
  margin-top: var(--space-md);
}
.brief__face { margin: var(--space-lg) 0 0; }
.brief__face figcaption { font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-sm); }
.face {
  position: relative;
  width: 100%;
  max-width: 36rem;
  aspect-ratio: var(--pw, 297) / var(--ph, 210);
  background: var(--color-paper-2);
  border: 1px solid var(--color-rule);
  overflow: hidden;
}
.face iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }

/* Panel */
.panel {
  grid-area: panel;
  margin: 0 clamp(.75rem, 2vw, 1.25rem) clamp(.75rem, 2vw, 1.25rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--color-paper-2);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-panel);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
@media (min-width: 60rem) {
  .panel { margin: clamp(.75rem, 2vw, 1.25rem); margin-left: 0; }
}
.panel__title { font-weight: 700; font-size: var(--text-xl); line-height: 1.2; letter-spacing: -0.02em; }

.form { display: grid; gap: var(--space-lg); margin-top: var(--space-xl); }
.form:first-child { margin-block: auto; }
.field { display: grid; gap: var(--space-xs); }
.field__label { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }

/* Foot */
.shell__foot {
  grid-area: foot;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md) clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2rem);
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.shell__foot p { margin: 0; }
.shell__foot a { color: var(--color-accent); font-weight: 500; text-decoration: none; }
.shell__foot a:hover { text-decoration: underline; }
.shell__foot-note { max-width: 58ch; font-size: var(--text-xs); line-height: 1.55; padding-bottom: var(--space-sm); border-bottom: 1px solid var(--color-rule); }
/* The copyright line closes the page: nothing is placed after it. */
.shell__foot-legal { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-xs); }

/* Where to find the ID: a small drawing of a certificate with the two places marked */
.id-guide { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--space-lg); align-items: center; margin: var(--space-xl) 0 0; max-width: 40rem; }
.id-guide__doc { width: 100%; height: auto; display: block; }
.id-guide__doc .g-paper { fill: var(--color-shell); stroke: var(--color-rule-2); stroke-width: 1.5; }
.id-guide__doc .g-title { fill: var(--color-accent-soft); }
.id-guide__doc .g-name { fill: var(--color-ink-2); opacity: .8; }
.id-guide__doc .g-line { fill: var(--color-rule); }
.id-guide__doc .g-qr rect { fill: var(--color-ink-2); }
.id-guide__doc .g-qr .g-qr__cut { fill: var(--color-shell); }
.id-guide__doc .g-id { fill: var(--color-accent); }
.id-guide__doc .g-ring { fill: none; stroke: var(--color-accent); stroke-width: 1.5; stroke-dasharray: 4 3; }
.id-guide__doc .g-key { fill: var(--color-accent); }
.id-guide__doc .g-key__n { fill: var(--color-accent-ink); font: 700 8px var(--font-sans); text-anchor: middle; dominant-baseline: central; }
.id-guide__keys { margin: 0; display: grid; gap: var(--space-md); }
.id-guide__keys dt { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); font-weight: 700; color: var(--color-ink); }
.id-guide__keys dd { margin: var(--space-3xs) 0 0 calc(1.25rem + var(--space-xs)); font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink-2); }
.id-guide__n { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--color-accent); color: var(--color-accent-ink); font-size: var(--text-xs); font-weight: 700; }
.id-guide .mono, .id-guide__tip .mono { font-family: var(--font-mono); font-size: .92em; }
.id-guide__tip { margin: var(--space-lg) 0 0; font-size: var(--text-sm); color: var(--color-muted); }
.id-guide__tip strong { font-family: var(--font-mono); font-weight: 600; color: var(--color-ink-2); }
@media (max-width: 34rem) { .id-guide { grid-template-columns: minmax(0, 1fr); } .id-guide__doc { max-width: 15rem; } }

/* ---------- 5. Controls ---------- */
.input {
  width: 100%;
  min-height: 3rem;
  padding: 0 var(--space-md);
  background: var(--color-shell);
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-md);
  color: var(--color-ink);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.input:hover { border-color: var(--color-muted); }
.input:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.input--mono { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .03em; }
.input--mono::placeholder { text-transform: none; letter-spacing: 0; }
.input::placeholder { color: var(--color-muted); opacity: .8; }
.input:user-invalid, .input[aria-invalid="true"] { border-color: var(--color-revoked); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 3rem;
  padding: 0 var(--space-lg);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: default; }
.btn--primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-accent-hover); }
.btn--block { width: 100%; }
.btn__spinner { display: none; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(1turn); } }

/* ---------- 6. Result state ---------- */
.record { display: flex; flex-direction: column; flex: 1; animation: reveal var(--dur-slow) var(--ease-out); }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.record__status { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.record__status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; flex: none; }
.record__status--valid { color: var(--color-valid); }
.record__status--warn { color: var(--color-warn); }
.record__status--bad { color: var(--color-revoked); }
.record__id { margin-top: var(--space-md); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); letter-spacing: .03em; overflow-wrap: anywhere; }
.record__holder { margin-top: var(--space-2xs); font-size: var(--text-xl); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.record__course { margin-top: var(--space-2xs); color: var(--color-ink-2); }

.record__grid { display: grid; grid-template-columns: auto minmax(0, 1fr); margin-top: var(--space-lg); border-top: 1px solid var(--color-rule); }
.record__grid dt, .record__grid dd { padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
.record__grid dt { padding-right: var(--space-md); font-size: var(--text-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); line-height: 1.9; }
.record__grid dd { font-size: var(--text-sm); color: var(--color-ink); }

.record__foot { display: flex; align-items: center; gap: var(--space-md); margin-top: auto; padding-top: var(--space-lg); }
.record__qr { flex: none; width: 4.5rem; height: 4.5rem; padding: var(--space-2xs); background: #fff; border: 1px solid var(--color-rule); border-radius: var(--radius-sm); }
.record__qr svg { width: 100%; height: 100%; }
.record__links { display: flex; flex-wrap: wrap; gap: var(--space-xs); font-size: var(--text-sm); }
.record__links a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 1rem;
  border-radius: var(--radius-md); border: 1px solid var(--color-rule-2); background: var(--color-shell);
  color: var(--color-ink); font-weight: 600; text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.record__links a:first-child { background: var(--color-accent-soft); border-color: transparent; color: var(--color-accent); }
.record__links a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.record__links a:first-child:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.record__links a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
@media (pointer: coarse) { .record__links a { min-height: 44px; } }

/* Error pages reuse the panel */
.panel__code { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .08em; color: var(--color-muted); }
.panel__text { margin-top: var(--space-md); font-size: var(--text-sm); color: var(--color-ink-2); }
.panel__text code { font-family: var(--font-mono); font-size: var(--text-xs); }
.panel__actions { margin-top: var(--space-xl); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  .field-bg, .field-rotor, .slat, .shell::before, .shell::after, .record { animation: none; }
}

/* ---------- Robot check on the verification form ---------- */
.captcha { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-sm, .75rem); margin: .5rem 0; }
.captcha img { display: block; border: 1px solid var(--color-rule, #d9d9e3); border-radius: 6px; background: #f7f1e8; max-width: 100%; height: auto; }
.captcha .btn-link { background: none; border: 0; padding: .5rem 0; font: inherit; font-size: var(--text-sm, .875rem); color: var(--color-accent); text-decoration: underline; cursor: pointer; min-height: 44px; }
.form .hint { font-size: var(--text-sm, .875rem); color: var(--color-ink-2); }
.form-error { color: var(--color-revoked); font-size: var(--text-sm, .875rem); font-weight: 600; margin: 0; }

/* Light and dark logo: both are in the page, the theme decides which one shows. */
.theme-logo--dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-logo--light { display: none; }
  :root:not([data-theme="light"]) .theme-logo--dark { display: block; }
}
:root[data-theme="dark"] .theme-logo--light { display: none; }
:root[data-theme="dark"] .theme-logo--dark { display: block; }

/* Theme switch: Light / System / Dark segmented control with a sliding thumb. */
.theme-switch { position: relative; display: inline-grid; grid-template-columns: repeat(3, 44px); padding: 3px; border: 1px solid var(--color-rule); border-radius: 999px; background: var(--color-shell); box-shadow: 0 1px 2px oklch(0% 0 0 / 0.06); isolation: isolate; }
.theme-switch__thumb { position: absolute; z-index: -1; top: 3px; left: 3px; width: 44px; height: 38px; border-radius: 999px; background: var(--color-accent-soft); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--color-accent) 30%, transparent); transform: translateX(44px); }
.theme-switch[data-current="light"] .theme-switch__thumb { transform: translateX(0); }
.theme-switch[data-current="dark"] .theme-switch__thumb { transform: translateX(88px); }
.theme-ready .theme-switch__thumb { transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.theme-switch__option { display: grid; place-items: center; width: 44px; height: 38px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--color-muted); cursor: pointer; transition: color 150ms ease; }
.theme-switch__option:hover { color: var(--color-ink); }
.theme-switch__option[aria-checked="true"] { color: var(--color-accent); }
.theme-switch__option:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.theme-switch--floating { position: fixed; top: 16px; right: 16px; z-index: 20; }
@media (prefers-reduced-motion: reduce) { .theme-ready .theme-switch__thumb, .theme-switch__option { transition: none; } }
.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; }
.brief__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md); }

/* QR scan: an alternative to typing the ID */
.btn--quiet { gap: var(--space-xs); background: var(--color-shell); color: var(--color-accent); border: 1px solid var(--color-rule-2); }
.btn--quiet:hover { border-color: var(--color-accent); background: var(--color-accent-soft); }
.scan-entry { display: grid; gap: var(--space-sm); }
.scan-entry[hidden] { display: none; }
.scan-entry__or { display: flex; align-items: center; gap: var(--space-sm); font-size: var(--text-xs); color: var(--color-muted); text-transform: uppercase; letter-spacing: .12em; }
.scan-entry__or::before, .scan-entry__or::after { content: ""; flex: 1; height: 1px; background: var(--color-rule); }
.scan { width: min(100% - 2rem, 26rem); padding: 0; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-shell); color: var(--color-ink); box-shadow: var(--shadow-shell); }
.scan::backdrop { background: oklch(15% 0.03 292 / .55); }
.scan__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-md) var(--space-md) var(--space-sm) var(--space-lg); }
.scan__head h2 { font-size: var(--text-md); font-weight: 700; }
.scan__close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--color-ink-2); cursor: pointer; }
.scan__close:hover { background: var(--color-paper-2); }
.scan__close:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.scan__view { position: relative; aspect-ratio: 1; margin: 0 var(--space-md); background: #000; border-radius: var(--radius-md); overflow: hidden; }
.scan__view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan__frame { position: absolute; inset: 18%; border-radius: 12px; box-shadow: 0 0 0 999px oklch(0% 0 0 / .35); outline: 3px solid #fff; outline-offset: 0; }
.scan__status { margin: 0; padding: var(--space-md) var(--space-lg) var(--space-lg); font-size: var(--text-sm); color: var(--color-ink-2); line-height: 1.5; }

/* Cookie notice */
.cookie-note { position: fixed; z-index: 30; left: var(--space-md); right: var(--space-md); bottom: var(--space-md); max-width: 26rem; display: grid; gap: var(--space-sm); padding: var(--space-md) var(--space-lg); background: var(--color-shell); color: var(--color-ink); border: 1px solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-shell); font-size: var(--text-sm); line-height: 1.5; }
.cookie-note[hidden] { display: none; }
.cookie-note p { margin: 0; }
.cookie-note__actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }
.cookie-note__actions a { color: var(--color-accent); font-weight: 600; text-decoration: none; }
.cookie-note__actions a:hover { text-decoration: underline; }
.cookie-note .btn { min-height: 2.5rem; padding: 0 var(--space-lg); }

/* Cookie page */
.cookie-list ul { list-style: none; margin: var(--space-lg) 0 0; padding: 0; display: grid; gap: var(--space-sm); }
.cookie-list__item { padding: var(--space-sm) var(--space-md); background: var(--color-shell); border: 1px solid var(--color-rule); border-radius: var(--radius-md); }
.cookie-list__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2xs) var(--space-sm); }
.cookie-list__name { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; color: var(--color-ink); }
.cookie-list__kept { font-size: var(--text-xs); color: var(--color-muted); }
.cookie-list__purpose { margin: var(--space-2xs) 0 0; font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink-2); }
.cookie-list__who { margin: var(--space-2xs) 0 0; font-size: var(--text-xs); color: var(--color-muted); }
.cookie-list__more { margin: var(--space-lg) 0; font-size: var(--text-sm); color: var(--color-muted); line-height: 1.5; }
.scan { margin: auto; }
@media (min-width: 60rem) { .cookie-note { left: auto; right: var(--space-lg); bottom: var(--space-lg); } }

/* QR scan: time left, and a clear warning when something is wrong */
.scan__timer { height: 4px; margin: var(--space-sm) var(--space-md) 0; background: var(--color-paper-2); border-radius: 2px; overflow: hidden; }
.scan__timer span { display: block; height: 100%; width: 0; background: var(--color-accent); }
.scan__alert { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm); margin: 0 var(--space-md) var(--space-md); padding: var(--space-sm) var(--space-md); background: var(--color-revoked-soft); border: 1px solid color-mix(in oklch, var(--color-revoked) 45%, transparent); border-left: 4px solid var(--color-revoked); border-radius: var(--radius-md); color: var(--color-ink); }
.scan__alert[hidden] { display: none; }
.scan__alert svg { color: var(--color-revoked); margin-top: .1rem; }
.scan__alert strong { display: block; font-size: var(--text-sm); font-weight: 700; color: var(--color-revoked); }
.scan__alert p { margin: var(--space-3xs) 0 0; font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink-2); }
.scan__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); padding: 0 var(--space-md) var(--space-lg); }
.scan__actions[hidden] { display: none; }
.scan__actions .btn { flex: 1 1 10rem; }
.scan__status:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .scan__timer span { transition: none !important; } }
.input--mono::placeholder { font-family: var(--font-sans); letter-spacing: 0; }
