/*
 * Steward token layer (owner ruling 2026-11-09: "I like the Steward website style").
 *
 * Steward is the visual style of the consumer surfaces only: the public site, the signed-in family app and the family
 * sign-in pages. It is a STANDALONE stylesheet, served at assets/steward/tokens.css and loaded by those surfaces
 * themselves (src/steward/steward.ts loadStewardStyles). It is not in stylesheets.json, so the staff styles.css is not
 * changed by a byte. Every token is a custom property named --st-*, declared on the one root class `.steward`, so no
 * staff screen could read one even if both sheets were loaded: a staff page never carries that class.
 *
 * This is the only Steward file that may state a colour (tests/steward-foundation.test.ts), and every var() a Steward
 * sheet reads is declared here.
 *
 * Contrast (WCAG 2.2 AA), measured on the stone page, the tray and a white card: ink 13.3:1 or more, ink-2 6.9:1 or
 * more, muted 4.9:1 or more, evergreen text 8.5:1 or more, clay text 6.1:1 on its own tint, white on evergreen 10:1,
 * and the control outline 3.2:1 or more (SC 1.4.11).
 *
 * Steward is light only, by design: the page states `color-scheme: light` so a dark device keeps the calm stone page.
 */

/* Inter, self-hosted: the application's own face (public/fonts/InterVariable.woff2, OFL.txt beside it). No other origin. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/InterVariable.woff2") format("woff2");
}

.steward {
  color-scheme: light;

  /* Neutrals: warm stone. */
  --st-stone: #F7F5F0;
  --st-stone-2: #EFECE4;
  --st-surface: #FFFFFF;
  --st-ink: #1B2521;
  --st-ink-2: #46524C;
  --st-muted: #5E6862;
  --st-line: #E4E0D6;
  --st-line-2: #CFC9BC;
  --st-control-line: #7D857F;
  --st-neutral-bg: #F1EEE7;
  --st-neutral-ink: #4D5852;
  --st-track: #EBE7DE;

  /* Evergreen: the one signature. Buttons, links, progress, "done", the focus ring. */
  --st-evergreen: #174A3E;
  --st-evergreen-2: #3D6B5F;
  --st-evergreen-tint: #E5EEEA;
  --st-on-evergreen: #FFFFFF;
  --st-on-evergreen-2: #D1DBD8;

  /* Clay: ONLY "missing" and "Sponsored". */
  --st-clay: #A86A45;
  --st-clay-ink: #7F4A2A;
  --st-clay-bg: #F6EBE2;
  --st-clay-line: #E2C6B1;

  --st-focus: #174A3E;
  --st-shadow-1: 0 1px 2px rgb(20 30 28 / 8%);
  --st-shadow-2: 0 1px 2px rgb(20 30 28 / 4%), 0 12px 32px -12px rgb(20 30 28 / 14%);

  /* Type: Inter for everything (the application's own self-hosted face, public/fonts/InterVariable.woff2). */
  --st-font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --st-text-label: 0.8125rem;
  --st-text-small: 0.9375rem;
  --st-text-body: 1.0625rem;
  --st-text-lede: 1.1875rem;
  --st-text-h3: 1.25rem;
  --st-text-h2: 1.75rem;
  --st-text-h1: 2.5rem;
  --st-text-display: 2.75rem;
  --st-weight-display: 620;
  --st-weight-strong: 650;
  --st-track-display: -0.038em;
  --st-track-heading: -0.03em;
  --st-leading: 1.55;

  /* Space: a 4px base. The gutter is 16px on a phone and grows with the window. */
  --st-space-1: 0.25rem;
  --st-space-2: 0.5rem;
  --st-space-3: 0.75rem;
  --st-space-4: 1rem;
  --st-space-5: 1.5rem;
  --st-space-6: 2rem;
  --st-space-7: 3rem;
  --st-space-8: 4rem;
  --st-gutter: 1rem;
  --st-section: 4.5rem;

  /* Shape and controls. A control is never shorter than 44px (SC 2.5.8 asks 24px; older hands need more). */
  --st-radius: 16px;
  --st-radius-lg: 24px;
  --st-radius-control: 12px;
  --st-radius-pill: 999px;
  --st-control: 3.125rem;
  --st-control-large: 3.75rem;
  --st-control-small: 2.75rem;
  --st-measure: 38em;

  /* Progress geometry. The bar's value is set per element by script (src/steward/steward.ts). */
  --st-ring-size: 132px;
  --st-bar-value: 0%;
}

@media (min-width: 761px) {
  .steward {
    --st-text-body: 1.125rem;
    --st-text-lede: clamp(1.1875rem, 1.25vw, 1.5rem);
    --st-text-h3: 1.3125rem;
    --st-text-h2: clamp(2rem, 2.6vw, 3rem);
    --st-text-h1: clamp(2.75rem, 3.6vw, 4.5rem);
    --st-text-display: clamp(3.25rem, 5.4vw, 6.75rem);
    --st-gutter: clamp(1.5rem, 5vw, 6rem);
    --st-section: clamp(5rem, 8vw, 8.75rem);
  }
}
