/* The redesigned ops app's one source of colour, type and spacing (Oct 8, 2026).

   Build step 1 of docs/plans/OPS_APP_REDESIGN_UX.md: light by default, with a dark look kept as a
   setting (her decisions, October 8, 2026). The UX design system (ai-support-agent
   docs/UX_DESIGN_SYSTEM.md) is written for Tailwind; this file implements its contracts in plain
   CSS: the type scale (3.2) and the 4px grid (4.1). Colours and type are the original ops dashboard's
   (her preference, October 8, 2026): its blue, its grays, Inter, and its red, amber and green for
   overdue, due soon and done.

   Pages link this file and use the variables; nothing here styles a component, so linking it
   changes no existing page until that page opts in.

   Dark: `<html data-theme="dark">`, set by app.js from the saved setting. */

:root {
  color-scheme: light;
  /* Direction A, "Ledger": light and calm, a white rail, one indigo accent (Aarohi chose it on October 12, 2026 from three
     directions, superseding the October 8 old-dashboard palette: "Overall ui is not good enough"). Severity colours keep
     their meaning: red overdue, amber needs you, green done. Charts keep their own colours (views/dash.js). */
  /* Surfaces and ink */
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-raised: #F7F8FA;
  --ink: #1A1F36;
  --ink-muted: #5E6778;
  --ink-soft: #8792A2;
  --line: #E3E8EE;
  --line-strong: #C9D1DB;
  /* Accent: one indigo, used sparingly (primary action, links, selection) */
  --accent: #4F46E5;
  --accent-hover: #4338CA;
  --accent-bright: #635BFF;
  --accent-soft: #EEF0FD;
  --on-accent: #FFFFFF;
  /* Severity: three colours, each with a soft fill for rows and chips */
  --broken: #C0123C;        /* red: broken or overdue */
  --broken-soft: #FFE9EE;
  --needs-you: #A35200;     /* amber: needs you */
  --needs-you-soft: #FFF3E0;
  --working: #12805C;       /* green: working, done, money in */
  --working-soft: #E3F6EE;
  /* The rail: white, grey items, the current one in a soft indigo */
  --rail-bg: #FFFFFF;
  --rail-ink: #3C4257;
  --rail-ink-strong: #1A1F36;
  --rail-active: #EEF0FD;
  --rail-heading: #8792A2;
  --rail-line: #E3E8EE;
  --rail-mark: #4F46E5;
  /* Focus */
  --focus: #635BFF;

  /* Type: Inter, as the old dashboard, with the system stack behind it */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --text-page: 600 20px/1.4 var(--font);       /* page title, one per page */
  --text-section: 600 16px/1.5 var(--font);    /* section title */
  --text-card: 600 14px/1.43 var(--font);      /* card title, subsection */
  --text-body: 400 14px/1.43 var(--font);      /* body, inputs, table cells */
  --text-small: 400 12px/1.5 var(--font);      /* metadata, helper text */
  --text-label: 500 14px/1.43 var(--font);     /* form labels */
  --text-badge: 500 12px/1.5 var(--font);      /* badges, column headers */
  --text-code: 400 13px/1.54 var(--font-mono);

  /* Spacing: the 4px grid (UX design system 4.1) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;
  /* Shape: the old dashboard's 10px cards */
  --radius-sm: 6px; --radius: 10px; --radius-lg: 12px; --radius-pill: 999px;
  --touch: 44px;     /* minimum touch target on the phone */
  --overlay: #0f172a;                          /* full-screen viewer backdrop */
  --on-overlay: #e5e7eb;                       /* text and icons on it */
  --overlay-control: rgba(255, 255, 255, .12);
  --overlay-control-hover: rgba(255, 255, 255, .24);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1014;
  --surface: #15171C;
  --surface-raised: #1B1E24;
  --ink: #E8EAEE;
  --ink-muted: #A0A6B1;
  --ink-soft: #6E7480;
  --line: #262A33;
  --line-strong: #353A45;
  --accent: #8C97FF;
  --accent-hover: #A9B1FF;
  --accent-bright: #8C97FF;
  --accent-soft: rgba(140, 151, 255, .14);
  --on-accent: #0E1014;
  --broken: #F87171;
  --broken-soft: rgba(248, 113, 113, .13);
  --needs-you: #FBBF24;
  --needs-you-soft: rgba(251, 191, 36, .13);
  --working: #4ADE80;
  --working-soft: rgba(74, 222, 128, .13);
  --rail-bg: #111317;
  --rail-ink: #B4B9C3;
  --rail-ink-strong: #F1F2F4;
  --rail-active: rgba(140, 151, 255, .14);
  --rail-heading: #6E7480;
  --rail-line: #262A33;
  --rail-mark: #8C97FF;
  --focus: #A9B1FF;
  --overlay: #0f172a;                          /* full-screen viewer backdrop */
  --on-overlay: #e5e7eb;                       /* text and icons on it */
  --overlay-control: rgba(255, 255, 255, .12);
  --overlay-control-hover: rgba(255, 255, 255, .24);
}

/* The only rule here: a focus ring every interactive element shows, in both looks. */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
