/* ============================================================
   The Interaction Atlas — styles
   Brand: deep navy + clinical white + tier-graded accents
   ============================================================ */

:root {
  --c-bg: #f5f7fb;
  --c-surface: #ffffff;
  --c-surface-2: #f0f3f8;
  --c-border: #d6dbe4;
  --c-border-strong: #aab3c2;
  --c-text: #0c2540;
  --c-text-muted: #4b5567;
  --c-text-soft: #6b7280;
  --c-brand: #0c2540;
  --c-brand-2: #1f4e79;
  --c-brand-soft: #e6edf6;
  --c-link: #1f4e79;

  --c-tier-1: #2e8b57;
  --c-tier-2: #c98a00;
  --c-tier-3: #d97706;
  --c-tier-4: #c2410c;
  --c-tier-5: #991b1b;
  --c-tier-6: #581c87;

  --c-tier-1-bg: #e8f5ee;
  --c-tier-2-bg: #fef5e0;
  --c-tier-3-bg: #fef0d8;
  --c-tier-4-bg: #fde2cf;
  --c-tier-5-bg: #fbd5d5;
  --c-tier-6-bg: #ede0fa;

  --c-emergency: #b91c1c;
  --c-emergency-strong: #7f1d1d;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(12,37,64,0.06);
  --shadow-md: 0 4px 12px rgba(12,37,64,0.08);
  --shadow-lg: 0 12px 28px rgba(12,37,64,0.14);

  --header-h: 60px;
  --nav-h: 60px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

/* Accessibility: skip-to-main link, visible focus rings */
.skip-link {
  position: absolute;
  left: -1000px;
  top: 0;
  background: var(--c-brand);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus {
  left: 0;
  outline: 3px solid var(--c-brand-2);
}

/* Universal focus ring — make every focusable element visually identifiable. */
:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}
/* Buttons inside the navy header get a contrasting ring */
#taskbar :focus-visible {
  outline-color: #fbbf24;
}
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
  min-height: 100vh;
}

a { color: var(--c-link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ============================================================
   Header taskbar
============================================================ */
#taskbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--c-brand);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.tb-brand {
  background: transparent;
  border: 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: var(--r-md);
}
.tb-brand:hover { background: rgba(255,255,255,0.06); }
.tb-logo {
  font-size: 22px;
  font-weight: 700;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: grid; place-items: center;
}
.tb-product {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.tb-edition {
  font-weight: 400;
  font-size: 11px;
  opacity: 0.75;
  margin-left: 4px;
}
.tb-build {
  font-weight: 500;
  font-size: 11px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  padding: 2px 9px;
  border-radius: 999px;
  margin-left: 8px;
  letter-spacing: 0.02em;
}
#web-nav {
  display: flex;
  margin-left: 12px;
  align-items: center;
  gap: 4px;
  flex: 1;
}
#web-nav a {
  color: rgba(255,255,255,0.84);
  padding: 8px 12px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
#web-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
#web-nav a.active { background: rgba(255,255,255,0.16); color: #fff; }

.tb-context { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.mode-toggle {
  display: flex;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 3px;
}
.mode-btn {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.7);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  white-space: nowrap;
}
.mode-btn[aria-selected="true"] {
  background: #fff;
  color: var(--c-brand);
}
.mode-btn:not([aria-selected="true"]):hover { color: #fff; }

.tb-context-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--r-md);
  position: relative;
}
.tb-context-btn:hover { background: rgba(255,255,255,0.16); }
.tb-context-btn .ni { font-size: 14px; }
.tb-context-count {
  background: #c98a00;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
}
.tb-context-label { display: none; }

.tb-emergency {
  background: var(--c-emergency);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.2);
}
.tb-emergency:hover { background: var(--c-emergency-strong); text-decoration: none; }

/* ============================================================
   Narrow-viewport hint (shown when window is below the designed minimum)
============================================================ */
#narrow-viewport-hint {
  position: fixed;
  inset: 0;
  background: var(--c-bg);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.narrow-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px;
  max-width: 460px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.narrow-card h2 { margin: 0 0 10px; font-size: 18px; }
