/* ORAD — "Reading Room" design tokens (single source of truth).
   Consumed by the differential tool (web/, via the /theme mount) and the Astro
   reference site (public_site/). Identity: grayscale radiographic film on a dark
   viewbox, lit by the amber safelight of a dental darkroom.

   Dark ("reading room") is the default; [data-theme="light"] is the "lightbox".
   Variable NAMES are kept stable so the tool's existing stylesheet re-themes by
   value substitution rather than markup churn. --ox is the single brand accent
   (amber); provenance/confidence hues stay distinct via --blue/--amber/--green/
   --teal/--grey/--danger. */

:root {
  /* Neutrals — the film system */
  --bg:     #0C1013;   /* viewbox canvas */
  --paper:  #161C21;   /* film panel / card */
  --plate:  #05070A;   /* deep well behind uploaded radiographs */
  --ink:    #E9ECE8;   /* bone — primary text */
  --muted:  #9BA4AB;   /* secondary text */
  --faint:  #7C858D;   /* labels / tertiary — ≥4.5:1 on --bg for AA small text */
  --rule:   #29333A;   /* hairline */

  /* Brand accent — darkroom safelight amber (was oxblood) */
  --ox:      #E5A24C;
  --ox-soft: #241B0F;  /* dark amber-tint fill behind amber text */

  /* Provenance / confidence — retuned as muted glows, kept distinct */
  --blue:  #6BA5E0;  --blue-soft:  #16222E;   /* AI high confidence */
  --amber: #D9A441;  --amber-soft: #241E10;   /* AI moderate confidence */
  --green: #63B98A;  --green-soft: #12241A;   /* clinician-confirmed / you */
  --teal:  #56C2BC;  --teal-soft:  #0C2422;   /* clinical finding */
  --grey:  #96A0A6;  --grey-soft:  #1B2228;   /* AI unsure / neutral */
  --danger:#E0715A;  --danger-soft:#2A1512;   /* AI low confidence / scrutinise */

  /* Type */
  --font-display: 'Martian Mono', ui-monospace, 'SFMono-Regular', monospace;
  --font-mono:    'Martian Mono', ui-monospace, 'SFMono-Regular', monospace;
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  /* Layout (dynamic; JS may override --sidebar-w inline) */
  --sidebar-w: 360px;

  /* Radius scale — one system so corners read as deliberate, not ad hoc */
  --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;

  /* Elevation — three steps, from resting card to floating modal */
  --shadow-1: 0 8px 30px rgba(0,0,0,.35);
  --shadow-2: 0 12px 30px rgba(0,0,0,.22);
  --shadow-3: 0 30px 80px -40px rgba(0,0,0,.7);

  /* Motion */
  --dur-fast: .15s; --dur: .25s; --ease: cubic-bezier(.2, .7, .2, 1);

  /* Category palette — used only by the lesion Map (public_site). Semantic by
     hue family: benign→cool greens/teals, malignant→warm reds/roses, cysts→blue,
     fibro-osseous→bronze, giant-cell→burnt orange, inflammatory→olive, developmental/
     metabolic/systemic→violets, salivary→pink, calcifications/TMJ→slate, normal/
     trauma→grey. Distinct from --ox (reserved for interaction). Keyed by the
     categories.json slugs so a node's data-cat maps straight to fill:var(--cat-<slug>). */
  --cat-benign-odontogenic-tumors:                       #57C6BF;
  --cat-benign-non-odontogenic-tumors:                   #6BC191;
  --cat-odontogenic-cysts:                               #6BA5E0;
  --cat-non-odontogenic-cysts-pseudocysts:               #5FBCD6;
  --cat-malignant-odontogenic-tumors:                    #E2604D;
  --cat-malignant-tumors-non-odontogenic:                #D6483F;
  --cat-hematologic-lymphoproliferative-malignancies:    #D45C86;
  --cat-fibro-osseous-cemento-osseous-lesions:           #CE9E6C;
  --cat-giant-cell-lesions:                              #CC7A33;
  --cat-inflammatory-infectious-lesions:                 #AEB24F;
  --cat-metabolic-endocrine-bone-disease:                #AE8FE6;
  --cat-genetic-developmental-bone-dysplasias-syndromes: #8E93E0;
  --cat-systemic-hematologic-non-malignant-conditions:   #C08FD0;
  --cat-salivary-gland-lesions:                          #E58CB8;
  --cat-soft-tissue-vascular-calcifications-foreign-bodies: #8AA0B0;
  --cat-tmj-joint-disorders:                             #6F9FC4;
  --cat-trauma-surgical-iatrogenic:                      #B0A091;
  --cat-normal-anatomy-developmental-dental-anomalies:   #9AA0A2;
  --cat-fallback:                                        #9BA4AB;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg:     #E9EDEE;   /* cool viewbox white */
  --paper:  #FFFFFF;   /* film panel */
  --plate:  #0A0D11;   /* image wells stay dark — film is read on black */
  --ink:    #1A2026;
  --muted:  #55606A;
  --faint:  #626C74;   /* ≥4.5:1 on the light --bg for AA small text */
  --rule:   #D8DDDE;

  --ox:      #B9701F;  /* darker amber for contrast on light */
  --ox-soft: #F6ECD9;

  --blue:  #2F5C93;  --blue-soft:  #E3EAF3;
  --amber: #9A6B12;  --amber-soft: #F6EBD4;
  --green: #2F6B4F;  --green-soft: #E2ECDF;
  --teal:  #0F6E70;  --teal-soft:  #D8ECEC;
  --grey:  #5F6B72;  --grey-soft:  #E8EAEC;
  --danger:#B03A28;  --danger-soft:#F6E0DC;

  /* Category palette — deepened for contrast on the light "lightbox" (white) ground. */
  --cat-benign-odontogenic-tumors:                       #167F79;
  --cat-benign-non-odontogenic-tumors:                   #2E8B5C;
  --cat-odontogenic-cysts:                               #2F6FB0;
  --cat-non-odontogenic-cysts-pseudocysts:               #1E8AA6;
  --cat-malignant-odontogenic-tumors:                    #C23A28;
  --cat-malignant-tumors-non-odontogenic:                #A82F2C;
  --cat-hematologic-lymphoproliferative-malignancies:    #B23767;
  --cat-fibro-osseous-cemento-osseous-lesions:           #9A6A34;
  --cat-giant-cell-lesions:                              #A85818;
  --cat-inflammatory-infectious-lesions:                 #74772C;
  --cat-metabolic-endocrine-bone-disease:                #6E4FB0;
  --cat-genetic-developmental-bone-dysplasias-syndromes: #4E52B0;
  --cat-systemic-hematologic-non-malignant-conditions:   #8A4FA0;
  --cat-salivary-gland-lesions:                          #C0447E;
  --cat-soft-tissue-vascular-calcifications-foreign-bodies: #566E80;
  --cat-tmj-joint-disorders:                             #3F6E96;
  --cat-trauma-surgical-iatrogenic:                      #7E6E5C;
  --cat-normal-anatomy-developmental-dental-anomalies:   #66707A;
  --cat-fallback:                                        #55606A;

  color-scheme: light;
}
