/* Chicane's tokens: every colour, size of type, size of space, control height and the grid, decided once.
   Every other sheet uses these; tests/test_css.py refuses a raw size anywhere else. Direction: docs/RIKTNING.md. */
/* Chicane's stylesheet. The direction and what is taken from Deepbob's desk: docs/RIKTNING.md.
   [Deepbob] marks what is taken unchanged from Deepbob's desk; [utkast] marks what is Chicane's own draft. */
@font-face { font-family: "Funnel Display"; src: url("/static/fonts/FunnelDisplay-Light.woff2") format("woff2"); font-weight: 300; }
@font-face { font-family: "Funnel Display"; src: url("/static/fonts/FunnelDisplay-Regular.woff2") format("woff2"); font-weight: 400; }
@font-face { font-family: "Funnel Display"; src: url("/static/fonts/FunnelDisplay-Medium.woff2") format("woff2"); font-weight: 500; }
@font-face { font-family: "Google Sans"; src: url("/static/fonts/GoogleSans-Regular.woff2") format("woff2"); font-weight: 400; }

:root {
  color-scheme: light;
  /* [Deepbob] colours */
  --ink: oklch(16% 0.035 250);
  --n-0: oklch(97.5% 0.003 70);
  --n-1: oklch(93.6% 0.004 70);
  --n-4: oklch(70% 0.006 70);
  --n-6: oklch(49% 0.008 70);
  --n-7: oklch(37.4% 0.008 70);
  --white: oklch(100% 0 0);
  --red: oklch(59% 0.23 28);          /* one job, the same as on the desk: a person is needed */
  --kelp: oklch(25% 0.05 175);        /* in Deepbob's palette, unused on the desk. [utkast] as Chicane's own colour */
  --line: color-mix(in oklch, var(--ink) 13%, transparent);
  --quiet: var(--n-6);
  --soft: color-mix(in oklch, var(--ink) 74%, transparent);
  /* [utkast] one new colour, a light step of Kelp, for the door and for what is in progress */
  --kelp-wash: oklch(94% 0.022 175);
  /* [Deepbob] the palette's light colours with their inks (Colour Lab "deepbob"). Each has one job here. */
  --sun: oklch(86% 0.13 92);      --sun-ink: oklch(20% 0.02 60);       /* new */
  --shell: oklch(90% 0.045 15);   --shell-ink: oklch(27% 0.08 22);     /* waits for us */
  --pool: oklch(86% 0.06 215);    --pool-ink: oklch(22% 0.05 240);     /* waits for the customer */
  /* [Deepbob] the palette's dark colours, as Deepbob has them: the source of the even --d-* variants below, which are
     what people's circles and the kinds use (2026-11-18). Light says a state, dark says who or what kind. */
  --plum: oklch(24% 0.06 345); --petrol: oklch(30% 0.06 235); --umber: oklch(26% 0.04 65); --oxblood: oklch(26% 0.08 25);

  /* [Deepbob] type, space, measure, motion */
  --display: "Funnel Display", "Google Sans", system-ui, sans-serif;
  --text: "Google Sans", system-ui, sans-serif;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 40px; --s-8: 56px; --s-9: 80px; --s-10: 120px;
  --t-label: 13px; --t-small: 14px; --t-body: 16px; --t-lead: 19px; --t-title: 24px; --t-control: 14px;
  --t-head: 28px;            /* a page's title: Funnel Display 400 at 28/32 (Bishop's foundation, 2026-11-18) */
  --t-statement: clamp(46px, 4.2vw + 18px, 84px);
  --w-narrow: 680px; --w-wide: 860px;
  --gut: var(--s-9);
  --radius: 4px; --radius-lg: 8px; --radius-ctl: 6px;   /* controls have corners, not pills (Bishop, 2026-11-18) */   /* [utkast] the large one is for what floats over the page; thin bars and chips are round (999px) */
  --ease: cubic-bezier(0.2, 0, 0, 1); --fast: 200ms;
  /* [utkast] the working row: Deepbob's 40 px baseline as the height of a line of work */
  --row: 56px;
  /* [utkast] one height scale for every control a finger presses (Peter, 2026-11-18, on Dag/Vecka beside the day
     arrows). A button that ends a task is --ctl; everything that works inside a row (small buttons, fields, selects,
     switches, search) is --ctl-sm. A phone or a touch screen lifts --ctl-sm to 44 px. Heights live here, never in
     padding: padding plus a line of text is how eight heights came about. */
  --ctl: 36px; --ctl-sm: var(--ctl); --ctl-row: 28px;
  /* [utkast] one spacing scale (Peter, 2026-11-18: "linjeringar för element och text, avsaknad av tomrum, marginaler"):
     everything inside a surface starts --inset from its edge; sections are --gap-section apart, groups --gap-group,
     fields --gap-field. The sweep counts the insets and gaps on every page; one value each is the aim. */
  /* the grid, Deepbob's (docs/DESK_DESIGN.md): twelve columns; the work column is eight, what supports it four,
     on every page at the same x. A page's own width never appears anywhere else. */
  --cols: 12; --gutter: var(--s-6); --content: 1280px;
  /* the air inside controls and chips, decided once */
  --pad-ctl: 14px; --pad-ctl-sm: 12px; --pad-field: 10px; --pad-select: 28px; --pad-chip: 10px; --pad-chip-tight: 6px;
  --t-marker: 12px;   /* a marker's words in the schedule: the call time, now */
  --inset: var(--s-5); --gap-section: var(--s-7); --gap-group: var(--s-5); --gap-field: var(--s-3);   /* Bishop's foundation (2026-11-18): every control 36, an action in a list row 28 */
  /* [utkast] the accent: one colour, two jobs. The next step (the filled button) and now (the line across the day,
     today in the week). Kelp until Peter picks a palette; a palette sets these three and nothing else needs to know. */
  --accent: var(--coral); --on-accent: var(--coral-ink); --accent-mark: var(--coral-mark);
  /* [Deepbob] Coral, the palette's warm light: what is pressed next and what is now. No kind and no state uses it,
     so the one filled button on a page is never read as one of them (design round, 2026-11-18). The mark is a
     deeper step of it, for a line or a word on white (Chicane's variant). */
  --coral: oklch(75% 0.12 38); --coral-ink: oklch(20% 0.04 38); --coral-mark: oklch(54% 0.15 38);
  /* [utkast] kinds: each sort of thing has a Deepbob dark, a light wash of it and an icon, so the flow case → order →
     schedule shows wherever one of them appears (Peter, 2026-11-18: "markera sektioner, visa ikoner/knappar, förstå
     flödet"). A circle in a dark is a person; a square in a dark is a kind. Olive is Chicane's variant, for tyres. */
  /* Every kind at one lightness, 34 %, with Deepbob's hues: the palette's darks run from 16 to 31 %, and side by side
     some read as black and some as colour (Peter, 2026-11-18: "konstigt att vissa färger är mörkare än andra").
     These are Chicane's variants, confirmed by Peter ("34 % är bra"); the people's circles take the same ones ("gör så"),
     so nothing that stands beside its equals is darker than they are. */
  --d-graphite: oklch(34% 0.012 70); --d-umber: oklch(34% 0.06 65); --d-petrol: oklch(34% 0.065 235);
  --d-kelp: oklch(34% 0.055 175); --d-plum: oklch(34% 0.065 345); --d-olive: oklch(34% 0.06 115);
  --d-oxblood: oklch(34% 0.08 25);
  --k-idag: var(--d-graphite); --k-schema: var(--d-umber); --k-arenden: var(--d-petrol); --k-ordrar: var(--d-kelp);
  --k-hallen: var(--d-plum); --k-dack: var(--d-olive); --k-reklamationer: var(--d-oxblood);
  --kind: var(--n-7); --kind-wash: var(--n-1);
  --band: var(--ink); --on-band: var(--n-0);
  /* the edge of a field, of a plain button, a field's example, the schedule's hatching and today's column: named, so
     dark can set them apart (Bishop, round 11: in dark the buttons' edges outshone the fields to fill) */
  --field-edge: var(--n-4); --ctl-edge: var(--ink); --placeholder: var(--n-6);
  --hatch: color-mix(in oklch, var(--n-4) 28%, transparent);
  --today-col: color-mix(in oklch, var(--kelp-wash) 60%, var(--white));   /* the demo's band: dark in light, and dark in dark too */
  /* the week's time bars (Veckan): booked and done in the schedule's umber, two lightness steps of one hue, so they part
     by lightness for every eye and on paper; each at least 3:1 on its surface (dataviz validator, 2026-11-19) */
  --bar-booked: oklch(62% 0.07 65); --bar-done: oklch(32% 0.06 65);
  --track: color-mix(in oklch, var(--n-1) 70%, var(--white));   /* the working time behind them: there, and quiet */
}
@media (max-width: 899px) { :root { --gut: var(--s-5); --t-statement: 56px; --t-head: 24px; --inset: var(--s-4); --gap-section: var(--s-6); }
}
/* on a touch screen a control that looks like a link still gets a finger-sized box */
/* on a phone, or any touch screen, a control that stands on its own gets a finger-sized box: links that look like
   links, the mark, the filter chips, and the way back in a page's kicker. A link inside a sentence keeps the
   sentence's line (WCAG 2.5.8 makes that exception), and a row link already covers its row. */
