/*
 * Hyrer design tokens.
 *
 * The single source for colour, type, shape, depth and motion. Linked first on every Hyrer page (the app,
 * sign-in, staff console, setup, signing and print pages). Every other stylesheet reads these values and
 * none of them redefines one. docs/design-system.md explains how the tokens are meant to be used.
 *
 * Type      12 small print · 13 supporting text and tables · 14 body · 16 card titles · 20 section titles
 *           and figures · 22 dialog titles · 28 headline figures · 30 page titles. Cal Sans for titles and
 *           headline figures, Hyrer Sans for everything else. Secondary text is ink-2, tertiary is subtle.
 * Space     A 4px grid: 4, 8, 12, 16, 20, 24, 32, 40. Cards pad 20, pages 32, card gaps 16, sections 24.
 * Shape     6 tags and counts · 10 controls · 12 wells inside a card · 16 cards and panels · 20 dialogs.
 *           Fully round is for avatars, switches and dots only.
 * Controls  Buttons are 32 or 36 tall, fields 40. Button labels are semibold.
 * Depth     Four levels: card (on the page), raise (pointed at or stuck), float (menus and popovers),
 *           sheet (dialogs and drawers). Each carries its own hairline, so cards need no border.
 * Colour    One neutral ramp with a slight violet lean, and one accent. Violet marks the primary action,
 *           where you are, what is switched on, and focus. Status colours carry meaning only.
 * Motion    One standard curve and one arriving curve; 120ms feedback, 200ms overlays, 280ms pages.
 *           Only transform and opacity move.
 */

/* Shared workspace materials. Only the two review screens adopt them until the design is approved. */
[data-design-review] {
  --workspace-page-rgb: 245 245 244;
  --workspace-surface: #fff;
  --workspace-band: #eae8f0;
  --workspace-ink: #282632;
  --workspace-secondary: #595763;
  --workspace-series: #534578;
  --workspace-lift: 0 2px 5px rgb(33 31 53 / .06);
  --workspace-frame: #211f35;
  --workspace-radius: 12px;
}
[data-theme="dark"] [data-design-review] {
  --workspace-page-rgb: 32 32 36;
  --workspace-surface: #2d2c31;
  --workspace-band: #35323e;
  --workspace-ink: #f4f2f5;
  --workspace-secondary: #c3bfc9;
  --workspace-series: #c5b3ea;
  --workspace-lift: 0 2px 5px rgb(0 0 0 / .16);
}

/* Hyrer Sans for everything you read (SIL Open Font License, see /fonts/hyrer-sans/OFL.txt). Its figures are
   equal width when asked (tabular-nums), so money and hours line up; in these web copies that only changes
   the digits, not hyphens, colons or brackets. Each weight is split in two: the
   extended letters only download when a page shows a name that needs them. */
