/* Winch design tokens: the only stylesheet with raw colours and curves (game palettes excepted, as --game-*
   on each specimen root). */
:root {
  /* Shared reading and paper components for C1 and the deferred Writing release. */
  --lh-read: 1.65;
  --accepted-stroke: 2.5;
  /* Colour, 23 tokens */
  --chalk: #F5F3ED;
  --card: #FBFAF8;
  --sunken: #EDEBE5;
  --line: #D5D4CE;
  --line-strong: #C7C7C1;
  --ink: #252C25;
  --ink-2: #535851;
  --ink-3: #666B64;
  --ink-4: #7B7F78;
  --instrument: #1C211C;
  --instrument-raised: #2F362F;
  --on-dark-2: #ADAEA8;
  --on-dark-3: #969792;
  --rust: #B2472C;
  --rust-ink: #8F3721;
  --rust-light: #CD816C;
  --slate: #4E6474;
  --slate-light: #96A2A9;
  --sage: #D7DDD2;
  --pass: #44704B;
  --pass-dark: #9FC79F;
  --open: #8A5E17;
  --open-dark: #E2B86B;

  /* Roles (aliases of the 23, no new colours) */
  --fix: var(--rust-ink);
  --fix-dark: var(--rust-light);
  --focus: var(--rust);
  --focus-on-dark: var(--chalk);
  --dark-line: rgb(245 243 237 / .10);
  --dark-line-hover: rgb(245 243 237 / .18);
  --dark-line-active: rgb(245 243 237 / .28);

  /* Families */
  --font-display: "Archivo", "Archivo fallback", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Instrument Sans fallback", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Winch Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --font-game: "Fredoka", "Instrument Sans", "Instrument Sans fallback", Arial, sans-serif;

  /* Type roles. Sizes interpolate 390 to 1440 px and hold their maximum beyond. */
  --t-display: clamp(2.5rem, 1.757rem + 3.048vw, 4.5rem);
  --t-h1: clamp(2.25rem, 1.693rem + 2.286vw, 3.75rem);
  --t-h2: clamp(1.875rem, 1.55rem + 1.333vw, 2.75rem);
  --t-h3: clamp(1.25rem, 1.157rem + 0.381vw, 1.5rem);
  --t-lead: clamp(1.125rem, 1.079rem + 0.1905vw, 1.25rem);
  --t-body: clamp(1rem, 0.9768rem + 0.09524vw, 1.0625rem);
  --t-small: clamp(0.875rem, 0.8518rem + 0.09524vw, 0.9375rem);
  --t-meta: 0.8125rem;
  --t-paper-title: 1.1875rem; /* paper brief titles: the flagship brief, the close and the pipeline stations */
  --t-button: 0.9375rem;
  --t-mono: 0.8125rem;

  --lh-display: 1.02;
  --lh-h1: 1.04;
  --lh-h2: 1.08;
  --lh-h3: 1.2;
  --lh-lead: 1.5;
  --lh-body: 1.6;
  --lh-small: 1.5;
  --lh-meta: 1.4;
  --lh-mono: 1.45;

  --tr-display: -0.03em;
  --tr-h1: -0.028em;
  --tr-h2: -0.022em;
  --tr-h3: -0.012em;
  --tr-lead: -0.005em;
  --tr-meta: 0.005em;

  --wght-display: 560;
  --wdth-display: 92%;
  --wght-heading: 560;
  --wdth-heading: 94%;
  --wght-h3: 620;
  --wdth-h3: 100%;

  /* Space, base 4 */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-section: clamp(4rem, 2.514rem + 6.095vw, 8rem);
  --s-section-half: calc(var(--s-section) / 2);
  --s-head: clamp(2rem, 1.443rem + 2.286vw, 3.5rem);

  /* Layout */
  --container: 1200px;
  --stage-max: var(--container);
  --gutter: clamp(1.25rem, 0.7857rem + 1.905vw, 2.5rem);
  --frame-gutter: var(--gutter); /* the frame line: 56 px from 1240 px */
  --grid-gap: clamp(1rem, 0.8143rem + 0.7619vw, 1.5rem);
  --stage-inset: clamp(0.75rem, 0.4714rem + 1.143vw, 1.5rem);
  --measure: 62ch;
  --measure-long: 640px;
  --header-h: 64px;

  /* Radii. Inner radius = outer minus inset, never under --r-xs. */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-round: 999px;

  /* Shadows, light surfaces only */
  --sh-1: 0 1px 0 rgb(37 44 37 / .04), 0 1px 2px rgb(37 44 37 / .06);
  --sh-2: 0 2px 6px rgb(37 44 37 / .06), 0 16px 40px -16px rgb(37 44 37 / .24);
  --sh-3: 0 32px 80px -32px rgb(16 20 16 / .45);
  --sh-dark: inset 0 1px 0 rgb(245 243 237 / .06);

  /* Motion: durations */
  --d-tap: 120ms;
  --d-quick: 180ms;
  --d-roll: 320ms;
  --d-move: 480ms;
  --d-enter: 720ms;
  --d-scene: 1100ms;
  --d-beat: 1000ms;
  --d-hold: 2400ms;

  /* Motion: easings (GSAP equivalents in motion.js: Winch.eases) */
  --e-glide: cubic-bezier(.25, .46, .45, .94);
  --e-rise: cubic-bezier(.215, .61, .355, 1);
  --e-settle: cubic-bezier(.22, 1, .36, 1);
  --e-haul: cubic-bezier(.76, 0, .24, 1);
  --e-roll: cubic-bezier(.45, 0, .55, 1);
  --e-latch: cubic-bezier(.3, 1.35, .5, 1);
}

@media (max-width: 767px) {
  :root { --header-h: 56px; --stage-inset: 12px; }
}
@media (min-width: 1240px) {
  :root { --frame-gutter: max(var(--gutter), 56px); }
}