.narrow-card p { margin: 0; color: var(--c-text-muted); line-height: 1.55; }
@media (min-width: 1000px) {
  #narrow-viewport-hint { display: none !important; }
}

/* ============================================================
   Main / app
============================================================ */
#app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px 24px 32px;
}

.screen-header {
  margin: 0 0 16px;
}
.screen-header h1 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.screen-header p {
  margin: 0;
  color: var(--c-text-muted);
  font-size: 14px;
}

/* ============================================================
   Cards / panels
============================================================ */
.panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.panel h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
}
.panel h3 {
  margin: 16px 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-brand);
}
.panel-body p { margin: 0 0 8px; }

/* ============================================================
   Inputs
============================================================ */
.search-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  outline: none;
}
.search-input:focus { border-color: var(--c-brand-2); box-shadow: 0 0 0 3px rgba(31,78,121,0.16); }
select, input[type="number"], input[type="text"] {
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 7px 9px;
  font-size: 14px;
  background: var(--c-surface);
  color: var(--c-text);
}

/* ============================================================
   Drug list / cards
============================================================ */
.drug-list { list-style: none; margin: 0; padding: 0; }
.drug-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.drug-row:hover { background: var(--c-surface-2); }
.drug-row .name { font-weight: 600; }
.drug-row .meta { color: var(--c-text-muted); font-size: 12px; }
.drug-row .meta > * + *::before { content: "·"; margin: 0 6px; color: var(--c-text-soft); }

