/* Daacter — "Clinical Clarity" design tokens.
   The single source of every colour, size and duration in the product. Both
   the staff surfaces and the patient PWA load this file; nothing else defines
   a raw colour. Change a value here and it changes everywhere.

   Fonts are self-hosted: a health surface must not call an external CDN on
   every page load, which would hand the patient's IP and the page they are on
   to a third party. */

/* Variable fonts — one file covers every weight the design uses. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/jakarta-latin.7660bd9909fb.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/jakarta-latin-ext.341687eeeb6a.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.260c81a4759b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
/* Urdu (Nastaliq) — patient-facing surfaces only. Self-hosted like the rest;
   its unicode-range is Arabic script alone, so Latin letters and Western
   digits in Urdu text fall through to Jakarta/Inter — which is exactly what we
   want: numerals stay in the data face in both languages. */
@font-face {
  font-family: "Noto Nastaliq Urdu";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/noto-nastaliq-urdu.85b507458d4b.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}

:root {
  /* --- Core palette --- */
  --healing-teal:   #0D9488;
  --pristine-white: #FFFFFF;
  --clinical-slate: #F1F5F9;
  --charcoal-ink:   #0F172A;
  --secure-gold:    #D97706;

  /* --- Teal ramp --- */
  --teal-900: #134E4A;
  --teal-800: #115E59;
  --teal-700: #0F766E;
  --teal-600: #0D9488;
  --teal-300: #5EEAD4;
  --teal-100: #CCFBF1;
  --teal-050: #F0FDFA;

  /* --- Neutral ramp --- */
  --ink-900: #0F172A;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748B;
  --ink-400: #94A3B8;
  --ink-300: #CBD5E1;
  --ink-200: #E2E8F0;
  --ink-100: #F1F5F9;
  --ink-050: #F8FAFC;

  /* --- Gold ramp (money only) --- */
  --gold-700: #B45309;
  --gold-600: #D97706;
  --gold-200: #FDE68A;
  --gold-050: #FFFBEB;

  /* --- Triage rose (clinical urgency and errors only) --- */
  --rose-700: #9F1239;
  --rose-600: #BE123C;
  --rose-100: #FFE4E6;
  --rose-050: #FFF1F2;

  /* --- Semantic --- */
  --bg:           var(--clinical-slate);
  --surface:      var(--pristine-white);
  --surface-sunk: var(--ink-050);
  --line:         var(--ink-200);
  --line-soft:    #EDF1F6;
  --text:         var(--charcoal-ink);
  --text-muted:   var(--ink-500);
  --text-dim:     var(--ink-400);
  --accent:       var(--healing-teal);
  --accent-ink:   var(--teal-800);
  --money:        var(--secure-gold);
  --urgent:       var(--rose-600);
  --ok:           var(--teal-700);
  --bad:          var(--rose-600);

  /* --- Type --- */
  --font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-data:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-display: clamp(2.5rem, 5.4vw, 4.25rem);
  --fs-h2:      clamp(1.7rem, 3.1vw, 2.5rem);
  --fs-h3:      clamp(1.15rem, 1.6vw, 1.375rem);
  --fs-lede:    clamp(1.0625rem, 1.35vw, 1.1875rem);
  --fs-body:    1rem;
  --fs-sm:      0.875rem;
  --fs-xs:      0.8125rem;
  --fs-micro:   0.6875rem;

  /* --- Space --- */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.5rem;   --sp-6: 2rem;
  --sp-7: 3rem;     --sp-8: 4rem;     --sp-9: 6rem;

  /* --- Radius --- */
  --r-sm: 8px;  --r-md: 12px;  --r-lg: 16px;  --r-xl: 22px;  --r-pill: 999px;

  /* --- Ambient separation: layered shadows, not heavy borders --- */
  --shadow-1: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.05);
  --shadow-2: 0 1px 2px rgba(15,23,42,.03), 0 4px 10px -2px rgba(15,23,42,.06),
              0 12px 24px -8px rgba(15,23,42,.07);
  --shadow-3: 0 1px 2px rgba(15,23,42,.04), 0 10px 22px -6px rgba(15,23,42,.09),
              0 30px 60px -22px rgba(15,23,42,.16);
  --shadow-teal: 0 1px 2px rgba(13,148,136,.18), 0 8px 20px -6px rgba(13,148,136,.28);
  --shadow-gold: 0 1px 2px rgba(217,119,6,.18), 0 8px 20px -6px rgba(217,119,6,.26);

  --ring: 0 0 0 3px rgba(13,148,136,.28);

  /* --- Motion --- */
  --ease:     cubic-bezier(.2,.7,.3,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --t-fast: 140ms;  --t-mid: 240ms;  --t-slow: 480ms;

  /* --- Shell --- */
  --shell-max: 1220px;
  --rail-w: 248px;

  --font-urdu: "Noto Nastaliq Urdu", "Plus Jakarta Sans", ui-sans-serif,
    system-ui, sans-serif;
}

/* Urdu locale: prepend Nastaliq to both type roles. Because the Nastaliq face
   only covers Arabic script, Latin text and Western digits still render in the
   original faces (Jakarta/Inter with tabular-nums), so money, dosages and
   timestamps look identical in both languages. Only <html lang="ur"> — the
   public/patient shell in Urdu — matches; the staff shell is always lang="en".
   Nastaliq is tall, so line-height is loosened to keep the script legible. */
:root:lang(ur),
[lang="ur"] {
  --font-display: var(--font-urdu);
  --font-data: "Noto Nastaliq Urdu", "Inter", ui-sans-serif, system-ui, sans-serif;
}
