/* Design tokens and base layer. Colour tokens are the reference product's OKLCH values as
   written; the dark set applies when html carries data-theme="dark" (set from JS for the
   dark and system preferences). Everything else in the client reads these tokens. */

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

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.183 0.0309 263.38);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.183 0.0309 263.38);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.183 0.0309 263.38);
  --primary: oklch(0.2921 0.0219 262.51);
  --primary-foreground: oklch(0.985 0 0);
  --primary-accent: oklch(0.5963 0.2317 359.78);
  --primary-accent-foreground: oklch(0.985 0 0);
  --alpha-1: oklch(0.7874 0.1453 314.49);
  --alpha-1-accent: oklch(0.6675 0.1669 314.02);
  --alpha-2: oklch(0.394 0.0763 171.61);
  --alpha-2-accent: oklch(0.5908 0.0791 177.52);
  --alpha-3: oklch(0.3586 0.2181 265.55);
  --alpha-3-accent: oklch(0.7116 0.1507 259.92);
  --secondary: oklch(0.8607 0.0291 268.33);
  --secondary-foreground: oklch(0.2921 0.0219 262.51);
  --muted: oklch(0.9583 0.0154 269.98);
  --muted-foreground: oklch(0.4951 0.0275 264.28);
  --accent: oklch(0.9583 0.0154 269.98);
  --accent-foreground: oklch(0.2921 0.0219 262.51);
  --destructive: oklch(0.625 0.257 29.23);
  --border: oklch(0.9276 0.0058 264.53);
  --input: oklch(0.9276 0.0058 264.53);
  --ring: oklch(0.8607 0.0291 268.33);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(1 0 0);
  --sidebar-foreground: oklch(0.183 0.0309 263.38);
  --sidebar-primary: oklch(0.2921 0.0219 262.51);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.9583 0.0154 269.98);
  --sidebar-accent-foreground: oklch(0.2921 0.0219 262.51);
  --sidebar-border: oklch(0.9276 0.0058 264.53);
  --sidebar-ring: oklch(0.8607 0.0291 268.33);

  /* Client additions (not in the reference): status tones for jobs, caveats and toasts. */
  --success: oklch(0.52 0.12 155);
  --warning: oklch(0.55 0.13 70);
  --grid-line: oklch(0.2921 0.0219 262.51 / 0.035);
  --glow: oklch(0.5963 0.2317 359.78 / 0.08);
  /* Text-safe variants of the accent colours (WCAG AA for small text on the page, card and muted
     grounds) and a focus indicator with at least 3:1 against the page. */
  --accent-text: oklch(0.54 0.21 359.78);
  --public-record-text: oklch(0.5 0.15 262);
  --focus-ring: oklch(0.5 0.03 265);

  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: 1rem;
  --radius-full: 999px;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --ring-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
  --accent-ring: 0 0 0 2px color-mix(in oklab, var(--primary-accent) 40%, transparent);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 150ms;
  --duration-slow: 200ms;
  --blur: 8px;
  --header-height: 4rem;
  --container: 80rem;

  color-scheme: light;
}

html[data-theme="dark"] {
  --background: oklch(0.1966 0.028 264.93);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.2208 0.0347 268.64);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.2208 0.0347 268.64);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.8607 0.0291 268.33);
  --primary-foreground: oklch(0.1966 0.028 264.93);
  --primary-accent: oklch(0.5963 0.2317 359.78);
  --primary-accent-foreground: oklch(0.985 0 0);
  --alpha-1: oklch(0.7874 0.1453 314.49);
  --alpha-1-accent: oklch(0.6675 0.1669 314.02);
  --alpha-2: oklch(0.394 0.0763 171.61);
  --alpha-2-accent: oklch(0.5908 0.0791 177.52);
  --alpha-3: oklch(0.3586 0.2181 265.55);
  --alpha-3-accent: oklch(0.7116 0.1507 259.92);
  --secondary: oklch(0.2921 0.0219 262.51);
  --secondary-foreground: oklch(1 0 0);
  --muted: oklch(0.2536 0.0339 266.8);
  --muted-foreground: oklch(0.7565 0.0304 266.30);
  --accent: oklch(0.2536 0.0339 266.8);
  --accent-foreground: oklch(1 0 0);
  --destructive: oklch(0.625 0.257 29.23);
  --border: oklch(0.2854 0.0334 264.86);
  --input: oklch(0.2854 0.0334 264.86);
  --ring: oklch(0.404 0.0572 265.78);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.2208 0.0347 268.64);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.8607 0.0291 268.33);
  --sidebar-primary-foreground: oklch(0.1966 0.028 264.93);
  --sidebar-accent: oklch(0.2536 0.0339 266.8);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.2854 0.0334 264.86);
  --sidebar-ring: oklch(0.404 0.0572 265.78);

  --success: oklch(0.78 0.12 155);
  --warning: oklch(0.82 0.13 80);
  --grid-line: oklch(0.985 0 0 / 0.03);
  --accent-text: oklch(0.74 0.17 359.78);
  --public-record-text: oklch(0.84 0.1 262);
  --focus-ring: oklch(0.75 0.03 265);

  color-scheme: dark;
}

/* base */

*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--border); }
* { outline-color: color-mix(in oklab, var(--ring) 50%, transparent); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
  background: var(--background);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; padding: 0; }
button:disabled { cursor: not-allowed; }
img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
code, kbd, pre, samp { font-family: var(--font-mono); font-size: 0.875em; }
a { color: inherit; text-underline-offset: 4px; }
::selection { background: var(--primary); color: var(--primary-foreground); }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@keyframes enter { from { opacity: 0; transform: translateY(-0.5rem) scale(0.95); } }
@keyframes enter-up { from { opacity: 0; transform: translateY(0.5rem); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pulse { 50% { opacity: 0.5; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
