/* Shape, type, spacing, depth and motion tokens. Colours live in
   color-schemes.css and font families in typography.css. Every value below was
   read off the stylesheets as they were written; two values that differ by a
   pixel or a hundredth of a rem are kept as two tokens so a restyle can decide
   whether to merge them. Loaded by index.html and by the Worker's crawlable
   pages, so the app and those pages draw from the same numbers. */
:root {
  /* Radii: pills, controls and tiles, cards and popovers, panels and dialogs. */
  --radius-pill: 999px;
  --radius-circle: 50%;
  --radius-panel: 20px;
  --radius-18: 18px;
  --radius-16: 16px;
  --radius-card: 14px;
  --radius-12: 12px;
  --radius-control: 11px;
  --radius-tile: 10px;
  --radius-9: 9px;
  --radius-sm: 8px;
  --radius-7: 7px;
  --radius-xs: 4px;

  /* Border widths: the hairline for surfaces and dividers, the full pixel for
     the boundary of a control. */
  --border-width-hairline: 0.5px;
  --border-width-default: 1px;
  --border-width-strong: 1.5px;

  /* Spacing steps used by padding, margin and gap (px in the comment). */
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-7: 14px;
  --space-8: 16px;
  --space-9: 20px;
  --space-10: 24px;

  /* Control heights: buttons, large tiles, touch targets and in-bar fields. */
  --control-height-xl: 50px;
  --control-height-lg: 48px;
  --control-height-md: 44px;
  --control-height-field: 34px;

  /* Type scale, named for the rem value times 100 (81 is 0.8125rem, 87 is
     0.875rem). */
  --text-65: 0.65rem;
  --text-68: 0.68rem;
  --text-70: 0.7rem;
  --text-72: 0.72rem;
  --text-74: 0.74rem;
  --text-75: 0.75rem;
  --text-78: 0.78rem;
  --text-80: 0.8rem;
  --text-81: 0.8125rem;
  --text-82: 0.82rem;
  --text-85: 0.85rem;
  --text-87: 0.875rem;
  --text-88: 0.88rem;
  --text-90: 0.9rem;
  --text-92: 0.92rem;
  --text-95: 0.95rem;
  --text-100: 1rem;
  --text-110: 1.1rem;
  --text-125: 1.25rem;
  --text-135: 1.35rem;
  --text-150: 1.5rem;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-650: 650;
  --weight-bold: 700;
  --weight-750: 750;
  --weight-extrabold: 800;
  --weight-850: 850;

  --leading-none: 1;
  --leading-tight: 1.2;
  --leading-130: 1.3;
  --leading-135: 1.35;
  --leading-140: 1.4;
  --leading-base: 1.5;

  /* Elevation. Shadow colour is the palette's --color-shadow-rgb. */
  --shadow-panel: 0 4px 16px rgb(var(--color-shadow-rgb) / 4%);
  --shadow-chip: 0 3px 9px rgb(var(--color-shadow-rgb) / 8%);
  --shadow-thumb: 0 1px 3px rgb(var(--color-shadow-rgb) / 20%);
  --shadow-tab: 0 2px 8px rgb(var(--color-shadow-rgb) / 10%);
  --shadow-search-bar:
    0 12px 30px rgb(var(--color-shadow-rgb) / 10%),
    0 2px 6px rgb(var(--color-shadow-rgb) / 5%);
  --shadow-card: 0 12px 32px rgb(var(--color-shadow-rgb) / 7%);
  --shadow-card-hover: 0 16px 40px rgb(var(--color-shadow-rgb) / 11%);
  --shadow-banner: 0 12px 36px rgb(var(--color-shadow-rgb) / 12%);
  --shadow-popover: 0 18px 45px rgb(var(--color-shadow-rgb) / 18%);
  --shadow-dialog: 0 24px 70px rgb(var(--color-shadow-rgb) / 24%);
  --shadow-button: 0 8px 18px rgb(var(--color-shadow-rgb) / 20%);
  --shadow-button-hover: 0 10px 22px rgb(var(--color-shadow-rgb) / 25%);
  --shadow-link-button: 0 8px 18px rgb(var(--color-shadow-rgb) / 18%);
  --shadow-selected-edge: inset 0 0 0 1px var(--color-primary);
  --shadow-selected-ring: 0 0 0 2px rgb(var(--color-primary-rgb) / 10%);
  /* The accent line under a focused field; the ring below is what meets 2.4.7. */
  --shadow-field-focus: inset 0 -2px 0
    color-mix(in srgb, var(--color-card-stripe, var(--color-accent)) 60%, transparent);

  /* Keyboard focus: the same ring on every control. */
  --focus-ring: 3px solid var(--color-primary);
  --focus-ring-thin: 2px solid var(--color-primary);
  --focus-ring-offset: 3px;
  --focus-ring-offset-tight: 2px;

  /* Motion. */
  --duration-fast: 160ms;
  --duration-base: 180ms;
  --ease-standard: ease;
}

