/* CareTrace — Tableau-flavoured analytical aesthetic.
   Deep teal primary, coral accent, dense dashboard chrome. */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Condensed:wght@500;600;700&display=swap");

:root {
  /* Ink — cool charcoal */
  --ink-950: oklch(0.18 0.018 240);
  --ink-900: oklch(0.24 0.020 240);
  --ink-800: oklch(0.32 0.018 240);
  --ink-700: oklch(0.42 0.016 240);
  --ink-600: oklch(0.54 0.014 240);
  --ink-500: oklch(0.66 0.010 240);
  --ink-400: oklch(0.76 0.008 240);
  --ink-300: oklch(0.85 0.006 240);
  --ink-200: oklch(0.91 0.005 240);
  --ink-150: oklch(0.94 0.004 240);
  --ink-100: oklch(0.965 0.003 240);
  --ink-50:  oklch(0.985 0.002 240);

  /* Surface — analyst workspace */
  --surface:   oklch(0.985 0.004 220);
  --surface-2: oklch(0.965 0.006 220);
  --surface-3: oklch(0.94 0.008 220);

  /* Teal — primary brand scale */
  --teal-950: oklch(0.20 0.05 200);
  --teal-900: oklch(0.26 0.07 200);
  --teal-800: oklch(0.34 0.09 200);
  --teal-700: oklch(0.40 0.10 200);
  --teal-600: oklch(0.45 0.10 200);   /* primary brand */
  --teal-500: oklch(0.55 0.10 200);
  --teal-400: oklch(0.68 0.10 200);
  --teal-300: oklch(0.80 0.08 200);
  --teal-200: oklch(0.88 0.05 200);
  --teal-100: oklch(0.94 0.03 200);
  --teal-50:  oklch(0.97 0.018 200);

  /* Coral — secondary brand accent (outcome highlight) */
  --coral-700: oklch(0.55 0.16 35);
  --coral-500: oklch(0.68 0.16 35);
  --coral-300: oklch(0.82 0.10 35);
  --coral-100: oklch(0.95 0.04 35);

  /* Quintile / risk palette — 5-step diverging */
  --q1: oklch(0.42 0.10 200);   /* deep teal */
  --q2: oklch(0.60 0.09 195);
  --q3: oklch(0.78 0.04 180);   /* neutral */
  --q4: oklch(0.72 0.12 50);
  --q5: oklch(0.62 0.18 35);    /* coral */

  /* Semantic */
  --pos:      oklch(0.50 0.13 158);
  --pos-soft: oklch(0.94 0.04 158);
  --neg:      oklch(0.55 0.18 25);
  --neg-soft: oklch(0.95 0.045 25);
  --warn:     oklch(0.72 0.16 75);

  /* Type */
  --sans:  "IBM Plex Sans", "Söhne", system-ui, -apple-system, sans-serif;
  --sans-cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --mono:  "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Radius — small (analyst surfaces favour rectangles) */
  --r-2: 2px;
  --r-3: 3px;
  --r-4: 4px;
  --r-6: 6px;
  --r-8: 8px;

  /* Shadows */
  --shadow-card: 0 1px 0 oklch(0.91 0.005 240), 0 1px 2px oklch(0.18 0.018 240 / 0.03);
  --shadow-pop:  0 2px 4px oklch(0.18 0.018 240 / 0.06), 0 12px 24px -6px oklch(0.18 0.018 240 / 0.09);
}

.ct-root {
  font-family: var(--sans);
  color: var(--ink-950);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ct-root .num, .ct-root .mono {
  font-family: var(--mono);
  font-feature-settings: "tnum", "zero";
  font-variant-numeric: tabular-nums slashed-zero;
}

.ct-root .cond {
  font-family: var(--sans-cond);
  letter-spacing: -0.005em;
}

.ct-root .micro {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--teal-700);
}

/* Pill */
.ct-root .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--r-3);
  background: var(--ink-100);
  color: var(--ink-700);
  border: 1px solid var(--ink-200);
}
.ct-root .pill.teal  { background: var(--teal-100);  color: var(--teal-700);  border-color: var(--teal-200); }
.ct-root .pill.coral { background: var(--coral-100); color: var(--coral-700); border-color: transparent; }
.ct-root .pill.pos   { background: var(--pos-soft);  color: var(--pos);       border-color: transparent; }
.ct-root .pill.neg   { background: var(--neg-soft);  color: var(--neg);       border-color: transparent; }

/* Buttons */
.ct-root .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--r-3);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .12s;
  white-space: nowrap;
}
.ct-root .btn-primary { background: var(--ink-950); color: var(--surface); }
.ct-root .btn-teal    { background: var(--teal-600); color: white; }
.ct-root .btn-ghost   { background: var(--surface); color: var(--ink-900); border-color: var(--ink-300); }

/* Input */
.ct-root .input {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  font-family: var(--sans); font-size: 13px;
  color: var(--ink-700);
  background: var(--surface);
  border: 1px solid var(--ink-300);
  border-radius: var(--r-3);
}

/* Card */
.ct-root .card {
  background: var(--surface);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-4);
}

/* Hairline */
.ct-rule { border: 0; border-top: 1px solid var(--ink-200); margin: 0; }

/* Subtle dotted grid background, analytical */
.ct-grid {
  background-image:
    linear-gradient(to right, oklch(0.91 0.005 240) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.91 0.005 240) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}
