/* Source of truth for the homepage and style guide.
   Fixed brand palette, theme mappings, type scale, and 4px spatial rhythm. */
:root {
  color-scheme: light dark;
  /* #235711 and #131719 encode primes; #C0FFEE spells COFFEE.
     Soft surface #EFFBEF has three prime RGB channels: 239,251,239. */
  --brand: #235711;
  --neutral: #131719;
  --accent: #C0FFEE;
  --brand-soft: #EFFBEF;
  --page:#f7f9f5;
  --page-glow:#e6efdd;
  --ink:#131719;
  --muted:#536456;
  --green:#235711;
  --green-deep:#1c460f;
  --green-soft:#EFFBEF;
  --surface:rgba(255,255,255,.82);
  --surface-opaque:#fff;
  --hair:rgba(35,87,17,.16);
  --hover:rgba(35,87,17,.075);
  --shadow:0 12px 36px rgba(30,74,44,.055),0 2px 7px rgba(30,74,44,.025);
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  /* Major Third: each successive heading role is 1.25× the previous one.
     Explicit role tokens avoid reliance on sibling-index() or :heading().
     Auxiliary description/metadata sizes remain separately specified for legibility. */
  --type-ratio: 1.25;
  --text-heading-card: calc(var(--text-base) * var(--type-ratio));
  --text-heading-section: calc(var(--text-base) * var(--type-ratio) * var(--type-ratio));
  --text-display: clamp(2.875rem, 7vw, 4.25rem);
  --text-display-secondary: calc(var(--text-display) / var(--type-ratio));
  --leading-tight: 1.15;
  --leading-title: 1.3;
  --leading-body: 1.55;
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page:#131719;
    --page-glow:#203920;
    --ink:#f0f6ec;
    --muted:#b8c9b0;
    --green:#b7dea5;
    --green-deep:#d3edc7;
    --green-soft:#263829;
    --surface:rgba(29,38,31,.9);
    --surface-opaque:#1d261f;
    --hair:rgba(186,220,166,.16);
    --hover:rgba(183,222,165,.09);
    --shadow:0 14px 40px rgba(0,0,0,.13),0 2px 8px rgba(0,0,0,.08);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page:#131719;
  --page-glow:#203920;
  --ink:#f0f6ec;
  --muted:#b8c9b0;
  --green:#b7dea5;
  --green-deep:#d3edc7;
  --green-soft:#263829;
  --surface:rgba(29,38,31,.9);
  --surface-opaque:#1d261f;
  --hair:rgba(186,220,166,.16);
  --hover:rgba(183,222,165,.09);
  --shadow:0 14px 40px rgba(0,0,0,.13),0 2px 8px rgba(0,0,0,.08);
}
:root[data-theme="light"] {
  color-scheme: light;
  --page:#f7f9f5;
  --page-glow:#e6efdd;
  --ink:#131719;
  --muted:#536456;
  --green:#235711;
  --green-deep:#1c460f;
  --green-soft:#EFFBEF;
  --surface:rgba(255,255,255,.82);
  --surface-opaque:#fff;
  --hair:rgba(35,87,17,.16);
  --hover:rgba(35,87,17,.075);
  --shadow:0 12px 36px rgba(30,74,44,.055),0 2px 7px rgba(30,74,44,.025);
}