@font-face { font-family: "Hyrer Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/hyrer-sans/HyrerSans-Regular.woff2?v=2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+2713-2715, U+25CF, U+FEFF, U+FFFD; }
@font-face { font-family: "Hyrer Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/hyrer-sans/HyrerSans-Regular-ext.woff2?v=2") format("woff2"); unicode-range: U+0100-0130, U+0132-0151, U+0154-024F, U+0259, U+02B0-02BA, U+02BD-02C5, U+02C7-02D9, U+02DB, U+02DD-02FF, U+0300-0303, U+0305-0307, U+0309-0328, U+032A-036F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2100-2121, U+2123-214F, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hyrer Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/hyrer-sans/HyrerSans-Medium.woff2?v=2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+2713-2715, U+25CF, U+FEFF, U+FFFD; }
@font-face { font-family: "Hyrer Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/hyrer-sans/HyrerSans-Medium-ext.woff2?v=2") format("woff2"); unicode-range: U+0100-0130, U+0132-0151, U+0154-024F, U+0259, U+02B0-02BA, U+02BD-02C5, U+02C7-02D9, U+02DB, U+02DD-02FF, U+0300-0303, U+0305-0307, U+0309-0328, U+032A-036F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2100-2121, U+2123-214F, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hyrer Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/hyrer-sans/HyrerSans-Semibold.woff2?v=2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+2713-2715, U+25CF, U+FEFF, U+FFFD; }
@font-face { font-family: "Hyrer Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/hyrer-sans/HyrerSans-Semibold-ext.woff2?v=2") format("woff2"); unicode-range: U+0100-0130, U+0132-0151, U+0154-024F, U+0259, U+02B0-02BA, U+02BD-02C5, U+02C7-02D9, U+02DB, U+02DD-02FF, U+0300-0303, U+0305-0307, U+0309-0328, U+032A-036F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2100-2121, U+2123-214F, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hyrer Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/hyrer-sans/HyrerSans-Bold.woff2?v=2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+2713-2715, U+25CF, U+FEFF, U+FFFD; }
@font-face { font-family: "Hyrer Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/hyrer-sans/HyrerSans-Bold-ext.woff2?v=2") format("woff2"); unicode-range: U+0100-0130, U+0132-0151, U+0154-024F, U+0259, U+02B0-02BA, U+02BD-02C5, U+02C7-02D9, U+02DB, U+02DD-02FF, U+0300-0303, U+0305-0307, U+0309-0328, U+032A-036F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2100-2121, U+2123-214F, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hyrer Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/hyrer-sans/HyrerSans-Italic.woff2?v=2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+2713-2715, U+25CF, U+FEFF, U+FFFD; }

/* Cal Sans for page titles and record names only (SIL Open Font License, see /fonts/cal-sans/OFL.txt).
   One weight. Titles are set slightly tight (JP preferred this to open spacing, Oct 2026). */