.group-badge {
  display: inline-block;
  background: var(--c-brand-soft);
  color: var(--c-brand);
  border: 1px solid #cdd9ea;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chip {
  display: inline-block;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--c-surface-2);
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
  margin: 2px 4px 2px 0;
  text-decoration: none;
}
.chip:hover { background: #e8edf3; text-decoration: none; }
.chip.chip-cyp { background: #fef9e7; border-color: #f1d97a; color: #6d5210; }
.chip.chip-transport { background: #e7f3fe; border-color: #9ec7f0; color: #0e3e6d; }
.chip.chip-risk { background: #fdecea; border-color: #f5b8b4; color: #7a1a14; }
.chip.chip-syndrome { background: #f4e7ff; border-color: #cba0f6; color: #4a1980; }

/* ============================================================
   Tier badge
============================================================ */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--r-md);
  border: 1px solid;
  white-space: nowrap;
}
.tier-1 { background: var(--c-tier-1-bg); color: var(--c-tier-1); border-color: #b6dec5; }
.tier-2 { background: var(--c-tier-2-bg); color: var(--c-tier-2); border-color: #f0d68a; }
.tier-3 { background: var(--c-tier-3-bg); color: var(--c-tier-3); border-color: #f4c389; }
.tier-4 { background: var(--c-tier-4-bg); color: var(--c-tier-4); border-color: #f3a979; }
.tier-5 { background: var(--c-tier-5-bg); color: var(--c-tier-5); border-color: #f0a39e; }
.tier-6 { background: var(--c-tier-6-bg); color: var(--c-tier-6); border-color: #c79bf2; }

/* ============================================================
   Detail screens
============================================================ */
.hero {
  background: linear-gradient(135deg, #0c2540 0%, #1f4e79 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.hero h1 { margin: 0 0 4px; font-size: 26px; font-weight: 700; }
.hero .alias { opacity: 0.78; font-size: 13px; }
.hero .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.hero .meta-line .pill {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.kv {
  display: grid;
  grid-template-columns: 180px 1fr;
  row-gap: 8px;
  column-gap: 14px;
  font-size: 14px;
}
.kv dt {
  color: var(--c-text-muted);
  font-weight: 500;
}
.kv dd { margin: 0; }
.kv-subtle dt { color: var(--c-text-soft); font-weight: 400; font-size: 13px; }

.body-copy {
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.body-copy.clinician { font-size: 14px; }
.body-copy.carer { font-size: 15px; }
.body-copy.participant { font-size: 16px; line-height: 1.6; }

/* Section markers in mode-aware copy */
.body-copy strong, .body-copy h4 { color: var(--c-brand); }

/* ============================================================
   DDI screen — multi-drug picker list
============================================================ */
.ddi-pickers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.ddi-slot {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.ddi-slot .ddi-picker {
  background: transparent;
  border: 0;
  padding: 0;
}
.ddi-slot-remove {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: 0;
  font-size: 12px;
  color: var(--c-text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
}
.ddi-slot-remove:hover {
  background: var(--c-tier-5-bg);
  color: var(--c-tier-5);
}
.ddi-add-drug {
  align-self: flex-start;
  background: var(--c-surface-2);
  border-style: dashed;
  color: var(--c-brand);
}
.ddi-add-drug:hover {
  background: var(--c-brand-soft);
  border-style: solid;
}
.ddi-summary {
  margin-bottom: 16px;
}
.ddi-summary-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ddi-summary-drugs {
  margin-top: 6px;
  font-size: 13px;
  color: var(--c-text-muted);
}

/* ============================================================
   DDI screen (legacy two-up grid — kept for reference, no longer used)
============================================================ */
.ddi-grid {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 10px;
  align-items: stretch;
}
.ddi-grid .vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text-soft);
}
.ddi-picker {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 12px;
}
.ddi-picker .label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
  margin-bottom: 6px;
}
.ddi-picker .selected {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.ddi-picker .selected.empty { color: var(--c-text-soft); font-weight: 500; }
.ddi-picker .clear-btn {
  background: transparent;
  border: 0;
  color: var(--c-link);
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
}
.pair-result { margin-top: 14px; }
.pair-tier-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.pair-headline {
  font-size: 17px;
  font-weight: 600;
  margin: 4px 0 12px;
  color: var(--c-brand);
}
.pair-action {
  background: var(--c-surface-2);
  border-left: 4px solid var(--c-brand-2);
  padding: 12px 14px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: 12px 0;
  white-space: pre-wrap;
}
.pair-action.tier-5, .pair-action.tier-6 {
  background: var(--c-tier-5-bg);
  border-left-color: var(--c-tier-5);
}
.modifier-banner {
  background: #fef5e0;
  border: 1px solid #f0d68a;
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 13px;
  color: #6d5210;
  margin: 10px 0;
}
.modifier-banner ul { margin: 6px 0 0 18px; }

/* ============================================================
   Search dropdown / results
============================================================ */
.search-wrap { position: relative; margin-bottom: 14px; }
.search-results {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  max-height: 360px;
  overflow-y: auto;
  z-index: 20;
  margin-top: 4px;
}

/* ============================================================
   Modal / sheet
============================================================ */
#modal-root.open { display: block; }
.modal-shade {
  position: fixed; inset: 0;
  background: rgba(12, 37, 64, 0.45);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
}
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--c-text-muted);
  padding: 4px 8px;
}
.modal-body { padding: 16px 18px; }
.modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-weight: 500;
  font-size: 14px;
}
.btn:hover { background: var(--c-surface-2); }
.btn-primary { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }
.btn-primary:hover { background: #1a3554; }
.btn-emergency { background: var(--c-emergency); color: #fff; border-color: var(--c-emergency); }
.btn-emergency:hover { background: var(--c-emergency-strong); }

/* ============================================================
   Tabs
============================================================ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 14px;
  overflow-x: auto;
}
.tab {
  background: transparent;
  border: 0;
  padding: 10px 14px;
  color: var(--c-text-muted);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab[aria-selected="true"] {
  color: var(--c-brand);
  border-bottom-color: var(--c-brand);
}

/* ============================================================
   PK timeline
============================================================ */
.pk-chart {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px;
}
.pk-chart svg { width: 100%; height: auto; display: block; }

/* ============================================================
   Loading
============================================================ */
.loading-shade {
  position: fixed; inset: 0;
  background: rgba(245,247,251,0.92);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.loading-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 24px 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-lg);
}
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-brand-2);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Toast
============================================================ */
#toast-root {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--c-text);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
}

/* ============================================================
   Emergency screen
============================================================ */
.emergency-banner {
  background: var(--c-emergency);
  color: #fff;
  padding: 16px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.emergency-banner .call-btn {
  background: #fff;
  color: var(--c-emergency);
  font-size: 22px;
  font-weight: 800;
  padding: 14px 22px;
  border-radius: var(--r-md);
  text-decoration: none;
  letter-spacing: 0.02em;
  border: 0;
}
.emergency-banner .desc { font-size: 14px; line-height: 1.4; }

.protocol-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-emergency);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
}
.protocol-card:hover { background: var(--c-surface-2); }
.protocol-card h3 { margin: 0 0 4px; font-size: 16px; }
.protocol-card .threshold { font-size: 12px; color: var(--c-text-muted); }

/* ============================================================
   Helpers
============================================================ */
.muted { color: var(--c-text-muted); }
.small { font-size: 12px; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-brand);
  margin: 16px 0 6px;
}
.divider { height: 1px; background: var(--c-border); margin: 14px 0; }
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--c-text-soft);
}
.empty-state .big { font-size: 36px; margin-bottom: 8px; }

/* ============================================================
   References + DOIs
============================================================ */
.ref-list { font-family: var(--font-mono); font-size: 12px; }
.ref-list .ref { display: inline-block; margin-right: 8px; padding: 1px 6px; background: var(--c-surface-2); border-radius: var(--r-sm); }

.ref-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ref-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.ref-id {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-brand);
  font-size: 12px;
}
.ref-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-link);
  word-break: break-all;
}
.ref-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--c-text-muted);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Severity-by-symptom table */
.severity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.severity-table th, .severity-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
.severity-table thead th {
  background: var(--c-surface-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-muted);
}
.sev-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.sym-cell-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.sym-name {
  font-size: 14px;
  color: var(--c-text);
}
.sym-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-text-soft);
  background: var(--c-surface-2);
  padding: 1px 7px;
  border-radius: var(--r-sm);
}
.sev-pill.sev-low { background: var(--c-tier-1-bg); color: var(--c-tier-1); }
.sev-pill.sev-mid { background: var(--c-tier-3-bg); color: var(--c-tier-3); }
.sev-pill.sev-high { background: var(--c-tier-5-bg); color: var(--c-tier-5); }
.sev-pill.sev-em { background: var(--c-emergency); color: #fff; }

/* ============================================================
   Patient context drawer
============================================================ */
.context-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.context-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.context-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.context-form select, .context-form input {
  width: 100%;
}

/* ============================================================
   Audit log
============================================================ */
.audit-day-head {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-muted);
  margin: 22px 0 8px;
}
.audit-list { display: flex; flex-direction: column; gap: 6px; }
.audit-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 10px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
}
.audit-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-text-muted);
  flex-shrink: 0;
  width: 50px;
  padding-top: 2px;
}
.audit-main { flex: 1; min-width: 0; }
.audit-action { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.audit-verb {
  font-weight: 600;
  font-size: 14px;
  color: var(--c-brand);
}
.audit-patient {
  font-size: 14px;
  color: var(--c-link);
  text-decoration: none;
}
.audit-patient:hover { text-decoration: underline; }
.audit-detail { margin-top: 4px; }

/* ============================================================
   Legal pages + acceptance gate
============================================================ */
.legal-panel { max-width: 760px; }
.legal-panel .lede {
  font-size: 16px;
  font-weight: 500;
  color: var(--c-brand);
  border-left: 3px solid var(--c-brand-2);
  padding-left: 12px;
  margin-bottom: 16px;
}
.legal-section { margin-top: 22px; }
.legal-section h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}
.legal-section p {
  margin: 0 0 8px;
  line-height: 1.55;
}
.legal-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.legal-links li {
  padding: 6px 0;
  border-bottom: 1px solid var(--c-border);
}
.legal-links li:last-child { border-bottom: 0; }

