/* ==========================================================================
   FHIR R4 Prep — Accessible Design Tokens (WCAG AA/AAA)
   Neutral-first surfaces + Teal-Blue Primary + Semantic Status Tints
   ========================================================================== */

:root,
[data-theme="light"] {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Surfaces */
  --page: #F7F9FB;
  --surface: #FFFFFF;
  --surface-subtle: #F3F6F9;
  --code-bg: #F0F3F6;
  --sidebar-bg: #FFFFFF;

  /* Borders */
  --border: #D6DFE6;
  --border-subtle: #E6EDF2;

  /* Typography (Body text on white ~16.5:1) */
  --text: #16202A;
  --text-secondary: #4E5D6C;

  /* Primary Teal-Blue (used ONLY on primary CTA, progress bar, links) */
  --primary: #0F6D84;
  --primary-hover: #0B5668;
  --primary-btn-text: #FFFFFF;
  --primary-tint: #EBF5F8;

  /* Semantic Feedback (paired with text + outline icon; >= 6.2:1 on tint) */
  --correct: #156842;
  --correct-tint: #EAF6F0;
  --correct-border: #8CC9AC;

  --incorrect: #A42828;
  --incorrect-tint: #FCEEEE;
  --incorrect-border: #E5A4A4;

  /* Misc */
  --modal-overlay: rgba(15, 23, 32, 0.55);
  --shadow-sm: 0 1px 2px rgba(22, 32, 42, 0.04);
  --shadow-drawer: -8px 0 28px rgba(15, 23, 32, 0.12);
}

/* Dark Mode — Custom Calibrated Tokens (All text pairs clear 7:1) */
[data-theme="dark"] {
  --page: #0F1720;
  --surface: #17212C;
  --surface-subtle: #131C26;
  --code-bg: #111A24;
  --sidebar-bg: #121B25;

  --border: #2A3744;
  --border-subtle: #202C38;

  --text: #E7ECF1;
  --text-secondary: #A3B0BC;

  --primary: #6DBBD0;
  --primary-hover: #83C8DB;
  --primary-btn-text: #0F1720;
  --primary-tint: rgba(109, 187, 208, 0.12);

  --correct: #5FD39A;
  --correct-tint: rgba(95, 211, 154, 0.10);
  --correct-border: rgba(95, 211, 154, 0.45);

  --incorrect: #FF9A92;
  --incorrect-tint: rgba(255, 154, 146, 0.10);
  --incorrect-border: rgba(255, 154, 146, 0.45);

  --modal-overlay: rgba(5, 9, 14, 0.78);
  --shadow-sm: none;
  --shadow-drawer: -8px 0 28px rgba(0, 0, 0, 0.45);
}
