@layer reset, base, components, utilities;

/* Layers, not file names, decide precedence: Propshaft links every stylesheet
 * alphabetically, so file order is incidental. */

:root {
  /* Colors: the brand of ../landing/brand.md. Deep green is the main button and the logo's
   * symbol, nothing else; mint is the marker under an approved headline and the water under the
   * sail in the logo's symbol; pale mint sits behind a tick, a tag and the word "Passed"; red is
   * only the word "Failed" and its mark. */
  --color-ink: #1C1E1D;
  --color-ground: #FFFCF7; /* the page, the nav, and a card on a sand card */
  --color-surface: #F9F5EF; /* sand: a flat card, a note */
  --color-muted: #565B58;
  --color-hairline: #E7E0D5;
  --color-main-action: #22524C;
  --color-on-main-action: #FFFCF7;
  --color-accent: #8DDBD2;
  --color-accent-soft: #DCF4F1;
  --color-fail: #C73A2E;

  /* Only what floats over other content: a menu, the list of documents. */
  --shadow-raised: 0 1px 2px rgb(28 30 29 / 6%), 0 12px 32px rgb(28 30 29 / 8%);

  /* Corners: buttons, inputs and notes; cards; a photo tile is md too. */
  --rounded-sm: 6px;
  --rounded-md: 10px;
  --rounded-lg: 16px;
  --rounded-xl: 20px;
  --rounded-full: 9999px;

  /* Text: one family, Plus Jakarta Sans. Headlines at 800 and tight; a measurement takes
   * tabular figures (font-variant-numeric) after its font. */
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --text-h1: 800 40px/1.08 var(--font-sans);
  --text-h2: 800 32px/1.1 var(--font-sans);
  --text-h3: 700 19px/1.3 var(--font-sans);
  --text-title: 700 26px/1.2 var(--font-sans); /* a title under the page's h1, as the homepage's chapter titles */
  --text-lead: 400 18px/1.55 var(--font-sans);
  --text-body: 400 16px/1.6 var(--font-sans);
  --text-small: 400 15px/1.5 var(--font-sans);
  --text-caption: 400 14px/1.45 var(--font-sans);
  --text-label: 500 13px/1.4 var(--font-sans);
  --text-button: 600 15px/1.2 var(--font-sans);

  /* Layout: the content is 1160 px wide at most, with 24 px at the sides (20 px on a phone). */
  --page-width: 1160px;
  --page-gutter: 24px;

  /* Focus rings for keyboard navigation */
  --focus-ring-color: var(--color-ink);
  --focus-ring-offset: 3px;
  --focus-ring-size: 2px;

  @media (max-width: 880px) {
    --page-gutter: 20px;
  }

  /* Phone: the 390 artboard stacks everything below 760 px. */
  @media (max-width: 760px) {
    --text-h1: 800 30px/1.1 var(--font-sans);
    --text-h2: 800 26px/1.15 var(--font-sans);
    --text-title: 700 22px/1.25 var(--font-sans);
    --text-lead: 400 17px/1.55 var(--font-sans);
  }
}