.acceptance-body {
  max-width: 100%;
  font-size: 14px;
}
.acceptance-lede {
  font-size: 13px;
  color: var(--c-text-muted);
  margin: 0 0 14px;
}
.acceptance-block {
  background: var(--c-surface-2);
  border-left: 3px solid var(--c-brand-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 10px 14px;
  margin-bottom: 10px;
}
.acceptance-block h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-brand);
}
.acceptance-block p { margin: 0; font-size: 13px; line-height: 1.5; }
.acceptance-links {
  text-align: center;
  margin: 14px 0 12px;
  font-size: 13px;
}
.acceptance-links a { color: var(--c-link); text-decoration: underline; }
.acceptance-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: var(--c-brand-soft);
  border: 1px solid #cdd9ea;
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}
.acceptance-checkbox input { margin-top: 3px; flex-shrink: 0; }

/* Larger modal for the acceptance gate */
.modal-shade .modal-card:has(.acceptance-body) { max-width: 720px; }

/* ============================================================
   Dashboard (home)
============================================================ */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}
.dash-title {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dash-subtitle { margin: 0; font-size: 14px; color: var(--c-text-muted); }
.dash-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.dash-empty { text-align: center; padding: 50px 24px; }
.dash-empty-icon { font-size: 50px; margin-bottom: 8px; }
.dash-empty h2 { margin: 0 0 8px; }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 760px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-snapshot { grid-column: span 2; }
  .dash-quick { grid-column: span 2; }
}
@media (min-width: 1100px) {
  .dash-grid { grid-template-columns: 2fr 1fr 1fr; }
  .dash-snapshot { grid-column: span 3; }
  .dash-attention { grid-column: span 2; grid-row: span 2; }
  .dash-quick { grid-column: span 3; }
}

