/*
 * Design tokens of the web shell (Steel Graphite LEDGER).
 * Single source of truth: the front matter of docs/ux.md (colors, typography,
 * rounded, spacing, components). Every token is exactly one custom property on
 * :root, values are copied verbatim, every {ref} link becomes var(--...).
 * Dark theme only: there is no light theme and no media query in this file.
 */

:root {
  color-scheme: dark;

  /* colors */
  --color-bg: #0A0C0E;
  --color-surface: #111519;
  --color-surface-raised: #161B21;
  --color-border: #20272F;
  --color-border-strong: #3A4654;
  --color-border-control: #5E6C7A;
  --color-text: #EEF3F8;
  --color-text-muted: #AEBBC8;
  --color-text-faint: #8492A0;
  --color-accent: #EEF3F8;
  --color-accent-ink: #0A0C0E;
  --color-accent-soft: rgba(238, 243, 248, 0.08);
  --color-accent-line: #CFD8E3;
  --color-danger: #DCE5EF;
  --color-danger-soft: rgba(220, 229, 239, 0.08);
  --color-danger-line: #8492A0;
  --color-warn: #E5B84B;
  --color-warn-soft: rgba(229, 184, 75, 0.08);
  --color-warn-border: rgba(229, 184, 75, 0.34);
  --color-focus-ring: #EEF3F8;
  --color-scrim: rgba(6, 8, 9, 0.78);
  --color-disabled-bg: #191F26;
  --color-disabled-fg: #5E6C7A;

  /* typography.display */
  --type-display-font-family: Inter;
  --type-display-font-size: 32px;
  --type-display-font-weight: 650;
  --type-display-line-height: 1.15;
  --type-display-letter-spacing: -0.02em;

  /* typography.h1 */
  --type-h1-font-family: Inter;
  --type-h1-font-size: 24px;
  --type-h1-font-weight: 600;
  --type-h1-line-height: 1.25;
  --type-h1-letter-spacing: -0.015em;

  /* typography.h2 */
  --type-h2-font-family: Inter;
  --type-h2-font-size: 19px;
  --type-h2-font-weight: 600;
  --type-h2-line-height: 1.3;
  --type-h2-letter-spacing: -0.01em;

  /* typography.body */
  --type-body-font-family: Inter;
  --type-body-font-size: 15px;
  --type-body-font-weight: 400;
  --type-body-line-height: 1.55;

  /* typography.report */
  --type-report-font-family: Inter;
  --type-report-font-size: 16px;
  --type-report-font-weight: 400;
  --type-report-line-height: 1.65;

  /* typography.label */
  --type-label-font-family: Inter;
  --type-label-font-size: 12px;
  --type-label-font-weight: 600;
  --type-label-line-height: 1.3;
  --type-label-letter-spacing: 0.06em;

  /* typography.caption */
  --type-caption-font-family: Inter;
  --type-caption-font-size: 13px;
  --type-caption-font-weight: 400;
  --type-caption-line-height: 1.45;

  /* typography.mono */
  --type-mono-font-family: JetBrains Mono;
  --type-mono-font-size: 13px;
  --type-mono-font-weight: 450;
  --type-mono-line-height: 1.45;

  /* rounded */
  --rounded-sm: 0px;
  --rounded-md: 0px;
  --rounded-lg: 0px;
  --rounded-pill: 0px;

  /* spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  --spacing-2xl: 32px;
  --spacing-3xl: 48px;
  --spacing-report-measure: 72ch;
  --spacing-sidebar: 280px;
  --spacing-control-h: 44px;
  --spacing-content-max: 1200px;
  --spacing-form-max: 560px;

  /* components.button-primary */
  --button-primary-background: var(--color-accent);
  --button-primary-foreground: var(--color-accent-ink);
  --button-primary-radius: var(--rounded-md);

  /* components.button-primary-disabled */
  --button-primary-disabled-background: var(--color-disabled-bg);
  --button-primary-disabled-foreground: var(--color-disabled-fg);
  --button-primary-disabled-radius: var(--rounded-md);

  /* components.button-secondary */
  --button-secondary-background: transparent;
  --button-secondary-foreground: var(--color-text);
  --button-secondary-border: 1px solid var(--color-border-control);
  --button-secondary-radius: var(--rounded-md);

  /* components.button-danger */
  --button-danger-background: transparent;
  --button-danger-foreground: var(--color-danger);
  --button-danger-border: 1px solid var(--color-danger-line);
  --button-danger-radius: var(--rounded-md);

  /* components.action-slot */
  --action-slot-background: var(--color-surface);
  --action-slot-border: 1px solid var(--color-accent-line);
  --action-slot-shadow: none;
  --action-slot-radius: var(--rounded-lg);

  /* components.action-slot-danger */
  --action-slot-danger-background: var(--color-surface);
  --action-slot-danger-border: 1px solid var(--color-danger-line);
  --action-slot-danger-shadow: none;
  --action-slot-danger-radius: var(--rounded-lg);

  /* components.answer-option */
  --answer-option-background: transparent;
  --answer-option-foreground: var(--color-text);
  --answer-option-border: 1px solid var(--color-border-control);
  --answer-option-radius: var(--rounded-md);

  /* components.answer-option-recommended */
  --answer-option-recommended-background: var(--color-accent-soft);
  --answer-option-recommended-foreground: var(--color-text);
  --answer-option-recommended-border: 1px solid var(--color-accent-line);
  --answer-option-recommended-radius: var(--rounded-md);

  /* components.answer-option-selected */
  --answer-option-selected-background: var(--color-surface-raised);
  --answer-option-selected-foreground: var(--color-text);
  --answer-option-selected-border: 2px solid var(--color-accent);
  --answer-option-selected-radius: var(--rounded-md);

  /* components.stage-row-selected */
  --stage-row-selected-background: var(--color-surface-raised);
  --stage-row-selected-foreground: var(--color-text);
  --stage-row-selected-radius: var(--rounded-md);

  /* components.stage-row-waiting */
  --stage-row-waiting-background: var(--color-accent-soft);
  --stage-row-waiting-foreground: var(--color-accent);
  --stage-row-waiting-radius: var(--rounded-md);

  /* components.badge-beta */
  --badge-beta-background: var(--color-surface);
  --badge-beta-foreground: var(--color-text);
  --badge-beta-border: 1px solid var(--color-accent-line);
  --badge-beta-radius: var(--rounded-pill);

  /* components.result-card */
  --result-card-background: var(--color-surface);
  --result-card-border: 1px dashed var(--color-accent-line);
  --result-card-radius: var(--rounded-lg);

  /* components.report-frame */
  --report-frame-background: var(--color-bg);
  --report-frame-foreground: var(--color-text);
  --report-frame-radius: var(--rounded-lg);
  --report-frame-border: 1px solid var(--color-border);

  /* components.text-input */
  --text-input-background: var(--color-surface);
  --text-input-foreground: var(--color-text);
  --text-input-border: 1px solid var(--color-border-control);
  --text-input-radius: var(--rounded-md);

  /* components.text-input-error */
  --text-input-error-background: var(--color-surface);
  --text-input-error-foreground: var(--color-text);
  --text-input-error-border: 1px solid var(--color-danger);
  --text-input-error-radius: var(--rounded-md);

  /* components.toast */
  --toast-background: var(--color-surface-raised);
  --toast-foreground: var(--color-text);
  --toast-border: 1px solid var(--color-border-control);
  --toast-radius: var(--rounded-md);

  /* components.connection-bar */
  --connection-bar-background: var(--color-warn-soft);
  --connection-bar-foreground: var(--color-warn);
}
