/* Design tokens (ADR 0033): custom properties on :root. */

:root {
  color-scheme: light;

  --kp-bg: #FAF6F0;
  --kp-surface: #FFFFFF;
  --kp-surface-sunk: #F2EBE1;
  --kp-text: #2B2521;
  --kp-text-muted: #685C53;
  --kp-border: #E3D9CD;
  --kp-control-border: #8A7B6E;
  --kp-primary: #2C6A5D;
  --kp-primary-hover: #235449;
  --kp-on-primary: #FFFFFF;
  --kp-selected: #DCEBE6;
  --kp-accent: #A8492A;
  --kp-accent-soft: #F6E4DC;
  --kp-danger: #B3261E;
  --kp-danger-hover: #8F1E18;
  --kp-danger-soft: #F9E3E1;
  --kp-on-danger: #FFFFFF;
  --kp-success: #2D7049;
  --kp-success-soft: #E3F0E7;
  --kp-warning: #8A5300;
  --kp-warning-soft: #F7EBD6;
  --kp-info: #1F5FBF;
  --kp-info-soft: #E3ECF8;
  --kp-focus: #1F5FBF;
  --kp-backdrop: rgb(43 37 33 / 0.4);
  --kp-bar-bg: rgb(250 246 240 / 0.92);

  --kp-font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --kp-font-heading: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif", serif;
  --kp-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --kp-text-xs: 0.8125rem;
  --kp-text-sm: 0.875rem;
  --kp-text-md: 1rem;
  --kp-text-lg: 1.25rem;
  --kp-text-xl: 1.5rem;
  --kp-text-2xl: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
  --kp-text-reading: 1.125rem;
  --kp-leading: 1.55;
  --kp-leading-heading: 1.2;
  --kp-leading-reading: 1.7;

  --kp-space-1: 0.25rem;
  --kp-space-2: 0.5rem;
  --kp-space-3: 0.75rem;
  --kp-space-4: 1rem;
  --kp-space-5: 1.5rem;
  --kp-space-6: 2rem;
  --kp-space-7: 3rem;
  --kp-radius-sm: 6px;
  --kp-radius-md: 10px;
  --kp-radius-lg: 16px;
  --kp-radius-pill: 999px;
  --kp-shadow-1: 0 1px 2px rgb(43 37 33 / 0.08);
  --kp-shadow-2: 0 4px 16px rgb(43 37 33 / 0.12);
  --kp-shadow-3: 0 12px 32px rgb(43 37 33 / 0.18);

  --kp-ease: cubic-bezier(0.2, 0, 0, 1);
  --kp-duration: 150ms;
  --kp-duration-slow: 220ms;

  --kp-target: 2.25rem;
  --kp-gutter: 1rem;
  --kp-content-width: 48rem;
  --kp-panel-width: 20rem;
  --kp-topbar-height: 3rem;
  --kp-tabbar-height: 3.5rem;
  --kp-tabbar-offset: 0px;
}

@media (pointer: coarse) {
  :root { --kp-target: 2.75rem; }
}

@media (min-width: 40rem) {
  :root { --kp-gutter: 1.5rem; --kp-topbar-height: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --kp-duration: 0ms; --kp-duration-slow: 0ms; }
}
