/* Optional contextual color overrides are documented in THEMING.md.
   Keep literal neutral defaults in this file; project palettes load last. */

/* Shared design tokens and base reset for every GOAT surface: the public
   SSR pages link it first, the SPA bundles it through styles.scss. See
   /DESIGN.md for the semantic meaning of each token. */

:root {
  color-scheme: light;

  --background: #f4f6f2;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-subtle: #edf1eb;
  --border: #d5ddd4;
  --border-strong: #aebbad;
  /* Edges that identify a form control: 3:1 against --surface (WCAG 1.4.11). */
  --control-border: #7f8e80;

  --text: #18231c;
  --text-muted: #526055;
  --text-subtle: #5f6b61;

  --primary: #176447;
  --primary-hover: #0f5339;
  --primary-active: #0d432f;
  --primary-strong: var(--primary-active);
  --focus: #247a5a;
  --success: #166b4a;
  --warning: #8b6110;
  --danger: #aa3f34;
  --danger-strong: #8b332a;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-raised: 0 12px 28px rgba(22, 39, 29, 0.12);
  --control-height: 2.5rem;

  --layout-max: 70rem;
  --layout-gutter: clamp(var(--space-4), 3.5vw, var(--space-6));
  --layout-prose: 62ch;
  --layout-hero-space: clamp(var(--space-6), 5vw, var(--space-8));
  --layout-section-space: clamp(var(--space-7), 7vw, var(--space-8));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--background);
}

/* One visible focus indicator for every surface: a solid ring at 3:1 or more
   against the page (WCAG 2.4.7, 1.4.11). Outlines survive forced-colors mode,
   unlike box-shadow rings. Components restyle it only to change the offset. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
