/* Consult design tokens — the 2026-10-05 redesign (Claude Design handoff,
   ~/consult-redesign/design-system/consult-redesign-handoff/tokens/).
   Loaded before style.css on every page, staff app and client portal.
   Dark is the default; html.light is a pure token flip (look-and-feel rule 12's
   sibling — no rule below the tokens may hardcode a theme colour).
   Type: only the custom properties are taken from the handoff; its utility
   classes are prefixed t- here because .small/.title/.body/.code/.figure were
   already Consult classes. */

@font-face {
  font-family: "InterVariable";
  src: url("/static/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #181818;  /* Page canvas; also input fills */
  --shell: #101010;  /* The ground behind the content sheet: the icon rail and the pop-out page panel sit on it */
  --panel: #181818;  /* Card fill */
  --panel2: #303030;  /* Title bands (card titles, section bars, group bars), neutral pills, hover fill on outline buttons */
  --panel3: #3a3a3a;  /* Hover on a clickable title band, one step above `panel2` */
  --line: #303030;  /* 1px hairline borders on cards, inputs, table rows */
  --text: #ffffff;  /* Ink */
  --muted: #969696;  /* Secondary ink on `bg`/`panel`: table headers, form labels, meta, help text */
  --accent: #da291c;  /* The brand accent (Rosso Corsa) */
  --accent-active: #b01e0a;  /* Hover and pressed state of an `accent` fill */
  --on-accent: #ffffff;  /* Text and icons on an `accent` fill */
  --danger: #f13a2c;  /* Destructive actions (outline button ink and border), error notices, over-capacity */
  --ok: #03904a;  /* Success notice border and ink, tick marks, capacity meter */
  --info: #4c98b9;  /* Informational ink on `bg` and on `tint-info-bg` */
  --yellow: #f6e500;  /* Live, recording, working: the work bar, record dots, the dictation dot */
  --on-yellow: #181818;  /* Text and icons on a `yellow` fill */
  --yellow-hover: #fff58f;  /* Hover on a `yellow` button */
  --focus: #f6e500;  /* The :focus-visible ring: 2px solid, 2px offset, on every interactive element */
  --hover: rgba(255, 255, 255, 0.06);  /* Hover overlay on nav links and ghost buttons */
  --hover-soft: rgba(255, 255, 255, 0.04);  /* Active nav item, section-bar hover, billed rows */
  --rule: rgba(255, 255, 255, 0.35);  /* Link underline colour */
  --rule-soft: rgba(255, 255, 255, 0.22);  /* Hover borders on rows and cards */
  --shadow-color: rgba(0, 0, 0, 0.45);  /* Colour of the one shadow recipe (`raised`) */
  --scrim: rgba(0, 0, 0, 0.6);  /* Modal backdrop */
  --code-bg: #101010;  /* Code panes */
  --code-ink: #ffffff;  /* Default text in a code pane, on `code-bg` */
  --violet: #b3a1f7;  /* Ink: Ready/Open status, logged-time pill, sent mail */
  --amber: #e0a63a;  /* Ink: Waiting Client / On Hold status, Updated pill, questions badge */
  --green: #1db56b;  /* Ink: Closed / Completed / Done only, and the Created pill */
  --rose: #ff8f86;  /* Ink: retainer badge and retainer calendar chips */
  --pink: #f48fb1;  /* Ink: the Estimate pill only */
  --gold: #e6d600;  /* Ink: the AI-placed planner badge only */
  --status-new: var(--danger);  /* Status ink: New */
  --status-ready: var(--violet);  /* Status ink: Ready, Open */
  --status-in-progress: var(--info);  /* Status ink: In Progress, Active */
  --status-waiting: var(--amber);  /* Status ink: Waiting Client, On Hold */
  --status-closed: var(--green);  /* Status ink: Closed, Completed, Done */
  --tint-new-bg: rgba(218, 41, 28, 0.16);  /* Pill fill behind `status-new` and priority 5 */
  --tint-ready-bg: rgba(167, 139, 250, 0.15);  /* Pill fill behind `status-ready` */
  --tint-info-bg: rgba(76, 152, 185, 0.16);  /* Pill fill behind `info` ink: In Progress, note kinds, priority 3, AI */
  --tint-warn-bg: rgba(224, 166, 58, 0.16);  /* Pill fill behind `amber` ink: Waiting, Updated date, questions, priority 4 */
  --tint-ok-bg: rgba(3, 144, 74, 0.18);  /* Pill fill behind `green` ink: Closed, Created date, final documents */
  --tint-bad-bg: rgba(241, 58, 44, 0.16);  /* Pill fill behind `danger` ink: the Due date */
  --tint-purple-bg: rgba(179, 161, 247, 0.16);  /* Pill fill behind `violet` ink: logged time, sent mail */
  --tint-pink-bg: rgba(244, 143, 177, 0.16);  /* Pill fill behind `pink` ink: the Estimate */
  --tint-retainer-bg: rgba(218, 41, 28, 0.13);  /* Pill fill behind `rose` ink: retainer */
  --tint-ai-bg: rgba(246, 229, 0, 0.12);  /* Pill fill behind `gold` ink: AI-placed */
  --tint-draft-bg: rgba(150, 150, 150, 0.18);  /* Pill fill behind `muted` ink: draft documents */
  --paper: #ffffff;  /* Printed pages, PDF previews and email: white in both themes */
  --paper-ink: #181818;  /* Toad Tech identity ink on `paper`: letterhead, email footer, print previews */
  --paper-muted: #5e5e5e;  /* Small print on `paper`: the company disclosure in footers */
  --paper-line: #e4e4e4;  /* Hairlines on `paper` */
}

html.light, [data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --shell: #f3f3f3;
  --panel: #ffffff;
  --panel2: #ececec;
  --panel3: #e0e0e0;
  --line: #d7d7d7;
  --text: #181818;
  --muted: #5f5f5f;
  --danger: #c62817;
  --ok: #067a41;
  --info: #2b6f8e;
  --focus: #8a6d00;
  --hover: rgba(0, 0, 0, 0.05);
  --hover-soft: rgba(0, 0, 0, 0.035);
  --rule: rgba(0, 0, 0, 0.38);
  --rule-soft: rgba(0, 0, 0, 0.22);
  --shadow-color: rgba(0, 0, 0, 0.18);
  --scrim: rgba(0, 0, 0, 0.45);
  --code-ink: #e8e8e8;
  --violet: #5b3fc4;
  --amber: #8a5b00;
  --green: #0f7a45;
  --rose: #c0392b;
  --pink: #b3286b;
  --gold: #7d6b00;
}

/* Six sizes, one family. Use font-variant-numeric: tabular-nums on every figure. */
:root {
  --font-sans: "InterVariable", Inter, -apple-system, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --type-figure: 700 34px/38px var(--font-sans);  /* Dashboard figures and timers */
  --type-page-title: 600 22px/28px var(--font-sans);  /* The page title, desktop only */
  --type-title: 600 16px/22px var(--font-sans);  /* Card titles, section bars, group bars, the brand name */
  --type-body: 400 14px/22px var(--font-sans);  /* Body copy, table cells, inputs on desktop */
  --type-body-strong: 600 14px/22px var(--font-sans);  /* Emphasis in prose and nav links */
  --type-small: 400 13px/18px var(--font-sans);  /* Form labels, meta, help popovers, the phone crumb line */
  --type-control: 700 13px/16px var(--font-sans);  /* Button labels */
  --type-micro: 600 12px/16px var(--font-sans);  /* Pills, table headers, the signed-in email */
  --type-input-touch: 400 16px/22px var(--font-sans);  /* Inputs, selects and textareas on any coarse pointer, so iOS does not zoom on focus */
  --type-code: 400 13px/20px var(--font-mono);  /* Code panes and the document editor, on `code-bg` */
}
.t-figure { font: var(--type-figure); letter-spacing: -0.02em; }
.t-page-title { font: var(--type-page-title); letter-spacing: -0.01em; }
.t-title { font: var(--type-title); }
.t-body { font: var(--type-body); }
.t-body-strong { font: var(--type-body-strong); }
.t-small { font: var(--type-small); }
.t-control { font: var(--type-control); letter-spacing: 0.02em; }
.t-micro { font: var(--type-micro); letter-spacing: 0.01em; }
.t-input-touch { font: var(--type-input-touch); }
.t-code { font: var(--type-code); }

/* Spacing, radii, sizes. Breakpoints are listed for reference: custom properties cannot be used in @media. */
:root {
  --space-1: 4px;  /* Icon to label inside a pill; hairline gaps */
  --space-2: 6px;  /* Gap between pills in a row; label to control */
  --space-3: 8px;  /* Table cell padding; gap between controls in a row */
  --space-4: 10px;  /* Page gutter on phones; input side padding */
  --space-5: 12px;  /* Gap between form fields; phone panel inset */
  --space-6: 16px;  /* Card padding; gap between cards; button side padding */
  --space-7: 24px;  /* Page padding top (desktop); gap between page sections */
  --space-8: 28px;  /* Page gutter left and right on desktop */
  --space-9: 48px;  /* Page padding bottom */
  --radius-none: 0;  /* The work bar, table rows and title bands inside a card */
  --radius-input: 6px;  /* Buttons, inputs, selects, textareas, notices, nav rows */
  --radius-card: 10px;  /* Panels, cards, widgets, menus, modals */
  --radius-sheet: 12px;  /* The content sheet and the phone header strip */
  --radius-bar: 20px;  /* The floating phone tab bar */
  --radius-pill: 9999px;  /* Pills, status dots, record dots */
  --control-h: 36px;  /* Height of every button, input and select on desktop, so a row of controls shares one baseline */
  --control-h-touch: 44px;  /* Height of the same controls, and the minimum tap target, on any coarse pointer */
  --pill-h: 24px;  /* The one box every pill and chip shares */
  --page-head-h: 36px;  /* Fixed height of the page-head row, so the first panel starts at the same height on every page */
  --panel-w: 216px;  /* The pop-out page panel beside the rail */
  --rail-w: 72px;  /* The icon rail: icon in a pill with its label beneath */
  --workbar-h: 2.4rem;  /* The work bar; `control-h-touch` on coarse pointers */
  --hairline: 1px;  /* Every border */
  --focus-ring: 2px;  /* Focus outline width and offset */
  --active-bar: 3px;  /* The accent bar on the active nav item */
  --icon: 16px;  /* Lucide icons inline with text and in buttons (2px stroke) */
  --col-snug: 11rem;  /* Preferred width of a .snug column */
  --col-snug-min: 7rem;  /* Floor of a .snug / .grow column */
  --col-min: 10rem;  /* Floor of a .snug / .grow column */
  --bp-phone: 640px;  /* max-width: what stacks, phone padding */
  --bp-tablet: 900px;  /* max-width: tables become one card per row */
  --bp-desktop: 901px;  /* min-width, with not (pointer: coarse): desktop table column sizing */
}

/* The brand mark: the crouching toad (2026-10-27; SERVER-CHANGES section 10), a 16 x 16 pixel
   grid. On screen, paint it as a mask over `--accent`:
     background: var(--accent); mask: var(--toad) center / contain no-repeat;
   Paper and email do not use this (print dialogs drop backgrounds): they take the PNG at
   https://toadtech.co.uk/brand/toad-red-48.png, shown at 16 x 13. Files: static/consult-toad-*.svg. */
:root {
  --toad: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 2 32 32' shape-rendering='crispEdges'%3E%3Cpath d='M20 5h6v2h-6ZM18 7h10v2h-10ZM18 9h2v2h-2ZM22 9h8v2h-8ZM14 11h18v2h-18ZM8 13h24v2h-24ZM4 15h20v2h-20ZM2 17h30v2h-30ZM0 19h30v2h-30ZM0 21h28v2h-28ZM0 23h6v2h-6ZM8 23h18v2h-18ZM0 25h4v2h-4ZM6 25h10v2h-10ZM18 25h8v2h-8ZM0 27h12v2h-12ZM18 27h12v2h-12ZM0 29h12v2h-12ZM16 29h16v2h-16Z'/%3E%3C/svg%3E");
}

/* The one shadow, z-index and motion. */
:root, [data-theme="dark"] {
  --raised: 0 8px 20px rgba(0, 0, 0, 0.45);  /* The only shadow: things that float over the page (modal, open menu, toast) */
}
html.light, [data-theme="light"] {
  --raised: 0 8px 20px rgba(0, 0, 0, 0.18);
}
:root {
  --z-raised: 1;  /* Links above a row overlay */
  --z-sidebar: 50;  /* The navigation shell */
  --z-toast: 100;  /* Toasts and banners */
  --z-modal: 110;  /* Modal and its scrim */
  --z-workbar: 120;  /* The work bar sits above everything */
}
:root {
  --dur-fast: 120ms;
  --dur-base: 150ms;
  --dur-panel: 260ms;
  --ease-out: cubic-bezier(.2,.7,.3,1);
}
