/**
 * Design tokens: the Kano Ministry palette (deep Kano green with a harvest
 * gold accent), type scale, spacing, radii and shadows. Every other file
 * uses these custom properties instead of raw values.
 */
:root {
  /* Kano green */
  --kc-green-950: #03241a;
  --kc-green-900: #06392a;
  --kc-green-800: #0a4d36;
  --kc-green-700: #0c6142;
  --kc-green-600: #11774f;
  --kc-green-500: #1b8f5f;
  --kc-green-400: #47ad80;
  --kc-green-300: #86cfa9;
  --kc-green-200: #b9e3cc;
  --kc-green-100: #dcf1e5;
  --kc-green-50: #eff8f3;

  /* Harvest gold */
  --kc-gold-700: #7c560a;
  --kc-gold-600: #a1720f;
  --kc-gold-500: #cf9a1f;
  --kc-gold-400: #e8b949;
  --kc-gold-300: #f2d27a;
  --kc-gold-200: #f8e6b0;
  --kc-gold-100: #fdf5dd;

  /* Neutrals with a faint green cast */
  --kc-ink: #0e1c16;
  --kc-body: #33413b;
  --kc-muted: #56645d;
  --kc-subtle: #687570;
  --kc-line: #dfe6e2;
  --kc-line-strong: #c3cec8;
  --kc-canvas: #f5f8f6;
  --kc-surface: #ffffff;
  --kc-surface-2: #fafcfb;

  /* Feedback */
  --kc-success: #0f7a46;
  --kc-success-bg: #ecf8f1;
  --kc-warning: #8a4b06;
  --kc-warning-bg: #fff8e6;
  --kc-error: #b42318;
  --kc-error-bg: #fef3f2;
  --kc-info: #1e4fb8;
  --kc-info-bg: #eef4ff;

  /* Roles */
  --kc-primary: var(--kc-green-700);
  --kc-primary-hover: var(--kc-green-800);
  --kc-accent: var(--kc-gold-400);
  --kc-link: var(--kc-green-700);
  --kc-link-hover: var(--kc-green-900);
  --kc-focus: #f2b705;
  --kc-focus-ring: 0 0 0 3px var(--kc-surface), 0 0 0 6px var(--kc-focus);

  /* Type */
  --kc-font-sans: "Inter Variable", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --kc-font-display: "Plus Jakarta Sans Variable", "Plus Jakarta Sans", var(--kc-font-sans);
  --kc-font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --kc-fs-2xs: 0.6875rem;
  --kc-fs-xs: 0.75rem;
  --kc-fs-sm: 0.875rem;
  --kc-fs-base: 1rem;
  --kc-fs-md: 1.0625rem;
  --kc-fs-lg: 1.25rem;
  --kc-fs-xl: 1.5rem;
  --kc-fs-2xl: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  --kc-fs-3xl: clamp(1.75rem, 1.3rem + 1.9vw, 2.375rem);
  --kc-fs-4xl: clamp(2.125rem, 1.4rem + 3.1vw, 3.5rem);
  --kc-lh-tight: 1.15;
  --kc-lh-snug: 1.3;
  --kc-lh-base: 1.6;

  /* Space (4px grid) */
  --kc-s1: 0.25rem;
  --kc-s2: 0.5rem;
  --kc-s3: 0.75rem;
  --kc-s4: 1rem;
  --kc-s5: 1.25rem;
  --kc-s6: 1.5rem;
  --kc-s8: 2rem;
  --kc-s10: 2.5rem;
  --kc-s12: 3rem;
  --kc-s16: 4rem;
  --kc-s20: 5rem;

  /* Shape */
  --kc-radius-sm: 0.5rem;
  --kc-radius: 0.75rem;
  --kc-radius-lg: 1rem;
  --kc-radius-xl: 1.5rem;
  --kc-radius-pill: 999px;
  --kc-shadow-xs: 0 1px 2px rgba(14, 28, 22, 0.06);
  --kc-shadow-sm: 0 1px 2px rgba(14, 28, 22, 0.06), 0 1px 3px rgba(14, 28, 22, 0.08);
  --kc-shadow: 0 12px 30px -14px rgba(14, 28, 22, 0.22);
  --kc-shadow-lg: 0 30px 60px -28px rgba(3, 36, 26, 0.45);

  /* Layout */
  --kc-container: 77.5rem;
  --kc-gutter: 1rem;
  --kc-header-h: 4.75rem;
  --kc-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 40rem) {
  :root { --kc-gutter: 1.5rem; }
}
@media (min-width: 64rem) {
  :root { --kc-gutter: 2rem; }
}

/* Text size control (utility bar). Stored per device by kanocommerce.js. */
html[data-kc-text="sm"] { font-size: 93.75%; }
html[data-kc-text="lg"] { font-size: 112.5%; }
html[data-kc-text="xl"] { font-size: 125%; }

/* High contrast mode: darker text, solid borders, underlined links. */
html.kc-contrast {
  --kc-body: #0e1c16;
  --kc-muted: #26332d;
  --kc-subtle: #3a4842;
  --kc-line: #7b8882;
  --kc-line-strong: #3a4842;
  --kc-link: #03241a;
  --kc-primary: #06392a;
}
html.kc-contrast a { text-decoration: underline; }
