/* The design system "Aylin" (design/system/tokens.json) as custom properties:
   the system's own tokens under the system's own names, and nothing else. The
   only place in this repository where a literal colour, size, radius or shadow
   lives; `node design/check-tokens.mjs src` holds every other style to it.
   Generated from design/system/tokens.json; change that, then this and
   tokens.json together.

   THEME: `data-theme="amber|teal|vermilion"` on <html> (or any wrapper) sets
   the accent-* tokens; every neutral stays put. No attribute is amber, the
   default. Night sections are `.ay-dark` (design/system/components/bundle.css)
   and remap the semantic tokens themselves.

   TYPE STYLES have no name in the system's CSS, so they are named here as
   --type-<style>-size / -line / -weight / -tracking (tracking only where the
   system sets one); the -phone styles apply below the breakpoint. */
:root {
  /* colour: neutrals, status */
  --paper: #f7f3ec;
  --paper-raised: #fdfbf7;
  --paper-sunk: #efe9de;
  --paper-line: #dfd7ca;
  --paper-edge: #857c6e;
  --ink: #15140f;
  --ink-muted: #5e574b;
  --night: var(--ink);
  --night-raised: #221f19;
  --night-sunk: #0e0d0a;
  --night-line: #39352d;
  --night-edge: #7a7264;
  --night-text: var(--paper);
  --night-muted: #b1a898;
  --success: #2c6b3f;
  --danger: #b3261e;
  --success-night: #7cc48f;
  --danger-night: #f2937f;
  --surface: var(--paper);
  --surface-raised: var(--paper-raised);
  --surface-sunk: var(--paper-sunk);
  --text: var(--ink);
  --text-muted: var(--ink-muted);
  --line: var(--paper-line);
  --line-strong: var(--paper-edge);
  --mark: var(--ink);
  --positive: var(--success);
  --negative: var(--danger);
  --backdrop: rgba(21,20,15,0.2);

  /* type: families */
  --font-heading: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading-instrument: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body-instrument: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading-fraunces: Fraunces, "Iowan Old Style", Georgia, serif;
  --font-body-figtree: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading-newsreader: Newsreader, "Iowan Old Style", Georgia, serif;
  --font-body-inter: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* type: styles */
  --type-display-size: 76px;
  --type-display-line: 80px;
  --type-display-weight: 400;
  --type-display-tracking: -0.01em;
  --type-title-size: 52px;
  --type-title-line: 58px;
  --type-title-weight: 400;
  --type-title-tracking: -0.005em;
  --type-heading-size: 34px;
  --type-heading-line: 42px;
  --type-heading-weight: 400;
  --type-subhead-size: 24px;
  --type-subhead-line: 32px;
  --type-subhead-weight: 400;
  --type-figure-size: 64px;
  --type-figure-line: 64px;
  --type-figure-weight: 400;
  --type-figure-tracking: -0.01em;
  --type-display-phone-size: 46px;
  --type-display-phone-line: 50px;
  --type-display-phone-weight: 400;
  --type-display-phone-tracking: -0.01em;
  --type-title-phone-size: 36px;
  --type-title-phone-line: 42px;
  --type-title-phone-weight: 400;
  --type-heading-phone-size: 28px;
  --type-heading-phone-line: 34px;
  --type-heading-phone-weight: 400;
  --type-figure-phone-size: 48px;
  --type-figure-phone-line: 52px;
  --type-figure-phone-weight: 400;
  --type-lead-size: 21px;
  --type-lead-line: 32px;
  --type-lead-weight: 400;
  --type-lead-phone-size: 19px;
  --type-lead-phone-line: 29px;
  --type-lead-phone-weight: 400;
  --type-body-size: 18px;
  --type-body-line: 29px;
  --type-body-weight: 400;
  --type-body-phone-size: 17px;
  --type-body-phone-line: 27px;
  --type-body-phone-weight: 400;
  --type-label-size: 16px;
  --type-label-line: 20px;
  --type-label-weight: 500;
  --type-kicker-size: 15px;
  --type-kicker-line: 20px;
  --type-kicker-weight: 600;
  --type-kicker-tracking: 0.01em;
  --type-status-size: 15px;
  --type-status-line: 22px;
  --type-status-weight: 500;
  --type-caption-size: 14px;
  --type-caption-line: 21px;
  --type-caption-weight: 400;

  /* spacing, radius, shadow, layout */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 144px;
  --radius-none: 0px;
  --radius-xs: 2px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;
  --shadow-frame: 0 1px 2px rgba(21,20,15,0.06), 0 24px 48px -28px rgba(21,20,15,0.35);
  --measure: 33em;
  --container: 1200px;
  --gutter-phone: 20px;
  --gutter-desktop: 48px;
  --breakpoint: 760px;
  --tap-target: 48px;

  /* icons, switches, focus */
  --icon-size: 20px;
  --icon-size-lg: 28px;
  --switch-width: 44px;
  --switch-height: 24px;
  --switch-knob: 18px;
  --switch-inset: 2px;
  --focus-width: 2px;
  --focus-offset: 2px;
}

/* THE THEMES (design/variants.json): the accent-* tokens of each accent theme,
   and the semantic tokens that resolve through them, so a wrapper with its own
   data-theme re-resolves them. */
:root,
[data-theme="amber"] {
  --accent: #e6a23c;
  --accent-fill: #e6a23c;
  --on-accent-fill: #15140f;
  --accent-ink: #875811;
  --accent-soft: #f4e1bc;
  --accent-night: #e6a23c;
  --on-accent-night: #15140f;
  --accent-soft-night: #3b2d15;
}
:root,
[data-theme] {
  --action: var(--accent-fill);
  --on-action: var(--on-accent-fill);
  --highlight: var(--accent-ink);
  --highlight-soft: var(--accent-soft);
  --focus-ring: var(--accent-ink);
}
[data-theme="teal"] {
  --accent: #0f5e66;
  --accent-fill: #0f5e66;
  --on-accent-fill: #f7f3ec;
  --accent-ink: #0f5e66;
  --accent-soft: #d9e7e3;
  --accent-night: #5fb3ba;
  --on-accent-night: #15140f;
  --accent-soft-night: #133a3e;
}
[data-theme="vermilion"] {
  --accent: #e04a2f;
  --accent-fill: #e04a2f;
  --on-accent-fill: #15140f;
  --accent-ink: #b8301c;
  --accent-soft: #f8dcd3;
  --accent-night: #ee6448;
  --on-accent-night: #15140f;
  --accent-soft-night: #3a1c16;
}
