/*
  PurePaycheck tokens: concept B "Deposit", version 2 (chosen by the owner 2026-11-18).
  Source of every value: DESIGN.md and the artboards in work/design/concept-b/*.dc.html.
  Hex values of the artboards are converted to OKLCH; the accent is the registry value.

  Theme: dark is the default look. Light follows the device setting
  (prefers-color-scheme: light). Either theme can be forced with
  data-theme="dark" | "light" on <html> (or on any element, for the states sheet).

  This is the only file with colour literals and font-family names.
*/

/* Fonts: self-hosted latin subsets from Google Fonts (SIL OFL 1.1).
   Both families are variable fonts; one file covers the weights in use. */
@font-face {
  font-family: "Gabarito";
  src: url("../fonts/gabarito-latin-var.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Albert Sans";
  src: url("../fonts/albert-sans-latin-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-adjusted fallbacks, so text keeps its place while the web fonts load.
   Values come from the glyph advances and vertical metrics of the two files
   (fontTools), measured against Arial and Arial Bold on English copy and amounts. */
@font-face {
  font-family: "Gabarito Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("HelveticaNeue-Bold");
  font-weight: 700 900;
  size-adjust: 96%;
  ascent-override: 97.9%;
  descent-override: 27.1%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Albert Sans Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("HelveticaNeue");
  font-weight: 400 600;
  size-adjust: 103.9%;
  ascent-override: 91.4%;
  descent-override: 24.1%;
  line-gap-override: 0%;
}

:root {
  /* Families */
  --font-display: "Gabarito", "Gabarito Fallback", sans-serif;
  --font-text: "Albert Sans", "Albert Sans Fallback", sans-serif;

  /* Type scale, as drawn in the artboards (phone and desktop steps) */
  --fs-15: 0.9375rem;
  --fs-16: 1rem;
  --fs-17: 1.0625rem;
  --fs-18: 1.125rem;
  --fs-19: 1.1875rem;
  --fs-20: 1.25rem;
  --fs-22: 1.375rem;
  --fs-24: 1.5rem;
  --fs-25: 1.5625rem;
  --fs-28: 1.75rem;
  --fs-30: 1.875rem;
  --fs-32: 2rem;
  --fs-36: 2.25rem;
  --fs-40: 2.5rem;
  --fs-48: 3rem;
  --fs-52: 3.25rem;
  --fs-56: 3.5rem;
  --fs-64: 4rem;
  --fs-84: 5.25rem;
  --fs-190: 11.875rem;

  /* Spacing */
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-14: 14px;
  --space-16: 16px;
  --space-18: 18px;
  --space-20: 20px;
  --space-22: 22px;
  --space-24: 24px;
  --space-26: 26px;
  --space-28: 28px;
  --space-30: 30px;
  --space-32: 32px;
  --space-36: 36px;
  --space-40: 40px;
  --space-42: 42px;
  --space-44: 44px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;
  --space-72: 72px;
  --space-112: 112px;
  --space-120: 120px;

  /* Sizes of controls */
  --target: 44px;
  --control-h: 52px;
  --control-h-lg: 64px;
  --segment-h: 56px;
  --bar-h: 46px;
  --bar-h-lg: 64px;
  --answer-bar-h: 64px;
  --page-max: 1440px;

  /* Radii */
  --radius-4: 4px;
  --radius-8: 8px;
  --radius-12: 12px;
  --radius-14: 14px;
  --radius-16: 16px;
  --radius-18: 18px;
  --radius-20: 20px;
  --radius-24: 24px;
  --radius-28: 28px;

  /* Lines */
  --line: 2px;
  --line-strong: 3px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 240ms;

  /* Colour, dark theme (default) */
  color-scheme: dark;
  --color-ground: oklch(16.9% 0.033 294.1);          /* #100C1C */
  --color-surface: oklch(21.9% 0.052 291.8);         /* #1B1530 */
  --color-text: oklch(100% 0 0);                     /* #FFFFFF */
  --color-text-2: oklch(87.2% 0.036 299.7);          /* #D8D0EA */
  --color-text-3: oklch(75.3% 0.052 299.1);          /* #B3A8CC */
  --color-field: oklch(16.9% 0.033 294.1);           /* #100C1C */
  --color-field-border: oklch(63.3% 0.084 294.5);    /* #8D80B8 */
  --color-segment-on: oklch(100% 0 0);               /* #FFFFFF */
  --color-on-segment: oklch(20% 0.04 294);           /* #171226 */
  --color-rule: oklch(33.4% 0.081 292.2);            /* #382D5C */
  --color-link: oklch(100% 0 0);                     /* #FFFFFF, underlined */
  --color-link-hover: oklch(86.3% 0.071 300.5);      /* #D9C8FA */
  --color-caret: oklch(74.6% 0.115 299.3);           /* #B79CEB */
  --color-wordmark: oklch(67.1% 0.187 301.4);        /* #AB74F4 */
  --color-alert: oklch(74.6% 0.115 299.3);           /* #B79CEB: field that needs a look */
  --color-focus: oklch(100% 0 0);
  --color-summary: oklch(21.9% 0.052 291.8);         /* take-home card: #1B1530 */
  --color-on-summary: oklch(100% 0 0);

  /* Result field: the same in both themes */
  --color-accent: oklch(53.5% 0.245 302);            /* #8A2FE0 */
  --color-on-accent: oklch(100% 0 0);                /* #FFFFFF */
  --color-on-accent-2: oklch(95.4% 0.025 303.5);     /* #F3ECFE */
  --color-on-accent-example: oklch(84% 0.07 302);    /* muted example answer, large text only */
  --color-rule-on-accent: oklch(68% 0.16 302);       /* separator inside the result field */
  --color-ink: oklch(20% 0.04 294);                  /* #171226: text on white bar and buttons */
  --color-bar-net: oklch(100% 0 0);                  /* take-home */
  --color-bar-federal: oklch(86.3% 0.071 300.5);     /* #D9C8FA */
  --color-bar-ss: oklch(74.6% 0.115 299.3);          /* #B79CEB */
  --color-bar-medicare: oklch(65.3% 0.156 297.6);    /* #9C78E2 */

  /* Tile map: one violet scale, share of the example paycheck kept (1 = least) */
  --color-map-1: oklch(95.4% 0.025 303.5);
  --color-map-2: oklch(86.3% 0.071 300.5);
  --color-map-3: oklch(74.6% 0.115 299.3);
  --color-map-4: oklch(65.3% 0.156 297.6);
  --color-map-5: oklch(53.5% 0.245 302);
}

/* Light theme: by device setting, unless dark is forced */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --color-ground: oklch(100% 0 0);                 /* #FFFFFF */
    --color-surface: oklch(95.7% 0.019 302.2);       /* #F3EEFC */
    --color-text: oklch(20% 0.04 294);               /* #171226 */
    --color-text-2: oklch(39.5% 0.054 298.2);        /* #4A4060 */
    --color-text-3: oklch(47.3% 0.055 297.7);        /* #5F5577 */
    --color-field: oklch(100% 0 0);                  /* #FFFFFF */
    --color-field-border: oklch(57.7% 0.087 294.8);  /* #7D6FA8 */
    --color-segment-on: oklch(20% 0.04 294);         /* #171226 */
    --color-on-segment: oklch(100% 0 0);
    --color-rule: oklch(88.1% 0.042 300.7);          /* #DCD2F0 */
    --color-link: oklch(44.9% 0.215 299.2);          /* #6A1FB8 */
    --color-link-hover: oklch(37% 0.18 297.2);       /* #4E1590 */
    --color-caret: oklch(53.5% 0.245 302);           /* #8A2FE0 */
    --color-wordmark: oklch(53.5% 0.245 302);        /* #8A2FE0 */
    --color-alert: oklch(53.5% 0.245 302);
    --color-focus: oklch(44.9% 0.215 299.2);
    --color-summary: oklch(20% 0.04 294);            /* #171226 */
    --color-on-summary: oklch(100% 0 0);
  }
}

/* Forced themes (frames of both themes, the states sheet) */
[data-theme="dark"] {
  color-scheme: dark;
  --color-ground: oklch(16.9% 0.033 294.1);
  --color-surface: oklch(21.9% 0.052 291.8);
  --color-text: oklch(100% 0 0);
  --color-text-2: oklch(87.2% 0.036 299.7);
  --color-text-3: oklch(75.3% 0.052 299.1);
  --color-field: oklch(16.9% 0.033 294.1);
  --color-field-border: oklch(63.3% 0.084 294.5);
  --color-segment-on: oklch(100% 0 0);
  --color-on-segment: oklch(20% 0.04 294);
  --color-rule: oklch(33.4% 0.081 292.2);
  --color-link: oklch(100% 0 0);
  --color-link-hover: oklch(86.3% 0.071 300.5);
  --color-caret: oklch(74.6% 0.115 299.3);
  --color-wordmark: oklch(67.1% 0.187 301.4);
  --color-alert: oklch(74.6% 0.115 299.3);
  --color-focus: oklch(100% 0 0);
  --color-summary: oklch(21.9% 0.052 291.8);
  --color-on-summary: oklch(100% 0 0);
}
[data-theme="light"] {
  color-scheme: light;
  --color-ground: oklch(100% 0 0);
  --color-surface: oklch(95.7% 0.019 302.2);
  --color-text: oklch(20% 0.04 294);
  --color-text-2: oklch(39.5% 0.054 298.2);
  --color-text-3: oklch(47.3% 0.055 297.7);
  --color-field: oklch(100% 0 0);
  --color-field-border: oklch(57.7% 0.087 294.8);
  --color-segment-on: oklch(20% 0.04 294);
  --color-on-segment: oklch(100% 0 0);
  --color-rule: oklch(88.1% 0.042 300.7);
  --color-link: oklch(44.9% 0.215 299.2);
  --color-link-hover: oklch(37% 0.18 297.2);
  --color-caret: oklch(53.5% 0.245 302);
  --color-wordmark: oklch(53.5% 0.245 302);
  --color-alert: oklch(53.5% 0.245 302);
  --color-focus: oklch(44.9% 0.215 299.2);
  --color-summary: oklch(20% 0.04 294);
  --color-on-summary: oklch(100% 0 0);
}
