/* =====================================================================
   TessaMed design tokens - v1.0 (8 October 2026)
   One source of truth for the website (Astro) and the TessaMed software.
   Prefix: --tm-  (the prototype used the legacy --mp- prefix; map 1:1)
   Rules: no red anywhere; no em dashes in copy; DM Sans + JetBrains Mono only.
   ===================================================================== */
:root {
  /* ── Surfaces & ink (near-monochrome base) ── */
  --tm-night:      #1B1F3B;  /* primary ink, dark sections, app sidebar */
  --tm-night-2:    #141830;  /* deeper night, hover on night */
  --tm-cream:      #FFFCF5;  /* page / app canvas */
  --tm-off:        #F4F1E9;  /* secondary band, panels */
  --tm-sand:       #FBF6EE;  /* warm tint band */
  --tm-white:      #FFFFFF;  /* cards on tinted bands, logo plates, inputs in app */
  --tm-body:       #3A3A4E;  /* body text */
  --tm-secondary:  #555565;  /* supporting text */
  --tm-muted:      #6B6F7D;  /* labels, captions, mono eyebrows */
  --tm-border:     #E2DED4;  /* hairline borders */
  --tm-line:       #EAE7DE;  /* dividers, table rules */
  --tm-on-night:        #FFFCF5;  /* text on navy */
  --tm-on-night-muted:  #9298A6;  /* supporting text on navy */
  --tm-hairline-night:  rgba(255,255,255,0.16);

  /* ── Speciality (discipline) colours: dots, fills, borders, data, anything on navy ── */
  --tm-cobalt: #2D5DFF;  /* Obstetrics & Gynaecology (live) · primary action · links */
  --tm-sky:    #05ABF9;  /* Anaesthesiology */
  --tm-pink:   #E85AD4;  /* Physician */
  --tm-orange: #FD5E02;  /* Orthopaedics · "action required" status */
  --tm-amber:  #F0A800;  /* Ophthalmology · "pending" status */

  /* ── Text-safe speciality tones: when a speciality colour is TEXT on a light surface (WCAG AA 4.5:1) ── */
  --tm-cobalt-text: #2B59F4;
  --tm-sky-text:    #0370A4;
  --tm-pink-text:   #A74098;
  --tm-orange-text: #B84401;
  --tm-amber-text:  #8F6400;

  /* ── Pastel "rooms" (speciality washes) ── */
  --tm-room-og: #E7ECFF;
  --tm-room-an: #DAF2FD;
  --tm-room-ph: #FCE7F8;
  --tm-room-or: #FFEBE0;
  --tm-room-op: #FCF2D9;

  /* ── Status system (software + site). Never red. ── */
  --tm-status-new-bg:        rgba(45,93,255,0.12);  --tm-status-new-fg:        #2B59F4; /* New / active / saved */
  --tm-status-processing-bg: rgba(5,171,249,0.12);  --tm-status-processing-fg: #0370A4; /* Processing / info */
  --tm-status-pending-bg:    rgba(240,168,0,0.16);  --tm-status-pending-fg:    #8F6400; /* Pending / awaiting */
  --tm-status-action-bg:     rgba(253,94,2,0.12);   --tm-status-action-fg:     #B84401; /* Action required / overdue / error */

  /* ── Multicoloured ball (full logo dot) ── */
  --tm-spectrum: linear-gradient(135deg, #2D5DFF 0%, #05ABF9 25%, #E85AD4 50%, #FD5E02 75%, #F0A800 100%);

  /* ── Type ── */
  --tm-font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --tm-font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --tm-weight-display: 300;  /* whisper-light headings: the signature */
  --tm-weight-body: 400;
  --tm-weight-strong: 500;
  --tm-weight-emphasis: 600; /* sparingly: names, room titles */
  --tm-text-display: clamp(40px, 6vw, 66px);  --tm-track-display: -1.8px;
  --tm-text-h1:      clamp(34px, 5vw, 50px);  --tm-track-h1: -1.8px;
  --tm-text-h2:      clamp(26px, 3.4vw, 36px);--tm-track-h2: -1.2px;
  --tm-text-h3:      20px;                    --tm-track-h3: -0.4px;
  --tm-text-lead:    18px;   /* weight 300 */
  --tm-text-body:    16px;
  --tm-text-small:   14.5px;
  --tm-text-caption: 13px;
  --tm-text-label:   11px;   /* mono, uppercase, letter-spacing 2px */
  --tm-leading-tight: 1.1;
  --tm-leading-body:  1.6;

  /* ── Spacing (8px base) ── */
  --tm-space-1: 4px;  --tm-space-2: 8px;  --tm-space-3: 12px; --tm-space-4: 16px;
  --tm-space-5: 24px; --tm-space-6: 32px; --tm-space-7: 48px; --tm-space-8: 64px;
  --tm-space-9: 80px; --tm-space-10: 96px;
  --tm-section-y: 80px;
  --tm-max-width: 1160px;
  --tm-gutter: 28px;

  /* ── Radius ── */
  --tm-radius-input: 8px;
  --tm-radius-card: 16px;
  --tm-radius-room: 24px;
  --tm-radius-panel: 32px;   /* price cards, CTA bands */
  --tm-radius-pill: 1000px;  /* buttons, badges, tags */

  /* ── Elevation: flat by design. Use colour and borders, not shadow. ── */
  --tm-shadow: none;
  --tm-focus-ring: 0 0 0 3px rgba(45,93,255,0.35);

  /* ── Motion ── */
  --tm-ease: cubic-bezier(.2,.7,.2,1);
  --tm-ease-settle: cubic-bezier(.3,1.4,.5,1);
  --tm-dur-fast: 150ms; --tm-dur-base: 500ms; --tm-dur-hero: 1200ms;
  --tm-stagger: 70ms;  /* mosaic tile stagger */
}
@media (prefers-reduced-motion: reduce) {
  :root { --tm-dur-fast: 0ms; --tm-dur-base: 0ms; --tm-dur-hero: 0ms; --tm-stagger: 0ms; }
}
