/* Energy Vampire design tokens. Shared by the public site and the admin pages. */
:root {
  color-scheme: light;

  /* Neutrals: warm paper, plum-black ink. */
  --ink: #17131f;
  --ink-2: #463f53;
  --ink-3: #655e72; /* >= 4.5:1 on --paper */
  --paper: #f6f3ee;
  --paper-2: #ece7df;
  --surface: #ffffff;
  --line: #ddd6cb;

  /* Brand: the vampire. Used for markers, focus rings and primary actions. */
  --accent: #b5174f;
  --accent-strong: #8e0f3d;
  --accent-soft: #fbe4ec;
  --on-accent: #ffffff;

  /* Semantic vote colours (also the chart series). Text on them is white, >= 4.5:1. */
  --cold: #1f5fbf;
  --cold-soft: #e2ecfa;
  --ok: #11795a;
  --ok-soft: #dff2ea;
  --hot: #c2410c;
  --hot-soft: #fde6da;

  --danger: #a1122a;

  /* Type */
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans HK', 'PingFang HK',
    'Microsoft JhengHei', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --text-xs: 0.75rem;
  --text-s: 0.875rem;
  --text-m: 1rem;
  --text-l: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --text-xl: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);

  /* Space and shape: deliberately uneven radii (soft sheets, crisp controls). */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 36px;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 24px;
  --tap: 48px; /* minimum touch target */

  --shadow-1: 0 1px 2px rgb(23 19 31 / 0.08);
  --shadow-2: 0 1px 2px rgb(23 19 31 / 0.06), 0 14px 36px -10px rgb(23 19 31 / 0.28);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 140ms;
  --dur: 260ms;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-m);
  line-height: 1.5;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

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

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

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