.dash-card { margin-bottom: 0; display: flex; flex-direction: column; }
.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}
.dash-card-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.dash-card-link { font-size: 13px; color: var(--c-link); text-decoration: none; }
.dash-card-link:hover { text-decoration: underline; }

/* Triage snapshot */
.snap-counts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.snap-pill {
  background: var(--c-surface-2);
  border-radius: var(--r-md);
  padding: 12px 10px;
  text-align: center;
  border-left: 3px solid var(--c-border);
}
.snap-pill.snap-tier-5 { border-left-color: var(--c-tier-5); }
.snap-pill.snap-tier-4 { border-left-color: var(--c-tier-4); }
.snap-pill.snap-tier-3 { border-left-color: var(--c-tier-3); }
.snap-pill.snap-tier-2 { border-left-color: var(--c-tier-2); }
.snap-pill.snap-tier-1 { border-left-color: var(--c-tier-1); }
.snap-pill-num { font-size: 26px; font-weight: 700; line-height: 1; color: var(--c-text); }
.snap-pill.snap-tier-5 .snap-pill-num { color: var(--c-tier-5); }
.snap-pill.snap-tier-4 .snap-pill-num { color: var(--c-tier-4); }
.snap-pill.snap-tier-3 .snap-pill-num { color: var(--c-tier-3); }
.snap-pill-label { font-size: 12px; color: var(--c-text-muted); margin-top: 4px; }
.snap-progress-wrap { margin-top: 4px; }
.snap-progress { height: 8px; background: var(--c-surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.snap-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--c-tier-1) 0%, var(--c-brand-2) 100%);
  border-radius: 999px;
  transition: width 0.3s;
}
.snap-progress-label { font-size: 13px; }

/* Activity list */
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--c-border);
  font-size: 14px;
}
.activity-item:last-child { border-bottom: 0; }
.activity-icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--c-brand-soft);
  color: var(--c-brand);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Attention list */
.attention-list { display: flex; flex-direction: column; gap: 6px; }
.attention-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--c-surface-2);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  border-left: 3px solid transparent;
}
.attention-row:hover { background: #e8edf3; border-left-color: var(--c-brand-2); }
.attention-tier { flex-shrink: 0; }
.attention-main { flex: 1; min-width: 0; }
.attention-name { font-weight: 600; font-size: 14px; }
.attention-meta { font-size: 12px; color: var(--c-text-muted); margin-top: 2px; }
.attention-cta { flex-shrink: 0; }

/* High-risk drugs */
.highrisk-list { list-style: none; margin: 0; padding: 0; }
.highrisk-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--c-border);
}
.highrisk-row:last-child { border-bottom: 0; }
.highrisk-name { font-weight: 500; color: var(--c-link); text-decoration: none; }
.highrisk-name:hover { text-decoration: underline; }
.highrisk-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-tier-5);
  background: var(--c-tier-5-bg);
  padding: 2px 9px;
  border-radius: 999px;
}

