/* Direction: Carebook — a quiet clinic console. Cool white paper, graphite
   text, slim geometric headings, one deep violet accent for the now line,
   the main action and the takings. */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #fbfcfe;
  --surface: #ffffff;
  --surface-2: #f2f5fa;
  --border: #e3e8f1;
  --border-strong: #c7cedd;
  --ink: #23262e;
  --muted: #5f6676;
  --accent: #4c1fd7;
  --accent-hover: #3f16c2;
  --accent-ink: #ffffff;
  --accent-text: #4a21c9;
  --accent-strong: #3a17a8;
  --accent-soft: #efeafe;
  --accent-border: #d4c9fb;
  --success: #11734a;
  --success-ink: #ffffff;
  --success-soft: #dfece8;
  --success-strong: #11734a;
  --warning: #9a5b06;
  --warning-ink: #ffffff;
  --warning-soft: #efe9e0;
  --warning-strong: #8e5406;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #f3e1e3;
  --danger-strong: #b91c1c;
  --chart-1: #4c1fd7;
  --chart-2: #bd0d95;
  --chart-3: #832d03;
  --chart-4: #776a03;
  --chart-5: #065c3c;
  --chart-6: #177791;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --display-weight: 500;
  --display-tracking: -0.02em;
  --eyebrow-tracking: 0.14em;
  --radius-card: 16px;
  --radius-btn: 10px;
  --radius-input: 10px;
  --shadow-card: 0 1px 2px rgba(35, 38, 46, 0.04), 0 10px 30px -18px rgba(35, 38, 46, 0.18);
  --card-pad: 1.25rem;
  --x-on-photo: #ffffff;
  --x-rail: rgba(76, 31, 215, 0.14);
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

html[data-theme="dark"] {
  --canvas: #060310;
  --surface: #1f1c28;
  --surface-2: #12101c;
  --border: #292631;
  --border-strong: #514f58;
  --ink: #fbfcfe;
  --muted: #99989f;
  --accent: #4c1fd7;
  --accent-hover: #6741dd;
  --accent-ink: #ffffff;
  --accent-text: #9277e6;
  --accent-strong: #886be4;
  --accent-soft: #15093c;
  --accent-border: #26106a;
  --success: #11734a;
  --success-ink: #ffffff;
  --success-soft: #081c1d;
  --success-strong: #469271;
  --warning: #9a5b06;
  --warning-ink: #ffffff;
  --warning-soft: #27160e;
  --warning-strong: #b07f3d;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #2d0913;
  --danger-strong: #cd5c5c;
  --chart-1: #634afb;
  --chart-2: #e630b8;
  --chart-3: #d35011;
  --chart-4: #978809;
  --chart-5: #199767;
  --chart-6: #2198b7;
}

/* Carebook — motion and the timeline rail. */

@keyframes cb-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes cb-slide {
  from { opacity: 0.25; transform: translateX(-14px); }
  to { opacity: 1; transform: none; }
}

@keyframes cb-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.cb-page {
  animation: cb-fade 0.34s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.cb-row {
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.cb-row:hover {
  background-color: var(--surface-2);
  border-color: var(--border-strong);
}

.cb-new {
  animation: cb-slide 0.42s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.cb-rail {
  background: linear-gradient(to bottom, transparent, var(--x-rail) 6%, var(--x-rail) 94%, transparent);
}

.cb-now-dot {
  animation: cb-breathe 2.4s ease-in-out infinite;
}

html.reduced-motion .cb-page,
html.reduced-motion .cb-new,
html.reduced-motion .cb-now-dot {
  animation: none;
}

/* The prescription slip on paper. */
@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  html,
  body {
    background: var(--surface);
  }

  .cb-page {
    animation: none;
  }

  .cb-slip {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    max-width: none;
  }

  .cb-slip table {
    min-width: 0;
  }

  .cb-slip tr,
  .cb-slip section,
  .cb-slip footer {
    break-inside: avoid;
  }
}
