/* Shared tokens and controls for the public site and the admin. */
:root {
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #eaf0ee;
  --ink: #12201f;
  --muted: #586966;
  --line: #d6dfdc;
  --grid: rgba(18, 32, 31, 0.05);
  --accent: #0b6e63;
  --accent-hover: #085a51;
  --accent-ink: #ffffff;
  --accent-soft: #dcefeb;
  --signal: #a8480a;
  --signal-soft: #fbead6;
  --danger: #b42318;
  --danger-soft: #fbe4e1;
  --ok: #157347;
  --ok-soft: #dcf1e4;
  --info: #1f4e8c;
  --info-soft: #e2ebf7;
  --shadow: 0 1px 2px rgba(18, 32, 31, 0.06), 0 6px 20px rgba(18, 32, 31, 0.05);
  --font-display: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 8px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1514;
    --surface: #152120;
    --surface-2: #1c2c2a;
    --ink: #e6efed;
    --muted: #94a7a3;
    --line: #283937;
    --grid: rgba(230, 239, 237, 0.05);
    --accent: #3fbfa8;
    --accent-hover: #5fd0bb;
    --accent-ink: #06201b;
    --accent-soft: #15332e;
    --signal: #f0a458;
    --signal-soft: #3a2a15;
    --danger: #f28b82;
    --danger-soft: #3b1d1a;
    --ok: #6fd39a;
    --ok-soft: #14301f;
    --info: #8db7f0;
    --info-soft: #172a45;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
img, svg { max-width: 100%; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

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

/* Buttons */
.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  font: 600 15px/1 var(--font-body);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Form controls */
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
input, select, textarea {
  font: 400 16px/1.4 var(--font-body);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; width: 100%; min-height: 44px;
}
textarea { resize: vertical; min-height: 110px; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 0; border-color: var(--accent); }
input[type='checkbox'] { width: 20px; min-height: 20px; height: 20px; padding: 0; accent-color: var(--accent); }

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