/* Quick actions */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 520px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .quick-grid { grid-template-columns: repeat(6, 1fr); } }
.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: background 0.12s, border-color 0.12s;
}
.quick-tile:hover { background: var(--c-brand-soft); border-color: #cdd9ea; text-decoration: none; }
.quick-icon { font-size: 22px; }
.quick-label { font-size: 12px; font-weight: 500; }

/* Database health */
.dbhealth-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 520px) { .dbhealth-row { grid-template-columns: repeat(5, 1fr); } }
.dbhealth-stat {
  text-align: center;
  background: var(--c-surface-2);
  padding: 10px 8px;
  border-radius: var(--r-md);
}
.dbhealth-stat-num { font-size: 18px; font-weight: 700; color: var(--c-brand); }
.dbhealth-stat-label { font-size: 11px; color: var(--c-text-muted); margin-top: 2px; }

/* ============================================================
   Cohort triage
============================================================ */
.cohort-counts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.count-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  min-width: 110px;
  flex: 1 0 110px;
}
.count-num { font-size: 28px; font-weight: 700; line-height: 1; }
.count-label { font-size: 12px; font-weight: 600; color: var(--c-text-muted); margin-top: 4px; }

.cohort-filters {
  padding: 12px 14px;
  margin-bottom: 14px;
}
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.filter-row:last-child { margin-bottom: 0; }
.filter-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
  min-width: 80px;
}

.triage-table-wrap {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: auto;
}
.triage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.triage-table th, .triage-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
.triage-table thead th {
  background: var(--c-surface-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-muted);
  white-space: nowrap;
  position: sticky; top: 0;
}
.triage-table th.sortable { cursor: pointer; user-select: none; }
.triage-table th.sortable.active { color: var(--c-brand); }
.triage-table th.sortable:hover { color: var(--c-brand); }
.triage-row.band-urgent { background: linear-gradient(90deg, rgba(153,27,27,0.04), transparent 30%); }
.triage-row.band-caution { background: linear-gradient(90deg, rgba(194,65,12,0.03), transparent 30%); }
.triage-row.band-monitor { background: linear-gradient(90deg, rgba(217,119,6,0.03), transparent 30%); }
.triage-row:hover { background: var(--c-surface-2); }
.patient-link { text-decoration: none; color: inherit; display: block; }
.patient-link .name { font-weight: 600; }
.patient-link:hover .name { color: var(--c-link); }