@font-face { font-family: "Cal Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/cal-sans/CalSans-Regular.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+2713-2715, U+25CF, U+FEFF, U+FFFD; }
@font-face { font-family: "Cal Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/cal-sans/CalSans-Regular-ext.woff2") format("woff2"); unicode-range: U+0100-0130, U+0132-0151, U+0154-024F, U+0259, U+02B0-02BA, U+02BD-02C5, U+02C7-02D9, U+02DB, U+02DD-02FF, U+0300-0303, U+0305-0307, U+0309-0328, U+032A-036F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2100-2121, U+2123-214F, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Type */
  --h-font: "Hyrer Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --h-font-display: "Cal Sans", var(--h-font);   /* titles, record names and headline figures; one weight */
  --h-weight-display: 400;
  --h-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --h-fs-12: 12px;                /* small print, column names */
  --h-fs-12-5: 12.5px;            /* status pills */
  --h-fs-13: 13px;                /* supporting text, tables */
  --h-fs-14: 14px;                /* body */
  --h-fs-16: 16px;                /* card titles */
  --h-fs-20: 20px;                /* section titles, figures */
  --h-fs-28: 28px;                /* headline figures */
  --h-fs-title: 30px;             /* page titles and record names */
  --h-fs-dialog: 22px;            /* dialog titles */
  --h-track-title: -0.012em;      /* display type is set slightly tight: any tighter and Cal Sans letters touch */
  --h-track-figure: 0;

  /* Shape */
  --h-r-tag: 6px;                 /* counts, statuses and tags */
  --h-r-sm: 8px;                  /* menu rows, chips and small controls */
  --h-r-ctl: 10px;                /* buttons, fields and anything pressed */
  --h-r-inset: 12px;              /* wells and notices inside a card */
  --h-r-panel: 16px;              /* cards and panels */
  --h-r-overlay: 20px;            /* dialogs, drawers and popovers */
  --h-r-sheet: 20px;
  --h-r-round: 999px;             /* avatars, switches and dots only */

  /* Controls */
  --h-ctl-sm: 32px;
  --h-ctl-md: 36px;
  --h-weight-control: 600;
  --h-track: rgb(var(--h-ink-rgb) / .045);       /* the trough behind a segmented control */

  /* Depth. Every level carries its own hairline, so a surface needs no border of its own. */
  --h-shadow-press: 0 1px 1px rgb(22 21 42 / .05);
  --h-shadow-card: 0 0 0 1px rgb(46 38 110 / .05), 0 1px 2px rgb(22 21 42 / .04), 0 10px 24px -14px rgb(46 38 110 / .16);
  --h-shadow-raise: 0 0 0 1px rgb(46 38 110 / .06), 0 2px 4px rgb(22 21 42 / .04), 0 16px 32px -14px rgb(46 38 110 / .24);
  --h-shadow-lift: 0 0 0 1px rgb(22 21 42 / .06), 0 8px 24px -8px rgb(22 21 42 / .16);
  --h-shadow-float: 0 0 0 1px rgb(22 21 42 / .07), 0 16px 40px -12px rgb(22 21 42 / .22);
  --h-shadow-sheet: 0 0 0 1px rgb(22 21 42 / .07), 0 24px 64px -16px rgb(22 21 42 / .28);
  --h-shadow-primary: 0 1px 2px rgb(22 21 42 / .18);
  --h-shadow-thumb: 0 1px 2px rgb(22 21 42 / .14), 0 0 0 .5px rgb(22 21 42 / .06);
  --h-edge: inset 0 1px 0 rgb(255 255 255 / .16);
  --h-key: 0 0 0 1px rgb(22 21 42 / .07), 0 1px 2px rgb(22 21 42 / .06);    /* the chosen option in a segmented control */
  --h-plate: inset 0 0 0 1px var(--h-line), 0 1px 0 rgb(var(--h-line-strong-rgb) / .55);   /* the square an icon sits on */
  --h-plate-face: var(--h-panel);

  /* Motion. Only transform and opacity are animated. */
  --h-ease: cubic-bezier(.2, 0, 0, 1);            /* standard: hover, press, colour */
  --h-quick: 120ms;
  --h-move: cubic-bezier(.16, 1, .3, 1);          /* arriving and travelling: pages, highlights, overlays */
  --h-move-time: 280ms;
  --h-spring: cubic-bezier(.34, 1.4, .64, 1);   /* follow-through: lands a touch past and settles */
  --h-overlay-enter: 200ms;
  --h-overlay-leave: 140ms;
  --h-overlay-ease: cubic-bezier(.16, 1, .3, 1);
  --h-header-glow-radius: 88px;
  --h-header-glow-strength: 14%;
  --h-scrim: rgb(22 21 42 / .32);
  /* The light along the top of the page: violet from the left, a cooler blue from the right. */
  /* Ink surfaces: the lead figure in a strip and other dark panels. Violet light rises from one corner. */
  --h-ink-surface: radial-gradient(120% 150% at 100% 115%, rgb(104 84 228 / .62), transparent 60%), rgb(var(--h-rail-rgb));
  --h-page-wash: radial-gradient(62% 300px at 16% 0, rgb(var(--h-accent-rgb) / .10), transparent 72%), radial-gradient(48% 260px at 92% 0, rgb(86 132 255 / .09), transparent 72%);

  /* Colour, as RGB triplets so both rgb() and rgb(... / alpha) work. The neutrals lean slightly towards
     Hyrer violet so the brand is in the page itself and not only in its buttons. */
  --h-night-rgb: 31 31 54;        /* dark surfaces: overlays, the staff console */
  --h-rail-rgb: 19 17 40;         /* the module rail */
  --h-ink-rgb: 22 21 42;          /* headings and main text */
  --h-ink-2-rgb: 72 72 94;        /* secondary text */
  --h-subtle-rgb: 106 107 128;    /* tertiary text and placeholders; 5:1 on the page */
  --h-canvas-rgb: 244 244 249;    /* the section menu and anything set behind the page */
  --h-paper-rgb: 246 245 251;     /* the page: white with a breath of lavender, so cards stand off it */
  --h-panel-rgb: 255 255 255;     /* cards, tables, records, forms */
  --h-panel-2-rgb: 248 248 251;   /* a quiet surface inside a card */
  --h-line-rgb: 233 233 241;      /* hairlines */
  --h-line-strong-rgb: 212 212 225;   /* field and button edges */
  --h-hover-rgb: 243 243 249;
  --h-selected-rgb: 236 235 247;  /* neutral selection: view switches, held items */
  --h-tint-rgb: 240 238 252;      /* lavender: where you are, what is on */
  --h-tint-strong-rgb: 229 225 250;
  --h-nav-wash-rgb: 243 241 252;  /* column bands: the faintest lavender */
  --h-wash-rgb: 246 245 252;      /* neutral notices inside a card */
  --h-row-stripe: #f8f8fb;
  --h-accent-rgb: 82 65 196;      /* Hyrer violet */
  --h-accent-hover-rgb: 67 52 174;
  --h-on-accent-rgb: 255 255 255;
  --h-money-rgb: 30 122 76;       /* fees, margin, placed */
  --h-money-soft-rgb: 234 245 238;
  --h-warn-rgb: 138 90 14;
  --h-warn-soft-rgb: 251 243 228;
  --h-danger-rgb: 176 66 52;
  --h-danger-soft-rgb: 253 238 236;
  --h-info-rgb: 53 104 159;
  --h-info-soft-rgb: 234 241 248;

  --h-night: rgb(var(--h-night-rgb));
  --h-canvas: rgb(var(--h-canvas-rgb));
  --h-ink: rgb(var(--h-ink-rgb));
  --h-ink-2: rgb(var(--h-ink-2-rgb));
  --h-subtle: rgb(var(--h-subtle-rgb));
  --h-paper: rgb(var(--h-paper-rgb));
  --h-panel: rgb(var(--h-panel-rgb));
  --h-panel-2: rgb(var(--h-panel-2-rgb));
  --h-line: rgb(var(--h-line-rgb));
  --h-line-strong: rgb(var(--h-line-strong-rgb));
  --h-hover: rgb(var(--h-hover-rgb));
  --h-selected: rgb(var(--h-selected-rgb));
  --h-tint: rgb(var(--h-tint-rgb));
  --h-nav-wash: rgb(var(--h-nav-wash-rgb));
  --h-wash: rgb(var(--h-wash-rgb));
  --h-nav-edge: rgb(var(--h-accent-rgb) / .1);
  --h-tint-strong: rgb(var(--h-tint-strong-rgb));
  --h-accent: rgb(var(--h-accent-rgb));
  --h-accent-hover: rgb(var(--h-accent-hover-rgb));
  --h-on-accent: rgb(var(--h-on-accent-rgb));
  /* One focus ring everywhere: a 2px outline in full-strength violet, 2px off the control. Fields mark focus with
     their violet edge and the soft halo instead, never with both. */
  --h-focus: rgb(var(--h-accent-rgb));
  --h-focus-halo: rgb(var(--h-accent-rgb) / .16);
  /* The face of menus and popovers: white in light; in dark one step above the card so a menu stands off the page. */
  --h-float-face: var(--h-panel);
  /* Create in the top bar: a key on ink in light; in dark an ink key one step lighter than the page with a light
     ring, never a white pill. */
  --h-create-face: rgb(var(--h-ink-rgb));
  --h-create-hover: rgb(var(--h-ink-rgb) / .86);
  --h-create-text: var(--h-paper);
  --h-create-edge: var(--h-edge), 0 1px 2px rgb(22 21 42 / .22);
  /* The lit tile of the current section in the rail: Hyrer violet in both themes, so white sits on it. */
  --h-tile: rgb(82 65 196);
  --h-money: rgb(var(--h-money-rgb));
  --h-money-soft: rgb(var(--h-money-soft-rgb));
  --h-warn: rgb(var(--h-warn-rgb));
  --h-warn-soft: rgb(var(--h-warn-soft-rgb));
  --h-danger: rgb(var(--h-danger-rgb));
  --h-danger-soft: rgb(var(--h-danger-soft-rgb));
  --h-info: rgb(var(--h-info-rgb));
  --h-info-soft: rgb(var(--h-info-soft-rgb));
}