@media (max-width: 899px), (pointer: coarse) {
  :root { --ctl: 44px; --ctl-row: 44px; --t-control: 16px; }
}

/* ------------------------------------------------------------------ dark (design part five, 2026-11-18)
   The same roles with their own values, when the computer or phone asks for dark. The page is darkest and surfaces a
   step lighter, so depth is told by lightness, not shadow. A state's light tag becomes a dark tone with light words.
   The kinds and people stay at one lightness, light here (66 %), and their icons and initials turn dark with --n-0.
   Coral keeps its one job. Every other sheet uses these names, so nothing else needs to know. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: oklch(93% 0.008 250);
    --n-0: oklch(16% 0.012 250); --n-1: oklch(27% 0.012 250); --n-4: oklch(47% 0.01 250);
    --n-6: oklch(68% 0.008 250); --n-7: oklch(78% 0.008 250);
    --white: oklch(21% 0.012 250);
    --red: oklch(68% 0.19 28);
    --kelp: oklch(76% 0.08 175); --kelp-wash: oklch(30% 0.035 175);
    --sun: oklch(38% 0.07 92);   --sun-ink: oklch(91% 0.09 92);
    --shell: oklch(34% 0.06 15); --shell-ink: oklch(91% 0.04 15);
    --pool: oklch(34% 0.05 215); --pool-ink: oklch(91% 0.04 215);
    --d-graphite: oklch(66% 0.012 70); --d-umber: oklch(66% 0.07 65); --d-petrol: oklch(66% 0.07 235);
    --d-kelp: oklch(66% 0.07 175); --d-plum: oklch(66% 0.07 345); --d-olive: oklch(66% 0.07 115);
    --d-oxblood: oklch(66% 0.09 25);   /* a step quieter than 72: bright circles led the queue (Bishop, round 11) */
    --coral: oklch(74% 0.12 38); --coral-ink: oklch(18% 0.04 38); --coral-mark: oklch(74% 0.14 38);
    --band: oklch(30% 0.012 250); --on-band: var(--ink);
    --field-edge: oklch(60% 0.01 250); --ctl-edge: oklch(60% 0.01 250); --placeholder: oklch(70% 0.008 250);
    --hatch: color-mix(in oklch, var(--n-6) 40%, transparent); --today-col: oklch(25% 0.012 250);
    --bar-booked: oklch(58% 0.07 65); --bar-done: oklch(84% 0.07 65);
    --track: oklch(26% 0.012 250);
  }
}
/* the same values when the person has chosen dark in Chicane, whatever the computer says; tests/test_css.py keeps
   the two blocks equal */
:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: oklch(93% 0.008 250);
    --n-0: oklch(16% 0.012 250); --n-1: oklch(27% 0.012 250); --n-4: oklch(47% 0.01 250);
    --n-6: oklch(68% 0.008 250); --n-7: oklch(78% 0.008 250);
    --white: oklch(21% 0.012 250);
    --red: oklch(68% 0.19 28);
    --kelp: oklch(76% 0.08 175); --kelp-wash: oklch(30% 0.035 175);
    --sun: oklch(38% 0.07 92);   --sun-ink: oklch(91% 0.09 92);
    --shell: oklch(34% 0.06 15); --shell-ink: oklch(91% 0.04 15);
    --pool: oklch(34% 0.05 215); --pool-ink: oklch(91% 0.04 215);
    --d-graphite: oklch(66% 0.012 70); --d-umber: oklch(66% 0.07 65); --d-petrol: oklch(66% 0.07 235);
    --d-kelp: oklch(66% 0.07 175); --d-plum: oklch(66% 0.07 345); --d-olive: oklch(66% 0.07 115);
    --d-oxblood: oklch(66% 0.09 25);   /* a step quieter than 72: bright circles led the queue (Bishop, round 11) */
    --coral: oklch(74% 0.12 38); --coral-ink: oklch(18% 0.04 38); --coral-mark: oklch(74% 0.14 38);
    --band: oklch(30% 0.012 250); --on-band: var(--ink);
    --field-edge: oklch(60% 0.01 250); --ctl-edge: oklch(60% 0.01 250); --placeholder: oklch(70% 0.008 250);
    --hatch: color-mix(in oklch, var(--n-6) 40%, transparent); --today-col: oklch(25% 0.012 250);
    --bar-booked: oklch(58% 0.07 65); --bar-done: oklch(84% 0.07 65);
    --track: oklch(26% 0.012 250);
}
