:root {
  /* Typography. */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: var(--font-sans);

  --text-2xs: 10px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 13px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-page-title: clamp(36px, 5vw, 52px);

  /* Spacing. Use a 4px base scale for component layout. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Content widths. */
  --content-app: 1120px;
  --content-narrow: 680px;
  --content-feed: 760px;
  --content-table: 860px;

  /* Shape and elevation. */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-xs: 0 2px 8px rgba(30, 43, 36, 0.08);
  --shadow-sm: 0 8px 28px rgba(30, 43, 36, 0.10);
  --shadow-md: 0 12px 35px rgba(30, 43, 36, 0.08);
  --shadow-lg: 0 18px 60px rgba(30, 43, 36, 0.11);

  /* Controls. */
  --control-sm: 38px;
  --control-md: 44px;
  --control-field: 48px;
  --control-lg: 52px;

  /* Foundation colors. */
  --color-white: #fff;
  --color-bg: #f7f3ec;
  --color-surface-subtle: #eee7dc;
  --color-surface: #fffdf8;
  --color-text: #17221d;
  --color-text-muted: #65706a;
  --color-border: #dcd5ca;
  --color-border-soft: #ebe6dc;
  --color-border-strong: #c7bfb3;

  /* Semantic colors. */
  --color-primary: #0c6548;
  --color-primary-hover: #084a35;
  --color-primary-soft: #dceade;
  --color-primary-strong: #1d785a;
  --color-primary-border: #8ac7aa;
  --color-negative: #e76243;
  --color-negative-soft: #f8ded4;
  --color-negative-strong: #9e422c;
  --color-negative-border: #efa28e;
  --color-negative-text: #8c2e1b;
  --color-warning: #edb934;
  --color-warning-soft: #fbf5df;
  --color-warning-text: #645a3c;
  --color-warning-border: #b78005;
  --color-neutral-soft: #ece8df;
  --color-neutral-text: #675e53;

  /* Transparent surfaces. */
  --color-topbar: rgba(247, 243, 236, 0.92);
  --color-surface-62: rgba(255, 253, 248, 0.62);
  --color-white-65: rgba(255, 255, 255, 0.65);
  --color-white-46: rgba(255, 255, 255, 0.46);
  --color-white-42: rgba(255, 255, 255, 0.42);
  --color-white-17: rgba(255, 255, 255, 0.17);
  --color-white-16: rgba(255, 255, 255, 0.16);
  --color-white-07: rgba(255, 255, 255, 0.07);
  --color-primary-12: rgba(12, 101, 72, 0.12);
  --color-primary-10: rgba(12, 101, 72, 0.10);
  --color-primary-03: rgba(12, 101, 72, 0.025);
  --color-primary-02: rgba(12, 101, 72, 0.02);
  --color-negative-09: rgba(231, 98, 67, 0.09);
  --color-overlay: rgba(18, 29, 24, 0.55);
  --color-inverse-muted: #b9c1bd;
  --color-inverse-subtle: #c9d0cc;

  --motion-fast: 120ms ease;
  --motion-standard: 180ms ease;

  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--color-bg); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--color-text-muted); }
.optional { color: var(--color-text-muted); font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.section-intro {
  display: grid;
  gap: var(--space-3);
}

.section-intro .eyebrow,
.section-intro h2,
.section-intro > p:not(.eyebrow) {
  margin: 0;
}

.section-intro h2 {
  font: 700 var(--text-2xl)/1.2 var(--font-display);
  letter-spacing: -.015em;
}

.section-intro > p:not(.eyebrow) {
  font-size: var(--text-lg);
  line-height: 1.45;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--color-white);
  color: var(--color-text);
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

input,
select {
  height: var(--control-field);
  padding: 0 14px;
}

textarea {
  resize: vertical;
  padding: 12px 14px;
  line-height: 1.45;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-10);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: var(--control-md);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 700;
  transition: transform var(--motion-fast), background var(--motion-fast), border-color var(--motion-fast), opacity var(--motion-fast);
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button-primary { background: var(--color-primary); color: var(--color-white); }
.button-primary:hover:not(:disabled) { background: var(--color-primary-hover); }
.button-secondary { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); }
.button-secondary:hover:not(:disabled) { border-color: var(--color-border-strong); background: var(--color-surface-subtle); }
.button-danger { background: var(--color-negative-soft); color: var(--color-negative-text); }
.button-danger:hover:not(:disabled) { background: var(--color-negative-border); }
.button-danger-solid { background: var(--color-negative-text); color: var(--color-white); }
.button-danger-solid:hover:not(:disabled) { background: var(--color-negative-strong); }
.button-small { min-height: var(--control-sm); padding: 0 13px; font-size: var(--text-sm); }
.button-large { width: 100%; min-height: var(--control-lg); margin-top: 18px; justify-content: space-between; padding: 0 18px; }
.button-full { width: 100%; }

@media (max-width: 650px) {
  input,
  textarea,
  select {
    font-size: 16px;
  }
}