:root[data-theme="dark"] {
  --h-scrim: rgb(0 0 0 / .58);
  --h-ink-surface: radial-gradient(120% 150% at 100% 115%, rgb(104 84 228 / .5), transparent 60%), rgb(36 33 70);
  --h-page-wash: radial-gradient(62% 300px at 16% 0, rgb(var(--h-accent-rgb) / .07), transparent 72%), radial-gradient(48% 260px at 92% 0, rgb(86 132 255 / .05), transparent 72%);
  --h-night-rgb: 14 15 26;
  --h-rail-rgb: 11 11 20;
  --h-canvas-rgb: 10 11 19;
  --h-ink-rgb: 236 237 243;
  --h-ink-2-rgb: 190 193 209;
  --h-subtle-rgb: 156 159 178;
  --h-paper-rgb: 16 17 27;
  --h-panel-rgb: 23 24 37;
  --h-panel-2-rgb: 28 29 44;
  --h-line-rgb: 42 44 62;
  --h-line-strong-rgb: 62 65 86;
  --h-hover-rgb: 33 35 52;
  --h-selected-rgb: 44 46 66;
  --h-tint-rgb: 43 41 72;
  --h-tint-strong-rgb: 55 51 94;
  --h-nav-wash-rgb: 30 30 50;
  --h-wash-rgb: 32 31 52;
  --h-row-stripe: #1d1d2d;
  --h-accent-rgb: 169 156 255;
  --h-accent-hover-rgb: 186 175 255;
  --h-on-accent-rgb: 23 20 46;
  --h-money-rgb: 111 207 151;
  --h-money-soft-rgb: 26 48 38;
  --h-warn-rgb: 227 184 102;
  --h-warn-soft-rgb: 52 42 22;
  --h-danger-rgb: 240 150 138;
  --h-danger-soft-rgb: 56 30 30;
  --h-info-rgb: 143 184 232;
  --h-info-soft-rgb: 26 38 56;
  --h-shadow-float: 0 18px 44px -14px rgb(0 0 0 / .6), 0 0 0 1px rgb(var(--h-line-strong-rgb));
  --h-float-face: rgb(32 33 51);
  --h-create-face: var(--h-panel);
  --h-create-hover: var(--h-selected);
  --h-create-text: var(--h-ink);
  --h-create-edge: inset 0 0 0 1px var(--h-line-strong), 0 1px 2px rgb(0 0 0 / .4);
  --h-tile: rgb(92 74 214);
  --h-shadow-thumb: 0 1px 2px rgb(0 0 0 / .4);
  --h-shadow-press: 0 1px 2px rgb(0 0 0 / .3);
  --h-shadow-card: 0 0 0 1px rgb(255 255 255 / .06), 0 1px 2px rgb(0 0 0 / .3), inset 0 1px 0 rgb(255 255 255 / .025);
  --h-shadow-primary: inset 0 1px 0 rgb(255 255 255 / .28), inset 0 -1px 0 rgb(30 20 80 / .2), 0 1px 2px rgb(0 0 0 / .45);
  --h-shadow-raise: 0 1px 2px rgb(0 0 0 / .35), inset 0 1px 0 rgb(255 255 255 / .03);
  --h-shadow-lift: 0 8px 20px -8px rgb(0 0 0 / .7), 0 0 0 1px rgb(255 255 255 / .05);
  --h-shadow-sheet: 0 0 0 1px rgb(255 255 255 / .06), 0 10px 30px -18px rgb(0 0 0 / .7);
  --h-edge: inset 0 1px 0 rgb(255 255 255 / .12);
  --h-key: 0 0 0 1px rgb(255 255 255 / .08), 0 1px 2px rgb(0 0 0 / .45);
  --h-plate: inset 0 0 0 1px rgb(255 255 255 / .07), 0 1px 0 rgb(0 0 0 / .35);
  --h-plate-face: var(--h-panel-2);
  --h-track: rgb(255 255 255 / .04);
}