.tier-mini, .assess-mini {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.tier-mini.tier-1 { background: var(--c-tier-1-bg); color: var(--c-tier-1); }
.tier-mini.tier-2 { background: var(--c-tier-2-bg); color: var(--c-tier-2); }
.tier-mini.tier-3 { background: var(--c-tier-3-bg); color: var(--c-tier-3); }
.tier-mini.tier-4 { background: var(--c-tier-4-bg); color: var(--c-tier-4); }
.tier-mini.tier-5 { background: var(--c-tier-5-bg); color: var(--c-tier-5); }
.tier-mini.tier-6 { background: var(--c-tier-6-bg); color: var(--c-tier-6); }

.assess-mini.assess-green { background: #e8f5ee; color: #2e8b57; }
.assess-mini.assess-amber { background: #fef5e0; color: #c98a00; }
.assess-mini.assess-orange { background: #fde2cf; color: #c2410c; }
.assess-mini.assess-yellow { background: #fef9e7; color: #6d5210; }
.assess-mini.assess-gray { background: var(--c-surface-2); color: var(--c-text-muted); }
.assess-mini.assess-muted { background: var(--c-surface-2); color: var(--c-text-soft); }

.assess-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.assess-pill.assess-green { background: #e8f5ee; color: #2e8b57; border: 1px solid #b6dec5; }
.assess-pill.assess-amber { background: #fef5e0; color: #c98a00; border: 1px solid #f0d68a; }
.assess-pill.assess-orange { background: #fde2cf; color: #c2410c; border: 1px solid #f3a979; }
.assess-pill.assess-yellow { background: #fef9e7; color: #6d5210; border: 1px solid #f1d97a; }
.assess-pill.assess-gray { background: var(--c-surface-2); color: var(--c-text-muted); border: 1px solid var(--c-border); }
.assess-pill.assess-muted { background: var(--c-surface-2); color: var(--c-text-soft); border: 1px solid var(--c-border); }

.band-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.band-badge.band-urgent { background: var(--c-tier-5-bg); color: var(--c-tier-5); }
.band-badge.band-caution { background: var(--c-tier-4-bg); color: var(--c-tier-4); }
.band-badge.band-monitor { background: var(--c-tier-3-bg); color: var(--c-tier-3); }
.band-badge.band-ok { background: var(--c-tier-2-bg); color: var(--c-tier-2); }
.band-badge.band-clear { background: var(--c-surface-2); color: var(--c-text-muted); }

.band-urgent-pill { background: rgba(255,255,255,0.2) !important; border-color: rgba(255,255,255,0.3) !important; }

.ctx-flags { display: flex; flex-wrap: wrap; gap: 3px; }
.ctx-flag {
  display: inline-block;
  font-size: 12px;
  background: var(--c-surface-2);
  color: var(--c-text-muted);
  padding: 2px 8px;
  border-radius: 999px;
}

.btn-small { font-size: 12px; padding: 4px 10px; }

.matrix-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.matrix-row {
  border: 1px solid var(--c-border);
  border-left-width: 4px;
  border-radius: var(--r-md);
  padding: 10px 12px;
  background: var(--c-surface);
}
.matrix-row.tier-row-5, .matrix-row.tier-row-6 { border-left-color: var(--c-tier-5); background: rgba(153,27,27,0.02); }
.matrix-row.tier-row-4 { border-left-color: var(--c-tier-4); }
.matrix-row.tier-row-3 { border-left-color: var(--c-tier-3); }
.matrix-row.tier-row-2 { border-left-color: var(--c-tier-2); }
.matrix-row.tier-row-1 { border-left-color: var(--c-tier-1); }
.matrix-row-head { margin-bottom: 6px; flex-wrap: wrap; gap: 8px; }
.matrix-pair-name { font-weight: 600; }
.matrix-headline { font-size: 14px; color: var(--c-brand); margin-top: 4px; }
.matrix-modifier-banner {
  background: var(--c-tier-2-bg);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  font-size: 12px;
  color: var(--c-tier-2);
  margin-top: 6px;
  display: inline-block;
}

/* ============================================================
   Clinician monograph (drug detail in clinician mode)
============================================================ */
.monograph-panel { padding: 0; overflow: hidden; }
.monograph-panel > h2 { padding: 18px 22px 0; margin: 0 0 4px; font-size: 18px; }

.monograph {
  font-size: 14px;
  line-height: 1.6;
}

.monograph-glance {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: linear-gradient(135deg, #0c2540 0%, #1f4e79 100%);
  color: #fff;
  margin: 14px 0 0;
}
.glance-item {
  flex: 1 0 auto;
  min-width: 110px;
  padding: 12px 18px;
  border-right: 1px solid rgba(255,255,255,0.14);
}
.glance-item:last-child { border-right: 0; }
.glance-key {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.72;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.glance-val {
  font-size: 15px;
  font-weight: 600;
}

.monograph-section {
  border-top: 1px solid var(--c-border);
  padding: 18px 22px;
}
.monograph-section:first-of-type { border-top: 0; }
.monograph-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.monograph-subtitle {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-brand);
}
.monograph-prose {
  margin: 0 0 8px;
  color: var(--c-text);
}
.monograph-prose-soft {
  font-size: 13px;
  color: var(--c-text-muted);
}
.monograph-list {
  margin: 4px 0 0;
  padding-left: 22px;
}
.monograph-list li {
  margin-bottom: 4px;
  color: var(--c-text);
}
.monograph-list-numbered { list-style: decimal; }
.monograph-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 22px;
}
@media (min-width: 720px) {
  .monograph-grid-2 { grid-template-columns: 1fr 1fr; }
}

/* PK table inside monograph */
.pk-table-wrap { overflow-x: auto; }
.pk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pk-table th, .pk-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--c-border);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.pk-table thead th {
  background: var(--c-surface-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-muted);
}

/* Enzyme / transporter grid */
.et-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .et-grid { grid-template-columns: 1fr 1fr; }
}
.et-cell {
  background: var(--c-surface-2);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.et-label {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
}
.et-role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--c-brand);
}
.et-class {
  font-size: 11px;
  color: var(--c-text-muted);
}
.et-targets {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.et-target-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-size: 13px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 4px 10px;
}
.et-target-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-brand);
  white-space: nowrap;
}
.et-target-full {
  flex: 1;
  color: var(--c-text);
}
.et-target-strength {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-muted);
  background: var(--c-surface-2);
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Special populations grid */
.pops-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 720px) {
  .pops-grid { grid-template-columns: 1fr 1fr; }
}
.pops-row {
  background: var(--c-surface-2);
  border-radius: var(--r-md);
  padding: 8px 12px;
}
.pops-key {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}
.pops-key > span:first-child {
  font-weight: 600;
  font-size: 13px;
}
.pops-flag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}
.pops-flag-low { background: var(--c-tier-1-bg); color: var(--c-tier-1); }
.pops-flag-mid { background: var(--c-tier-3-bg); color: var(--c-tier-3); }
.pops-flag-high { background: var(--c-tier-5-bg); color: var(--c-tier-5); }
.pops-notes {
  color: var(--c-text-muted);
  line-height: 1.45;
}

/* Safety ceilings */
.safety-row {
  background: var(--c-surface-2);
  border-radius: var(--r-md);
  padding: 10px 14px;
  margin-bottom: 8px;
}
.safety-row:last-child { margin-bottom: 0; }
.safety-route {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.safety-line {
  font-size: 13px;
  margin-bottom: 2px;
}
.safety-label {
  font-weight: 600;
  color: var(--c-text-muted);
  font-size: 12px;
}

/* ============================================================
   Profile-driven sections (curated class-pair content)
============================================================ */
.profile-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--c-brand-soft);
  color: var(--c-brand);
  border: 1px solid #cdd9ea;
  font-size: 12px;
  font-weight: 600;
}
.profile-mechanism {
  background: var(--c-surface-2);
  border-left: 3px solid var(--c-brand-2);
  padding: 10px 14px;
  margin-top: 8px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text);
}
.profile-list {
  margin: 4px 0 8px 0;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.55;
}
.profile-list li {
  margin-bottom: 4px;
}
.profile-thresholds li {
  font-weight: 500;
  color: var(--c-tier-5);
}

