/* Site theme: edit visual settings here; structural rules live in style.css.
   Presets import this file and override only the settings they change. */
:root {
  color-scheme: light;

  /* Palette */
  --background: #ffffffd5;
  --foreground: rgb(18, 9, 1);
  --accent: #1a6a36;
  --accent-muted: #cdd3ce1b;
  --accent-strong: #045c07;
  --ink-muted: #282626;
  --line: #43270055;
  --paper: #ffffffa9;
  --signal: #3400ef;
  --on-accent: #fff;
  --on-accent-muted: #b0cdb7;
  --on-accent-line: rgba(6, 0, 0, 0.35);
  --background-grid: rgba(255, 255, 255, 0.035);
  --background-grid-size: 36px;
  --border-radius: 2px;

  /* Body text and rhythm. Line heights are unitless multipliers. */
  --body-font-family: "Site Atkinson Hyperlegible", sans-serif;
  --body-font-size: 1rem;
  --body-font-weight: 500;
  --body-line-height: 1.5;t
  --body-letter-spacing: normal;
  --body-strong-font-weight: 700;
  --paragraph-align: justify;
  --paragraph-space: 1.2em;
  --list-item-space: 0.35em;

  /* Heading defaults and explicit H1–H6 controls */
  --heading-font-family: "Site Cabin", sans-serif;
  --heading-font-weight: 700;
  --heading-line-height: 1.2;
  --heading-letter-spacing: -0.04em;
  --heading-align: left;
  --heading-space-before: 2em;
  --heading-space-after: 0.65em;
  --heading-h1-font-size: clamp(2.25rem, 5vw, 4rem);
  --heading-h1-font-weight: var(--heading-font-weight);
  --heading-h1-line-height: 1.08;
  --heading-h2-font-size: clamp(1.65rem, 3vw, 2.4rem);
  --heading-h2-font-weight: var(--heading-font-weight);
  --heading-h2-line-height: 1.15;
  --heading-h3-font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  --heading-h3-font-weight: var(--heading-font-weight);
  --heading-h3-line-height: var(--heading-line-height);
  --heading-h4-font-size: 1.2rem;
  --heading-h4-font-weight: var(--heading-font-weight);
  --heading-h4-line-height: var(--heading-line-height);
  --heading-h5-font-size: 1.1rem;
  --heading-h5-font-weight: var(--heading-font-weight);
  --heading-h5-line-height: var(--heading-line-height);
  --heading-h6-font-size: 1rem;
  --heading-h6-font-weight: var(--heading-font-weight);
  --heading-h6-line-height: var(--heading-line-height);

  /* Introductions and article summaries */
  --intro-font-family: var(--body-font-family);
  --intro-font-size: var(--body-font-size);
  --intro-font-weight: var(--body-font-weight);
  --intro-line-height: 1.6;
  --intro-letter-spacing: var(--body-letter-spacing);
  --summary-font-size: var(--intro-font-size);
  --summary-line-height: var(--intro-line-height);

  /* Component headings inherit the heading scale unless overridden. */
  --card-heading-font-size: var(--heading-h4-font-size);
  --gallery-text-heading-font-size: var(--heading-h3-font-size);
  --banner-heading-font-size: var(--heading-h2-font-size);

  /* Navigation, controls and supporting text */
  --navigation-font-size: 0.82rem;
  --navigation-font-weight: var(--body-font-weight);
  --navigation-letter-spacing: 0.08em;
  --control-font-size: 0.85rem;
  --control-font-weight: var(--body-strong-font-weight);
  --control-line-height: 1.4;
  --toc-line-height: 1.25;
  --meta-font-size: 0.78rem;
  --caption-font-size: 0.8rem;
  --caption-font-weight: var(--body-font-weight);
  --caption-line-height: 1.5;
  --note-font-size: 0.84rem;
  --eyebrow-font-size: 0.76rem;
  --eyebrow-letter-spacing: 0.12em;
  --label-font-size: 0.68rem;
  --label-small-font-size: 0.66rem;
  --author-card-mobile-label-font-size: 0.68rem;
  --table-label-font-size: 0.67rem;
  --label-font-weight: var(--body-strong-font-weight);
  --label-letter-spacing: 0.08em;
  --label-line-height: 1.5;

  /* Feedback quotes */
  --quote-font-family: var(--body-font-family);
  --quote-font-size: clamp(1.3rem, 2.6vw, 2.1rem);
  --quote-font-weight: var(--body-font-weight);
  --quote-line-height: 1.35;
  --quote-letter-spacing: -0.025em;
  --quote-text-align: left;

  /* Source/translation examples */
  --translation-font-family: var(--body-font-family);
  --translation-font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  --translation-font-weight: var(--body-font-weight);
  --translation-line-height: 1.5;
  --translation-letter-spacing: normal;

  /* Code */
  --code-font-family: "Site Fira Code", monospace;
  --code-font-size: 0.95rem;
  --code-line-height: 1.6;

  /* Layout and spacing */
  --layout-page-width: 1120px;
  --layout-reading-width: 760px;
  --layout-wide-width: 960px;
  --layout-page-padding: clamp(20px, 5vw, 56px);
  --layout-page-padding-mobile: 18px;
  --layout-intro-column: 1fr;
  --layout-feed-column: 1fr;
  --space-small: 16px;
  --space-medium: 24px;
  --space-large: 32px;
  --space-section: clamp(32px, 5vw, 56px);
  --space-component: clamp(36px, 5vw, 64px);

  /* Bridges for the upstream Terminal styles. Edit the explicit tokens above. */
  --font-size: var(--body-font-size);
  --line-height: calc(var(--body-line-height) * 1em);
  --radius: var(--border-radius);
}

/* The visitor's color preference changes the palette, not the typography. */
:root[data-color-scheme="dark"] {
  color-scheme: dark;
  --background: #1b1d1b;
  --foreground: #e9e6df;
  --paper: #232722;
  --ink-muted: #c3c6be;
  --accent: #91c99b;
  --accent-muted: #91c99b1a;
  --accent-strong: #9cd4a6;
  --line: #566153;
  --signal: #b6a7ff;
  --on-accent: #152519;
  --on-accent-muted: #243a28;
  --on-accent-line: #15251955;
  --background-grid: #ffffff03;
}

@media (max-width: 684px) {
  :root {
    --body-font-size: 1.125rem;
    --body-line-height: 1.65;
    --paragraph-align: left;
    --paragraph-space: 1.2em;
    --heading-font-weight: 600;
    --heading-letter-spacing: -0.015em;
    --heading-h1-font-size: 2rem;
    --heading-h1-font-weight: 700;
    --heading-h1-line-height: 1.18;
    --heading-h2-line-height: 1.2;
    --control-font-size: 1rem;
    --meta-font-size: 0.875rem;
    --caption-font-size: 0.875rem;
    --note-font-size: 1rem;
    --eyebrow-font-size: 0.875rem;
    --eyebrow-letter-spacing: 0.06em;
    --label-font-size: 0.875rem;
    --label-small-font-size: 0.875rem;
  }
}
