/* CWC semantic tokens (TICKET-62): what each colour, type and shape means, on top of the template's base tokens in
   theme.css. Every surface of a CWC product (the manual, the Deploy Console, the documents) uses these names, so one
   pairing always means one thing. The board that shows and explains them: ai/design/cwc-tokens/index.html.
   Contrast is WCAG 2 AA: 4.5:1 for text, 3:1 for a control's boundary; each ratio is noted where it binds. */
:root {
  /* Base (theme.css), repeated so this file stands alone. */
  --cwc-paper: #F9F6F1;
  --cwc-surface: #F1EDE6;
  --cwc-ghost: #EDEAE5;
  --cwc-ink: #0D0D0D;
  --cwc-text-2: #41403F;
  --cwc-text-3: #706F6D;
  --cwc-accent: #6F2C91;
  --cwc-hairline: #DBD8D4;
  --cwc-white: #FFFFFF;

  /* Text. text-3 only on paper (4.66:1); on surface or ghost it falls under 4.5:1 (4.30:1, 4.18:1), so labels there take
     text-2 (9.60:1 on paper, 8.87:1 on surface, 8.62:1 on ghost). */
  --text-body: var(--cwc-ink);
  --text-secondary: var(--cwc-text-2);
  --text-meta-on-paper: var(--cwc-text-3);
  --text-meta-on-card: var(--cwc-text-2);
  --text-link: var(--cwc-accent);              /* 7.97:1 on paper, 7.36:1 on surface */

  /* Backgrounds. */
  --bg-page: var(--cwc-paper);
  --bg-card: var(--cwc-surface);
  --bg-sunken: var(--cwc-ghost);

  /* Lines. A divider may be faint; a control's boundary must reach 3:1. */
  --line-divider: var(--cwc-hairline);         /* 1.32:1: dividers, card edges, table rules only */
  --line-control: var(--cwc-text-3);           /* 4.66:1: fields, secondary buttons, checkboxes */

  /* Actions. One primary per panel. */
  --action-primary-bg: var(--cwc-ink);         /* the way forward: Save and continue, Deploy, Sign in */
  --action-primary-text: var(--cwc-white);     /* 19.4:1 */
  --action-primary-bg-hover: #2A2928;
  --action-secondary-bg: var(--cwc-paper);     /* an alternative: Test the connection, Run the checks again */
  --action-secondary-text: var(--cwc-ink);
  --action-secondary-line: var(--line-control);
  --action-secondary-bg-hover: var(--cwc-ghost);  /* ink on it 16.2:1 */
  --action-tertiary-text: var(--cwc-ink);      /* text only, underlined on hover: Back, Details */
  --action-disabled-bg: var(--cwc-ghost);
  --action-disabled-text: var(--cwc-text-2);   /* stays readable (8.62:1); the control says why it is off */
  --action-disabled-line: var(--line-divider);  /* an inactive control is exempt from the 3:1 boundary */

  /* Identity and place: purple never fills an action. */
  --identity: var(--cwc-accent);               /* links, the title bar, section eyebrows */
  --selected-bg: var(--cwc-accent);            /* a selected state: the current step's marker, a chosen segment */
  --selected-text: var(--cwc-white);           /* 8.59:1 */
  --focus-ring: var(--cwc-accent);             /* 2px, offset 2px, on every focusable control */

  /* Status: always with a word or an icon, never colour alone; never an action. Text on its own 10% tint, >= 4.9:1. */
  --status-pass: #266944;
  --status-fail: #A73225;
  --status-warn: #84510D;
  --status-info: #274A9B;
  --status-pass-bg: color-mix(in srgb, var(--status-pass) 10%, var(--cwc-paper));
  --status-fail-bg: color-mix(in srgb, var(--status-fail) 10%, var(--cwc-paper));
  --status-warn-bg: color-mix(in srgb, var(--status-warn) 10%, var(--cwc-paper));
  --status-info-bg: color-mix(in srgb, var(--status-info) 10%, var(--cwc-paper));

  /* Machine output: logs and terminals only. Warmer and larger than a button, always in mono. */
  --terminal-bg: #1C1B1A;
  --terminal-text: var(--cwc-ghost);           /* 14.3:1; dim 7.1:1, fail 8.4:1, mark 9.8:1 */
  --terminal-dim: #A8A6A2;                     /* timestamps, unit names */
  --terminal-fail: #F0A196;                    /* a failing line, on the terminal background */
  --terminal-mark: #D9B8EA;                    /* a line a check points to */
  --terminal-line: #3A3836;                    /* the terminal's own edge and dividers */
  --terminal-control: var(--terminal-dim);     /* the terminal's tabs and Follow control, on its background (7.1:1) */

  /* Progress: work under way, always with its words ("Pulling 2 of 6"). */
  --progress-fill: var(--status-info);
  --progress-track: var(--cwc-ghost);

  /* Type: the face says what the words are. */
  --type-display: "Libre Baskerville", Georgia, serif;     /* page and section titles only */
  --type-ui: "Inter", system-ui, sans-serif;               /* interface text and prose */
  --type-data: "JetBrains Mono", ui-monospace, monospace;  /* labels (upper case, spaced), settings, tags, digests, logs */

  /* Shape. No thick left-border accent anywhere. Diagrams draw straight lines (Mermaid's `curve: "linear"`); a curve
     only where space is too tight for one. */
  --radius: 3px;
  --border-width: 1px;
}