/* ============================================================
   Class-level interaction note (DDI fallback when no specific pair)
============================================================ */
.class-level-note {
  background: linear-gradient(180deg, #f4ebfc 0%, #f8f3fe 100%);
  border: 1px solid #d4b8f1;
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.class-level-headline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.class-tag {
  display: inline-block;
  background: #fff;
  border: 1px solid #c9a4f0;
  color: #4a1980;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
.class-vs {
  color: #4a1980;
  font-size: 18px;
  font-weight: 600;
  opacity: 0.7;
}
.class-level-subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #2a1640;
}

/* ============================================================
   Assessment-status banner (DDI screen)
============================================================ */
.assessment-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid;
}
.assessment-banner.assess-green { background: #e8f5ee; color: #2e8b57; border-color: #b6dec5; }
.assessment-banner.assess-amber { background: #fef5e0; color: #c98a00; border-color: #f0d68a; }
.assessment-banner.assess-orange { background: #fde2cf; color: #c2410c; border-color: #f3a979; }
.assessment-banner.assess-yellow { background: #fef9e7; color: #6d5210; border-color: #f1d97a; }
.assessment-banner.assess-gray { background: var(--c-surface-2); color: var(--c-text-muted); border-color: var(--c-border); }
.assessment-banner.assess-muted { background: var(--c-surface-2); color: var(--c-text-soft); border-color: var(--c-border); }
.assessment-banner .icon { font-size: 18px; }
.assessment-banner .body { flex: 1; }
.assessment-banner strong { display: block; font-size: 13px; }
.assessment-banner .small { font-size: 11px; opacity: 0.85; }

/* ============================================================
   Desktop-only layout finishing touches
   (The app is designed for windows ≥ 1000 px. The narrow-viewport hint
   covers anything below that threshold.)
============================================================ */
.tb-context-label { display: inline; }
.ddi-grid { gap: 14px; }
.context-form { grid-template-columns: 1fr 1fr 1fr; }
