:root {
  color-scheme: light;
  --ink: #182033;
  --muted: #667085;
  --line: #dce2ea;
  --paper: #ffffff;
  --surface: #eef3f6;
  --navy: #143247;
  --blue: #176b83;
  --blue-soft: #e5f1f5;
  --teal: #167966;
  --teal-soft: #e1f4ef;
  --indigo: #485eb4;
  --indigo-soft: #ebedfb;
  --violet: #7953a9;
  --violet-soft: #f1eafa;
  --amber: #a76614;
  --amber-soft: #fff2d8;
  --coral: #b8544e;
  --coral-soft: #fdebe8;
  --tone-low-bg: #e3f1fb;
  --tone-low-ink: #165c86;
  --tone-reference-bg: #edf0f4;
  --tone-reference-ink: #4b5565;
  --tone-high-bg: #fee7e3;
  --tone-high-ink: #982e26;
  --tone-variable-bg: #efe8fa;
  --tone-variable-ink: #6941a5;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --content-max: 1440px;
  --pane-outline: #9ebdca;
  --pane-outline-soft: #cbd8de;
  --pane-outline-ring: rgba(110, 151, 168, 0.42);
  --pane-radius: 0.9rem;
  --pane-shadow: 0 10px 26px rgba(24, 71, 91, 0.085);
  --pane-surface: rgba(255, 255, 255, 0.9);
  --pane-header-surface: linear-gradient(110deg, #eef5f7, #fbfdfd);
  --pane-content-surface: #f7fafb;
  --pane-divider: #cbd8de;
  --section-divider: #d7e1e5;
  --pane-simple-border: #b9c9d0;
  --pane-simple-radius: 0.45rem;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-label: Arial, Helvetica, ui-sans-serif, sans-serif;
  --manager-ink-strong: #123746;
  --manager-ink: #284b59;
  --manager-muted: #5b7078;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 90% 0%, rgba(77, 137, 176, 0.12), transparent 26rem),
    radial-gradient(circle at 8% 28%, rgba(121, 83, 169, 0.07), transparent 24rem),
    radial-gradient(circle at 82% 78%, rgba(22, 121, 102, 0.055), transparent 28rem),
    var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
}

.home-medical .page-shell {
  padding-top: 0.75rem;
}

button, input, select, textarea { font: inherit; }

button:focus-visible, [role="tab"]:focus-visible, a:focus-visible {
  outline: 3px solid rgba(45, 111, 159, 0.35);
  outline-offset: 3px;
}

.drug-detail-link:focus-visible, .modal-close:focus-visible {
  outline: 3px solid rgba(45, 111, 159, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: white;
  border-radius: 0.5rem;
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  border-bottom: 1px solid #c8d4d8;
  background: rgba(250, 252, 252, 0.96);
  box-shadow: 0 4px 16px rgba(24, 54, 64, 0.08);
  backdrop-filter: blur(12px);
}

.site-navigation {
  display: flex;
  width: min(var(--content-max), calc(100% - 2rem));
  min-width: 0;
  max-width: calc(100% - 2rem);
  min-height: 3.15rem;
  align-items: center;
  gap: clamp(0.06rem, 0.18vw, 0.16rem);
  margin: 0 auto;
  overflow: visible;
  scrollbar-width: thin;
}

@media (min-width: 1472px) {
  .site-navigation {
    width: max-content;
    min-width: var(--content-max);
  }
}

.site-navigation a {
  display: inline-flex;
  min-height: 2.12rem;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.46rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  color: #4c6470;
  font-size: 0.66rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.site-navigation a:hover { border-color: #b9cbd2; background: #eef4f6; color: #234f61; }
.site-navigation a[aria-current="page"] { border-color: #8fb3c0; background: #e7f1f4; color: #174f63; }
.site-nav-group { position: relative; flex: 0 0 auto; }
.site-nav-group > summary { display: inline-flex; min-height: 2.12rem; align-items: center; padding: 0.38rem 0.46rem; border: 1px solid transparent; border-radius: 0.55rem; color: #4c6470; font-size: 0.66rem; font-weight: 850; cursor: pointer; list-style: none; white-space: nowrap; }
.site-nav-group > summary::-webkit-details-marker { display: none; }
.site-nav-group > summary::after { margin-left: 0.28rem; content: "⌄"; color: #6d8189; font-size: 0.72rem; transition: transform 140ms ease; }
.site-nav-group[open] > summary { border-color: #a8bdc5; background: #edf4f6; color: #234f61; }
.site-nav-group[open] > summary::after { transform: rotate(180deg); }
.site-nav-group:has(a[aria-current="page"]) > summary { border-color: #b5c7cd; background: #f0f5f7; color: #315562; }
.site-nav-group-menu { position: absolute; top: calc(100% + 0.28rem); right: 0; z-index: 90; display: grid; min-width: 10.5rem; gap: 0.15rem; padding: 0.3rem; border: 1px solid #b8c9cf; border-radius: 0.55rem; background: #fbfdfd; box-shadow: 0 8px 18px rgba(31, 65, 77, 0.14); }
.site-nav-group:not([open]) > .site-nav-group-menu { display: none; }
.site-nav-group-menu a { justify-content: flex-start; }
.site-navigation .site-nav-primary {
  min-height: 2.38rem;
  margin-right: 0;
  padding: 0.46rem 0.62rem;
  border-color: #216b54;
  background: #216b54;
  color: white;
  font-size: 0.72rem;
  box-shadow: 0 4px 10px rgba(28, 102, 77, 0.18);
}
.site-navigation .site-nav-home { min-height: 2.28rem; margin-right: 0; padding-inline: 0.56rem; border-color: #9bb2bc; background: #eef5f7; color: #284f5f; font-size: 0.7rem; box-shadow: 0 3px 8px rgba(38, 76, 91, 0.1); }
.site-navigation .site-nav-home::before { margin-right: 0.3rem; content: "⌂"; font-size: 0.92rem; line-height: 1; }
.site-navigation .site-nav-home:hover, .site-navigation .site-nav-home[aria-current="page"] { border-color: #648a9a; background: #dfecef; color: #173f50; }
.site-navigation .site-nav-primary { margin-right: 0; }
.site-navigation .site-nav-secondary-start { margin-left: auto; }
.site-navigation .site-nav-primary::before { content: "❤️💊"; margin-right: 0.36rem; padding-right: 0.28rem; font-size: 0.82rem; letter-spacing: -0.28rem; filter: drop-shadow(0 2px 2px rgba(16, 64, 50, 0.16)); }
.site-navigation .site-nav-primary:hover,
.site-navigation .site-nav-primary[aria-current="page"] { border-color: #174f3e; background: #174f3e; color: white; }
.site-navigation .site-patient-name { flex: 0 1 auto; max-width: 10rem; margin-left: 0; overflow: hidden; padding: 0.3rem 0.05rem 0.3rem 0.2rem; color: #74848b; font-size: 0.6rem; font-style: italic; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.site-navigation .site-patient-name[hidden] { display: none; }
.site-navigation .site-nav-print {
  min-width: 2.45rem;
  min-height: 2.38rem;
  padding-inline: 0.48rem;
  border: 2px solid #6c94a4;
  background: linear-gradient(145deg, #f8fcfd, #dcecf1);
  color: #174f63;
  font-size: 1.18rem;
  box-shadow: 0 4px 11px rgba(31, 81, 100, 0.18);
  filter: saturate(1.08);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.site-navigation .site-nav-print:hover,
.site-navigation .site-nav-print:focus-visible {
  border-color: #2e7188;
  background: linear-gradient(145deg, #eef8fa, #c9e2e9);
  color: #123f50;
  outline: 3px solid rgba(46, 113, 136, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(31, 81, 100, 0.24);
}
.site-navigation a[href="about.html"] { color: #65458d; }
.site-navigation a[href="about.html"]:hover, .site-navigation a[href="about.html"][aria-current="page"] { border-color: #c6b1dc; background: var(--violet-soft); color: #56347e; }
.site-navigation a[href="development.html"] { color: #8a443f; }
.site-navigation a[href="development.html"]:hover, .site-navigation a[href="development.html"][aria-current="page"] { border-color: #ddb0aa; background: var(--coral-soft); color: #7a332e; }

.site-nav-mobile-toggle { display: none; }

.ui-icon {
  position: relative;
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  place-items: center;
  border: 1px solid rgba(23, 107, 131, 0.14);
  border-radius: 0.68rem;
  background: linear-gradient(145deg, #f4fafc, var(--blue-soft));
  color: var(--blue);
  box-shadow: 0 0.28rem 0.65rem rgba(41, 74, 91, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.14rem;
  line-height: 1;
  transform: rotate(-2deg);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.ui-icon:hover { transform: rotate(2deg) translateY(-1px) scale(1.04); box-shadow: 0 0.42rem 0.85rem rgba(41, 74, 91, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.ui-icon-plus { border-color: rgba(22, 121, 102, 0.18); background: linear-gradient(145deg, #f4fcf9, var(--teal-soft)); color: var(--teal); }
.ui-icon-plus::before { content: "💊"; }
.ui-icon-calendar { border-color: rgba(72, 94, 180, 0.18); background: linear-gradient(145deg, #f8f8fe, var(--indigo-soft)); color: var(--indigo); }
.ui-icon-calendar::before { content: "📅"; }
.ui-icon-calendar::after { content: none; }
.ui-icon-person { border-color: rgba(121, 83, 169, 0.18); background: linear-gradient(145deg, #fbf9fe, var(--violet-soft)); color: var(--violet); }
.ui-icon-person::before { content: "🧑‍⚕️"; }
.ui-icon-person::after { content: none; }
.ui-icon-lock { border-color: rgba(167, 102, 20, 0.18); background: linear-gradient(145deg, #fffaf1, var(--amber-soft)); color: var(--amber); }
.ui-icon-lock::before { content: "🛡️"; }
.ui-icon-lock::after { content: none; }
.manager-primary-link .ui-icon-plus, .primary-action .ui-icon-plus { background: rgba(255, 255, 255, 0.18); color: white; }
.manager-primary-link .ui-icon, .primary-action .ui-icon { width: 1.7rem; height: 1.7rem; flex-basis: 1.7rem; border-color: rgba(255, 255, 255, 0.16); border-radius: 0.54rem; box-shadow: none; }
.manager-primary-link .ui-icon-plus::before, .primary-action .ui-icon-plus::before { font-size: 1.05rem; }
.patient-profile-open-button .ui-icon { width: 2rem; height: 2rem; flex-basis: 2rem; }
.section-heading-with-icon { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.section-heading-with-icon > div { min-width: 0; }

.page-shell {
  width: min(var(--content-max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.eyebrow, .category-kicker {
  margin: 0 0 0.45rem;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 0.6rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.intro {
  max-width: 45rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.controls { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.control-button {
  min-height: 2.65rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid #cbd3de;
  border-radius: 0.65rem;
  background: var(--paper);
  color: #344054;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.control-button:hover:not(:disabled), .control-button.active {
  border-color: #7da9c8;
  background: var(--blue-soft);
  color: #174d72;
}

.control-button:disabled { opacity: 0.55; cursor: wait; }

.comparison-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  overflow-x: visible;
  padding: 0.55rem;
  border-bottom: 1px solid var(--line);
  background: #e9edf2;
}

.catalog-category-filter { display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); background: #e9edf2; }
.catalog-category-filter label { color: #334155; font-size: 0.76rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.055em; }
.catalog-category-filter select { min-width: min(26rem, 100%); padding: 0.68rem 2.2rem 0.68rem 0.8rem; border: 1px solid #9cb2bd; border-radius: 0.58rem; background: white; color: #243b47; font: inherit; font-weight: 750; }
.catalog-row-guide { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.72rem 0.9rem; border-bottom: 1px solid #d7e1e5; background: #f4f8f9; color: #536871; }
.catalog-row-guide > span { display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 1.8rem; place-items: center; border-radius: 0.5rem; background: white; font-size: 0.9rem; box-shadow: 0 2px 6px rgba(29, 57, 68, 0.08); }
.catalog-row-guide p { max-width: 78rem; margin: 0; font-size: 0.7rem; line-height: 1.52; }
.catalog-row-guide strong { color: #294d5b; }

.tab {
  flex: 0 0 auto;
  padding: 0.72rem 1rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: #5b6879;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.tab:hover { background: rgba(255, 255, 255, 0.62); }

.tab[data-tone="recreational"] {
  order: 999;
  margin-inline-start: auto;
  border: 1px solid transparent;
  background: transparent;
  color: #778291;
  font-size: 0.78rem;
  font-weight: 700;
}

.tab[data-tone="recreational"]::before {
  display: inline-block;
  width: 1px;
  height: 1rem;
  margin-right: 0.65rem;
  background: #b8c0ca;
  content: "";
  vertical-align: -0.18rem;
}

.tab[data-tone="recreational"]:hover {
  background: rgba(255, 255, 255, 0.52);
  color: #556170;
}

.tab[data-tone="recreational"].active {
  border-color: #cbd3dc;
  background: #f7f9fb;
  color: #44515f;
  box-shadow: inset 0 -2px 0 #7e8c9b;
}

.tab[data-tone="recreational"].active::before { background: #8f9ba8; }

.tab.active {
  background: white;
  color: #164c71;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.11);
}

.manager-feature {
  display: grid;
  grid-template-columns: auto minmax(16rem, 1.25fr) minmax(13rem, 0.85fr) auto;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid #9bc8b7;
  border-left: 0.42rem solid #2f8064;
  border-radius: 0.9rem;
  background: linear-gradient(115deg, #f2fbf7, #e8f5ef);
  box-shadow: 0 8px 22px rgba(24, 89, 68, 0.08);
}

.manager-feature-mark {
  display: grid;
  width: 3.3rem;
  height: 3.3rem;
  place-items: center;
  border-radius: 0.85rem;
  background: #226c54;
  color: white;
  font-family: Georgia, serif;
  font-size: 1.22rem;
  font-weight: 800;
  box-shadow: 0 0.38rem 0.8rem rgba(24, 89, 68, 0.2);
}

.manager-feature-copy h2 { margin-bottom: 0.28rem; color: #183f33; font-size: 1.2rem; letter-spacing: -0.025em; }
.manager-feature-copy p:last-child { margin: 0; color: #4b6b61; font-size: 0.78rem; line-height: 1.5; }
.manager-feature-status { display: grid; gap: 0.18rem; padding-left: 1rem; border-left: 1px solid #bad9ce; }
.manager-feature-status strong { color: #245947; font-size: 0.82rem; }
.manager-feature-status span { color: #5e756d; font-size: 0.7rem; line-height: 1.4; }
.manager-feature-action { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.72rem 0.85rem; border-radius: 0.62rem; background: #226c54; color: white; font-size: 0.77rem; font-weight: 850; text-decoration: none; white-space: nowrap; }
.manager-feature-action:hover { background: #18523f; }

.manager-priority-hero {
  display: grid;
  gap: 0.72rem;
  margin-bottom: 0.7rem;
  padding: 0.75rem;
  overflow: hidden;
  border: 1px solid #a9bec9;
  border-top: 0.35rem solid #19758a;
  border-radius: 0.9rem;
  background: #eef5f7;
  box-shadow: 0 12px 30px rgba(25, 58, 74, 0.16);
}

.manager-priority-intro {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.75rem 0.35rem;
}

.manager-priority-brand { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; }
.manager-priority-mark {
  display: grid;
  width: 3.6rem;
  height: 3.6rem;
  place-items: center;
  border-radius: 0.55rem;
  background: #176b83;
  color: white;
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 0.35rem 0.8rem rgba(23, 107, 131, 0.2);
}
.manager-priority-intro h1 { max-width: 46rem; margin-bottom: 0.28rem; color: #16384b; font-size: clamp(1.55rem, 2.35vw, 2.15rem); letter-spacing: -0.035em; }
.manager-priority-intro .intro { max-width: 48rem; color: #526c79; font-size: 0.82rem; line-height: 1.45; }
.manager-priority-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: flex-end; margin: 0; padding: 0 0.15rem 0.1rem; }
.manager-primary-link, .manager-secondary-link {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem;
  border-radius: 0.65rem;
  font-size: 0.8rem;
  font-weight: 850;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.manager-primary-link { border: 1px solid var(--teal); background: var(--teal); color: white; box-shadow: 0 0.35rem 0.8rem rgba(22, 121, 102, 0.18); }
.manager-primary-link:hover { background: #105f50; }
.manager-secondary-link { border: 1px solid #9cb7c3; background: #fff; color: #295a6e; }
.manager-secondary-link:hover { background: white; }
.manager-risk-review-button { border-color: #bd5b53; background: #fff4f2; color: #922f28; font-family: inherit; cursor: pointer; }
.manager-risk-review-button:hover { border-color: #9f3f37; background: #ffe9e6; }
.manager-risk-review-button[hidden] { display: none; }
.patient-risk-review-button { border-color: #c27b29; background: #fff8e9; color: #7a4a0c; }
.patient-risk-review-button:hover { border-color: #9a5c18; background: #fff0d0; }
.patient-risk-review-button[hidden] { display: none; }
.priority-local-status { align-self: center; background: #f7fbfc; }

.manager-priority-dashboard {
  display: grid;
  gap: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #bfd0d7;
  border-radius: 0.72rem;
  background: #fff;
  box-shadow: none;
}
.priority-today { min-height: 10.5rem; background: linear-gradient(135deg, #fff, #f6fbf9); }
.manager-priority-stats { display: grid; grid-template-columns: 0.8fr 1.2fr; border-top: 1px solid #d6e0e5; background: #f2f7f9; }
.manager-priority-stats > div { display: grid; align-content: start; gap: 0.24rem; padding: 0.95rem 1rem; }
.manager-priority-stats > div + div { border-left: 1px solid #d6e0e5; }
.manager-priority-stats span { color: #607987; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.055em; text-transform: uppercase; }
.manager-priority-stats strong { color: #1b4b60; font-size: 0.78rem; line-height: 1.45; }
.priority-today-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.15rem 0.45rem; }
.priority-today-heading h2 { margin: 0; color: #16384b; font-size: clamp(1.3rem, 2vw, 1.7rem); letter-spacing: -0.03em; }
.priority-today-heading time { padding-top: 0.2rem; color: #647970; font-size: 0.68rem; font-weight: 800; }
.priority-today-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.58rem; padding: 0.65rem 1.15rem 1.15rem; }
.priority-today-list:empty { display: none; }
.priority-empty { margin: 0; padding: 1.3rem 1rem 1.5rem; color: #718079; font-size: 0.77rem; text-align: center; }
.priority-empty[hidden], .priority-more[hidden] { display: none; }
.priority-more { margin: -0.45rem 1rem 1rem; color: #37697b; font-size: 0.68rem; font-weight: 800; }

.home-page { max-width: 1120px; }
.home-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 0.8rem; padding: 0.2rem 0.15rem; }
.home-hero h1 { max-width: 46rem; margin-bottom: 0.35rem; color: #173e4b; font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -0.045em; }
.home-hero .intro { max-width: 48rem; color: #5a7079; font-size: 0.84rem; line-height: 1.5; }
.home-start-panel { margin: 0 0 1rem; padding: 0.82rem; overflow: hidden; border: 2px solid #9bbeb2; border-top: 0.42rem solid #27745c; border-radius: 1rem; background: linear-gradient(150deg, #f4faf8, #f8fafc); box-shadow: 0 14px 30px rgba(38, 91, 75, 0.12); }
.home-get-started { display: grid; gap: 0.22rem; margin: 0 0 0.75rem; padding: 0.75rem 0.95rem 0.78rem 1.1rem; border-left: 0.38rem solid #27745c; border-radius: 0.25rem 0.72rem 0.72rem 0.25rem; background: linear-gradient(90deg, rgba(221, 242, 234, 0.82), rgba(242, 248, 246, 0.28)); color: #4e6b61; line-height: 1.42; }
.home-get-started strong { color: #174f3e; font-size: clamp(1.55rem, 3.2vw, 2.2rem); font-weight: 950; letter-spacing: -0.04em; line-height: 1.05; }
.home-get-started span { max-width: 52rem; font-size: clamp(0.86rem, 1.35vw, 1.05rem); font-weight: 750; }
.home-start-panel > .home-patient-context { margin-bottom: 0.75rem; }
.home-start-panel > .home-manager-gateway { margin-bottom: 0; }
.about-purpose-missive { position: relative; margin: 1rem 0; overflow: hidden; border: 1px solid #d7c49f; border-radius: 0.95rem; background: linear-gradient(150deg, #fffdf7, #faf4e8); box-shadow: 0 10px 24px rgba(93, 71, 36, 0.08); }
.about-purpose-missive::before { position: absolute; top: 0; bottom: 0; left: 0; width: 0.34rem; content: ""; background: linear-gradient(#d49b42, #a96d24); }
.about-purpose-missive-heading { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.1rem 0.85rem 1.3rem; border-bottom: 1px solid #e5d7ba; background: rgba(255, 250, 239, 0.82); }
.about-purpose-missive-mark { display: grid; width: 2.65rem; height: 2.65rem; flex: 0 0 2.65rem; place-items: center; border: 1px solid #d7b779; border-radius: 0.75rem; background: white; font-size: 1.25rem; box-shadow: 0 4px 10px rgba(104, 76, 30, 0.09); }
.about-purpose-missive-heading .eyebrow { margin-bottom: 0.16rem; color: #946422; }
.about-purpose-missive-heading h2 { margin: 0; color: #5c421c; font-family: inherit; font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -0.025em; }
.about-purpose-missive-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.85rem; padding: 1rem 1.3rem 1.05rem; direction: ltr; text-align: left; }
.about-purpose-missive-body p { width: 100%; max-width: none; margin: 0; color: #544b3d; font-family: inherit; font-size: 0.78rem; line-height: 1.62; white-space: normal; overflow-wrap: break-word; }
.about-purpose-missive > footer { padding: 0.62rem 1.3rem; border-top: 1px solid #e6dac2; background: rgba(255, 255, 255, 0.45); color: #8b7757; font-size: 0.58rem; font-style: italic; letter-spacing: 0.04em; }
.home-manager-gateway { display: grid; grid-template-columns: auto minmax(0, 1.35fr) minmax(12rem, 0.75fr) auto; gap: 0.85rem 1rem; align-items: center; margin-bottom: 1rem; padding: 1.15rem; border: 2px solid #27745c; border-radius: 1rem; background: radial-gradient(circle at 8% 20%, rgba(110, 221, 181, 0.18), transparent 28%), linear-gradient(125deg, #edf8f4 0%, #f8fbfa 55%, #eef3fb 100%); box-shadow: 0 14px 30px rgba(28, 102, 77, 0.13); }
.home-manager-gateway-mark { display: grid; width: 4.1rem; height: 4.1rem; place-items: center; border: 1px solid #85b9a7; border-radius: 1.05rem; background: white; font-size: 1.55rem; letter-spacing: -0.42rem; padding-right: 0.42rem; box-shadow: 0 8px 18px rgba(38, 101, 80, 0.13); }
.home-manager-gateway-copy { min-width: 0; }
.home-manager-gateway-copy .eyebrow { margin-bottom: 0.18rem; color: #477565; }
.home-manager-gateway-copy h2 { margin: 0; color: #173f33; font-size: clamp(1.35rem, 2.2vw, 1.75rem); letter-spacing: -0.035em; }
.home-manager-gateway-copy > p:last-child { max-width: 42rem; margin: 0.34rem 0 0; color: #526b62; font-size: 0.73rem; line-height: 1.5; }
.home-manager-gateway-features { display: grid; gap: 0.34rem; margin: 0; padding: 0; list-style: none; }
.home-manager-gateway-features li { display: flex; align-items: center; gap: 0.42rem; color: #49645b; font-size: 0.65rem; font-weight: 800; }
.home-manager-gateway-features li > span { display: grid; width: 1.55rem; height: 1.55rem; place-items: center; border-radius: 0.45rem; background: rgba(255, 255, 255, 0.88); font-size: 0.78rem; }
.home-manager-gateway-action { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; gap: 0.55rem; padding: 0.72rem 0.9rem; border-radius: 0.7rem; background: #216b54; color: white; font-size: 0.74rem; font-weight: 900; text-align: center; text-decoration: none; white-space: nowrap; box-shadow: 0 7px 16px rgba(28, 102, 77, 0.2); }
.home-manager-gateway-action:hover { background: #174f3e; transform: translateY(-1px); }
.home-manager-gateway-action > span { font-size: 1rem; }
.home-patient-context { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.85rem 1rem; align-items: center; margin-bottom: 1rem; padding: 1rem 1.1rem; border: 1px solid #bea9d5; border-left: 0.4rem solid #7953a9; border-radius: 0.9rem; background: linear-gradient(125deg, #f4effa, #fbfafc 58%, #eef6f7); box-shadow: 0 8px 22px rgba(76, 53, 103, 0.08); }
.home-patient-context-mark { display: grid; width: 3.35rem; height: 3.35rem; place-items: center; border: 1px solid #c7b4db; border-radius: 0.82rem; background: white; font-size: 1.4rem; box-shadow: 0 5px 12px rgba(82, 57, 111, 0.1); }
.home-patient-context-copy { min-width: 0; }
.home-patient-context-copy .eyebrow { margin-bottom: 0.16rem; color: #72509a; }
.home-patient-context-copy h2 { margin: 0; color: #4f376d; font-size: clamp(1.1rem, 1.8vw, 1.35rem); }
.home-patient-context-copy > p:not(.eyebrow) { max-width: 49rem; margin: 0.32rem 0 0; color: #635a6d; font-size: 0.71rem; line-height: 1.5; }
.home-patient-context-privacy { display: flex; align-items: flex-start; gap: 0.38rem; padding-top: 0.12rem; color: #55666d !important; font-size: 0.65rem !important; }
.home-patient-context-action { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.65rem 0.8rem; border: 1px solid #7953a9; border-radius: 0.68rem; background: white; color: #62428a; font-size: 0.7rem; font-weight: 900; text-align: center; text-decoration: none; white-space: nowrap; }
.home-patient-context-action:hover { background: #7953a9; color: white; transform: translateY(-1px); }
.home-tenets { margin-bottom: 1rem; overflow: hidden; border: 2px solid #527b8d; border-top: 0.42rem solid #285b70; border-radius: 1rem; background: linear-gradient(145deg, #ffffff, #f1f7f9); box-shadow: 0 18px 38px rgba(31, 70, 87, 0.16); }
.home-tenets-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid #bfd2da; background: linear-gradient(110deg, #dcecf1, #f5fafb); }
.home-tenets-heading h2 { margin: 0; color: #173f50; font-size: clamp(1.35rem, 2.2vw, 1.75rem); letter-spacing: -0.035em; }
.home-tenets-summary { max-width: 58rem; margin: 0.42rem 0 0; color: #486773; font-size: 0.74rem; font-weight: 650; line-height: 1.55; }
.home-tenets-heading > a { padding: 0.45rem 0.62rem; border: 1px solid #8aaab7; border-radius: 999px; background: white; color: #28576a; font-size: 0.68rem; font-weight: 900; text-decoration: none; white-space: nowrap; }
.home-tenet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-tenet-grid article { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.18rem 0.7rem; padding: 1rem; background: rgba(255, 255, 255, 0.68); }
.home-tenet-grid article + article { border-left: 1px solid #cfdee3; }
.home-tenet-grid article > span { grid-row: 1 / span 2; display: grid; width: 2.55rem; height: 2.55rem; place-items: center; border: 1px solid #c3d8df; border-radius: 0.72rem; background: #dcecf1; font-size: 1.22rem; }
.home-tenet-grid h3 { margin: 0; color: #234b5b; font-size: 0.95rem; }
.home-tenet-grid p { margin: 0.3rem 0 0; color: #526c77; font-size: 0.73rem; line-height: 1.55; }
.home-important-context { margin-top: 0; }

@media (min-width: 761px) {
  .home-page > .home-tenets { margin-bottom: 1rem; border: 2px solid #7196a5; border-top: 0.42rem solid #285b70; border-radius: 1rem; box-shadow: 0 18px 38px rgba(31, 70, 87, 0.16); }
  .home-page > .home-tenets .home-tenets-heading { padding: 1rem 1.15rem; border-bottom-color: #c4d6dd; background: linear-gradient(110deg, #dcecf1, #f3f8fa); }
  .home-page > .home-tenets .home-tenets-heading h2 { color: #173f50; font-size: clamp(1.4rem, 2.1vw, 1.75rem); }
  .home-page > .home-tenets .home-tenets-heading > a { padding: 0.48rem 0.68rem; border: 1px solid #8aaab7; border-radius: 999px; background: white; color: #28576a; font-size: 0.72rem; text-decoration: none; }
  .home-page > .home-tenets .home-tenet-grid article { gap: 0.2rem 0.75rem; padding: 1.05rem; }
  .home-page > .home-tenets .home-tenet-grid article > span { width: 2.6rem; height: 2.6rem; border-radius: 0.72rem; background: #dcecf1; font-size: 1.25rem; }
  .home-page > .home-tenets .home-tenet-grid h3 { color: #234b5b; font-size: 0.98rem; }
  .home-page > .home-tenets .home-tenet-grid p { color: #526c77; font-size: 0.74rem; line-height: 1.55; }
}

.supporting-content {
  display: grid;
  gap: 0.65rem;
}

.catalog-view .homepage-medical-management,
body:has(#drugCatalog[open]) .homepage-medical-management { display: none; }
.catalog-view .supporting-content-label { display: none; }
.catalog-view .supporting-content { gap: 1rem; }
.catalog-view #drugCatalog { border-color: var(--pane-outline); box-shadow: 0 12px 30px rgba(24, 71, 91, 0.1); }

.supporting-content-label {
  margin: 0.25rem 0 0.15rem;
  color: #637985;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.explore-panel {
  overflow: clip;
  border: 1px solid var(--pane-outline-soft);
  border-radius: var(--pane-radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--pane-shadow);
}

/* Shared pane outline language: retain each pane's semantic accent while giving
   major page regions the rounded, cool-blue frame used by Drug Catalog. */
:where(
  .comparison-card,
  .manager-feature,
  .manager-priority-hero,
  .manager-priority-dashboard,
  .home-tenets,
  .home-start-panel,
  .home-patient-context,
  .home-manager-gateway,
  .about-purpose-missive,
  .about-authority,
  .about-grid article,
  .development-notice,
  .roadmap-phase,
  .development-context,
  .guide-intro,
  .category-guide-card,
  .guide-exposure-section,
  .guide-methodology,
  .methodology,
  .important-context,
  .interaction-builder,
  .pair-analysis,
  .mix-controls,
  .combination-card,
  .medical-management-shell,
  .manager-safety,
  .manager-subpane,
  .medication-editor,
  .medication-plan,
  .medical-management-shell .manager-subpane,
  .current-plan-standalone,
  .schedule-preview-standalone,
  .manager-privacy-disclosure,
  .emergency-notice,
  .global-guidance,
  .catalog-search-panel,
  .information-panel
) {
  border-radius: var(--pane-radius);
  border-color: var(--pane-outline-soft);
  background-color: var(--pane-surface);
  outline: 1px solid var(--pane-outline-ring);
  outline-offset: -1px;
  box-shadow: var(--pane-shadow);
}

.explore-panel > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 5rem;
  padding: 0.85rem 1rem;
  color: #203d4b;
  cursor: pointer;
  list-style: none;
}

.explore-panel > summary::-webkit-details-marker { display: none; }
.explore-panel > summary:hover { background: #f4f8fa; }
.explore-panel > summary:focus-visible { outline: 3px solid rgba(23, 107, 131, 0.3); outline-offset: -3px; }

.explore-panel-icon {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid #b5ccd6;
  border-radius: 0.5rem;
  background: #e9f3f6;
  color: #176b83;
  font-family: Georgia, serif;
  font-weight: 800;
}

.explore-panel-kicker { display: block; margin-bottom: 0.2rem; color: #647b87; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.explore-panel summary strong { display: block; margin-bottom: 0.15rem; color: #173b4b; font-size: 1rem; }
.explore-panel summary small { display: block; max-width: 55rem; color: #6a7e88; font-size: 0.76rem; line-height: 1.45; }
.explore-panel-action { color: #176b83; font-size: 0.72rem; font-weight: 850; white-space: nowrap; }
.explore-panel-action::after { display: inline-block; margin-left: 0.5rem; content: "+"; font-size: 1rem; }
.explore-panel[open] > summary { border-bottom: 1px solid #cbd8de; background: #f0f6f8; }
.explore-panel[open] .explore-panel-action::after { content: "−"; }
.explore-panel-content { padding: 1rem; background: var(--pane-content-surface); }
.information-icon { border-radius: 50%; font-family: Georgia, serif; font-style: italic; }

.explore-panel .reference-hero { margin-bottom: 0.9rem; }
.explore-panel .reference-hero h2 { font-size: 1.5rem; }

.catalog-search-panel {
  display: grid;
  grid-template-columns: minmax(15rem, 0.75fr) minmax(18rem, 1.25fr);
  gap: 0.7rem 1rem;
  margin-bottom: 0.9rem;
  padding: 1rem;
  border: 1px solid #bdd4dd;
  border-radius: 0.82rem;
  background: linear-gradient(135deg, #eff8fa, #f8fbfc);
}

.catalog-search-copy { display: flex; align-items: center; gap: 0.72rem; }
.catalog-search-icon { display: grid; width: 2.5rem; height: 2.5rem; flex: 0 0 2.5rem; place-items: center; border-radius: 0.72rem; background: #176b83; color: white; font-size: 1.45rem; font-weight: 900; }
.catalog-search-copy h3 { margin: 0 0 0.15rem; color: #173f50; font-size: 1rem; }
.catalog-search-copy p { margin: 0; color: #5f7782; font-size: 0.72rem; line-height: 1.45; }
.catalog-search-control { position: relative; align-self: center; }
.catalog-search-control input { width: 100%; min-height: 3rem; padding: 0.72rem 2.7rem 0.72rem 0.85rem; border: 2px solid #96bbc9; border-radius: 0.7rem; background: white; color: #173542; font: inherit; font-size: 0.86rem; box-shadow: 0 3px 10px rgba(29, 84, 105, 0.07); }
.catalog-search-control input:focus { border-color: #176b83; outline: 3px solid rgba(23, 107, 131, 0.18); }
.catalog-search-control button { position: absolute; top: 50%; right: 0.52rem; width: 2rem; height: 2rem; transform: translateY(-50%); border: 0; border-radius: 50%; background: #e7f1f4; color: #355d6c; font-size: 1.1rem; font-weight: 850; cursor: pointer; }
.catalog-search-control button[hidden] { display: none; }
.catalog-search-status { grid-column: 1 / -1; margin: 0; color: #4f6e7a; font-size: 0.7rem; font-weight: 750; }
.catalog-image-source-note { grid-column: 1 / -1; margin: -0.3rem 0 0; color: #637982; font-size: 0.64rem; line-height: 1.45; }
.catalog-image-source-note a { color: #23657f; font-weight: 800; }
.catalog-search-results { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.52rem; max-height: 25rem; overflow-y: auto; padding-top: 0.15rem; }
.catalog-search-results[hidden] { display: none; }
.catalog-search-result { display: flex; min-width: 0; align-items: center; gap: 0.62rem; padding: 0.58rem; border: 1px solid #cadbe2; border-radius: 0.65rem; background: white; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.catalog-search-result:hover, .catalog-search-result:focus-visible { border-color: #6fa3b6; background: #f2fafc; outline: 3px solid rgba(23, 107, 131, 0.14); }
.catalog-search-result-copy { display: grid; min-width: 0; gap: 0.15rem; }
.catalog-search-result-copy strong { overflow: hidden; color: #173f50; font-size: 0.82rem; text-overflow: ellipsis; white-space: nowrap; }
.catalog-search-result-copy span { overflow: hidden; color: #657b85; font-size: 0.64rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.catalog-search-empty { grid-column: 1 / -1; margin: 0; padding: 1rem; border: 1px dashed #bfd0d7; border-radius: 0.65rem; background: white; color: #6f8189; font-size: 0.76rem; text-align: center; }

.reference-hero { align-items: flex-end; margin-bottom: 1rem; padding-top: 0.2rem; }
.reference-hero h2 { margin-bottom: 0.45rem; font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -0.045em; }

.category-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.category-summary h2 {
  margin-bottom: 0.45rem;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.category-note { max-width: 60rem; margin-bottom: 0; color: var(--muted); line-height: 1.55; }

.category-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.category-facts[hidden] { display: none; }

.category-fact {
  display: grid;
  gap: 0.12rem;
  max-width: 30rem;
  padding: 0.52rem 0.68rem;
  border: 1px solid #d8e1e9;
  border-radius: 0.58rem;
  background: #f7f9fb;
}

.category-fact span {
  color: #667085;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.category-fact strong { color: #344054; font-size: 0.78rem; line-height: 1.4; }

.strength-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.strength-legend[hidden] { display: none; }
.legend-title { color: #344054; font-weight: 800; }
.legend-note { margin-left: 0.15rem; font-style: italic; }

.legend-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.44rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
}

.record-count {
  flex: 0 0 auto;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #f0f3f7;
  color: #526174;
  font-size: 0.78rem;
  font-weight: 800;
}

.table-wrap {
  --catalog-pill-icon-width: 3.2rem;
  --catalog-pill-icon-height: 2.3rem;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: auto;
  max-height: 68vh;
}

table { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.table-wrap table { min-width: 100%; }

th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0;
  border-bottom: 1px solid #0e1728;
  background: var(--navy);
  color: white;
  text-align: left;
}

.column-resize-handle { position: absolute; z-index: 6; top: 0; right: -0.25rem; width: 0.55rem; height: 100%; cursor: col-resize; touch-action: none; }
.column-resize-handle::after { content: ""; position: absolute; top: 20%; bottom: 20%; left: 50%; width: 2px; background: rgba(255,255,255,0.3); }
.column-resize-handle:hover::after { background: #8dd3e7; }
.is-resizing-column, .is-resizing-column * { cursor: col-resize !important; user-select: none !important; }

.sort-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.28rem;
  padding: 0.64rem 0.44rem;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.sort-button:hover { background: #222e45; }
.sort-indicator { color: #92a0b7; font-size: 0.75rem; }

td {
  padding: 0.62rem 0.44rem;
  border-bottom: 1px solid #e4e8ee;
  color: #344054;
  font-size: 0.82rem;
  line-height: 1.4;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.table-wrap [data-column="uses"] { white-space: normal; overflow-wrap: normal; }
.table-wrap [data-column="moreInfo"],
.table-wrap [data-column="addToPlan"] { text-align: center; }
.table-wrap th:not([data-column="uses"]),
.table-wrap td:not([data-column="uses"]) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.table-wrap .drug-cell,
.table-wrap .item-identity { flex-wrap: nowrap; }
.table-wrap th[data-column="name"],
.table-wrap td[data-column="name"],
.table-wrap td[data-column="sub-identity"],
.table-wrap th[data-column="moreInfo"],
.table-wrap td[data-column="moreInfo"],
.table-wrap th[data-column="addToPlan"],
.table-wrap td[data-column="addToPlan"] { overflow: visible; text-overflow: clip; white-space: normal; word-break: normal; overflow-wrap: normal; }

.parent-row { background: #f1f6fa; }
.parent-row:hover { background: #e8f1f8; }
.parent-row td { height: 4.15rem; }

.drug-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.item-identity {
  display: inline-grid;
  flex: 1 1 16rem;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.item-identity.compact { gap: 0.38rem; }
.item-identity-copy { display: grid; min-width: 0; justify-items: start; gap: 0.3rem; text-align: left; }
.item-identity-labels { display: flex; min-width: 0; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 0.3rem; text-align: left; }

.form-thumbnail {
  width: 3.1rem;
  height: 2.25rem;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid #cbd9e3;
  border-radius: 0.48rem;
  background: #edf4f8;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.form-thumbnail.compact { width: 2.45rem; height: 1.8rem; border-radius: 0.38rem; }

.identity-thumbnail {
  width: 3.1rem;
  height: 2.25rem;
  flex: 0 0 auto;
  justify-content: center;
  padding: 0.18rem;
  overflow: hidden;
  border: 1px solid #cbd9e3;
  border-radius: 0.48rem;
  background: #edf4f8;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.identity-thumbnail.compact { width: 2.45rem; height: 1.8rem; border-radius: 0.38rem; }
.identity-thumbnail .pill-face-wrap:nth-child(2), .identity-thumbnail small { display: none; }
.identity-thumbnail .pill-face { width: 2.35rem; height: 1.25rem; min-width: 0; }
.identity-thumbnail.shape-round .pill-face { width: 1.5rem; height: 1.5rem; }
.identity-thumbnail .pill-imprint { max-width: 90%; font-size: 0.33rem; }

.multi-identity-thumbnail {
  display: flex;
  width: 3.5rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
}
.multi-identity-thumbnail .identity-thumbnail { width: 2rem; margin: 0 -0.55rem; transform: scale(0.78); }
.multi-identity-thumbnail .identity-thumbnail:nth-child(2) { z-index: 2; transform: scale(0.9); }
.multi-identity-thumbnail.compact { width: 2.8rem; }

.pill-thumbnail-button { position: relative; display: inline-grid; flex: 0 0 auto; place-items: center; padding: 0.12rem; border: 1px solid transparent; border-radius: 0.58rem; background: transparent; cursor: pointer; }
.pill-thumbnail-button:hover, .pill-thumbnail-button:focus-visible { border-color: #5f94a8; background: #e8f5f8; outline: 3px solid rgba(23, 107, 131, 0.16); }
.pill-appearance-count { position: absolute; top: -0.38rem; right: -0.42rem; display: grid; min-width: 1.35rem; height: 1.35rem; place-items: center; padding: 0 0.26rem; border: 2px solid white; border-radius: 999px; background: #176b83; color: white; font-size: 0.56rem; font-weight: 950; line-height: 1; box-shadow: 0 3px 7px rgba(20, 50, 71, 0.24); }
.pill-thumbnail-button.has-multiple:hover .pill-appearance-count, .pill-thumbnail-button.has-multiple:focus-visible .pill-appearance-count { background: #104f62; }
.pill-photo-thumbnail { display: flex; width: 3.55rem; height: 2.5rem; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #b8cbd4; border-radius: 0.46rem; background: #dfe9ed; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1); }
.pill-photo-thumbnail.compact { width: 2.75rem; height: 2rem; }
.pill-photo-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.generic-form-shape { display: grid; width: 3.2rem; height: 2.3rem; place-items: center; flex: 0 0 auto; border: 1px solid #b8cbd4; border-radius: 0.46rem; background: linear-gradient(145deg, #edf5f7, #f5f1f8); }
.generic-form-shape.compact { width: 3.2rem; height: 2.3rem; }
.generic-form-capsule { width: 2.15rem; height: 0.92rem; border: 1px solid #738f9b; border-radius: 999px; background: linear-gradient(90deg, #f2d7a2 0 49%, #d7e7ed 51% 100%); box-shadow: inset 0 1px 2px rgba(255,255,255,.8), 0 2px 5px rgba(35,67,80,.14); transform: rotate(-8deg); }
.dependency-info-cell { text-align: center; }
.dependency-info-button { display: inline-grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid #7599a8; border-radius: 50%; background: #eff8fa; color: #165e73; font-size: 1rem; font-weight: 950; cursor: pointer; }
.dependency-info-button:hover, .dependency-info-button:focus-visible { background: #176b83; color: white; outline: 3px solid rgba(23,107,131,.18); }
.catalog-add-plan-cell { padding-inline: 0.22rem; text-align: center; }
.catalog-add-plan-button { display: inline-flex; width: 100%; max-width: 4.7rem; min-width: 0; min-height: 1.82rem; align-items: center; justify-content: center; gap: 0.18rem; padding: 0.2rem 0.26rem 0.2rem 0.18rem; border: 1px solid #5e927e; border-radius: 999px; background: #edf7f3; color: #235d49; font-size: 0.56rem; font-weight: 900; text-decoration: none; white-space: nowrap; }
.catalog-add-plan-button > span:first-child { display: grid; width: 1.04rem; height: 1.04rem; place-items: center; border-radius: 50%; background: #347a60; color: white; font-size: 0.82rem; line-height: 1; }
.catalog-add-plan-button:hover, .catalog-add-plan-button:focus-visible { border-color: #347a60; background: #dcefe7; outline: 3px solid rgba(52,122,96,.17); }
.modal-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 0.55rem; }
.modal-add-plan-button { display: inline-flex; min-height: 2.45rem; align-items: center; gap: 0.42rem; padding: 0.45rem 0.72rem 0.45rem 0.42rem; border: 1px solid #367d62; border-radius: 999px; background: #216b54; color: white; font-size: 0.72rem; font-weight: 900; text-decoration: none; white-space: nowrap; box-shadow: 0 4px 10px rgba(33,107,84,.18); }
.modal-add-plan-button > span { display: grid; width: 1.45rem; height: 1.45rem; place-items: center; border-radius: 50%; background: rgba(255,255,255,.18); font-size: 1.1rem; line-height: 1; }
.modal-add-plan-button:hover, .modal-add-plan-button:focus-visible { border-color: #174f3e; background: #174f3e; color: white; outline: 3px solid rgba(33,107,84,.2); }
.dependency-modal-content { display: grid; gap: 0.85rem; }
.dependency-modal-content section { padding: 1rem; border: 1px solid #d5e0e5; border-radius: 0.75rem; background: #f7fafb; }
.dependency-modal-content h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.dependency-modal-content p { margin: 0; }
.dependency-modal-content .dependency-guidance { border-color: #acd1c4; background: #edf8f3; }
.dependency-modal-sources { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.dependency-modal-sources a { padding: 0.45rem 0.65rem; border-radius: 0.45rem; background: #eef4f6; color: #176b83; font-size: 0.78rem; font-weight: 750; }

.print-plan-page { background: #e8edef; color: #1f2933; }
.print-toolbar { position: sticky; z-index: 10; top: 0; display: flex; justify-content: space-between; align-items: center; max-width: 8.5in; margin: 0 auto; padding: 0.7rem 0; }
.print-toolbar a, .print-toolbar button { min-height: 2.5rem; padding: 0.55rem 0.85rem; border: 1px solid #56747f; border-radius: 0.5rem; background: white; color: #234f61; font: inherit; font-size: 0.8rem; font-weight: 850; text-decoration: none; cursor: pointer; }
.print-toolbar button { background: #216b54; color: white; }
.print-plan-sheet { width: min(8.5in, calc(100% - 1.2rem)); min-height: 11in; margin: 0 auto 2rem; padding: 0.55in; background: white; box-shadow: 0 12px 34px rgba(23,45,54,.14); }
.print-plan-title, .print-section-heading, .print-medication-card header, .print-risk-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.print-plan-title { padding-bottom: 0.28in; border-bottom: 3px solid #216b54; }
.print-plan-title h1 { margin: 0.08rem 0 0; font-size: 1.75rem; }
.print-plan-meta { display: grid; gap: 0.18rem; text-align: right; font-size: 0.78rem; }
.print-plan-notice { margin: 0.22in 0; padding: 0.12in 0.16in; border-left: 4px solid #d59a3a; background: #fff8e9; font-size: 0.78rem; }
.print-section-heading { margin: 0.18in 0 0.1in; align-items: end; }
.print-section-heading h2 { margin: 0; font-size: 1.15rem; }
.print-section-heading > span { color: #60717a; font-size: 0.72rem; font-weight: 800; }
.print-medication-plan, .print-today-schedule, #printRiskAppendix { display: grid; gap: 0.1in; }
.print-today-section { break-inside: avoid-page; }
.print-today-schedule { border: 1px solid #cbd5d9; }
.print-today-dose { display: grid; grid-template-columns: 0.85in minmax(1.65in, 0.8fr) minmax(2.2in, 1.2fr); align-items: center; gap: 0.1in; min-height: 0.52in; padding: 0.08in 0.1in; break-inside: avoid; }
.print-today-dose + .print-today-dose { border-top: 1px solid #dbe3e6; }
.print-today-dose > time { color: #215f4c; font-size: 0.72rem; font-weight: 900; }
.print-today-dose > div { display: grid; gap: 0.03in; }
.print-today-dose > div strong { color: #203f4a; font-size: 0.82rem; }
.print-today-dose > div span { color: #5c6f76; font-size: 0.66rem; line-height: 1.3; }
.print-today-dose > p { margin: 0; padding-left: 0.1in; border-left: 1px solid #dbe3e6; color: #596a70; font-size: 0.65rem; line-height: 1.35; }
.print-today-dose.is-unscheduled { background: #fafbfb; }
.print-medication-card, .print-risk-card { break-inside: avoid; padding: 0.12in 0.14in; border: 1px solid #cbd5d9; border-radius: 0.06in; }
.print-medication-card h3, .print-risk-card h3 { margin: 0; font-size: 1rem; }
.print-medication-card header p { margin: 0.04rem 0 0; color: #5b6b73; font-size: 0.7rem; }
.print-medication-card header > strong { white-space: nowrap; font-size: 0.88rem; }
.print-medication-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0.07in 0.18in; margin: 0.1in 0 0; }
.print-medication-card dl div { display: grid; grid-template-columns: 0.95in 1fr; gap: 0.05in; }
.print-medication-card dt { color: #66757c; font-size: 0.65rem; font-weight: 850; text-transform: uppercase; }
.print-medication-card dd { margin: 0; font-size: 0.72rem; }
.print-risk-appendix { margin-top: 0.28in; break-before: page; }
.print-risk-intro, .print-risk-scope, .print-plan-footer, .print-empty { font-size: 0.72rem; color: #596970; }
.print-risk-scope { margin: 0 0 0.12in; padding: 0.09in 0.12in; border: 1px solid #cbd9de; border-radius: 0.05in; background: #f5f9fa; }
.print-risk-card { border-left-width: 5px; }
.print-risk-card.risk-critical, .print-risk-card.risk-very-high { border-left-color: #a72e35; }
.print-risk-card.risk-high { border-left-color: #d26625; }
.print-risk-card.risk-caution { border-left-color: #d4a62a; }
.print-risk-card header span { color: #617079; font-size: 0.64rem; font-weight: 850; text-transform: uppercase; }
.print-risk-card header > strong { padding: 0.18rem 0.42rem; border-radius: 999px; background: #f8e7e7; color: #87242b; font-size: 0.65rem; }
.print-risk-card h4 { margin: 0.1in 0 0.04in; font-size: 0.82rem; }
.print-risk-card p, .print-risk-card li { font-size: 0.7rem; line-height: 1.35; }
.print-risk-card p { margin: 0.04in 0; }
.print-risk-card ul { margin: 0.05in 0 0.06in; padding-left: 0.2in; columns: 2; }
.print-risk-sources { word-break: break-word; }
.print-risk-sources a { color: #285c6f; }
.print-plan-footer { margin-top: 0.22in; padding-top: 0.12in; border-top: 1px solid #cbd5d9; }

@page { size: letter portrait; margin: 0.45in; }
@media print {
  body.print-plan-page { background: white; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-toolbar { display: none; }
  .print-plan-sheet { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
  .print-risk-sources a::after { content: " (" attr(href) ")"; font-size: 0.58rem; }
}

.table-wrap .form-thumbnail,
.table-wrap .form-thumbnail.compact,
.table-wrap .identity-thumbnail,
.table-wrap .identity-thumbnail.compact,
.table-wrap .pill-photo-thumbnail,
.table-wrap .pill-photo-thumbnail.compact,
.table-wrap .form-thumbnail-fallback {
  width: var(--catalog-pill-icon-width);
  height: var(--catalog-pill-icon-height);
  border-radius: 0.46rem;
}

.form-thumbnail-fallback {
  display: inline-grid;
  width: 3.1rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  padding: 0.2rem;
  border: 1px dashed #b8c5d0;
  border-radius: 0.48rem;
  color: #748193;
  font-size: 0.52rem;
  line-height: 1.15;
  text-align: center;
}

.expand-button {
  display: inline-grid;
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 1.7rem;
  place-items: center;
  border: 1px solid #bfd0de;
  border-radius: 50%;
  background: white;
  color: #2f658a;
  cursor: pointer;
  transition: transform 150ms ease;
}

.expand-button[aria-expanded="true"] { transform: rotate(90deg); }

.drug-name { color: #101828; font-size: 1.04rem; font-weight: 850; letter-spacing: -0.02em; }

.drug-detail-link {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(45, 111, 159, 0.42);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.drug-detail-link:hover {
  color: #0e5d91;
  text-decoration-color: currentColor;
}

.flat-drug-name {
  color: #667085;
  font-size: 0.79rem;
  font-weight: 750;
}

.class-badge {
  display: inline-flex;
  padding: 0.28rem 0.48rem;
  border-radius: 0.38rem;
  background: #dceaf4;
  color: #255b7f;
  font-size: 0.64rem;
  font-weight: 850;
  max-width: 100%;
  text-align: left;
  white-space: normal;
}

.medication-purpose-badge { display: inline-flex; min-width: 0; max-width: 13rem; align-items: center; gap: 0.34rem; padding: 0.25rem 0.46rem; border: 1px solid #c9dbcf; border-radius: 999px; background: #eef7f2; color: #315b49; font-size: 0.62rem; font-weight: 800; line-height: 1.25; }
.medication-purpose-badge > span:last-child { min-width: 0; overflow-wrap: normal; text-align: left; white-space: normal; }
.medication-purpose-icon { display: grid; width: 1.15rem; height: 1.15rem; flex: 0 0 1.15rem; place-items: center; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 0.82rem; }
.item-identity.compact .medication-purpose-badge { width: 1.65rem; height: 1.65rem; justify-content: center; padding: 0; }
.item-identity.compact .medication-purpose-badge > span:last-child { display: none; }

.item-resource-link {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.44rem;
  border: 1px solid #b9d7cd;
  border-radius: 999px;
  background: #eef9f5;
  color: #17624b;
  font-size: 0.63rem;
  font-weight: 850;
  line-height: 1.15;
  text-decoration: none;
  max-width: 100%;
  text-align: left;
  white-space: normal;
}

.item-resource-link:hover { border-color: #70aa96; background: #e1f4ed; color: #0e503c; }

.sub-row { display: none; background: #fff; }
.sub-row.visible { display: table-row; }
.sub-row td:first-child { padding-left: 3.3rem; color: #667085; font-weight: 700; }
.sub-row:hover { background: #fafbfc; }
.sub-row .sub-row-brand-cell { padding-left: 2.8rem; }
.sub-row-brand-identity { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); gap: 0.12rem 0.65rem; align-items: center; }
.sub-row-brand-identity > .pill-thumbnail-button { grid-row: 1 / span 2; }
.sub-row-brand-name { overflow: hidden; color: #164c71; font-size: 0.86rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.sub-row-active-ingredients { overflow: hidden; color: #5b6f78; font-size: 0.64rem; font-weight: 750; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.commercial-name { color: #164c71; font-weight: 850; }
.parent-name-label { color: #667085; font-size: 0.76rem; font-weight: 750; }
.muted { color: #8a94a5; }

.flat-row { background: #fff; }
.flat-row:hover { background: #f8fbfd; }

.flat-brand-cell {
  position: relative;
  padding-left: 1.15rem;
}

.flat-brand-cell::before {
  position: absolute;
  top: 0.78rem;
  bottom: 0.78rem;
  left: 0.42rem;
  width: 0.22rem;
  border-radius: 999px;
  background: #4a8bb7;
  content: "";
}

.flat-brand-name {
  display: inline-block;
  color: #123f5e;
  font-size: 1.03rem;
  font-weight: 900;
  letter-spacing: -0.018em;
  line-height: 1.18;
}

.flat-brand-active-ingredients { display: block; margin-top: 0.18rem; color: #58717d; font-size: 0.67rem; font-weight: 750; line-height: 1.35; }

.metric {
  display: inline-flex;
  min-width: 3.5rem;
  max-width: 14rem;
  justify-content: center;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: #edf0f4;
  color: #5d6877;
  font-size: 0.73rem;
  font-weight: 850;
  line-height: 1.3;
  text-align: center;
}

.metric.numeric { font-variant-numeric: tabular-nums; }
.metric:not(.numeric) { border-radius: 0.5rem; }

.tone-low { border-color: #b8d9ed; background: var(--tone-low-bg); color: var(--tone-low-ink); }
.tone-below { border-color: #b9dfd0; background: #e7f5ef; color: #22634d; }
.tone-reference { border-color: #d3d8df; background: var(--tone-reference-bg); color: var(--tone-reference-ink); }
.tone-above { border-color: #f2d28f; background: #fff3d8; color: #825000; }
.tone-high { border-color: #f1b9b1; background: var(--tone-high-bg); color: var(--tone-high-ink); }
.tone-variable { border-color: #d8c5ef; background: var(--tone-variable-bg); color: var(--tone-variable-ink); }
.tone-neutral { border-color: #ccd6e1; background: #edf3f7; color: #44596c; }
.tone-unavailable { border-color: #dde1e6; background: #f4f5f7; color: #7b8492; font-weight: 750; }

.error-message { margin: 1rem 1.5rem; padding: 0.9rem 1rem; border-radius: 0.6rem; background: #fff0f0; color: #9b2c2c; }

.methodology {
  display: grid;
  grid-template-columns: minmax(13rem, 0.7fr) minmax(0, 1.8fr);
  gap: 2rem;
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.methodology h2 { margin-bottom: 0; font-size: 1.25rem; }
.methodology-copy { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.methodology-copy p { margin-bottom: 0.7rem; }
.methodology-copy ul { margin: 0 0 0.9rem; padding-left: 1.2rem; }
.methodology-copy li + li { margin-top: 0.35rem; }
.source-links { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.source-links a { color: #1e5f8b; font-weight: 750; }

.drug-modal {
  width: min(760px, calc(100% - 1.5rem));
  max-width: none;
  max-height: min(88vh, 860px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #cfd8e2;
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 85px rgba(10, 20, 35, 0.3);
}

.drug-modal::backdrop { background: rgba(15, 23, 42, 0.62); backdrop-filter: blur(3px); }
.drug-modal[open] { animation: modal-in 150ms ease-out; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(0.5rem) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: min(88vh, 860px); }

.drug-modal.appearance-focused { width: min(980px, calc(100% - 1.5rem)); }
.drug-modal.appearance-focused .modal-header { border-bottom-color: #bfd5cd; background: linear-gradient(110deg, #e9f5f0, #f7faf9); }
.drug-modal.appearance-focused .modal-meta,
.drug-modal.appearance-focused .modal-summary,
.drug-modal.appearance-focused .modal-pro-con-grid,
.drug-modal.appearance-focused .modal-context,
.drug-modal.appearance-focused .modal-resource-section,
.drug-modal.appearance-focused .modal-disclaimer { display: none; }
.drug-modal.appearance-focused .modal-identity-section { margin-bottom: 0.75rem; }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #f5f8fa;
}

.modal-header h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.05rem); letter-spacing: -0.035em; }

.modal-close {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 2.4rem;
  place-items: center;
  border: 1px solid #c8d3de;
  border-radius: 50%;
  background: white;
  color: #425266;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover { border-color: #7da9c8; background: var(--blue-soft); color: #174d72; }
.modal-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 1.25rem; }
.modal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; margin-bottom: 0.85rem; }
.modal-meta-text { color: #667085; font-size: 0.74rem; font-weight: 800; }
.modal-summary { margin-bottom: 1rem; color: #344054; font-size: 1rem; line-height: 1.62; }
.modal-identity-section,
.modal-media-section {
  margin-bottom: 1rem;
  padding: 0.9rem;
  border: 1px solid #cedde7;
  border-radius: 0.8rem;
  background: #f3f8fb;
}

.modal-identity-section { border-color: #c8d8c5; background: #f4f8f1; }
.modal-identity-section[hidden],
.modal-media-section[hidden] { display: none; }

.pill-identity-card {
  display: grid;
  grid-template-columns: minmax(15rem, 0.95fr) minmax(16rem, 1.05fr);
  gap: 1rem;
  align-items: start;
}

.pill-gallery-guidance { margin: 0 0 0.8rem; color: #536453; font-size: 0.74rem; line-height: 1.55; }
.common-pill-summary { margin: 0 0 0.7rem; padding: 0.68rem 0.75rem; border: 1px solid #bdd4c4; border-left: 0.3rem solid #31755a; border-radius: 0.58rem; background: #eaf5ef; color: #385b49; font-size: 0.75rem; line-height: 1.5; }
.common-pill-summary strong { display: block; margin-bottom: 0.15rem; color: #205b43; font-size: 0.64rem; letter-spacing: 0.045em; text-transform: uppercase; }
.pill-photo-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 0.85rem; }
.pill-photo-card { overflow: hidden; margin: 0; border: 1px solid #bfcfc4; border-radius: 0.72rem; background: white; box-shadow: 0 4px 12px rgba(38, 62, 45, 0.07); }
.pill-photo-card > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #dce2e1; }
.pill-photo-card figcaption { display: grid; gap: 0.58rem; padding: 0.72rem; }
.pill-photo-card figcaption > strong { color: #274b37; font-size: 0.88rem; }
.pill-photo-card figcaption > a { color: #2c6784; font-size: 0.65rem; font-weight: 800; }
.pill-photo-metadata { display: grid; grid-template-columns: minmax(4.5rem, 0.38fr) minmax(0, 1fr); gap: 0.26rem 0.55rem; margin: 0; font-size: 0.65rem; line-height: 1.35; }
.pill-photo-metadata dt { color: #66776c; font-weight: 850; }
.pill-photo-metadata dd { margin: 0; color: #35483c; overflow-wrap: anywhere; }
.pill-identity-gallery { display: grid; gap: 0.85rem; }
.pill-identity-gallery .pill-identity-card { padding: 0.8rem; border: 1px solid #d4dfd1; border-radius: 0.72rem; background: rgba(255, 255, 255, 0.72); }

.pill-visual-column { min-width: 0; }
.pill-identity-visual {
  --pill-fill: #e4e6e8;
  position: relative;
  display: flex;
  min-height: 8.5rem;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0.65rem 1.6rem;
  border: 1px solid #d3ddd0;
  border-radius: 0.72rem;
  background: linear-gradient(145deg, #fff, #eef3eb);
}

.pill-face-wrap { display: grid; justify-items: center; gap: 0.42rem; }
.pill-face-wrap small { color: #71806f; font-size: 0.61rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }

.pill-face {
  position: relative;
  display: grid;
  width: 6.2rem;
  height: 3.25rem;
  min-width: 3.25rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(47, 58, 49, 0.38);
  border-radius: 48% / 42%;
  background: var(--pill-fill);
  box-shadow: inset 0 0.3rem 0.55rem rgba(255, 255, 255, 0.48), inset 0 -0.25rem 0.45rem rgba(35, 45, 37, 0.12), 0 0.45rem 0.8rem rgba(39, 53, 43, 0.14);
}

.shape-round .pill-face { width: 4.45rem; height: 4.45rem; border-radius: 50%; }
.shape-oval .pill-face { width: 6.1rem; height: 3.65rem; border-radius: 50%; }
.shape-oblong .pill-face { width: 6.7rem; height: 3rem; border-radius: 1.4rem; }
.shape-capsule .pill-face { width: 6.8rem; height: 2.95rem; border-radius: 1.55rem; }
.shape-square .pill-face { width: 4.5rem; height: 4.5rem; border-radius: 0.75rem; }
.shape-rectangle .pill-face { width: 6rem; height: 3.55rem; border-radius: 0.6rem; }
.shape-diamond .pill-face { width: 4.3rem; height: 4.3rem; border-radius: 0.55rem; transform: rotate(45deg); }
.shape-diamond .pill-imprint, .shape-diamond .pill-score { transform: rotate(-45deg); }
.shape-almond .pill-face { width: 6rem; height: 3.1rem; border-radius: 75% 35% 75% 35% / 70% 35% 70% 35%; }

.pill-imprint {
  position: relative;
  z-index: 2;
  max-width: 84%;
  color: rgba(37, 44, 39, 0.78);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.015em;
  line-height: 1.08;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.pill-score { position: absolute; z-index: 1; width: 1px; height: 84%; background: rgba(39, 47, 41, 0.36); }
.pill-score.multiple::after { position: absolute; width: 3.2rem; height: 1px; top: 50%; left: 50%; background: rgba(39, 47, 41, 0.36); content: ""; transform: translate(-50%, -50%); }
.pill-size-scale { position: absolute; bottom: 0.5rem; left: 50%; color: #637260; font-size: 0.61rem; font-weight: 800; transform: translateX(-50%); }
.pill-size-scale::before { display: inline-block; width: 2.5rem; margin-right: 0.35rem; border-top: 1px solid #778573; content: ""; vertical-align: middle; }

.pill-identity-metadata {
  display: grid;
  grid-template-columns: minmax(7rem, 0.7fr) minmax(8rem, 1.3fr);
  margin: 0;
  overflow: hidden;
  border: 1px solid #d3ddd0;
  border-radius: 0.68rem;
  background: white;
}

.pill-identity-metadata dt,
.pill-identity-metadata dd { margin: 0; padding: 0.48rem 0.6rem; border-bottom: 1px solid #e3e9e0; font-size: 0.7rem; line-height: 1.35; }
.pill-identity-metadata dt { color: #61705f; font-weight: 850; }
.pill-identity-metadata dd { color: #344432; overflow-wrap: anywhere; }
.pill-identity-metadata dt:nth-last-of-type(1), .pill-identity-metadata dd:last-child { border-bottom: 0; }
.pill-identity-note { margin: 0.55rem 0 0; color: #6e5a3e; font-size: 0.66rem; font-weight: 700; line-height: 1.45; }
.pill-identity-source { margin: 0.65rem 0 0; color: #687665; font-size: 0.66rem; line-height: 1.45; }
.pill-identity-source a, .identity-notice a { color: #2d6b55; font-weight: 800; }

.identity-notice { padding: 0.85rem 0.95rem; border: 1px solid #d7decf; border-radius: 0.7rem; background: white; }
.identity-notice strong { color: #40503d; font-size: 0.82rem; }
.identity-notice p { margin: 0.38rem 0 0.48rem; color: #5e6b5b; font-size: 0.75rem; line-height: 1.5; }
.identity-not-applicable { border-color: #e1d4bd; background: #fffaf1; }

.modal-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.modal-section-heading h3 {
  margin: 0;
  color: #344054;
  font-size: 0.72rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.modal-section-heading span { color: #8a5b1f; font-size: 0.66rem; font-weight: 850; }

.modal-media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.65rem;
}

.modal-media-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid #d6e0e7;
  border-radius: 0.65rem;
  background: white;
}

.modal-media-card img,
.modal-media-fallback {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #edf3f7;
}

.modal-media-fallback {
  place-content: center;
  padding: 1rem;
  color: #748193;
  font-size: 0.72rem;
  text-align: center;
}

.modal-media-card figcaption { display: grid; gap: 0.18rem; padding: 0.58rem 0.65rem 0.68rem; }
.modal-media-card figcaption strong { color: #24364a; font-size: 0.76rem; }
.modal-media-card figcaption span { color: #697689; font-size: 0.66rem; line-height: 1.4; }

.modal-media-caveat {
  margin: 0.65rem 0 0;
  color: #6e5a3e;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.45;
}
.modal-pro-con-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

.modal-list, .modal-context {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f8fafb;
}

.modal-list h3, .modal-context h3 {
  margin: 0 0 0.5rem;
  color: #344054;
  font-size: 0.72rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.modal-list ul, .modal-name-list { margin: 0; padding-left: 1.1rem; }
.modal-list li, .modal-name-list li { color: #526174; font-size: 0.82rem; line-height: 1.52; }
.modal-list li + li, .modal-name-list li + li { margin-top: 0.38rem; }
.drug-modal-active-ingredients { display: block; color: #2f6477; font-size: 0.72rem; font-weight: 850; }
.modal-pros { border-color: #b9dfd0; background: #f1faf6; }
.modal-cons { border-color: #efcbc5; background: #fff7f5; }
.modal-context { margin-top: 0.8rem; }
.modal-context p { margin: 0; color: #526174; font-size: 0.84rem; line-height: 1.55; }
.modal-disclaimer { margin: 0.9rem 0 0; color: #7b8492; font-size: 0.72rem; font-style: italic; line-height: 1.5; }

.modal-resource-section {
  margin-top: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid #b9d7cd;
  border-radius: 0.75rem;
  background: #eef9f5;
}

.modal-resource-section[hidden] { display: none; }
.modal-resource-section > h3 { margin: 0 0 0.6rem; color: #245947; font-size: 0.72rem; letter-spacing: 0.055em; text-transform: uppercase; }
.modal-resource-list { display: grid; gap: 0.7rem; }
.modal-resource-card h4 { margin: 0 0 0.35rem; color: #183f33; font-size: 0.92rem; }
.modal-resource-card p { margin: 0; color: #3e6659; font-size: 0.8rem; line-height: 1.52; }
.modal-resource-links { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.55rem; }
.modal-resource-links a { padding: 0.38rem 0.55rem; border: 1px solid #84b6a5; border-radius: 0.45rem; background: white; color: #17624b; font-size: 0.72rem; font-weight: 850; text-decoration: none; }
.modal-resource-links a:hover { border-color: #4b9279; background: #e5f5ef; }
.modal-resource-card .modal-resource-caution { margin-top: 0.6rem; color: #754e14; font-size: 0.73rem; font-weight: 750; }

.guide-page { max-width: 1240px; }
.guide-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.2rem; }

.guide-intro {
  display: grid;
  grid-template-columns: minmax(13rem, 0.65fr) minmax(0, 1.7fr);
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid #c9d9e5;
  border-left: 0.42rem solid var(--blue);
  border-radius: 0.85rem;
  background: #f2f8fc;
}

.guide-intro h2 { margin: 0; font-size: 1.18rem; }
.guide-intro > p { margin: 0; color: #526174; line-height: 1.62; }
.category-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }

.category-guide-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
}
.category-guide-card:nth-child(4n + 1) { border-top: 0.26rem solid var(--blue); }
.category-guide-card:nth-child(4n + 2) { border-top: 0.26rem solid var(--teal); }
.category-guide-card:nth-child(4n + 3) { border-top: 0.26rem solid var(--amber); }
.category-guide-card:nth-child(4n) { border-top: 0.26rem solid var(--violet); }

.category-guide-card[open] { display: flex; flex-direction: column; }
.category-guide-card > summary { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.65rem; padding: 1.05rem 3rem 0.9rem 1.15rem; border-bottom: 1px solid #e5e9ee; cursor: pointer; list-style: none; }
.category-guide-card > summary::-webkit-details-marker { display: none; }
.category-guide-card > summary::after { position: absolute; top: 50%; right: 1.1rem; display: grid; width: 1.55rem; height: 1.55rem; place-items: center; border: 1px solid #cbd7df; border-radius: 50%; background: #f7fafb; color: #567080; content: "+"; font-size: 1rem; font-weight: 900; transform: translateY(-50%); }
.category-guide-card[open] > summary::after { content: "−"; }
.category-guide-card > summary:hover { background: #f8fafb; }
.category-guide-card > summary:focus-visible { outline: 3px solid rgba(23, 107, 131, 0.25); outline-offset: -3px; }
.category-guide-card-content { display: flex; flex: 1; flex-direction: column; padding: 0 1.15rem 1.15rem; }
.category-guide-card h2 { margin: 0; font-size: 1.22rem; letter-spacing: -0.025em; }
.guide-number { color: #8ca0b4; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.08em; }
.guide-card-count { padding: 0.3rem 0.45rem; border-radius: 999px; background: #eef2f5; color: #667085; font-size: 0.66rem; font-weight: 850; }
.category-guide-card h3 { margin: 0 0 0.38rem; color: #526174; font-size: 0.68rem; letter-spacing: 0.055em; text-transform: uppercase; }
.category-guide-card p { margin: 0; color: #526174; font-size: 0.84rem; line-height: 1.58; }
.guide-purpose { margin-top: 0.9rem; }
.guide-purpose p { color: #25364a; font-size: 0.9rem; font-weight: 700; }
.guide-purpose + div { margin-top: 0.75rem; }
.guide-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.9rem; }
.guide-detail-grid section { padding: 0.75rem; border-radius: 0.65rem; background: #f6f8fa; }
.guide-detail-grid ul { margin: 0; padding-left: 1.05rem; color: #58677a; font-size: 0.76rem; line-height: 1.5; }
.guide-detail-grid li + li { margin-top: 0.28rem; }
.guide-detail-grid .guide-considerations { background: #fff8ee; }

.guide-catalog-link {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 1rem;
  color: #1e5f8b;
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.guide-brand-disclosure { margin-top: 0.75rem; overflow: hidden; border: 1px solid #d8e2e9; border-radius: 0.62rem; background: #f8fafb; }
.guide-brand-disclosure > summary { position: relative; padding: 0.65rem 2rem 0.65rem 0.72rem; color: #496273; font-size: 0.7rem; font-weight: 850; cursor: pointer; list-style: none; }
.guide-brand-disclosure > summary::-webkit-details-marker { display: none; }
.guide-brand-disclosure > summary::after { position: absolute; top: 50%; right: 0.72rem; content: "+"; color: #718a99; font-size: 1rem; transform: translateY(-50%); }
.guide-brand-disclosure[open] > summary::after { content: "−"; }
.guide-brand-list-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); border-top: 1px solid #dce5ea; background: #edf3f6; }
.guide-brand-list-heading span { padding: 0.38rem 0.62rem; color: #637783; font-size: 0.56rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
.guide-brand-list-heading span + span { border-left: 1px solid #dce5ea; }
.guide-brand-list { display: grid; max-height: 14rem; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); margin: 0; overflow-y: auto; border-top: 1px solid #dce5ea; }
.guide-brand-list dt, .guide-brand-list dd { margin: 0; padding: 0.48rem 0.62rem; border-bottom: 1px solid #e6ecef; font-size: 0.68rem; line-height: 1.35; }
.guide-brand-list dt { color: #2f5268; font-weight: 800; }
.guide-brand-list dd { border-left: 1px solid #e6ecef; color: #617481; }
.guide-brand-empty { padding: 0 0.72rem 0.7rem; color: #71818b !important; font-size: 0.68rem !important; }

.guide-exposure-section { margin-top: 1rem; overflow: hidden; border: 1px solid #e0c692; border-top: 0.34rem solid #b77423; border-radius: 0.95rem; background: #fffaf0; }
.guide-exposure-heading { position: relative; display: grid; grid-template-columns: minmax(15rem, 0.75fr) minmax(0, 1.4fr); gap: 1.5rem; align-items: end; margin: 0; padding: 1rem 3.6rem 1rem 1.15rem; cursor: pointer; list-style: none; }
.guide-exposure-heading::-webkit-details-marker { display: none; }
.guide-exposure-heading:hover { background: #fff6e5; }
.guide-exposure-heading:focus-visible { outline: 3px solid rgba(183, 116, 35, 0.25); outline-offset: -3px; }
.guide-exposure-heading h2 { margin: 0; color: #623f13; font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -0.025em; }
.guide-exposure-heading > p { margin: 0; color: #735f44; font-size: 0.78rem; line-height: 1.55; }
.guide-exposure-toggle { position: absolute; top: 50%; right: 1.15rem; display: grid; width: 1.8rem; height: 1.8rem; place-items: center; border: 1px solid #d1ad69; border-radius: 50%; background: white; color: #805018; font-size: 1.1rem; font-weight: 850; transform: translateY(-50%); }
.guide-exposure-toggle::before { content: "+"; }
.guide-exposure-section[open] .guide-exposure-toggle::before { content: "−"; }
.guide-exposure-section[open] > .guide-exposure-heading { border-bottom: 1px solid #e4d2ad; }
.guide-exposure-content { padding: 0.9rem 1.15rem 1.15rem; }
.guide-exposure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.guide-exposure-card { padding: 0.9rem; border: 1px solid #e4d2ad; border-radius: 0.75rem; background: white; box-shadow: 0 5px 14px rgba(82, 55, 21, 0.045); }
.guide-exposure-label { display: inline-flex; margin-bottom: 0.42rem; padding: 0.25rem 0.42rem; border-radius: 999px; background: #fff0d1; color: #875619; font-size: 0.59rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
.guide-exposure-card > h3 { margin: 0; color: #513817; font-size: 0.95rem; line-height: 1.35; }
.guide-exposure-card > p { margin: 0.48rem 0 0; color: #645a4c; font-size: 0.73rem; line-height: 1.52; }
.guide-exposure-card .guide-exposure-categories { color: #806c50; font-size: 0.62rem; font-weight: 800; }
.guide-exposure-card .guide-exposure-affected { padding: 0.48rem 0.55rem; border-radius: 0.46rem; background: #f6f8f9; color: #435b69; font-weight: 750; }
.guide-exposure-card .guide-exposure-dangers { margin-top: 0.62rem; padding: 0.62rem; border-radius: 0.5rem; background: #fff7e9; }
.guide-exposure-card .guide-exposure-dangers h3 { margin: 0 0 0.32rem; color: #7e541e; font-size: 0.62rem; letter-spacing: 0.045em; text-transform: uppercase; }
.guide-exposure-card .guide-exposure-dangers ul { margin: 0; padding-left: 1rem; color: #715b3f; font-size: 0.68rem; line-height: 1.45; }
.guide-exposure-card .guide-exposure-response { color: #304f42; font-weight: 700; }
.guide-exposure-sources { margin-top: 0.62rem; padding-top: 0.5rem; border-top: 1px solid #ece5d8; color: #8b7a61; font-size: 0.6rem; line-height: 1.45; }
.guide-exposure-sources a { color: #506f83; font-weight: 500; }
.guide-exposure-limit { margin: 0.8rem 0 0; color: #806f56; font-size: 0.65rem; line-height: 1.5; }

.important-context { margin-top: 1rem; }
.important-context .source-links { font-size: 0.68rem; line-height: 1.45; }
.important-context .source-links a { font-size: 0.68rem; font-weight: 500; }

.category-detail-modal { width: min(1000px, calc(100% - 1.5rem)); border-color: #a9bdca; background: white; }
.category-detail-modal-header { background: linear-gradient(110deg, #eaf2f7, #fafcfd); }
.category-detail-modal-scroll { padding: 0; }
.category-detail-modal-summary { margin: 0; padding: 0.8rem 1rem; border-bottom: 1px solid #dce5ea; background: #f8fafb; color: #536874; font-size: 0.75rem; line-height: 1.55; }
.category-detail-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; padding: 0.9rem 1rem; }
.category-detail-overview section { padding: 0.75rem; border: 1px solid #d9e3e8; border-radius: 0.65rem; background: #fbfcfd; }
.category-detail-overview h3, .category-detail-section > h3, .category-detail-section-heading h3 { margin: 0 0 0.35rem; color: #3e5968; font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; }
.category-detail-overview p { margin: 0; color: #4f6370; font-size: 0.75rem; line-height: 1.55; }
.category-detail-section { margin: 0 1rem 0.9rem; padding: 0.8rem; border: 1px solid #d8e2e7; border-radius: 0.72rem; background: #f8fafb; }
.category-detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.6rem; }
.category-detail-section-heading h3 { margin: 0; }
.category-detail-section-heading span { padding: 0.24rem 0.4rem; border-radius: 999px; background: #e8f0f4; color: #58717e; font-size: 0.58rem; font-weight: 850; }
.category-detail-medications { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; max-height: 22rem; overflow-y: auto; }
.category-detail-medications article { padding: 0.62rem; border: 1px solid #dbe4e8; border-left: 0.24rem solid #5a8ca6; border-radius: 0.52rem; background: white; }
.category-detail-medications h4 { margin: 0; color: #263f4c; font-size: 0.78rem; }
.category-detail-medications p { margin: 0.22rem 0 0; color: #667983; font-size: 0.64rem; line-height: 1.4; }
.category-detail-medications .category-detail-medication-class { color: #45687a; font-weight: 800; }
.category-detail-considerations { background: #fffaf1; border-color: #e5d4ae; }
.category-detail-considerations ul { margin: 0; padding-left: 1.1rem; color: #655943; font-size: 0.72rem; line-height: 1.5; }
.category-detail-considerations li + li { margin-top: 0.28rem; }
.category-detail-actions { padding: 0 1rem 0.85rem; }
.category-detail-actions .primary-action { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.category-detail-disclaimer { margin: 0; padding: 0.72rem 1rem; border-top: 1px solid #dce5ea; background: #f6f8f9; color: #687982; font-size: 0.64rem; line-height: 1.5; }

.about-page { max-width: 1120px; }
.about-hero { align-items: center; }
.about-purpose-badge { flex: 0 0 auto; padding: 0.48rem 0.68rem; border: 1px solid #9ebcaf; border-radius: 999px; background: #edf6f2; color: #2f6c56; font-size: 0.65rem; font-weight: 850; letter-spacing: 0.035em; text-transform: uppercase; }
.about-authority { display: grid; grid-template-columns: minmax(14rem, 0.72fr) minmax(0, 1.4fr); gap: 1.2rem; align-items: center; margin: 1rem 0; padding: 1rem 1.1rem; border: 1px solid #dfc99a; border-left: 0.38rem solid #a96d1f; border-radius: 0.8rem; background: #fffaf0; }
.about-authority h2, .about-safety-note h2 { margin: 0; color: #5c421e; font-size: 1.12rem; }
.about-authority > p, .about-safety-note > p { margin: 0; color: #665a49; font-size: 0.78rem; line-height: 1.6; }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.about-grid article { padding: 1rem; border: 1px solid #d4dfe3; border-radius: 0.8rem; background: white; box-shadow: 0 6px 18px rgba(30, 55, 66, 0.055); }
.about-card-number { display: inline-block; margin-bottom: 0.55rem; color: #7c98a6; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; }
.about-grid h2 { margin: 0; color: #274755; font-size: 1rem; }
.about-grid p { margin: 0.48rem 0 0; color: #5d6e76; font-size: 0.75rem; line-height: 1.58; }
.about-safety-note { display: grid; grid-template-columns: minmax(14rem, 0.72fr) minmax(0, 1.4fr); gap: 1.2rem; align-items: center; margin-top: 0.9rem; padding: 1rem 1.1rem; border: 1px solid #cbdbe4; border-radius: 0.8rem; background: #f3f8fb; }
.about-safety-note h2 { color: #284e62; }
.about-safety-note > p { color: #536b78; }

.development-page { max-width: 1180px; }
.development-hero { align-items: center; }
.development-status-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 0.42rem; padding: 0.5rem 0.72rem; border: 1px solid #dcaaa5; border-radius: 999px; background: var(--coral-soft); color: #843a34; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.035em; text-transform: uppercase; box-shadow: 0 4px 12px rgba(139, 58, 51, 0.08); }
.development-notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.9rem; align-items: center; margin-bottom: 0.85rem; padding: 1rem 1.1rem; border: 1px solid #ddb6b1; border-left: 0.42rem solid var(--coral); border-radius: 0.85rem; background: linear-gradient(120deg, #fff7f5, #fffdfc); box-shadow: 0 7px 20px rgba(94, 52, 48, 0.06); }
.development-notice-icon { display: grid; width: 3rem; height: 3rem; place-items: center; border-radius: 0.8rem; background: var(--coral-soft); font-size: 1.35rem; }
.development-notice h2 { margin: 0; color: #613732; font-size: 1.15rem; letter-spacing: -0.02em; }
.development-notice p:last-child { margin: 0.35rem 0 0; color: #6b5a57; font-size: 0.78rem; line-height: 1.58; }
.roadmap-jump-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; margin-bottom: 0.9rem; }
.roadmap-jump-links a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.62rem; align-items: center; padding: 0.72rem 0.8rem; border: 1px solid #ced9de; border-radius: 0.72rem; background: white; color: #53656e; text-decoration: none; box-shadow: 0 4px 12px rgba(30, 55, 66, 0.045); }
.roadmap-jump-links a:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(30, 55, 66, 0.08); }
.roadmap-jump-links strong { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: 0.58rem; color: white; font-size: 0.74rem; text-transform: uppercase; }
.roadmap-jump-links span { font-size: 0.72rem; font-weight: 850; }
.roadmap-jump-v0 strong { background: var(--coral); }
.roadmap-jump-v1 strong { background: var(--teal); }
.roadmap-jump-v2 strong { background: var(--violet); }
.development-roadmap { display: grid; gap: 0.9rem; }
.roadmap-phase { overflow: hidden; scroll-margin-top: 4.5rem; border: 1px solid #d3dce1; border-top: 0.38rem solid; border-radius: 0.95rem; background: white; box-shadow: 0 10px 26px rgba(27, 52, 63, 0.065); }
.roadmap-phase-v0 { border-top-color: var(--coral); }
.roadmap-phase-v1 { border-top-color: var(--teal); }
.roadmap-phase-v2 { border-top-color: var(--violet); }
.roadmap-phase-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.85rem; align-items: center; padding: 1rem 1.1rem; border-bottom: 1px solid #e1e7ea; }
.roadmap-phase-v0 .roadmap-phase-heading { background: linear-gradient(115deg, #fff4f2, #fffdfc); }
.roadmap-phase-v1 .roadmap-phase-heading { background: linear-gradient(115deg, #edf8f4, #fbfdfc); }
.roadmap-phase-v2 .roadmap-phase-heading { background: linear-gradient(115deg, #f4eff9, #fdfcfe); }
.roadmap-version { display: grid; width: 3.25rem; height: 3.25rem; place-items: center; border-radius: 0.82rem; color: white; font-size: 1rem; font-weight: 950; letter-spacing: -0.02em; text-transform: lowercase; box-shadow: 0 5px 12px rgba(38, 47, 53, 0.13); }
.roadmap-phase-v0 .roadmap-version { background: linear-gradient(145deg, #ca6760, #9e3f39); }
.roadmap-phase-v1 .roadmap-version { background: linear-gradient(145deg, #2a9c81, #15705e); }
.roadmap-phase-v2 .roadmap-version { background: linear-gradient(145deg, #936bc0, #684591); }
.roadmap-phase-heading h2 { margin: 0; color: #263f4a; font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -0.03em; }
.roadmap-phase-heading p:last-child { margin: 0.28rem 0 0; color: #64737a; font-size: 0.73rem; line-height: 1.5; }
.roadmap-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.72rem; padding: 0.85rem; background: #f7f9fa; }
.roadmap-items-two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.roadmap-items article { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.68rem; align-items: start; padding: 0.82rem; border: 1px solid #d8e1e5; border-radius: 0.72rem; background: white; box-shadow: 0 4px 11px rgba(31, 55, 65, 0.04); }
.roadmap-item-icon { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: 0.62rem; background: #edf3f5; font-size: 1.05rem; }
.roadmap-phase-v0 .roadmap-item-icon { background: var(--coral-soft); }
.roadmap-phase-v1 .roadmap-item-icon { background: var(--teal-soft); }
.roadmap-phase-v2 .roadmap-item-icon { background: var(--violet-soft); }
.roadmap-items h3 { margin: 0; color: #2c4651; font-size: 0.88rem; line-height: 1.35; }
.roadmap-items p { margin: 0.38rem 0 0; color: #607078; font-size: 0.71rem; line-height: 1.55; }
.development-context { margin-top: 0.9rem; }

.mix-page { max-width: 1240px; }

.mix-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.3rem;
}

.mix-count {
  flex: 0 0 auto;
  padding: 0.55rem 0.78rem;
  border-radius: 999px;
  background: #e8edf3;
  color: #526174;
  font-size: 0.78rem;
  font-weight: 850;
}

.emergency-notice {
  display: grid;
  grid-template-columns: minmax(12rem, 0.55fr) minmax(0, 1.8fr);
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid #efb0aa;
  border-left: 0.42rem solid #b43a31;
  border-radius: 0.85rem;
  background: #fff1ef;
}

.emergency-notice h2 { margin-bottom: 0; color: #8e2e28; font-size: 1.18rem; }
.emergency-notice p:last-child { margin: 0; color: #653d39; line-height: 1.58; }

.interaction-builder {
  margin-bottom: 1.25rem;
  overflow: hidden;
  border: 1px solid #cbd8e3;
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.builder-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.3rem;
  border-bottom: 1px solid var(--line);
  background: #f4f8fb;
}

.builder-heading h2 { margin-bottom: 0.4rem; font-size: 1.4rem; letter-spacing: -0.025em; }
.builder-heading p:last-child { max-width: 51rem; margin: 0; color: #58677a; font-size: 0.84rem; line-height: 1.55; }
.builder-heading p:last-child a { color: #176b83; font-weight: 850; text-underline-offset: 0.14rem; }
.builder-heading .control-button { flex: 0 0 auto; }

.interaction-workspace {
  display: grid;
  grid-template-columns: minmax(19rem, 1.15fr) minmax(15rem, 0.85fr);
  min-height: 25rem;
}

.drug-picker { padding: 1rem; border-right: 1px solid var(--line); }
.drug-picker .search-field input { min-height: 2.8rem; }

.picker-status, .selection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.65rem 0 0.45rem;
  color: #697689;
  font-size: 0.68rem;
}

.picker-status strong { color: #3e4d60; }

.drug-options {
  display: grid;
  gap: 0.35rem;
  max-height: 20rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.25rem 0.25rem 0.25rem 0;
}

.drug-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.7rem;
  border: 1px solid #d9e0e7;
  border-radius: 0.62rem;
  background: #fafbfc;
  cursor: pointer;
}

.drug-option:hover { border-color: #9ebcd2; background: #f2f8fc; }
.drug-option.selected { border-color: #5e9ac1; background: #eaf4fb; box-shadow: inset 0 0 0 1px #b8d7eb; }
.drug-option:has(input:disabled) { cursor: not-allowed; opacity: 0.52; }
.drug-option input { width: 1rem; height: 1rem; margin: 0; accent-color: #2d6f9f; }
.drug-option > span { display: grid; gap: 0.12rem; min-width: 0; }
.drug-option strong { color: #26364a; font-size: 0.82rem; }
.drug-option small { overflow: hidden; color: #758193; font-size: 0.65rem; text-overflow: ellipsis; white-space: nowrap; }
.picker-empty { margin: 0; padding: 1.5rem 0.8rem; color: var(--muted); font-size: 0.8rem; text-align: center; }

.selection-panel { padding: 1rem; background: #fbfcfd; }
.selection-heading { margin-top: 0; }
.selection-heading h3 { margin: 0; color: #344054; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.selection-heading span { font-weight: 850; }
.selected-drugs { display: grid; gap: 0.48rem; }

.selected-drug {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.62rem 0.65rem 0.62rem 0.78rem;
  border: 1px solid #bdd2e1;
  border-radius: 0.62rem;
  background: white;
}

.selected-drug > span { display: grid; gap: 0.1rem; }
.selected-drug strong { color: #173f5c; font-size: 0.82rem; }
.selected-drug small { color: #758193; font-size: 0.64rem; }
.selected-drug button {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 1.7rem;
  place-items: center;
  border: 1px solid #d2d9e1;
  border-radius: 50%;
  background: #f7f8fa;
  color: #667085;
  cursor: pointer;
}
.selected-drug button:hover { border-color: #d49c96; background: #fff1ef; color: #902b24; }
.selection-empty { margin: 1rem 0 0; padding: 1rem; border: 1px dashed #cbd4de; border-radius: 0.65rem; color: #758193; font-size: 0.78rem; line-height: 1.5; text-align: center; }
.selection-empty[hidden] { display: none; }

.interaction-analysis { padding: 1rem; border-top: 1px solid var(--line); background: #f7f9fb; }
.interaction-analysis[hidden] { display: none; }

.analysis-status {
  padding: 0.9rem 1rem;
  border: 1px solid #d7dde4;
  border-left-width: 0.42rem;
  border-radius: 0.68rem;
  background: white;
}
.analysis-status h3 { margin: 0 0 0.25rem; font-size: 1.02rem; }
.analysis-status p { margin: 0; color: #58677a; font-size: 0.78rem; line-height: 1.5; }
.analysis-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.75rem; }
.analysis-stats > span { display: grid; gap: 0.12rem; padding: 0.5rem 0.58rem; border: 1px solid rgb(86 103 122 / 18%); border-radius: 0.5rem; background: rgb(255 255 255 / 62%); }
.analysis-stats small { color: #697689; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.035em; text-transform: uppercase; }
.analysis-stats strong { color: #344054; font-size: 0.76rem; }
.status-critical { border-color: #e8aaa4; border-left-color: #b43a31; background: #fff4f2; }
.status-critical h3 { color: #8e2e28; }
.status-very-high { border-color: #efd09a; border-left-color: #c77b00; background: #fff9ec; }
.status-very-high h3 { color: #7b4a00; }
.status-high { border-color: #d8c5ef; border-left-color: #7952b3; background: #faf7fe; }
.status-high h3 { color: #604092; }
.status-unmatched { border-color: #cbd4de; border-left-color: #778597; background: #f7f9fb; }
.status-unmatched h3 { color: #46566a; }

.coverage-note { margin: 0.65rem 0 0.85rem; color: #654f23; font-size: 0.75rem; font-weight: 750; line-height: 1.45; }
.pair-results { display: grid; gap: 0.8rem; }
.pair-analysis { overflow: hidden; border: 1px solid #d9e0e7; border-radius: 0.78rem; background: white; }
.pair-analysis > summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 0.78rem; background: #f5f7f9; cursor: pointer; list-style: none; }
.pair-analysis > summary::-webkit-details-marker { display: none; }
.pair-analysis[open] > summary { border-bottom: 1px solid #e3e8ed; }
.pair-names { display: flex; flex-wrap: wrap; align-items: center; gap: 0.38rem; }

.analysis-drug-chip { display: grid; gap: 0.05rem; padding: 0.35rem 0.48rem; border: 1px solid #cbd8e3; border-radius: 0.48rem; background: white; }
.analysis-drug-chip strong { color: #173f5c; font-size: 0.75rem; }
.analysis-drug-chip small { color: #7b8795; font-size: 0.57rem; }
.risk-unmatched { border-color: #d1d7df; background: #edf0f4; color: #5f6a79; }
.risk-caution { border-color: #c8d9e7; background: #eef5fa; color: #315d7c; }

.rule-result { padding: 0.9rem; }
.rule-result + .rule-result { border-top: 1px solid #e1e6eb; }
.rule-result > h4, .unmatched-copy h4 { margin: 0 0 0.35rem; color: #2c3b4e; font-size: 0.9rem; }
.rule-interaction, .unmatched-copy p { margin: 0; color: #58677a; font-size: 0.77rem; line-height: 1.55; }
.rule-onset { margin: 0.55rem 0 0; padding: 0.52rem 0.62rem; border-left: 0.22rem solid #83abc7; border-radius: 0 0.42rem 0.42rem 0; background: #f1f7fb; color: #536579; font-size: 0.7rem; line-height: 1.5; }
.rule-onset strong { color: #315d7c; }
.rule-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; margin-top: 0.75rem; }
.rule-list { padding: 0.7rem; border-radius: 0.58rem; background: #f6f8fa; }
.rule-list.mechanism { background: #eef5fa; }
.rule-list.amplifier { background: #faf6eb; }
.rule-list.warning { background: #fff6ee; }
.rule-list.response { background: #edf7f1; }
.rule-list h5 { margin: 0 0 0.35rem; color: #4a596c; font-size: 0.64rem; letter-spacing: 0.045em; text-transform: uppercase; }
.rule-list ul { margin: 0; padding-left: 1rem; color: #5c6878; font-size: 0.69rem; line-height: 1.45; }
.rule-list li + li { margin-top: 0.2rem; }
.rule-sources { margin: 0.65rem 0 0; color: #7a8594; font-size: 0.63rem; line-height: 1.45; }
.rule-sources a { color: #28658e; font-weight: 750; }
.unmatched-copy { padding: 0.9rem; }

.global-guidance { overflow: hidden; border: 1px solid #cbd8e3; border-radius: 0.78rem; background: white; }
.global-guidance summary { padding: 0.78rem 0.9rem; background: #edf4f8; color: #244d69; font-size: 0.8rem; font-weight: 850; cursor: pointer; }
.global-guidance > p { margin: 0; padding: 0.8rem 0.9rem 0; color: #58677a; font-size: 0.73rem; line-height: 1.55; }
.global-guidance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; padding: 0.8rem 0.9rem 0.9rem; }

.browse-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin: 1.4rem 0 0.8rem; }
.browse-heading h2 { margin: 0; font-size: 1.3rem; }
.browse-heading > p { max-width: 36rem; margin: 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }

.mix-controls {
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1.6fr);
  gap: 1rem;
  margin-bottom: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--paper);
}

.search-field { display: grid; gap: 0.38rem; }
.search-field span, .filter-label { color: #526174; font-size: 0.7rem; font-weight: 850; letter-spacing: 0.045em; text-transform: uppercase; }

.search-field input {
  width: 100%;
  min-height: 2.55rem;
  padding: 0.6rem 0.72rem;
  border: 1px solid #cbd3de;
  border-radius: 0.55rem;
  background: white;
  color: var(--ink);
}

.filter-buttons { display: flex; flex-wrap: wrap; gap: 0.42rem; margin-top: 0.38rem; }

.filter-button {
  padding: 0.45rem 0.62rem;
  border: 1px solid #cbd3de;
  border-radius: 999px;
  background: #f7f9fb;
  color: #526174;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.filter-button:hover, .filter-button.active { border-color: #7da9c8; background: var(--blue-soft); color: #174d72; }

.mix-caveat {
  margin: 0 0 1rem;
  padding: 0.72rem 0.9rem;
  border-radius: 0.65rem;
  background: #fff7df;
  color: #684f0c;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
}

.combination-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }

.combination-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
}

.combination-card > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem;
  background: #f6f8fa;
  cursor: pointer;
  list-style: none;
}
.combination-card > summary::-webkit-details-marker { display: none; }
.combination-card[open] > summary { border-bottom: 1px solid #e2e7ed; }

.substance-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 0.42rem; }

.substance-chip {
  display: grid;
  gap: 0.1rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid #c9d9e5;
  border-radius: 0.55rem;
  background: white;
}

.substance-chip strong { color: #173f5c; font-size: 0.83rem; }
.substance-chip small { color: #758193; font-size: 0.61rem; font-weight: 750; }
.pair-plus { color: #7a8798; font-size: 1rem; font-weight: 900; }

.mix-summary-meta { display: flex; flex: 0 0 auto; align-items: center; gap: 0.45rem; }
.mix-disclosure-cue { display: inline-flex; align-items: center; gap: 0.28rem; color: #647485; font-size: 0.62rem; font-weight: 850; white-space: nowrap; }
.mix-disclosure-cue::after { display: grid; width: 1.35rem; height: 1.35rem; place-items: center; border: 1px solid #c5d0d9; border-radius: 50%; background: white; color: #4d6575; content: "+"; font-size: 0.9rem; }
.pair-analysis[open] .mix-disclosure-cue::after, .combination-card[open] .mix-disclosure-cue::after { content: "−"; }

.risk-tier {
  flex: 0 0 auto;
  padding: 0.33rem 0.48rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 900;
  white-space: nowrap;
}

.risk-critical { border-color: #e8aaa4; background: #fee7e3; color: #902b24; }
.risk-very-high { border-color: #efd09a; background: #fff1d2; color: #7b4a00; }
.risk-high { border-color: #d8c5ef; background: #efe8fa; color: #6941a5; }

.interaction-summary {
  margin: 0;
  padding: 1rem 1rem 0.45rem;
  color: #26364a;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.52;
}

.mix-context { margin: 0; padding: 0 1rem 0.9rem; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }

.mix-detail-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #e7ebf0; }
.mix-detail { padding: 0.85rem 1rem; }
.mix-detail + .mix-detail { border-left: 1px solid #e7ebf0; }
.mix-detail h2 { margin-bottom: 0.45rem; color: #344054; font-size: 0.72rem; letter-spacing: 0.045em; text-transform: uppercase; }
.mix-detail ul { margin: 0; padding-left: 1.05rem; color: #58677a; font-size: 0.75rem; line-height: 1.5; }
.mix-detail li + li { margin-top: 0.25rem; }
.warning-list { background: #fffaf2; }

.card-sources { margin: 0; padding: 0.7rem 1rem; border-top: 1px solid #e7ebf0; color: #7a8594; font-size: 0.66rem; line-height: 1.45; }
.card-sources a { color: #28658e; font-weight: 750; }

.empty-state { padding: 2rem; border: 1px dashed #c7d0da; border-radius: 0.8rem; background: white; color: var(--muted); text-align: center; }

.manager-page { max-width: 1240px; }
.manager-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.25rem; }
.local-status { flex: 0 0 auto; padding: 0.55rem 0.72rem; border: 1px solid #abd1c2; border-radius: 999px; background: #eaf7f1; color: #2b6c57; font-size: 0.72rem; font-weight: 850; }
.local-status span { margin-right: 0.25rem; color: #3b9c76; }

.manager-safety {
  display: grid;
  grid-template-columns: minmax(12rem, 0.62fr) minmax(0, 1.6fr);
  gap: 0.8rem;
  margin-bottom: 0.55rem;
  padding: 0.58rem 0.78rem;
  border: 1px solid #e4c889;
  border-left: 0.28rem solid #b77c18;
  border-radius: 0.62rem;
  background: #fff9e9;
}

.manager-safety .eyebrow { font-size: 0.57rem; }
.manager-safety h2 { margin: 0; color: #6f4b10; font-size: 0.88rem; line-height: 1.25; }
.manager-safety > p { margin: 0; color: #69583a; font-size: 0.7rem; line-height: 1.42; }

.medical-management-shell {
  display: grid;
  gap: 0.8rem;
  padding: 0.8rem;
  border: 2px solid #9fbeb3;
  border-top: 0.4rem solid #27745c;
  border-radius: 1rem;
  background: #edf5f2;
  box-shadow: 0 12px 30px rgba(27, 75, 60, 0.12);
}
.medical-management-shell-heading { display: grid; grid-template-columns: minmax(11rem, 0.55fr) minmax(15rem, 0.9fr) minmax(18rem, auto); gap: 0.4rem 0.85rem; align-items: center; padding: 0.25rem 0.35rem 0.1rem; }
.medical-management-shell-heading-compact { grid-template-columns: minmax(18rem, 1fr) minmax(24rem, auto); }
.medical-management-shell-heading h2 { margin: 0; color: #173f33; font-size: clamp(1.2rem, 1.8vw, 1.55rem); letter-spacing: -0.03em; }
.medical-management-shell-heading > p { margin: 0; color: #526b62; font-size: 0.69rem; line-height: 1.4; }
.homepage-medical-management { margin-bottom: 0.7rem; }
.homepage-medical-management .medical-management-shell-heading h1 { margin: 0; color: #173f33; font-size: clamp(1.2rem, 1.8vw, 1.55rem); letter-spacing: -0.03em; }
.homepage-medical-management .manager-overview { margin: 0; box-shadow: none; }
.medical-management-actions { display: flex; flex-wrap: wrap; gap: 0.32rem; justify-content: flex-end; padding-top: 0; }
.medical-management-actions .manager-primary-link, .medical-management-actions .manager-secondary-link { min-height: 2rem; padding: 0.42rem 0.58rem; font-size: 0.66rem; }
.medical-management-shell .manager-subpane,
.medical-management-shell .medication-editor,
.medical-management-shell .medication-plan { margin: 0; box-shadow: none; }
.medical-management-shell .manager-subpane-group { margin: 0; }
.medical-management-shell .today-card-prominent { position: relative; overflow: hidden; border: 2px solid #155848; border-top: 0; border-radius: 1.2rem; background: #eff9f5; box-shadow: 0 22px 44px rgba(13, 64, 52, 0.27); }
.medical-management-shell .today-card-prominent::before { position: absolute; z-index: 2; top: 0; right: 0; left: 0; height: 0.34rem; content: ""; background: linear-gradient(90deg, #79dfbb, #56bfc2, #8ea4ee); }
.medical-management-risk-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.8rem; padding: 0.7rem 0.8rem; border: 1px solid #c8d7d2; border-radius: 0.78rem; background: linear-gradient(110deg, #f8fbfa, #eef5f2); }
.medical-management-risk-actions[hidden] { display: none; }
.combined-risk-review-button { display: grid; min-width: min(100%, 25rem); grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.68rem; align-items: center; padding: 0.62rem 0.72rem; border: 1px solid #714a91; border-radius: 0.72rem; background: linear-gradient(125deg, #fff 0%, #f6effb 58%, #eee3f7 100%); color: #4c2c67; font: inherit; text-align: left; box-shadow: 0 5px 13px rgba(83, 51, 106, 0.12); cursor: pointer; }
.combined-risk-review-button:hover, .combined-risk-review-button:focus-visible { border-color: #57316f; background: linear-gradient(125deg, #fff 0%, #efe3f7 100%); outline: 3px solid rgba(113, 74, 145, 0.18); }
.combined-risk-review-icon { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 0.58rem; background: linear-gradient(145deg, #d65c52, #a5322a); font-size: 0.95rem; box-shadow: 0 3px 8px rgba(144, 43, 36, 0.2); }
.combined-risk-review-copy { display: grid; min-width: 0; gap: 0.08rem; }
.combined-risk-review-copy strong { font-size: 0.76rem; font-weight: 900; }
.combined-risk-review-copy small { color: #725d7d; font-size: 0.6rem; font-weight: 750; }
.combined-risk-review-count { display: grid; min-width: 2rem; height: 2rem; place-items: center; padding: 0 0.4rem; border-radius: 999px; background: #65418f; color: white; font-size: 0.72rem; font-weight: 950; }
.today-card-prominent .manager-section-heading { align-items: center; padding: 1.25rem 1.35rem; border-bottom: 0; background: linear-gradient(125deg, #102f3a 0%, #125649 46%, #1f806a 100%); }
.today-card-prominent .manager-section-heading h2 { color: white; font-size: clamp(1.75rem, 3vw, 2.35rem); letter-spacing: -0.045em; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); }
.today-card-prominent .manager-section-heading .eyebrow { color: #a9e7d2; }
.today-heading-purpose { max-width: 34rem; margin: 0.28rem 0 0; color: #d2eee5; font-size: 0.7rem; font-weight: 650; line-height: 1.4; }
.today-card-prominent .section-heading-with-icon > .ui-icon-calendar { width: 3rem; height: 3rem; flex-basis: 3rem; border-color: rgba(255, 255, 255, 0.22); border-radius: 0.85rem; background: rgba(255, 255, 255, 0.13); color: white; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0.5rem 1.1rem rgba(4, 34, 27, 0.18); }
.today-card-prominent .section-heading-with-icon > .ui-icon-calendar::before { font-size: 1.6rem; }
.today-card-prominent .section-heading-with-icon > .ui-icon-calendar::after { content: none; }
.today-card-prominent .today-heading time { color: #d6eee6; }
.today-card-prominent .today-doses { position: relative; min-height: 9rem; grid-template-columns: 1fr; gap: 0.72rem; padding: 1.15rem 1.25rem 1.3rem; background: radial-gradient(circle at 8% 12%, rgba(74, 177, 144, 0.16), transparent 24%), linear-gradient(150deg, #d9f0e7 0%, #eef9f5 42%, #e7f0fa 100%); }
.today-card-prominent .today-dose { position: relative; display: grid; min-height: 5.7rem; grid-template-columns: minmax(7.2rem, 0.25fr) minmax(0, 1fr) auto; gap: 0; overflow: hidden; padding: 0; border: 1px solid #a8cec1; border-left: 0; background: rgba(255, 255, 255, 0.97); box-shadow: 0 8px 20px rgba(20, 83, 67, 0.11); }
.today-card-prominent .today-dose::before { position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; width: 0.38rem; content: ""; background: linear-gradient(#30a77f, #17765d); }
.today-card-prominent .today-dose.is-earlier::before { background: #94a39e; }
.today-card-prominent .today-dose.is-unscheduled::before { background: #aab5b1; }
.today-card-prominent .today-dose-timing { display: grid; align-content: center; gap: 0.28rem; padding: 0.85rem 0.9rem 0.85rem 1.15rem; border-right: 1px solid #c6ddd5; background: linear-gradient(135deg, #e5f5ef, #f6fbf9); }
.today-card-prominent .today-dose.is-earlier .today-dose-timing { background: #f0f3f2; }
.today-card-prominent .today-dose.is-unscheduled .today-dose-timing { background: #f1f3f2; }
.today-card-prominent .today-dose-copy { display: grid; align-content: center; gap: 0.2rem; padding: 0.85rem 1rem; }
.today-heading-meta { display: grid; justify-items: end; gap: 0.35rem; }
.today-priority-badge { padding: 0.36rem 0.58rem; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; background: #f2c96e; color: #3e3216; font-size: 0.6rem; font-weight: 900; letter-spacing: 0.045em; text-transform: uppercase; box-shadow: 0 4px 10px rgba(22, 43, 36, 0.18); }

.medical-management-clear-action { display: flex; align-items: center; justify-content: flex-end; gap: 0.7rem; margin: 0 0.85rem 0.85rem; padding-top: 0.68rem; border-top: 1px solid #dbe5e1; }
.medical-management-clear-action span { margin-right: auto; color: #7a8983; font-size: 0.62rem; line-height: 1.4; }
.medical-management-clear-action .text-danger-button { flex: 0 0 auto; padding: 0.48rem 0.68rem; border: 1px solid #dfc0bc; border-radius: 0.5rem; background: #fff8f6; }

.manager-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(8rem, 0.5fr)) minmax(14rem, 1.3fr);
  margin-bottom: 0.85rem;
  overflow: hidden;
  border: 1px solid #cddbd6;
  border-radius: 0.85rem;
  background: white;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.045);
}

.manager-overview > div { display: grid; gap: 0.2rem; padding: 0.85rem 1rem; }
.manager-overview > div:nth-child(1) { background: #f4f1fb; }
.manager-overview > div:nth-child(2) { background: #eef8f5; }
.manager-overview > div:nth-child(3) { background: #fff8ea; }
.manager-overview > div + div { border-left: 1px solid #dce5e1; }
.manager-overview span { color: #6a7d76; font-size: 0.65rem; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase; }
.manager-overview strong { color: #234a3d; font-size: 1.25rem; }
.manager-overview .manager-next-summary strong { font-size: 0.86rem; line-height: 1.45; }

.patient-profile-open-button { display: inline-flex; align-items: center; gap: 0.45rem; border-color: #69469a; background: linear-gradient(135deg, #7955a8, #65418f); color: white; box-shadow: 0 0.35rem 0.8rem rgba(84, 52, 126, 0.22); }
.patient-profile-open-button:hover { border-color: #56357d; background: linear-gradient(135deg, #684492, #55347b); }
.patient-profile-open-button .ui-icon { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.15); color: white; }
.patient-profile-status { padding: 0.2rem 0.36rem; border-radius: 999px; background: rgba(255, 255, 255, 0.9); color: #5b3b80; font-size: 0.56rem; font-weight: 900; white-space: nowrap; }
.patient-profile-modal { width: min(900px, calc(100% - 1.5rem)); border-color: #a8bcc8; background: white; }
.patient-profile-modal-header { background: linear-gradient(110deg, #e9f1f5, #f8fafb); }
.patient-profile-modal-description { margin: 0; padding: 0.75rem 1rem; border-bottom: 1px solid #dbe4e9; background: #f8fafb; color: #586b75; font-size: 0.72rem; line-height: 1.55; }
.patient-profile-form { display: grid; gap: 0.85rem; padding: 1rem; }
.patient-profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; }
.patient-condition-fields { margin: 0; padding: 0.8rem; border: 1px solid #d3dfda; border-radius: 0.68rem; background: #f8faf9; }
.patient-condition-fields legend { padding: 0 0.3rem; color: #485b54; font-size: 0.68rem; font-weight: 850; letter-spacing: 0.035em; text-transform: uppercase; }
.patient-condition-fields legend em { color: #7a8883; font-style: normal; font-weight: 650; text-transform: none; }
.patient-condition-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
.patient-condition-options label { display: grid; grid-template-columns: auto 1fr; gap: 0.42rem; align-items: start; padding: 0.48rem 0.52rem; border: 1px solid #d8e2de; border-radius: 0.5rem; background: white; color: #53675f; font-size: 0.66rem; font-weight: 750; line-height: 1.4; cursor: pointer; }
.patient-condition-options input { width: 1rem; height: 1rem; margin: 0.08rem 0 0; accent-color: #34785f; }
.patient-profile-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.patient-profile-privacy { margin: 0; padding: 0.65rem 0.72rem; border-radius: 0.52rem; background: #f2f6f4; color: #6a7c75; font-size: 0.64rem; line-height: 1.5; }

.medication-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.85rem; align-items: start; }
.medication-editor, .medication-plan, .upcoming-card, .today-card { border: 1px solid var(--line); border-radius: 0.95rem; background: white; box-shadow: var(--shadow); }
.medication-editor, .medication-plan { overflow: hidden; }
.medication-plan > summary { cursor: pointer; list-style: none; }
.medication-plan > summary::-webkit-details-marker { display: none; }
.medication-plan-emphasis { border: 2px solid #547d94; background: #fbfcfd; box-shadow: 0 12px 28px rgba(48, 82, 103, 0.14); }
.current-plan-standalone { margin-top: 0.85rem; }
.medication-plan-emphasis > .current-plan-heading { align-items: center; padding: 1.2rem 1.25rem; border-bottom: 0; background: linear-gradient(115deg, #e3eef4 0%, #edf4f8 58%, #f9fbfc 100%); }
.medication-plan-emphasis:not([open]) > .current-plan-heading { min-height: 3.45rem; padding: 0.5rem 0.7rem; }
.medication-plan-emphasis:not([open]) .current-plan-heading-copy { display: none; }
.medication-plan-emphasis:not([open]) .current-plan-heading h2 { font-size: 1.12rem; letter-spacing: -0.025em; }
.medication-plan-emphasis:not([open]) .current-plan-heading .eyebrow { font-size: 0.53rem; }
.medication-plan-emphasis:not([open]) .current-plan-actions > .current-plan-badge { padding: 0.28rem 0.45rem; font-size: 0.56rem; }
.medication-plan-emphasis:not([open]) .current-plan-heading::after { width: 1.45rem; height: 1.45rem; flex-basis: 1.45rem; font-size: 0.95rem; }
.medication-plan-emphasis[open] > .current-plan-heading { border-bottom: 2px solid #aec5d2; }
.current-plan-heading::after { content: "+"; display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 1.8rem; place-items: center; border: 1px solid #88aabd; border-radius: 50%; background: white; color: #3f677e; font-size: 1.15rem; font-weight: 850; }
.medication-plan-emphasis[open] > .current-plan-heading::after { content: "−"; }
.medication-plan-emphasis .current-plan-heading h2 { color: #213f50; font-size: clamp(1.55rem, 2.4vw, 2rem); letter-spacing: -0.04em; }
.medication-plan-emphasis .current-plan-heading .eyebrow { color: #527386; }
.current-plan-heading-copy { margin: 0.3rem 0 0; color: #5b707c; font-size: 0.72rem; font-weight: 700; line-height: 1.45; }
.current-plan-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.45rem; }
.current-plan-actions > .current-plan-badge { flex: 0 0 auto; padding: 0.42rem 0.62rem; border: 1px solid #88aabd; border-radius: 999px; background: white; color: #3f677e; font-size: 0.64rem; font-weight: 900; letter-spacing: 0.035em; text-transform: uppercase; box-shadow: 0 3px 8px rgba(47, 84, 105, 0.08); }
.current-plan-content { background: linear-gradient(#f4f8fa, #ffffff 7rem); }
.current-plan-expanded-actions { display: flex; justify-content: flex-end; padding: 0.72rem 0.85rem 0; }
.current-plan-add-button { display: inline-flex; min-height: 2.45rem; align-items: center; gap: 0.45rem; }

.medication-editor-modal { width: min(820px, calc(100% - 1.5rem)); overflow-y: auto; border-color: #9bbeb1; background: white; }
.medication-editor-dialog { overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
.medication-editor-dialog > .manager-section-heading { position: sticky; top: 0; z-index: 30; align-items: center; border-bottom: 2px solid #a8c9bd; background: linear-gradient(110deg, #e6f3ee, #f7fbf9); }
.medication-editor-dialog > .manager-section-heading h2 { color: #173f33; font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
.medication-editor-heading-actions { display: flex; align-items: center; gap: 0.55rem; }
.medication-editor-heading-actions .modal-close { width: 2.15rem; height: 2.15rem; flex-basis: 2.15rem; border-color: #a8c6ba; color: #2b6953; }

.today-card { margin-bottom: 0.85rem; overflow: hidden; border-color: #a9cfc1; }
.today-heading { background: linear-gradient(110deg, #edf8f3, #f7fbf9); }
.today-heading time { color: #557269; font-size: 0.72rem; font-weight: 800; }
.today-doses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.58rem; padding: 0.9rem; }
.today-dose { display: grid; grid-template-columns: minmax(5.6rem, auto) minmax(0, 1fr) auto; gap: 0.28rem 0.62rem; align-items: center; padding: 0.72rem; border: 1px solid #cbdcd5; border-left: 0.32rem solid #2f8064; border-radius: 0.66rem; background: #fbfdfc; }
.today-dose.is-earlier { border-left-color: #9aa8a3; background: #f6f8f7; opacity: 0.82; }
.today-dose.is-unscheduled { border-color: #d7dfdc; border-left-color: #a4b0ac; background: #f7f9f8; box-shadow: none; opacity: 0.72; }
.today-dose-status { color: #2c7159; font-size: 0.58rem; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; }
.today-dose.is-earlier .today-dose-status { color: #6f7d78; }
.today-dose.is-unscheduled .today-dose-status { color: #75817d; }
.today-dose.is-unscheduled .today-dose-copy strong { color: #52635d; }
.today-dose time { color: #173f33; font-size: 1rem; font-weight: 900; }
.today-card-prominent .today-dose time { color: #145b47; font-size: clamp(1.18rem, 2vw, 1.42rem); letter-spacing: -0.035em; }
.today-dose-copy { display: grid; gap: 0.08rem; }
.today-dose-copy strong { color: #234a3d; font-size: 0.82rem; }
.today-card-prominent .today-dose-copy strong { color: #123d31; font-size: clamp(1.42rem, 2.45vw, 1.88rem); font-weight: 950; line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; }
.today-card-prominent .today-dose.is-unscheduled .today-dose-copy strong { color: #465d55; font-size: clamp(1.28rem, 2.1vw, 1.58rem); }
.today-dose-copy > span { color: #667a72; font-size: 0.68rem; font-weight: 750; }
.today-dose-copy > .today-dose-purpose { color: #41564e; font-size: 0.68rem; font-weight: 800; line-height: 1.3; }
.today-dose-copy > .today-dose-brand { color: #416b5d; font-size: 0.64rem; font-style: italic; font-weight: 800; }
.today-dose-active-ingredient { color: #587168; font-size: clamp(0.72rem, 1.15vw, 0.86rem); font-weight: 700; letter-spacing: 0; line-height: 1.25; }
.today-dose-name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.today-reminder-badge { width: fit-content; margin-right: 0.85rem; padding: 0.22rem 0.42rem; border-radius: 999px; background: #e8f2fb; color: #285f87; font-size: 0.57rem; font-weight: 850; }

.manager-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); background: #f5f8f7; }
.manager-section-heading h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.025em; }
.manager-section-heading > span, .editor-mode { color: #6b7d76; font-size: 0.68rem; font-weight: 800; }
.editor-mode { padding: 0.32rem 0.5rem; border: 1px solid #c8d9d2; border-radius: 999px; background: white; }

#medicationForm { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; padding: 1.05rem 1.1rem 1.15rem; }
.manager-field { display: grid; align-content: start; gap: 0.35rem; min-width: 0; }
.manager-field-wide, .dose-fieldset, .weekday-fields, .time-fields, .interval-fields, .reminders-pane, .form-error, .form-actions { grid-column: 1 / -1; }
.manager-field > span, .manager-field > label, .field-legend, .weekday-fields legend, .time-fields legend { color: #485b54; font-size: 0.68rem; font-weight: 850; letter-spacing: 0.035em; text-transform: uppercase; }
.manager-field span em { color: #84918c; font-style: normal; font-weight: 650; text-transform: none; }
.manager-field small { color: #7a8883; font-size: 0.65rem; line-height: 1.4; }
.manager-field input, .manager-field select, .manager-field textarea, .dose-time-input {
  width: 100%;
  min-height: 2.55rem;
  padding: 0.58rem 0.68rem;
  border: 1px solid #c5d1cc;
  border-radius: 0.55rem;
  background: white;
  color: var(--ink);
}
.manager-field textarea { min-height: 4.7rem; resize: vertical; line-height: 1.45; }
.manager-field input:focus, .manager-field select:focus, .manager-field textarea:focus, .dose-time-input:focus { border-color: #4f9078; outline: 3px solid rgba(65, 143, 113, 0.16); }

.medication-name-field { position: relative; z-index: 4; container-type: inline-size; }
.medication-autocomplete { position: absolute; top: calc(100% + 0.35rem); right: 0; left: 0; z-index: 20; overflow: hidden; border: 1px solid #aebfb8; border-radius: 0.72rem; background: white; box-shadow: 0 14px 30px rgba(27, 55, 45, 0.18); }
.medication-autocomplete[hidden] { display: none; }
.medication-autocomplete-heading { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.58rem 0.68rem; border-bottom: 1px solid #dce5e1; background: #f3f8f6; }
.medication-autocomplete-heading strong { color: #35574b; font-size: 0.68rem; }
.medication-autocomplete-heading span { color: #718079; font-size: 0.62rem; font-weight: 750; }
.medication-suggestions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.42rem; max-height: 19rem; overflow-y: auto; padding: 0.5rem; }
.medication-suggestion { display: grid; gap: 0.16rem; min-width: 0; padding: 0.55rem 0.6rem; border: 1px solid #d7e1dd; border-radius: 0.52rem; background: #fbfdfc; color: #2e4d42; text-align: left; cursor: pointer; }
.medication-suggestion strong { overflow: hidden; font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.medication-suggestion span { overflow: hidden; color: #718079; font-size: 0.59rem; font-weight: 650; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.medication-suggestion:hover, .medication-suggestion.is-active { border-color: #4f9078; background: #eaf6f1; outline: 2px solid rgba(65, 143, 113, 0.13); }
.medication-suggestion.is-recreational { border-left: 0.28rem solid #9a6a42; background: #fffaf5; }
.medication-suggestion.is-recreational:hover, .medication-suggestion.is-recreational.is-active { border-color: #b88254; background: #fff4e8; }
.medication-suggestion.is-existing { border-color: #d2d7d5; background: #f1f3f2; color: #8a918e; }
.medication-suggestion.is-existing strong, .medication-suggestion.is-existing span { color: #858c89; }
.medication-suggestion.is-existing:hover, .medication-suggestion.is-existing.is-active { border-color: #aeb5b2; background: #e8ebea; outline-color: rgba(105, 114, 110, 0.13); }
.medication-suggestion-empty { margin: 0; padding: 0.85rem; color: #6c7d76; font-size: 0.7rem; line-height: 1.45; }
.medication-suggestion-empty[hidden], .medication-suggestions[hidden] { display: none; }
@container (max-width: 36rem) { .medication-suggestions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 25rem) { .medication-suggestions { grid-template-columns: 1fr; } }

.dose-fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 0; padding: 0.8rem; border: 1px solid #d7e1dd; border-radius: 0.68rem; background: #f8faf9; }
.dose-fieldset .field-legend { grid-column: 1 / -1; }
.schedule-pane { overflow: hidden; border: 1px solid #c9d9d2; border-radius: 0.72rem; background: #f8faf9; }
.schedule-pane > summary { display: flex; min-height: 3.15rem; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.72rem 0.85rem; color: #355f50; cursor: pointer; list-style: none; }
.schedule-pane > summary::-webkit-details-marker { display: none; }
.schedule-pane > summary::after { content: "+"; display: grid; width: 1.45rem; height: 1.45rem; flex: 0 0 1.45rem; place-items: center; border: 1px solid #aac5ba; border-radius: 50%; background: white; font-size: 1rem; }
.schedule-pane[open] > summary::after { content: "−"; }
.schedule-pane > summary > span { display: grid; gap: 0.1rem; }
.schedule-pane > summary strong { font-size: 0.76rem; letter-spacing: 0.035em; text-transform: uppercase; }
.schedule-pane > summary small { color: #73867e; font-size: 0.63rem; line-height: 1.4; }
.schedule-pane-content { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; padding: 0.85rem; border-top: 1px solid #d8e4df; background: white; }
.custom-dose-field[hidden] { display: none; }
.weekday-fields, .time-fields { margin: 0; padding: 0.8rem; border: 1px solid #d7e1dd; border-radius: 0.68rem; }
.weekday-fields[hidden], .time-fields[hidden], .interval-fields[hidden], #dailyFrequencyField[hidden] { display: none; }
.weekday-fields legend, .time-fields legend { padding: 0 0.3rem; }
.weekday-options { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.32rem; }
.weekday-options label { display: grid; justify-items: center; gap: 0.3rem; padding: 0.42rem 0.2rem; border: 1px solid #d4ddd9; border-radius: 0.45rem; background: #f8faf9; color: #52665e; font-size: 0.64rem; font-weight: 800; cursor: pointer; }
.weekday-options input { width: 1rem; height: 1rem; margin: 0; accent-color: #34785f; }
.time-field-help { margin: 0 0 0.55rem; color: #75847f; font-size: 0.66rem; line-height: 1.45; }
.time-input-list { display: grid; gap: 0.5rem; margin-bottom: 0.55rem; }
.time-input-row { display: grid; grid-template-columns: 1fr auto; gap: 0.45rem; align-items: end; }
.time-input-label { display: grid; gap: 0.28rem; }
.time-slot-label { color: #52665e; font-size: 0.64rem; font-weight: 850; }
.time-input-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem; }
.time-picker-button { min-height: 2.55rem; padding: 0.52rem 0.65rem; border: 1px solid #a7c6ba; border-radius: 0.55rem; background: #eef8f4; color: #27634f; font-size: 0.67rem; font-weight: 850; cursor: pointer; white-space: nowrap; }
.time-picker-button:hover, .time-picker-button:focus-visible { border-color: #4f9078; background: #e1f2eb; outline: 3px solid rgba(65, 143, 113, 0.14); }
.remove-time-button { width: 2.55rem; min-height: 2.55rem; border: 1px solid #d6cbc8; border-radius: 0.55rem; background: #fff8f6; color: #91463e; font-size: 1.15rem; cursor: pointer; }
.remove-time-button[hidden], #addTimeButton[hidden] { display: none; }
.secondary-action { padding: 0.45rem 0.62rem; border: 1px solid #a7c6ba; border-radius: 0.5rem; background: #eef8f4; color: #27634f; font-size: 0.7rem; font-weight: 850; cursor: pointer; }
.interval-fields { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 0.75rem; }
.input-suffix { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem; }
.input-suffix em { color: #677871; font-size: 0.75rem; font-style: normal; }
.form-actions { display: flex; gap: 0.55rem; padding-top: 0.2rem; }
.primary-action { min-height: 2.65rem; padding: 0.65rem 1rem; border: 1px solid #226c54; border-radius: 0.62rem; background: #226c54; color: white; font-size: 0.8rem; font-weight: 850; cursor: pointer; }
.primary-action:hover { background: #18523f; }
.form-error { margin: 0; padding: 0.62rem 0.7rem; border: 1px solid #e2aaa4; border-radius: 0.52rem; background: #fff3f1; color: #8e2e28; font-size: 0.75rem; font-weight: 750; line-height: 1.45; }
.form-error[hidden] { display: none; }
.text-danger-button { border: 0; background: transparent; color: #9a3e36; font-size: 0.7rem; font-weight: 850; cursor: pointer; }
.text-danger-button:disabled { color: #a8b0ad; cursor: default; }

.reminders-pane { margin: 0; overflow: hidden; border: 1px solid #c9d9e5; border-radius: 0.72rem; background: #f6fafe; }
.reminders-pane > summary { display: flex; min-height: 3.15rem; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.72rem 0.85rem; color: #365d79; cursor: pointer; list-style: none; }
.reminders-pane > summary::-webkit-details-marker { display: none; }
.reminders-pane > summary::after { content: "+"; display: grid; width: 1.45rem; height: 1.45rem; flex: 0 0 auto; place-items: center; border: 1px solid #abc2d2; border-radius: 999px; background: white; color: #3c6884; font-size: 1rem; font-weight: 750; }
.reminders-pane[open] > summary::after { content: "−"; }
.reminders-pane > summary > span:first-child { display: grid; gap: 0.1rem; }
.reminders-pane > summary strong { font-size: 0.76rem; letter-spacing: 0.035em; text-transform: uppercase; }
.reminders-pane > summary small { color: #778b99; font-size: 0.63rem; }
.reminders-pane-state { margin-left: auto; color: #657d8d; font-size: 0.62rem; font-weight: 800; }
.reminders-pane-content { padding: 0.8rem 0.85rem 0.85rem; border-top: 1px solid #d8e4ec; }
.reminder-toggle { display: grid; grid-template-columns: auto 1fr; gap: 0.62rem; align-items: start; cursor: pointer; }
.reminder-toggle input, .reminder-consent input { width: 1rem; height: 1rem; margin: 0.15rem 0 0; accent-color: #2d6f9f; }
.reminder-toggle > span { display: grid; gap: 0.12rem; }
.reminder-toggle strong { color: #254d68; font-size: 0.78rem; }
.reminder-toggle small { color: #6d8290; font-size: 0.64rem; line-height: 1.4; }
.text-reminder-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid #d8e4ec; }
.text-reminder-details[hidden] { display: none; }
.reminder-consent { display: grid; grid-template-columns: auto 1fr; grid-column: 1 / -1; gap: 0.55rem; color: #586e7d; font-size: 0.67rem; line-height: 1.45; cursor: pointer; }
.sms-integration-status { margin: 0.7rem 0 0; padding: 0.5rem 0.62rem; border-radius: 0.48rem; background: #eaf1f6; color: #536d7f; font-size: 0.65rem; line-height: 1.45; }
.sms-ready, .sms-synced { background: #e7f5ef; color: #27634f; }
.sms-error { background: #fff1ef; color: #8e3d35; }

.sms-verification { display: grid; grid-template-columns: auto minmax(8rem, 1fr) auto; grid-column: 1 / -1; gap: 0.55rem; align-items: end; padding: 0.7rem; border: 1px solid #d5e2ea; border-radius: 0.58rem; background: white; }
.verification-code-field[hidden], #verifyPhoneButton[hidden] { display: none; }
.phone-verification-status { grid-column: 1 / -1; margin: 0; color: #657a88; font-size: 0.65rem; line-height: 1.45; }
.phone-verification-status.is-verified { color: #27634f; font-weight: 800; }

.plan-risk-panel { margin-bottom: 0.85rem; overflow: hidden; border: 2px solid #cfd9d5; border-left-width: 0.55rem; border-radius: 0.9rem; background: white; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07); }
.plan-risk-panel[hidden] { display: none; }
.plan-risk-critical { border-color: #bd4037; box-shadow: 0 9px 28px rgba(160, 47, 39, 0.16); }
.plan-risk-very-high { border-color: #c77a12; box-shadow: 0 9px 28px rgba(173, 103, 11, 0.14); }
.plan-risk-high { border-color: #7e57ad; box-shadow: 0 9px 24px rgba(104, 65, 151, 0.12); }
.plan-risk-caution { border-color: #5b7892; }
.plan-risk-unmatched { border-color: #91a59d; }
.plan-risk-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid #e1e8e5; background: #f5f8f7; }
.plan-risk-critical .plan-risk-heading { background: #fff1ef; }
.plan-risk-very-high .plan-risk-heading { background: #fff7e8; }
.plan-risk-high .plan-risk-heading { background: #f8f3fd; }
.plan-risk-heading h2 { margin: 0; font-size: 1.22rem; }
.plan-risk-level { flex: 0 0 auto; padding: 0.4rem 0.58rem; border: 1px solid #cad5d1; border-radius: 999px; background: white; font-size: 0.68rem; }
.plan-risk-summary { margin: 0; padding: 0.85rem 1.1rem; color: #344c44; font-size: 0.82rem; font-weight: 750; line-height: 1.55; }
.plan-risk-high-section, .plan-risk-lower-section { margin: 0 1.1rem 1rem; overflow: hidden; border: 1px solid #d7e0dd; border-radius: 0.72rem; }
.plan-risk-high-section[hidden], .plan-risk-lower-section[hidden] { display: none; }
.plan-risk-high-section { border: 2px solid #c8574f; background: #fff8f7; box-shadow: 0 6px 16px rgba(161, 49, 41, 0.1); }
.plan-risk-lower-section { background: #f8faf9; }
.plan-risk-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.75rem 0.85rem; border-bottom: 1px solid #e1e7e5; background: white; }
.plan-risk-high-section .plan-risk-section-heading { border-bottom-color: #ecc7c3; background: #fff0ee; }
.plan-risk-section-heading h3 { margin: 0; color: #3d5149; font-size: 0.9rem; }
.plan-risk-high-section .plan-risk-section-heading h3 { color: #842f28; }
.plan-risk-section-count { flex: 0 0 auto; padding: 0.3rem 0.45rem; border-radius: 999px; background: #e7efec; color: #4f665d; font-size: 0.62rem; }
.plan-risk-high-section .plan-risk-section-count { background: #b94037; color: white; }
.plan-risk-warnings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; padding: 0.8rem; }
.plan-risk-warning { overflow: hidden; border: 1px solid #d8e0dd; border-radius: 0.68rem; background: #fcfdfc; }
.plan-risk-warning.warning-critical { border-color: #e3a7a2; }
.plan-risk-warning.warning-very-high { border-color: #e5c17e; }
.plan-risk-warning.warning-high { border-color: #cdb9e4; }
.plan-risk-warning > header { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.65rem 0.72rem; border-bottom: 1px solid #e5ebe8; background: #f7f9f8; }
.plan-risk-warning h3 { margin: 0; color: #263e35; font-size: 0.82rem; }
.plan-risk-warning h4 { margin: 0; padding: 0.65rem 0.72rem 0.15rem; color: #354b43; font-size: 0.78rem; }
.plan-risk-warning > p:not(.plan-risk-action):not(.plan-risk-sources) { margin: 0; padding: 0.2rem 0.72rem 0.45rem; color: #5b6c65; font-size: 0.7rem; line-height: 1.5; }
.plan-risk-warning ul { margin: 0; padding: 0.2rem 1.5rem 0.65rem; color: #53645d; font-size: 0.68rem; line-height: 1.48; }
.plan-risk-action { margin: 0; padding: 0.6rem 0.72rem; border-top: 1px solid #eadbd8; background: #fff5f3; color: #812f29; font-size: 0.68rem; font-weight: 800; line-height: 1.45; }
.plan-risk-sources { margin: 0; padding: 0.55rem 0.72rem; border-top: 1px solid #e5ebe8; color: #718079; font-size: 0.62rem; line-height: 1.45; }
.plan-risk-sources a, .plan-risk-limit a, .plan-risk-lower-sources a { color: #28658e; font-weight: 800; }
.plan-risk-lower-warnings { display: grid; gap: 0.5rem; padding: 0.7rem; }
.plan-risk-lower-warning { display: grid; grid-template-columns: minmax(10rem, 0.72fr) minmax(15rem, 1.28fr); gap: 0.25rem 0.8rem; padding: 0.65rem 0.72rem; border: 1px solid #dbe3e0; border-left: 0.3rem solid #638199; border-radius: 0.56rem; background: white; }
.plan-risk-lower-warning header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.45rem; }
.plan-risk-lower-warning h4 { margin: 0; color: #354b43; font-size: 0.75rem; line-height: 1.4; }
.plan-risk-lower-warning > p { grid-column: 2; margin: 0; color: #5d6f68; font-size: 0.68rem; line-height: 1.48; }
.plan-risk-lower-sources { grid-column: 1 / -1 !important; padding-top: 0.35rem; border-top: 1px solid #e6ebe9; color: #77857f !important; font-size: 0.6rem !important; }
.plan-risk-limit { margin: 0; padding: 0.75rem 1.1rem; border-top: 1px solid #e1e8e5; background: #f8faf9; color: #65756f; font-size: 0.67rem; line-height: 1.5; }
.plan-risk-unmatched-copy { margin: 0 1.1rem 1rem; padding: 0.75rem; border: 1px solid #d7e1dd; border-radius: 0.62rem; background: #f8faf9; color: #65756f; font-size: 0.72rem; line-height: 1.5; }
.plan-risk-unmatched-copy[hidden] { display: none; }

.combined-risk-modal { width: min(980px, calc(100% - 1.5rem)); border-color: #9b86ad; }
.combined-risk-modal-header { border-bottom-color: #c8b8d4; background: linear-gradient(115deg, #eee7f4, #fbf9fc); }
.combined-risk-modal-header h2 { color: #402756; font-size: clamp(1.7rem, 3.2vw, 2.25rem); font-weight: 950; letter-spacing: -0.045em; }
.combined-risk-modal-header .eyebrow { color: #76528f; }
.combined-risk-modal-header .modal-close { border-color: #c2afd0; color: #604078; }
.combined-risk-modal-scroll { padding: 0; }
.combined-risk-modal-summary { margin: 0; padding: 1rem 1.1rem; border-bottom: 1px solid #ded4e5; background: #fdfcff; color: #51445a; font-size: 0.82rem; font-weight: 750; line-height: 1.55; }
.combined-risk-legend { display: flex; flex-wrap: wrap; gap: 0.42rem; padding: 0.72rem 1.1rem; border-bottom: 1px solid #e2dce7; background: #f7f4f9; }
.combined-risk-type-badge { display: inline-flex; min-height: 1.7rem; align-items: center; padding: 0.3rem 0.55rem; border: 1px solid; border-radius: 999px; font-size: 0.58rem; font-weight: 950; letter-spacing: 0.045em; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.combined-risk-type-mixing { border-color: #e1a39d; background: #fde7e4; color: #8d2d27; }
.combined-risk-type-patient { border-color: #e0bd83; background: #ffedcb; color: #7e4b0e; }
.combined-risk-type-food { border-color: #9ebad5; background: #e3eff9; color: #315b83; }
.combined-risk-type-substance { border-color: #c8afe1; background: #eee4f8; color: #633c89; }
.combined-risk-modal-findings { display: grid; gap: 0.9rem; padding: 1rem 1.1rem; background: #f7f8f8; }
.combined-risk-section { overflow: hidden; border: 2px solid; border-radius: 0.9rem; background: white; box-shadow: 0 7px 18px rgba(43, 52, 62, 0.08); }
.combined-risk-section > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.82rem 0.9rem; border-bottom: 1px solid; }
.combined-risk-section > header > div { display: grid; gap: 0.08rem; }
.combined-risk-section > header h3 { margin: 0; color: #28353c; font-size: 1rem; }
.combined-risk-section > header p { margin: 0; color: #66737a; font-size: 0.66rem; line-height: 1.4; }
.combined-risk-section-count { color: #59666c; font-size: 0.63rem; font-weight: 900; white-space: nowrap; }
.combined-risk-section-cards { display: grid; gap: 0.7rem; padding: 0.78rem; background: #fbfcfc; }
.combined-risk-section-cards > article { border-width: 1px; box-shadow: none; }
.combined-risk-entry { overflow: hidden; border: 2px solid; border-radius: 0.9rem; background: white; box-shadow: 0 7px 18px rgba(43, 52, 62, 0.08); }
.combined-risk-entry > header { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.52rem 0.65rem; border-bottom: 1px solid; }
.combined-risk-entry > article { border: 0; border-radius: 0; box-shadow: none; }
.combined-risk-order-label { color: #647078; font-size: 0.59rem; font-weight: 900; letter-spacing: 0.035em; text-transform: uppercase; }
.combined-risk-mixing, .combined-risk-mixing > header { border-color: #e1a39d; }
.combined-risk-mixing > header { background: #fff8f7; }
.combined-risk-patient, .combined-risk-patient > header { border-color: #e0bd83; }
.combined-risk-patient > header { background: #fffaf1; }
.combined-risk-food, .combined-risk-food > header { border-color: #9ebad5; }
.combined-risk-food > header { background: #f7fbff; }
.combined-risk-substance, .combined-risk-substance > header { border-color: #c8afe1; }
.combined-risk-substance > header { background: #fcf9ff; }
.combined-risk-substance .plan-risk-warning, .combined-risk-substance .food-risk-warning { border-color: #c8afe1; }
.combined-risk-limit { margin: 0; padding: 0.8rem 1.1rem; border-top: 1px solid #ded5e4; background: #faf8fb; color: #6b6070; font-size: 0.67rem; line-height: 1.5; }

.mixing-risk-modal { width: min(900px, calc(100% - 1.5rem)); border-color: #d7a7a2; }
.mixing-risk-modal-header { border-bottom-color: #e7b8b3; background: linear-gradient(110deg, #fff0ee, #fff8f7); }
.mixing-risk-modal-header h2 { color: #7f2822; }
.mixing-risk-modal-header .eyebrow { color: #a5453d; }
.mixing-risk-modal-header .modal-close { border-color: #d7aaa5; color: #8c352e; }
.mixing-risk-modal-header .modal-close:hover { border-color: #b9554c; background: #ffe5e1; color: #76231e; }
.mixing-risk-modal-scroll { padding: 0; }
.mixing-risk-modal-summary { margin: 0; padding: 1rem 1.1rem; border-bottom: 1px solid #ead7d4; background: #fffdfc; color: #4e3f3c; font-size: 0.82rem; font-weight: 750; line-height: 1.55; }
.mixing-risk-modal-findings { display: grid; gap: 0.75rem; padding: 1rem 1.1rem; background: #fafcfb; }
.mixing-risk-modal-findings .plan-risk-warning { border-width: 2px; background: white; box-shadow: 0 5px 14px rgba(83, 45, 41, 0.07); }
.mixing-risk-modal .plan-risk-limit { border-top-color: #e4d3d0; }

.mixing-risk-modal-header h2,
.patient-risk-modal-header h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.mixing-risk-modal-findings .plan-risk-warning,
.patient-risk-modal-findings .patient-risk-warning {
  border-radius: 0.88rem;
  box-shadow: 0 9px 24px rgba(55, 42, 38, 0.1);
}

.mixing-risk-modal-findings .plan-risk-warning > header,
.patient-risk-modal-findings .patient-risk-warning > header {
  min-height: 4.25rem;
  padding: 0.95rem 1rem;
}

.mixing-risk-modal-findings .plan-risk-warning h3,
.patient-risk-modal-findings .patient-risk-warning h3 {
  font-size: clamp(1.12rem, 2vw, 1.38rem);
  font-weight: 950;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.mixing-risk-modal .risk-tier,
.patient-risk-modal .risk-tier {
  min-height: 2rem;
  padding: 0.47rem 0.72rem;
  border-width: 2px;
  font-size: 0.78rem;
  letter-spacing: 0.045em;
  box-shadow: 0 4px 10px rgba(68, 47, 39, 0.11);
}

.medication-list { display: grid; gap: 0.8rem; max-height: 43rem; overflow-y: auto; padding: 1rem; }
.medication-time-group { overflow: hidden; border: 1px solid #cad8d3; border-radius: 0.78rem; background: #f7faf9; }
.medication-time-group > header { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.65rem 0.75rem; border-bottom: 1px solid #d8e2de; background: #eaf3ef; }
.medication-time-group > header div { display: grid; gap: 0.08rem; }
.medication-time-group > header span { color: #668078; font-size: 0.58rem; font-weight: 850; letter-spacing: 0.045em; text-transform: uppercase; }
.medication-time-group > header h3 { margin: 0; color: #285444; font-size: 0.9rem; }
.medication-time-count { flex: 0 0 auto; padding: 0.27rem 0.42rem; border-radius: 999px; background: white; color: #60766e; font-size: 0.6rem; font-weight: 800; }
.medication-time-group-cards { display: grid; gap: 0.58rem; padding: 0.62rem; }
.medication-card { overflow: hidden; border: 1px solid #d6e0dc; border-radius: 0.72rem; background: #fcfdfc; }
.medication-card > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: flex-start; gap: 0.4rem 0.8rem; padding: 0.78rem 0.85rem; border-bottom: 1px solid #e1e8e5; background: #f3f8f6; }
.medication-card > header div { display: grid; gap: 0.12rem; }
.medication-card > header span { color: #72827c; font-size: 0.61rem; font-weight: 800; text-transform: uppercase; }
.medication-card h3 { margin: 0; color: #234a3d; font-size: 1rem; }
.medication-card > header .medication-brand-name { color: #527368; font-size: 0.66rem; font-style: italic; font-weight: 800; letter-spacing: 0; text-transform: none; }
.medication-card > header .medication-active-ingredient { color: #637871; font-size: 0.7rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.medication-purpose-description { grid-column: 1 / -1; color: #29453b; font-size: 0.67rem; font-weight: 780; letter-spacing: 0.01em; line-height: 1.35; }
.medication-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.current-plan-content .medication-card > header .medication-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.26rem; }
.current-plan-content .medication-title-line .medication-risk-label,
.current-plan-content .medication-title-line .patient-risk-label,
.current-plan-content .medication-title-line .food-risk-label,
.current-plan-content .medication-title-line .substance-risk-label { min-height: 1.28rem; padding: 0.17rem 0.35rem 0.17rem 0.2rem; font-size: 0.51rem; }
.current-plan-content .medication-title-line button::before { width: 0.78rem; height: 0.78rem; flex: 0 0 0.78rem; font-size: 0.49rem; }
.medication-risk-label {
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.44rem;
  border: 1px solid #a93e36;
  border-radius: 999px;
  background: #b94037;
  color: white;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(157, 48, 40, 0.18);
  cursor: pointer;
}
.medication-risk-label::before { content: "!"; display: grid; width: 0.9rem; height: 0.9rem; place-items: center; border-radius: 50%; background: white; color: #a92f27; font-size: 0.58rem; }
.medication-risk-label:hover, .medication-risk-label:focus-visible { border-color: #78251f; background: #942f28; outline: 3px solid rgba(185, 64, 55, 0.2); }
.patient-risk-label {
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.44rem;
  border: 1px solid #a86118;
  border-radius: 999px;
  background: #bf6b16;
  color: white;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(158, 87, 16, 0.18);
  cursor: pointer;
}
.patient-risk-label::before { content: "!"; display: grid; width: 0.9rem; height: 0.9rem; place-items: center; border-radius: 50%; background: white; color: #9b5310; font-size: 0.58rem; }
.patient-risk-label:hover, .patient-risk-label:focus-visible { border-color: #753c08; background: #9a520f; outline: 3px solid rgba(191, 107, 22, 0.2); }
.food-risk-label {
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.44rem;
  border: 1px solid #42688f;
  border-radius: 999px;
  background: #527ca5;
  color: white;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(57, 91, 124, 0.18);
  cursor: pointer;
}
.food-risk-label::before { content: "F"; display: grid; width: 0.9rem; height: 0.9rem; place-items: center; border-radius: 50%; background: white; color: #41678d; font-size: 0.52rem; }
.food-risk-label:hover, .food-risk-label:focus-visible { border-color: #294967; background: #3d6388; outline: 3px solid rgba(70, 111, 151, 0.2); }
.substance-risk-label {
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.44rem;
  border: 1px solid #72529a;
  border-radius: 999px;
  background: #7956a1;
  color: white;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(79, 54, 112, 0.18);
  cursor: pointer;
}
.substance-risk-label:hover, .substance-risk-label:focus-visible { border-color: #563878; background: #664489; outline: 3px solid rgba(114, 82, 154, 0.2); }

.medication-risk-label, .patient-risk-label, .food-risk-label, .substance-risk-label {
  min-height: 2rem;
  gap: 0.52rem;
  padding: 0.34rem 0.72rem 0.34rem 0.38rem;
  border-width: 1px;
  font-size: 0.63rem;
  letter-spacing: 0.045em;
  line-height: 1.05;
  box-shadow: 0 4px 10px rgba(42, 57, 70, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.medication-risk-label::before, .patient-risk-label::before, .food-risk-label::before, .substance-risk-label::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.26rem;
  height: 1.26rem;
  flex: 0 0 1.26rem;
  border-radius: 0.4rem;
  color: white;
  font-size: 0.58rem;
  line-height: 1;
  text-align: center;
  box-shadow: 0 2px 5px rgba(25, 37, 49, 0.16);
}
.medication-risk-label { border-color: #e1a39d; background: linear-gradient(145deg, #fff8f7, #fde7e4); color: #8d2d27; }
.medication-risk-label::before { content: "⚠️"; background: linear-gradient(145deg, #d85b51, #a9342c); color: white; font-size: 0.66rem; }
.medication-risk-label:hover, .medication-risk-label:focus-visible { border-color: #c7655d; background: #f9d8d4; color: #77231e; }
.patient-risk-label { border-color: #e0bd83; background: linear-gradient(145deg, #fffaf1, #ffedcb); color: #7e4b0e; }
.patient-risk-label::before { content: "🧑"; background: linear-gradient(145deg, #d98b2f, #a85d0e); color: white; font-size: 0.68rem; }
.patient-risk-label:hover, .patient-risk-label:focus-visible { border-color: #c58737; background: #ffe3b6; color: #663a08; }
.food-risk-label { border-color: #9ebad5; background: linear-gradient(145deg, #f7fbff, #e3eff9); color: #315b83; }
.food-risk-label::before { content: attr(data-icon); background: linear-gradient(145deg, #6f9ac2, #3f6c96); color: white; font-size: 0.68rem; }
.food-risk-label:hover, .food-risk-label:focus-visible { border-color: #7098bd; background: #d7e8f5; color: #244767; }
.substance-risk-label { border-color: #c8afe1; background: linear-gradient(145deg, #fcf9ff, #eee4f8); color: #633c89; }
.substance-risk-label::before { content: attr(data-icon); background: linear-gradient(145deg, #9870be, #67418b); color: white; font-size: 0.68rem; }
.substance-risk-label[data-icon="🍺"]::before,
.substance-risk-label[data-icon="🤍"]::before { padding-top: 0.08rem; transform: translateY(0.02rem); }
.substance-risk-label:hover, .substance-risk-label:focus-visible { border-color: #9b73c0; background: #e4d4f2; color: #4f2d70; }

.patient-risk-modal { width: min(900px, calc(100% - 1.5rem)); border-color: #d5b27d; }
.patient-risk-modal-header { border-bottom-color: #e2c691; background: linear-gradient(110deg, #fff4db, #fffaf0); }
.patient-risk-modal-header h2 { color: #70420c; }
.patient-risk-modal-header .eyebrow { color: #9a621e; }
.patient-risk-modal-scroll { padding: 0; }
.patient-risk-modal-summary { margin: 0; padding: 1rem 1.1rem; border-bottom: 1px solid #ead9b8; background: #fffdf8; color: #4f4534; font-size: 0.82rem; font-weight: 750; line-height: 1.55; }
.patient-risk-modal-findings { display: grid; gap: 0.75rem; padding: 1rem 1.1rem; background: #fafcfb; }
.patient-risk-warning { overflow: hidden; border: 2px solid #dbbd85; border-radius: 0.72rem; background: white; box-shadow: 0 5px 14px rgba(94, 70, 32, 0.07); }
.patient-risk-warning.warning-high { border-color: #d29342; }
.patient-risk-warning > header { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.7rem 0.78rem; border-bottom: 1px solid #eadcc4; background: #fff8e9; }
.patient-risk-warning h3 { margin: 0; color: #4b3b24; font-size: 0.88rem; }
.patient-risk-characteristic { display: grid; gap: 0.18rem; margin: 0; padding: 0.72rem 0.82rem 0.76rem 1rem; border-bottom: 1px solid #e7cfaa; border-left: 0.34rem solid #d29342; background: linear-gradient(110deg, #fff4dc, #fffaf1); color: #75430e; }
.patient-risk-characteristic-label { font-size: 0.62rem; font-weight: 950; letter-spacing: 0.065em; text-transform: uppercase; }
.patient-risk-characteristic-value { color: #593306; font-size: clamp(1rem, 1.7vw, 1.2rem); font-weight: 950; letter-spacing: -0.018em; line-height: 1.25; }
.patient-risk-warning h4 { margin: 0; padding: 0.7rem 0.78rem 0.2rem; color: #443b2e; font-size: 0.82rem; }
.patient-risk-warning > p:not(.patient-risk-characteristic):not(.patient-risk-response):not(.patient-risk-sources) { margin: 0; padding: 0.2rem 0.78rem 0.5rem; color: #625a4e; font-size: 0.72rem; line-height: 1.5; }
.patient-risk-warning ul { margin: 0; padding: 0.2rem 1.65rem 0.7rem; color: #625a4e; font-size: 0.7rem; line-height: 1.5; }
.patient-risk-response { margin: 0; padding: 0.65rem 0.78rem; border-top: 1px solid #ead6b1; background: #fff8e9; color: #70420c; font-size: 0.69rem; font-weight: 800; line-height: 1.5; }
.patient-risk-sources { margin: 0; padding: 0.58rem 0.78rem; border-top: 1px solid #e7dfd0; color: #746d61; font-size: 0.62rem; line-height: 1.45; }
.patient-risk-sources a { color: #28658e; font-weight: 800; }
.patient-risk-limit { margin: 0; padding: 0.8rem 1.1rem; border-top: 1px solid #e4d8c3; background: #fffaf0; color: #6e6558; font-size: 0.67rem; line-height: 1.5; }
.food-risk-modal { width: min(900px, calc(100% - 1.5rem)); border-color: #9eb7ce; }
.food-risk-modal-header { border-bottom-color: #bed0df; background: linear-gradient(110deg, #eaf3fa, #f8fbfd); }
.food-risk-modal-header h2 { color: #294f70; }
.food-risk-modal-header .eyebrow { color: #50799c; }
.food-risk-modal-scroll { padding: 0; }
.food-risk-modal-summary { margin: 0; padding: 1rem 1.1rem; border-bottom: 1px solid #d5e1ea; background: #fbfdff; color: #405361; font-size: 0.82rem; font-weight: 750; line-height: 1.55; }
.food-risk-modal-findings { display: grid; gap: 0.75rem; padding: 1rem 1.1rem; background: #f7fafc; }
.food-risk-warning { overflow: hidden; border: 2px solid #a8bfd2; border-radius: 0.72rem; background: white; box-shadow: 0 5px 14px rgba(50, 76, 98, 0.07); }
.food-risk-warning > header { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.7rem 0.78rem; border-bottom: 1px solid #d9e4ec; background: #eef5fa; }
.food-risk-warning h3 { margin: 0; color: #2d4c62; font-size: 0.88rem; }
.food-risk-exposure { display: flex; align-items: center; gap: 0.75rem; margin: 0.72rem 0.78rem 0.35rem; padding: 0.78rem 0.88rem; border: 1px solid #9ebed6; border-radius: 0.78rem; background: linear-gradient(120deg, #e7f2fa, #f8fcff); color: #294f70; box-shadow: 0 7px 18px rgba(50, 92, 125, 0.1); }
.food-risk-exposure-icon { display: grid; width: 2.65rem; height: 2.65rem; flex: 0 0 2.65rem; place-items: center; border-radius: 0.78rem; background: white; font-size: 1.45rem; box-shadow: 0 4px 10px rgba(52, 89, 118, 0.12); transform: rotate(-3deg); }
.food-risk-exposure-copy { display: grid; gap: 0.12rem; min-width: 0; }
.food-risk-exposure-label { color: #5a7890; font-size: 0.58rem; font-weight: 900; letter-spacing: 0.055em; text-transform: uppercase; }
.food-risk-exposure-name { color: #204f73; font-size: clamp(1.08rem, 2vw, 1.32rem); font-weight: 950; letter-spacing: -0.025em; line-height: 1.18; }
.food-risk-warning h4 { margin: 0; padding: 0.7rem 0.78rem 0.2rem; color: #354b5a; font-size: 0.82rem; }
.food-risk-warning > p:not(.food-risk-affected):not(.food-risk-response):not(.food-risk-sources) { margin: 0; padding: 0.2rem 0.78rem 0.5rem; color: #586a77; font-size: 0.72rem; line-height: 1.5; }
.food-risk-affected { margin: 0.55rem 0.78rem 0.7rem; padding: 0.78rem 0.85rem; border: 1px solid #afc8db; border-left: 0.34rem solid #527ca5; border-radius: 0.62rem; background: linear-gradient(110deg, #e8f2f9, #f7fbfe); color: #294f70; font-size: 0.88rem; font-weight: 900; line-height: 1.5; box-shadow: 0 4px 12px rgba(61, 99, 132, 0.09); }
.food-risk-warning ul { margin: 0; padding: 0.2rem 1.65rem 0.7rem; color: #586a77; font-size: 0.7rem; line-height: 1.5; }
.food-risk-response { margin: 0; padding: 0.65rem 0.78rem; border-top: 1px solid #cfdee9; background: #edf5fa; color: #294f70; font-size: 0.69rem; font-weight: 800; line-height: 1.5; }
.food-risk-sources { margin: 0; padding: 0.58rem 0.78rem; border-top: 1px solid #dde6ed; color: #657581; font-size: 0.62rem; line-height: 1.45; }
.food-risk-sources a { color: #28658e; font-weight: 800; }
.food-risk-limit { margin: 0; padding: 0.8rem 1.1rem; border-top: 1px solid #d5e1ea; background: #f3f8fb; color: #5f707d; font-size: 0.67rem; line-height: 1.5; }
.medication-dose { flex: 0 0 auto; padding: 0.34rem 0.5rem; border-radius: 999px; background: #dff1e9; color: #1d624b; font-size: 0.72rem; }
.medication-schedule { margin: 0; padding: 0.72rem 0.85rem 0.2rem; color: #344c44; font-size: 0.8rem; font-weight: 800; line-height: 1.45; }
.medication-instructions { margin: 0; padding: 0.2rem 0.85rem 0.7rem; color: #718079; font-size: 0.7rem; line-height: 1.45; }
.plan-pill-section { display: grid; gap: 0.45rem; margin: 0.35rem 0.85rem 0.65rem; padding: 0.62rem; border: 1px solid #d9e2de; border-radius: 0.58rem; background: white; }
.plan-pill-section > strong { color: #596c64; font-size: 0.62rem; letter-spacing: 0.04em; text-transform: uppercase; }
.plan-pill-section > small { color: #7b8984; font-size: 0.59rem; line-height: 1.4; }
.plan-pill-gallery { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.plan-pill-example { display: grid; min-width: 4.7rem; justify-items: center; gap: 0.2rem; padding: 0.38rem; border: 1px solid #d8e1dd; border-radius: 0.5rem; background: #f8faf9; }
.plan-pill-example.is-dose-match { border-color: #5c9c83; outline: 2px solid rgba(53, 126, 95, 0.12); background: #eff8f4; }
.plan-pill-example > small { color: #60736b; font-size: 0.55rem; font-weight: 800; }
.plan-pill-drawing { --pill-fill: #e4e6e8; display: grid; min-height: 2rem; place-items: center; }
.plan-pill-drawing .pill-face { width: 3.4rem; height: 1.55rem; min-width: 1.55rem; transform: none; }
.plan-pill-drawing.shape-round .pill-face { width: 2rem; height: 2rem; }
.plan-pill-drawing.shape-oval .pill-face { width: 3.2rem; height: 1.75rem; }
.plan-pill-drawing.shape-oblong .pill-face, .plan-pill-drawing.shape-capsule .pill-face { width: 3.5rem; height: 1.48rem; }
.plan-pill-drawing .pill-imprint { font-size: 0.38rem; }
.plan-pill-drawing .pill-score.multiple::after { width: 1.7rem; }
.medication-card-actions { display: flex; gap: 0.4rem; padding: 0.58rem 0.85rem; border-top: 1px solid #e5ebe8; background: white; }
.medication-card-actions button { padding: 0.36rem 0.55rem; border: 1px solid #c9d4d0; border-radius: 0.42rem; background: #f8faf9; color: #52665e; font-size: 0.68rem; font-weight: 800; cursor: pointer; }
.medication-card-actions button[data-action="delete"] { margin-left: auto; border-color: #dfc0bc; color: #92443c; }
.medication-reminder-state { align-self: center; margin-right: auto; color: #2d648a; font-size: 0.61rem; font-weight: 850; }
.medication-reminder-state + button { margin-left: 0; }
.manager-empty { margin: 0.9rem; padding: 2.2rem 1rem; border: 1px dashed #bfcfc9; border-radius: 0.7rem; background: #f8faf9; text-align: center; }
.manager-empty[hidden] { display: none; }
.manager-empty strong { color: #435b52; font-size: 1rem; font-weight: 900; }
.manager-empty p { max-width: 24rem; margin: 0.4rem auto 0; color: #7b8984; font-size: 0.72rem; line-height: 1.5; }

.upcoming-card { margin-top: 0.85rem; overflow: hidden; }
.schedule-preview > summary { cursor: pointer; list-style: none; }
.schedule-preview > summary::-webkit-details-marker { display: none; }
.schedule-preview-summary { align-items: center; border-bottom: 0; }
.schedule-preview { border-color: #c8cbed; border-top: 0.28rem solid var(--indigo); }
.schedule-preview-summary { background: linear-gradient(110deg, var(--indigo-soft), #f8f8fe); }
.schedule-preview-summary .ui-icon-calendar { width: 2.45rem; height: 2.45rem; flex-basis: 2.45rem; border-radius: 0.75rem; }
.schedule-preview-standalone { margin-top: 1rem; box-shadow: 0 12px 26px rgba(72, 94, 180, 0.1); }
.schedule-preview:not([open]) .schedule-preview-summary { min-height: 3.2rem; padding: 0.48rem 0.7rem; }
.schedule-preview:not([open]) .schedule-preview-summary h2 { font-size: 1.02rem; }
.schedule-preview:not([open]) .schedule-preview-summary .eyebrow { font-size: 0.53rem; }
.schedule-preview:not([open]) .schedule-preview-count { font-size: 0.6rem; }
.schedule-preview:not([open]) .schedule-preview-summary::after { width: 1.45rem; height: 1.45rem; flex-basis: 1.45rem; font-size: 0.95rem; }
.schedule-preview-summary::after { content: "+"; display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 1.8rem; place-items: center; border: 1px solid #a9c2b8; border-radius: 50%; background: white; color: #356b58; font-size: 1.15rem; font-weight: 800; }
.schedule-preview[open] .schedule-preview-summary { border-bottom: 1px solid #cfdcd7; }
.schedule-preview[open] .schedule-preview-summary::after { content: "−"; }
.schedule-preview-count { margin-left: auto; color: #62766e; font-size: 0.67rem; font-weight: 800; }
.schedule-preview-content { overflow-x: auto; padding: 0.8rem; background: #f7faf9; }
.calendar-navigation { display: grid; min-width: 700px; grid-template-columns: 1fr auto 1fr; gap: 0.6rem; align-items: center; margin-bottom: 0.58rem; }
.calendar-navigation-link { border: 0; background: transparent; color: #3f5d9e; font-size: 0.68rem; font-weight: 900; text-decoration: underline; text-underline-offset: 0.16rem; cursor: pointer; }
.calendar-navigation-link:first-child { justify-self: start; }
.calendar-navigation-link:last-child { justify-self: end; }
.calendar-range-status { color: #60716b; font-size: 0.64rem; font-weight: 850; text-align: center; white-space: nowrap; }
.calendar-week-labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid #cfdcd7; border-bottom: 0; border-radius: 0.65rem 0.65rem 0 0; background: #e6f1ed; }
.calendar-week-labels, .calendar-dose-grid { min-width: 700px; }
.calendar-week-labels span { padding: 0.45rem 0.25rem; color: #4e685e; font-size: 0.58rem; font-weight: 900; letter-spacing: 0.045em; text-align: center; text-transform: uppercase; }
.calendar-dose-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid #cfdcd7; border-left: 1px solid #cfdcd7; }
.calendar-blank-day, .calendar-day { min-height: 9rem; border-right: 1px solid #cfdcd7; border-bottom: 1px solid #cfdcd7; background: white; }
.calendar-blank-day { background: repeating-linear-gradient(135deg, #f4f7f6, #f4f7f6 0.35rem, #f8faf9 0.35rem, #f8faf9 0.7rem); }
.calendar-day > header { display: grid; grid-template-columns: 1fr auto; gap: 0.05rem 0.35rem; align-items: center; padding: 0.5rem; border-bottom: 1px solid #e0e8e5; background: #f6f9f8; }
.calendar-day > header span { color: #667a72; font-size: 0.56rem; font-weight: 900; text-transform: uppercase; }
.calendar-day > header time { grid-row: 1 / 3; grid-column: 2; color: #244d3f; font-size: 1.3rem; font-weight: 900; }
.calendar-day > header small { color: #82908b; font-size: 0.56rem; font-weight: 750; }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px #3d8b6d; }
.calendar-day.is-today > header { background: #dff1e9; }
.calendar-day-doses { display: grid; gap: 0.35rem; padding: 0.45rem; }
.calendar-dose-entry { display: grid; gap: 0.18rem; padding: 0.42rem; border-left: 0.24rem solid #3f866c; border-radius: 0.38rem; background: #edf7f3; }
.calendar-dose-entry > time { color: #2b684f; font-size: 0.58rem; font-weight: 900; }
.calendar-dose-entry > div { display: grid; gap: 0.08rem; }
.calendar-dose-entry strong { color: #27483d; font-size: 0.65rem; line-height: 1.3; }
.calendar-dose-entry span { color: #66786f; font-size: 0.58rem; font-weight: 750; }
.calendar-dose-entry .calendar-dose-purpose { color: #445b52; font-size: 0.57rem; font-weight: 800; line-height: 1.3; }
.calendar-dose-entry .calendar-dose-brand { color: #426b5d; font-style: italic; font-weight: 800; }
.calendar-dose-entry .calendar-dose-active-ingredient { color: #60766e; font-size: 0.54rem; font-weight: 700; }
.calendar-no-doses { color: #8a9692; font-size: 0.58rem; font-style: italic; line-height: 1.4; }
.manager-empty-inline { margin: 0; padding: 1.35rem; color: #7a8883; font-size: 0.78rem; text-align: center; }
.manager-empty-inline[hidden] { display: none; }
.manager-methodology { margin-top: 0.85rem; }
.manager-privacy-disclosure { display: block; overflow: hidden; padding: 0; border-color: #d8c5eb; border-top: 0.28rem solid var(--violet); background: #faf7fd; }
.manager-privacy-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.78rem 0.9rem; cursor: pointer; list-style: none; }
.manager-privacy-summary::-webkit-details-marker { display: none; }
.manager-privacy-summary:hover { background: var(--violet-soft); }
.manager-privacy-summary:focus-visible { outline: 3px solid rgba(121, 83, 169, 0.24); outline-offset: -3px; }
.manager-privacy-summary > span:nth-child(2) { display: grid; gap: 0.1rem; }
.manager-privacy-summary > .ui-icon-lock { width: 2.4rem; height: 2.4rem; flex-basis: 2.4rem; border-radius: 0.76rem; }
.manager-privacy-summary .eyebrow { color: #76589a; font-size: 0.57rem; }
.manager-privacy-summary strong { color: #4f386b; font-size: 0.82rem; line-height: 1.35; }
.manager-privacy-toggle { display: grid; width: 1.55rem; height: 1.55rem; place-items: center; border: 1px solid #bda9d2; border-radius: 50%; background: white; color: #65458d; }
.manager-privacy-toggle::before { content: "+"; font-size: 1rem; font-weight: 850; }
.manager-privacy-disclosure[open] .manager-privacy-toggle::before { content: "−"; }
.manager-privacy-disclosure[open] > .manager-privacy-summary { border-bottom: 1px solid #dfd1ed; }
.manager-privacy-disclosure > .methodology-copy { padding: 0.9rem 1rem 1rem; background: rgba(255, 255, 255, 0.76); }

/* Site-wide page headers echo the Drug Catalog disclosure header and content
   surface while retaining a page-specific top accent. */
.home-hero,
.manager-hero,
.mix-hero,
.guide-hero {
  align-items: center;
  padding: 1rem 1.15rem;
  border: 1px solid var(--pane-outline-soft);
  border-top: 0.3rem solid var(--blue);
  border-radius: var(--pane-radius);
  background: var(--pane-header-surface);
  box-shadow: var(--pane-shadow);
}

.home-hero { border-top-color: #285b70; }
.manager-hero { border-top-color: #27745c; }
.about-hero { border-top-color: #a96d1f; }
.development-hero { border-top-color: var(--coral); }

.home-hero h1,
.manager-hero h1,
.mix-hero h1,
.guide-hero h1 { color: #173b4b; }

.home-hero .intro,
.manager-hero .intro,
.mix-hero .intro,
.guide-hero .intro { color: #5b717b; }

/* Give informative and workflow panes the same restrained depth as an open
   catalog pane without replacing semantic warning or risk colors. */
.methodology,
.guide-intro,
.about-authority,
.about-grid article,
.development-notice,
.roadmap-phase,
.interaction-builder,
.mix-controls,
.manager-safety,
.medical-management-shell,
.current-plan-standalone,
.schedule-preview-standalone {
  box-shadow: var(--pane-shadow);
}

.methodology,
.guide-intro,
.catalog-search-panel { border-radius: var(--pane-radius); }

.builder-heading,
.catalog-category-filter,
.catalog-row-guide { border-bottom-color: var(--pane-divider); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 761px) and (max-width: 1120px) {
  .site-navigation { gap: 0.04rem; }
  .site-navigation a { padding-inline: 0.34rem; font-size: 0.62rem; }
  .site-navigation .site-nav-home { padding-inline: 0.46rem; font-size: 0.65rem; }
  .site-navigation .site-nav-primary { padding-inline: 0.5rem; font-size: 0.66rem; }
  .site-navigation .site-nav-home::before { margin-right: 0.18rem; }
  .site-navigation .site-nav-primary::before { margin-right: 0.22rem; }
  .site-navigation .site-patient-name { max-width: 6rem; font-size: 0.56rem; }
}

@media (max-width: 760px) {
  .site-navigation { display: grid; width: calc(100% - 0.7rem); min-width: 0; max-width: calc(100% - 0.7rem); min-height: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.38rem; padding: 0.3rem 0; overflow: visible; }
  .site-nav-mobile-toggle { display: flex; width: auto; min-height: 2.65rem; grid-column: 2; grid-row: 1; align-items: center; justify-self: end; gap: 0.42rem; padding: 0.34rem 0.5rem; border: 1px solid #b8ccd4; border-radius: 0.65rem; background: linear-gradient(110deg, #fff, #edf5f7); color: #183f4f; cursor: pointer; text-align: left; }
  .site-nav-mobile-icon { display: grid; width: 2rem; height: 2rem; flex: 0 0 2rem; place-items: center; border-radius: 0.58rem; background: #dff1eb; font-size: 1.15rem; }
  .site-nav-mobile-copy { display: grid; min-width: 0; gap: 0.02rem; }
  .site-nav-mobile-copy strong { font-size: 0.76rem; }
  .site-nav-mobile-copy small { overflow: hidden; color: #6a7d86; font-size: 0.62rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .site-nav-mobile-toggle::after { margin-left: auto; content: "⌄"; color: #4f6e79; font-size: 1.15rem; font-weight: 900; transition: transform 140ms ease; }
  .site-navigation.mobile-nav-open .site-nav-mobile-toggle::after { transform: rotate(180deg); }
  .site-navigation.mobile-nav-ready > a { display: none; width: 100%; min-height: 2.45rem; grid-column: 1 / -1; justify-content: flex-start; padding: 0.45rem 0.65rem; font-size: 0.7rem; }
  .site-navigation.mobile-nav-ready > .site-nav-group { display: none; width: 100%; grid-column: 1 / -1; }
  .site-navigation.mobile-nav-ready > .site-nav-primary { display: inline-flex; width: fit-content; min-width: 0; min-height: 2.65rem; grid-column: 1; grid-row: 1; align-self: center; padding: 0.48rem 0.62rem; font-size: 0.72rem; }
  .site-navigation.mobile-nav-open > a:not(.site-nav-primary) { display: flex; }
  .site-navigation.mobile-nav-open > .site-nav-group { display: block; }
  .site-nav-group > summary { width: 100%; min-height: 2.45rem; justify-content: space-between; padding: 0.45rem 0.65rem; border-radius: 0.48rem; font-size: 0.7rem; }
  .site-nav-group-menu { position: static; min-width: 0; margin: 0.16rem 0 0.25rem; padding: 0.22rem 0.35rem 0.35rem 0.75rem; border: 0; border-left: 1px solid #c9d7dc; border-radius: 0; background: transparent; box-shadow: none; }
  .site-nav-group-menu a { min-height: 2.2rem; justify-content: flex-start; }
  .site-navigation .site-nav-primary { margin-right: 0; }
  .site-navigation .site-nav-home { margin-right: 0; }
  .site-navigation .site-nav-secondary-start { margin-left: 0; }
  .site-navigation > .site-patient-name { display: none; width: 100%; max-width: none; grid-column: 1 / -1; margin-left: 0; padding: 0.38rem 0.7rem; }
  .site-navigation.mobile-nav-open > .site-patient-name:not([hidden]) { display: block; }
  .page-shell { width: min(100% - 0.7rem, 1440px); padding: 0.58rem 0 1.45rem; }
  .home-medical .page-shell { padding-top: 0.45rem; }
  .home-hero { align-items: stretch; flex-direction: column; gap: 0.42rem; margin-bottom: 0.55rem; }
  .home-hero .intro { font-size: 0.76rem; line-height: 1.4; }
  .home-start-panel { padding: 0.55rem; border-radius: 0.78rem; }
  .home-manager-gateway { grid-template-columns: auto minmax(0, 1fr); padding: 0.85rem; }
  .home-manager-gateway-mark { width: 3.5rem; height: 3.5rem; font-size: 1.35rem; }
  .home-manager-gateway-features { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-manager-gateway-action { grid-column: 1 / -1; min-height: 2.75rem; }
  .home-patient-context { grid-template-columns: auto minmax(0, 1fr); padding: 0.85rem; }
  .home-patient-context-mark { width: 3rem; height: 3rem; }
  .home-patient-context-action { grid-column: 1 / -1; min-height: 2.6rem; }
  .home-tenets-heading { align-items: flex-start; flex-direction: column; }
  .about-purpose-missive-heading { padding: 0.85rem 0.9rem 0.72rem 1.1rem; }
  .about-purpose-missive-body { padding: 0.85rem 1.1rem 0.9rem; }
  .about-purpose-missive > footer { padding: 0.55rem 1.1rem; }
  .home-tenet-grid { grid-template-columns: 1fr; }
  .home-tenet-grid article + article { border-top: 1px solid #e1e7ea; border-left: 0; }
  h1 { margin-bottom: 0.42rem; font-size: clamp(1.7rem, 8vw, 2.25rem); line-height: 1.02; }
  .intro { font-size: 0.86rem; line-height: 1.48; }
  .eyebrow, .category-kicker { margin-bottom: 0.28rem; font-size: 0.62rem; }
  .hero { align-items: stretch; flex-direction: column; gap: 0.65rem; margin-bottom: 0.75rem; }
  .controls { display: grid; grid-template-columns: 1fr 1fr; }
  .catalog-search-panel { grid-template-columns: 1fr; }
  .catalog-search-status, .catalog-image-source-note, .catalog-search-results { grid-column: 1; }
  .catalog-search-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-summary { flex-direction: column; }
  .methodology { grid-template-columns: 1fr; gap: 1rem; }
  .mix-hero { align-items: stretch; flex-direction: column; gap: 0.55rem; margin-bottom: 0.7rem; }
  .mix-count { align-self: flex-start; padding: 0.42rem 0.62rem; font-size: 0.7rem; }
  .emergency-notice, .mix-controls, .combination-grid, .interaction-workspace, .rule-detail-grid, .global-guidance-grid { grid-template-columns: 1fr; }
  .emergency-notice { gap: 0.45rem; margin-bottom: 0.65rem; padding: 0.7rem; }
  .emergency-notice h2 { font-size: 1rem; }
  .emergency-notice p:last-child { font-size: 0.76rem; line-height: 1.45; }
  .analysis-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drug-picker { border-right: 0; border-bottom: 1px solid var(--line); }
  .builder-heading, .browse-heading { align-items: stretch; flex-direction: column; gap: 0.55rem; }
  .builder-heading { padding: 0.75rem; }
  .builder-heading h2 { margin-bottom: 0.25rem; font-size: 1.12rem; }
  .builder-heading p:last-child { font-size: 0.75rem; line-height: 1.45; }
  .interaction-workspace { min-height: 0; }
  .drug-picker, .selection-panel, .interaction-analysis { padding: 0.65rem; }
  .drug-options { max-height: 14rem; gap: 0.25rem; }
  .drug-option { gap: 0.5rem; padding: 0.5rem 0.55rem; }
  .analysis-status { padding: 0.68rem; }
  .coverage-note { margin: 0.5rem 0 0.6rem; }
  .builder-heading .control-button { align-self: flex-start; }
  .pair-analysis > summary, .combination-card > summary { flex-direction: column; padding: 0.62rem; }
  .mix-summary-meta { width: 100%; justify-content: space-between; }
  .mix-detail-grid { grid-template-columns: 1fr; }
  .mix-detail + .mix-detail { border-top: 1px solid #e7ebf0; border-left: 0; }
  .mix-controls { gap: 0.65rem; margin-bottom: 0.6rem; padding: 0.65rem; }
  .mix-caveat { margin-bottom: 0.65rem; padding: 0.6rem 0.68rem; font-size: 0.74rem; }
  .browse-heading { margin: 0.85rem 0 0.55rem; }
  .modal-pro-con-grid, .pill-identity-card, .guide-intro, .category-guide-grid, .guide-detail-grid, .guide-exposure-heading, .guide-exposure-grid, .category-detail-overview, .category-detail-medications, .about-authority, .about-grid, .about-safety-note, .roadmap-items, .roadmap-items-two-column { grid-template-columns: 1fr; }
  .pill-identity-visual { min-height: 7.5rem; gap: 0.55rem; }
  .pill-face { transform: scale(0.88); }
  .shape-diamond .pill-face { transform: rotate(45deg) scale(0.82); }
  .guide-hero { align-items: stretch; flex-direction: column; gap: 0.55rem; margin-bottom: 0.7rem; }
  .guide-hero .mix-count { align-self: flex-start; }
  .development-status-badge { align-self: flex-start; }
  .development-notice { gap: 0.65rem; padding: 0.78rem; }
  .roadmap-jump-links { grid-template-columns: 1fr; gap: 0.4rem; }
  .roadmap-phase-heading { padding: 0.78rem; }
  .roadmap-items { gap: 0.5rem; padding: 0.55rem; }
  .guide-intro { gap: 0.55rem; margin-bottom: 0.65rem; padding: 0.72rem; }
  .guide-intro h2 { font-size: 1rem; }
  .guide-intro > p { font-size: 0.76rem; line-height: 1.45; }
  .category-guide-grid { gap: 0.55rem; }
  .category-guide-card > summary { grid-template-columns: auto 1fr; padding: 0.72rem 2.75rem 0.72rem 0.78rem; }
  .category-guide-card > summary::after { right: 0.72rem; }
  .category-guide-card-content { padding: 0 0.78rem 0.78rem; }
  .category-guide-card h2 { font-size: 1.02rem; }
  .guide-card-count { grid-column: 2; justify-self: start; }
  .modal-section-heading { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .manager-feature { grid-template-columns: auto 1fr; }
  .manager-feature-status, .manager-feature-action { grid-column: 1 / -1; }
  .manager-feature-status { padding-top: 0.7rem; padding-left: 0; border-top: 1px solid #bad9ce; border-left: 0; }
  .manager-feature-action { justify-content: center; }
  .manager-priority-hero { grid-template-columns: 1fr; margin-bottom: 0.5rem; padding: 0.4rem; border-radius: 0.72rem; }
  .manager-priority-intro { align-items: flex-start; flex-direction: column; gap: 0.55rem; padding: 0.48rem; border: 0; }
  .manager-priority-dashboard { margin: 0; }
  .manager-priority-actions, .medical-management-actions { justify-content: flex-start; }
  .explore-panel-content { padding: 0.55rem; }
  .explore-panel > summary { padding: 0.62rem; }
  .manager-hero { align-items: stretch; flex-direction: column; gap: 0.38rem; margin-bottom: 0.48rem; }
  .manager-hero .intro { font-size: 0.75rem; line-height: 1.4; }
  .local-status { padding: 0.38rem 0.52rem; font-size: 0.61rem; }
  .local-status { align-self: flex-start; }
  .manager-safety, .medication-workspace, .medical-management-shell-heading { grid-template-columns: 1fr; }
  .medical-management-shell-heading-compact { grid-template-columns: 1fr; }
  .medical-management-shell { gap: 0.45rem; padding: 0.38rem; border-radius: 0.75rem; }
  .medical-management-shell-heading { gap: 0.32rem; padding: 0.2rem; }
  .medical-management-actions { justify-content: flex-start; }
  .today-card-prominent .manager-section-heading { padding: 0.78rem; }
  .today-card-prominent .manager-section-heading h2 { font-size: 1.5rem; }
  .today-card-prominent .section-heading-with-icon > .ui-icon-calendar { width: 2.5rem; height: 2.5rem; flex-basis: 2.5rem; }
  .today-card-prominent .today-doses { min-height: 6rem; gap: 0.45rem; padding: 0.55rem; }
  .today-card-prominent .today-dose { min-height: 4.7rem; }
  .today-card-prominent .today-dose-timing { padding: 0.62rem 0.62rem 0.62rem 0.85rem; }
  .today-card-prominent .today-dose-copy { padding: 0.62rem 0.7rem; }
  .manager-section-heading { gap: 0.45rem; padding: 0.58rem; }
  .medication-plan-emphasis:not([open]) > .current-plan-heading, .schedule-preview:not([open]) .schedule-preview-summary { min-height: 2.8rem; padding: 0.4rem 0.55rem; }
  .schedule-preview-standalone { margin-top: 0.6rem; }
  .medical-management-clear-action { align-items: flex-start; flex-direction: column; }
  .manager-overview { grid-template-columns: 1fr 1fr; }
  .manager-overview > div { gap: 0.1rem; padding: 0.55rem 0.62rem; }
  .manager-overview strong { font-size: 1.02rem; }
  .manager-overview .manager-next-summary { grid-column: 1 / -1; border-top: 1px solid #dce5e1; border-left: 0; }
  #medicationForm, .dose-fieldset, .schedule-pane-content, .interval-fields, .text-reminder-details, .plan-risk-warnings, .plan-risk-lower-warning { grid-template-columns: 1fr; }
  .patient-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .patient-condition-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .combined-risk-section > header { grid-template-columns: minmax(0, 1fr) auto; }
  .combined-risk-section > header > .combined-risk-type-badge { grid-column: 1 / -1; justify-self: start; }
  details.combined-risk-entry > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.55rem; align-items: center; padding: 0.62rem; cursor: pointer; list-style: none; }
  details.combined-risk-entry > summary::-webkit-details-marker { display: none; }
  .combined-risk-mobile-summary { display: grid; min-width: 0; gap: 0.22rem; }
  .combined-risk-mobile-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
  .combined-risk-mobile-summary > strong { overflow: hidden; color: #2f3f46; font-size: 0.86rem; line-height: 1.3; text-overflow: ellipsis; }
  .combined-risk-mobile-summary > span:last-child { color: #65737a; font-size: 0.66rem; font-weight: 700; line-height: 1.4; }
  .combined-risk-mobile-toggle { display: grid; width: 1.65rem; height: 1.65rem; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: #65727a; }
  .combined-risk-mobile-toggle::before { content: "+"; font-size: 1rem; font-weight: 900; }
  details.combined-risk-entry[open] .combined-risk-mobile-toggle::before { content: "−"; }
  details.combined-risk-entry[open] > summary { border-bottom: 1px solid; }
  details.combined-risk-mixing > summary { border-color: #e1a39d; background: #fff8f7; }
  details.combined-risk-patient > summary { border-color: #e0bd83; background: #fffaf1; }
  details.combined-risk-food > summary { border-color: #9ebad5; background: #f7fbff; }
  details.combined-risk-substance > summary { border-color: #c8afe1; background: #fcf9ff; }
  details.combined-risk-entry > article { border: 0; border-radius: 0; }
  .plan-risk-lower-warning > p { grid-column: 1; }
  .sms-verification { grid-template-columns: 1fr; }
  .phone-verification-status { grid-column: 1; }
  .dose-fieldset .field-legend { grid-column: 1; }
  .weekday-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .upcoming-doses, .today-doses { grid-template-columns: 1fr 1fr; }
  .drug-modal { width: calc(100% - 0.55rem); max-height: 94vh; border-radius: 0.72rem; }
  .modal-shell { max-height: 94vh; }
  .modal-header { gap: 0.55rem; padding: 0.75rem; }
  .modal-header h2 { font-size: 1.35rem; }
  .modal-header-actions { gap: 0.35rem; }
  .modal-add-plan-button { min-height: 2.25rem; padding: 0.38rem 0.58rem 0.38rem 0.36rem; font-size: 0.65rem; }
}

@media (max-width: 640px) {
  .table-wrap { max-height: none; overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 64rem; }
  .table-wrap th, .table-wrap td { word-break: normal; overflow-wrap: normal; }
  .table-wrap [data-column="uses"] { white-space: normal; word-break: normal; overflow-wrap: normal; }
  .table-wrap td:not([data-column="uses"]) { white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
  .table-wrap [data-column="name"] .drug-cell { flex-wrap: nowrap; }
  .table-wrap [data-column="name"] .expand-button { order: -1; margin-left: 0; }
  .pill-photo-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .site-nav-mobile-copy small { display: none; }
  .home-manager-gateway { grid-template-columns: 1fr; }
  .home-manager-gateway-mark { width: 3.25rem; height: 3.25rem; }
  .home-manager-gateway-features, .home-manager-gateway-action { grid-column: 1; }
  .home-manager-gateway-features { grid-template-columns: 1fr; }
  .home-patient-context { grid-template-columns: 1fr; }
  .home-patient-context-action { grid-column: 1; white-space: normal; }
  .about-purpose-missive-heading { align-items: flex-start; }
  .about-purpose-missive-mark { width: 2.25rem; height: 2.25rem; flex-basis: 2.25rem; font-size: 1rem; }
  .about-purpose-missive-body p { font-size: 0.78rem; }
  .manager-priority-brand { grid-template-columns: 1fr; }
  .manager-priority-mark { width: 3rem; height: 3rem; border-radius: 0.82rem; font-size: 1.1rem; }
  .manager-priority-actions { display: grid; }
  .manager-priority-stats, .priority-today-list { grid-template-columns: 1fr; }
  .manager-priority-stats > div + div { border-top: 1px solid #d4e3dd; border-left: 0; }
  .priority-today-heading { align-items: flex-start; flex-direction: column; gap: 0.15rem; }
  .explore-panel > summary { grid-template-columns: auto minmax(0, 1fr); }
  .explore-panel-action { display: none; }
  .catalog-search-results { grid-template-columns: 1fr; }
  .upcoming-doses, .today-doses { grid-template-columns: 1fr; }
  .today-card-prominent .today-dose { grid-template-columns: 1fr; }
  .today-card-prominent .today-dose-timing { border-right: 0; border-bottom: 1px solid #c6ddd5; }
  .today-card-prominent .today-reminder-badge { margin: 0 1rem 0.85rem; }
  .patient-profile-grid, .patient-condition-options { grid-template-columns: 1fr; }
  .patient-profile-open-button { justify-content: space-between; }
  .weekday-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-actions { align-items: stretch; flex-direction: column; }
}

/* Identity controls and signed-in homepage workspace. */
.site-auth-controls { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 0.22rem; }
.site-auth-status { max-width: 8rem; overflow: hidden; color: #5b7079; font-size: 0.58rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.site-auth-button { min-height: 2.12rem; padding: 0.36rem 0.46rem; border: 1px solid #9db5bf; border-radius: 0.5rem; background: white; color: #274f60; font: inherit; font-size: 0.62rem; font-weight: 850; cursor: pointer; white-space: nowrap; }
.site-auth-register { border-color: #2f755e; background: #2f755e; color: white; }
.site-auth-logout { border-color: #c4cfd3; background: #f5f8f9; color: #526871; }
.site-auth-button:hover:not(:disabled) { border-color: #1f5f4b; background: #e4f2ed; color: #174c3b; }
.site-auth-register:hover:not(:disabled) { background: #1f5f4b; color: white; }
.site-auth-button:disabled { cursor: default; opacity: 0.58; }

.home-auth-loading { margin: 0; padding: 1rem; background: #f7fafb; color: #536a74; }
.home-auth-loading p { margin: 0; font-size: 0.78rem; font-weight: 750; }
.home-authenticated, .home-public { display: grid; gap: 1rem; }
.home-authenticated { display: block; }
[data-auth-view][hidden] { display: none !important; }
.home-medication-dashboard { overflow: hidden; background: #fff; }
.home-medication-dashboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem; background: #edf6f3; }
.home-medication-dashboard-heading h2 { margin: 0; color: #173f34; font-size: clamp(1.35rem, 2.3vw, 1.8rem); }
.home-medication-dashboard-heading time { display: block; margin-top: 0.25rem; color: #587067; font-size: 0.7rem; font-weight: 750; }
.home-dashboard-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.6rem; }
.home-dashboard-add { display: inline-flex; min-height: 2.25rem; align-items: center; padding: 0.42rem 0.62rem; border: 1px solid #216b54; border-radius: 0.48rem; background: #216b54; color: white; font-size: 0.68rem; font-weight: 900; text-decoration: none; white-space: nowrap; }
.home-dashboard-add { font-family: inherit; cursor: pointer; }
.home-dashboard-plan-link { color: #49656f; font-size: 0.62rem; font-weight: 850; text-decoration: underline; text-underline-offset: 0.15rem; }
.home-medication-list { padding: 0; }
.home-medication-group + .home-medication-group { border-top: 1px solid var(--section-divider); }
.home-medication-group { display: grid; grid-template-columns: minmax(5.8rem, 0.17fr) minmax(0, 1fr); }
.home-medication-group > header { display: flex; align-content: start; align-items: flex-start; justify-content: space-between; gap: 0.45rem; padding: 0.72rem 0.75rem; border-right: 1px solid var(--section-divider); background: #eef3f5; }
.home-medication-group > header span { color: #677b84; font-size: 0.58rem; font-weight: 800; text-transform: uppercase; }
.home-medication-group > header h3 { margin: 0.08rem 0 0; color: #2c4f5d; font-size: 1rem; }
.home-medication-group-count { white-space: nowrap; opacity: 0.72; }
.home-medication-group.is-current > header { background: #dff0ea; }
.home-medication-group.is-upcoming > header { background: #edf6f3; }
.home-medication-group.is-earlier > header { background: #f3f6f7; }
.home-medication-group.is-unscheduled > header { background: #f5f2e8; }
.home-medication-cards { display: grid; }
.home-medication-card { display: grid; grid-template-columns: minmax(4.6rem, 0.35fr) minmax(9rem, 1fr) minmax(5.6rem, 0.42fr) minmax(7.5rem, 0.7fr) minmax(11rem, 1.35fr) auto; align-items: center; gap: 0.7rem; padding: 0.72rem 0.8rem; background: #fff; }
.home-medication-card > .home-dose-field:not(:first-child),
.home-medication-card > .home-medication-actions { margin-left: -0.35rem; padding-left: 0.7rem; border-left: 1px solid #edf1f3; }
.home-medication-card + .home-medication-card { border-top: 1px solid #e0e7ea; }
.home-medication-card.is-unscheduled { background: #fffdf7; }
.home-dose-field { display: grid; min-width: 0; gap: 0.12rem; }
.home-dose-field-label { color: #788990; font-size: 0.49rem; font-weight: 850; letter-spacing: 0.045em; text-transform: uppercase; }
.home-dose-field-value { overflow-wrap: anywhere; color: #455f69; font-size: 0.66rem; font-weight: 720; line-height: 1.35; }
.home-dose-time .home-dose-field-value { color: #1f5b48; font-size: 0.72rem; font-weight: 900; white-space: nowrap; }
.home-dose-amount .home-dose-field-value { color: #284f5e; font-weight: 850; }
.home-medication-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.28rem; }
.home-medication-name strong { color: #173f50; font-size: 0.84rem; }
.home-medication-name span { color: #60747c; font-size: 0.59rem; }
.home-medication-actions { display: flex; gap: 0.24rem; }
.home-medication-actions a, .home-medication-actions button { padding: 0.12rem; border: 0; background: transparent; color: #6e7d83; font: inherit; font-size: 0.48rem; font-weight: 720; text-decoration: underline; text-underline-offset: 0.12rem; cursor: pointer; opacity: 0.5; }
.home-medication-actions button { color: #866b68; }
.home-medication-actions a:hover, .home-medication-actions a:focus-visible, .home-medication-actions button:hover, .home-medication-actions button:focus-visible { color: #1e5c49; opacity: 1; }
.medication-autocomplete-guidance { display: block; color: #6f7f85 !important; font-size: 0.61rem !important; }
.medication-autocomplete-guidance[hidden] { display: none; }
.home-medication-empty { padding: 1.2rem; text-align: center; }
.home-medication-empty strong { color: #244b5b; }
.home-medication-empty p { margin: 0.3rem 0 0.65rem; color: #63747b; font-size: 0.72rem; }
.home-medication-empty a { color: #1f6650; font-size: 0.72rem; font-weight: 900; }
.home-public-manager { align-items: start; }
.home-public-medication-controls { display: grid; gap: 0.3rem; min-width: 15rem; }
.home-public-medication-controls label { color: #405d68; font-size: 0.64rem; font-weight: 850; }
.home-public-medication-controls > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.home-public-medication-controls select { min-width: 0; min-height: 2.45rem; padding: 0.48rem 0.55rem; border: 1px solid #a9bec6; border-radius: 0.42rem 0 0 0.42rem; background: white; color: #263f49; }
.home-public-medication-controls button { min-height: 2.45rem; padding: 0.45rem 0.65rem; border: 1px solid #286b55; border-radius: 0 0.42rem 0.42rem 0; background: #286b55; color: white; font-weight: 850; cursor: pointer; }
.home-public-medication-list { grid-column: 2 / -1; display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--section-divider); list-style: none; }
.home-public-medication-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0.5rem 0; }
.home-public-medication-list li + li { border-top: 1px solid var(--section-divider); }
.home-public-medication-list span { display: grid; gap: 0.08rem; }
.home-public-medication-list strong { color: #244b5b; font-size: 0.75rem; }
.home-public-medication-list small { color: #667980; font-size: 0.6rem; }
.home-public-medication-list button { padding: 0.28rem 0.42rem; border: 1px solid #d3b5b1; border-radius: 0.35rem; background: white; color: #8a3e38; font-size: 0.61rem; font-weight: 850; cursor: pointer; }
.home-public-medication-empty { grid-column: 2 / -1; margin: 0; color: #6a7b82; font-size: 0.66rem; }
.home-account-benefits { display: grid; grid-template-columns: minmax(12rem, 0.65fr) minmax(16rem, 1fr) minmax(13rem, 0.7fr); gap: 1rem; align-items: start; padding: 1rem 1.15rem; }
.home-account-benefits h2 { margin: 0; color: #244b5b; font-size: 1rem; }
.home-account-benefits ul { margin: 0; padding-left: 1.1rem; color: #4f6771; font-size: 0.7rem; line-height: 1.55; }
.home-account-benefits > p { margin: 0; color: #6b5b37; font-size: 0.67rem; line-height: 1.5; }

/* Live NLM medication directory. */
.rxnorm-directory { padding: 1rem; background: #f8fbfc; }
.rxnorm-directory-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.rxnorm-directory-heading h3 { margin: 0; color: #244b5b; font-size: 1.05rem; }
.rxnorm-directory-heading p:last-child { max-width: 62rem; margin: 0.35rem 0 0; color: #596e77; font-size: 0.7rem; line-height: 1.5; }
.rxnorm-source-badge { flex: 0 0 auto; padding: 0.34rem 0.5rem; border: 1px solid #9db9c4; border-radius: 0.4rem; background: white; color: #315a6a; font-size: 0.62rem; font-weight: 900; }
.rxnorm-directory-form { display: grid; gap: 0.28rem; margin-top: 0.85rem; }
.rxnorm-directory-form > label { color: #405d68; font-size: 0.65rem; font-weight: 850; }
.rxnorm-directory-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.rxnorm-directory-form input { min-height: 2.55rem; padding: 0.55rem 0.65rem; border: 1px solid #a9bec6; border-radius: 0.48rem 0 0 0.48rem; background: white; color: #263f49; font: inherit; }
.rxnorm-directory-form button { min-height: 2.55rem; padding: 0.5rem 0.75rem; border: 1px solid #286b55; border-radius: 0 0.48rem 0.48rem 0; background: #286b55; color: white; font: inherit; font-size: 0.68rem; font-weight: 900; cursor: pointer; }
.rxnorm-directory-status { margin: 0.55rem 0 0; color: #61747b; font-size: 0.66rem; }
.rxnorm-directory-results { margin-top: 0.7rem; border-top: 1px solid var(--section-divider); }
.rxnorm-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; padding: 0.7rem 0; }
.rxnorm-result + .rxnorm-result { border-top: 1px solid #e0e7ea; }
.rxnorm-result h4 { margin: 0; color: #244b5b; font-size: 0.82rem; }
.rxnorm-result p { margin: 0.16rem 0 0; color: #687980; font-size: 0.62rem; line-height: 1.4; }
.rxnorm-result > div:last-child { display: flex; gap: 0.3rem; }
.rxnorm-result a { padding: 0.36rem 0.48rem; border: 1px solid #a7bbc3; border-radius: 0.38rem; color: #315b6a; font-size: 0.62rem; font-weight: 850; text-decoration: none; white-space: nowrap; }
.rxnorm-result .rxnorm-add-plan { border-color: #397a64; background: #e8f4ef; color: #19523f; }
.rxnorm-directory-caveat { margin: 0.7rem 0 0; padding-top: 0.65rem; border-top: 1px solid var(--section-divider); color: #68777d; font-size: 0.64rem; line-height: 1.5; }

@media (max-width: 1040px) {
  .site-auth-status { display: none; }
  .site-auth-register { display: none; }
}

@media (max-width: 760px) {
  .site-navigation.mobile-nav-ready > .site-auth-controls { display: none; width: 100%; grid-column: 1 / -1; flex-wrap: wrap; padding: 0.35rem 0.6rem; border-top: 1px solid #dbe4e7; }
  .site-navigation.mobile-nav-open > .site-auth-controls { display: flex; }
  .site-auth-status { display: block; max-width: none; flex: 1 0 100%; }
  .site-auth-register { display: inline-flex; }
  .home-medication-dashboard-heading, .home-dashboard-actions { align-items: stretch; flex-direction: column; }
  .home-dashboard-actions { justify-content: flex-start; }
  .home-dashboard-add { align-self: flex-start; }
  .home-dashboard-plan-link { align-self: flex-start; }
  .home-medication-group { grid-template-columns: 1fr; }
  .home-medication-group > header { align-items: center; padding: 0.55rem 0.7rem; border-right: 0; border-bottom: 1px solid var(--section-divider); }
  .home-medication-card { grid-template-columns: minmax(4.5rem, 0.38fr) minmax(0, 1fr); gap: 0.55rem 0.7rem; }
  .home-medication-card > .home-dose-field:not(:first-child),
  .home-medication-card > .home-medication-actions { margin-left: 0; padding-left: 0; border-left: 0; }
  .home-dose-purpose, .home-dose-directions { grid-column: 2; }
  .home-medication-actions { grid-column: 2; }
  .rxnorm-directory-heading, .rxnorm-result { grid-template-columns: 1fr; align-items: stretch; flex-direction: column; }
  .rxnorm-source-badge { align-self: flex-start; }
  .rxnorm-result { display: grid; }
  .home-public-manager, .home-account-benefits { grid-template-columns: 1fr; }
  .home-public-medication-list, .home-public-medication-empty { grid-column: 1; }
}

@media (max-width: 480px) {
  .rxnorm-directory-form > div { grid-template-columns: 1fr; gap: 0.35rem; }
  .rxnorm-directory-form input, .rxnorm-directory-form button { border-radius: 0.48rem; }
  .rxnorm-result > div:last-child { flex-wrap: wrap; }
}

/* Nested-pane hierarchy: outer panes own the frame. Their children read as
   connected sections separated by rules instead of independent bubbles. */
.home-start-panel {
  padding: 0;
  overflow: hidden;
}

.home-start-panel > .home-get-started,
.home-start-panel > .home-patient-context,
.home-start-panel > .home-manager-gateway {
  margin: 0;
  padding: 1rem 1.15rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  outline: 0;
  box-shadow: none;
}

.home-start-panel > .home-patient-context,
.home-start-panel > .home-manager-gateway { border-top: 1px solid var(--section-divider); }

.explore-panel-content { padding: 0; }
.explore-panel-content > .reference-hero { margin: 0; padding: 1rem; }
.explore-panel-content > .catalog-search-workspace,
.explore-panel-content > .comparison-card,
.explore-panel-content > .methodology {
  margin: 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  outline: 0;
  box-shadow: none;
}

.explore-panel-content > .catalog-search-workspace,
.explore-panel-content > .comparison-card { border-top: 1px solid var(--section-divider); }

.medical-management-shell {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.medical-management-shell > .medical-management-shell-heading {
  padding: 1rem;
  border-bottom: 1px solid var(--section-divider);
}

.medical-management-shell > .manager-subpane,
.medical-management-shell > .manager-subpane-group,
.medical-management-shell > .medical-management-risk-actions,
.medical-management-shell > .medical-management-clear-action {
  margin: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
}

.medical-management-shell > .manager-subpane-group,
.medical-management-shell > .medical-management-risk-actions,
.medical-management-shell > .medical-management-clear-action { border-top: 1px solid var(--section-divider); }

.medical-management-shell .today-card-prominent,
.medical-management-shell .manager-overview {
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
}

.medical-management-shell > .medical-management-risk-actions,
.medical-management-shell > .medical-management-clear-action {
  padding: 0.85rem 1rem;
  background: transparent;
}

.category-guide-card .guide-detail-grid {
  gap: 0;
  border-top: 1px solid var(--section-divider);
}

.category-guide-card .guide-detail-grid > section {
  padding: 0.8rem;
  border-radius: 0;
  background: transparent;
}

.category-guide-card .guide-detail-grid > section + section { border-left: 1px solid var(--section-divider); }

.guide-exposure-section .guide-exposure-grid,
.roadmap-phase .roadmap-items { gap: 0; padding: 0; }

.guide-exposure-section .guide-exposure-card,
.roadmap-phase .roadmap-items > article {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.guide-exposure-section .guide-exposure-card:nth-child(even),
.roadmap-phase .roadmap-items:not(.roadmap-items-two-column) > article:not(:nth-child(3n + 1)),
.roadmap-phase .roadmap-items-two-column > article:nth-child(even) { border-left: 1px solid var(--section-divider); }

.guide-exposure-section .guide-exposure-card:nth-child(n + 3),
.roadmap-phase .roadmap-items:not(.roadmap-items-two-column) > article:nth-child(n + 4),
.roadmap-phase .roadmap-items-two-column > article:nth-child(n + 3) { border-top: 1px solid var(--section-divider); }

@media (max-width: 760px) {
  .home-start-panel { padding: 0; }
  .explore-panel-content { padding: 0; }
  .medical-management-shell { gap: 0; padding: 0; }
  .medical-management-shell > .medical-management-shell-heading { padding: 0.75rem; }
  .category-guide-card .guide-detail-grid > section + section,
  .guide-exposure-section .guide-exposure-card:nth-child(even),
  .roadmap-phase .roadmap-items:not(.roadmap-items-two-column) > article:not(:nth-child(3n + 1)),
  .roadmap-phase .roadmap-items-two-column > article:nth-child(even) { border-left: 0; }
  .category-guide-card .guide-detail-grid > section + section,
  .guide-exposure-section .guide-exposure-card + .guide-exposure-card,
  .roadmap-phase .roadmap-items > article + article { border-top: 1px solid var(--section-divider); }
}

/* Simple pane frames: one equal line on every edge, with no shadow, outline
   ring, thick accent side, or decorative edge strip. */
:where(
  .manager-unified-pane,
  .home-hero,
  .manager-hero,
  .mix-hero,
  .guide-hero,
  .home-tenets,
  .home-start-panel,
  .about-purpose-missive,
  .manager-safety,
  .medical-management-shell,
  .current-plan-standalone,
  .schedule-preview-standalone,
  .manager-privacy-disclosure,
  .explore-panel,
  .methodology,
  .guide-intro,
  .category-guide-card,
  .guide-exposure-section,
  .about-authority,
  .about-grid article,
  .about-safety-note,
  .development-notice,
  .roadmap-phase,
  .emergency-notice,
  .interaction-builder,
  .mix-controls,
  .pair-analysis,
  .combination-card,
  .global-guidance
  ,.home-auth-loading
  ,.home-medication-dashboard
) {
  border: 1px solid var(--pane-simple-border) !important;
  border-radius: var(--pane-simple-radius) !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.about-purpose-missive::before,
.medical-management-shell .today-card-prominent::before { display: none !important; }

/* Explicit hierarchy classes keep legacy component styles from reintroducing
   card borders or spacing inside a framed pane. */
.outer-pane { overflow: hidden; }

.outer-pane > .pane-section,
.outer-pane-body > .pane-section {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline-offset: 0;
  box-shadow: none !important;
}

.outer-pane > .pane-section + .pane-section,
.outer-pane-body > .pane-section + .pane-section {
  border-top: 1px solid var(--section-divider) !important;
}

.home-start-panel.outer-pane > .pane-section { background: transparent !important; }
.medical-management-shell.outer-pane > .pane-section { width: 100%; }

/* The Medication Manager hero, safety note, and working controls share one
   simple frame. Interior sections use dividers instead of nested cards. */
.manager-unified-pane {
  margin-bottom: 0.85rem;
  background: #fff;
}

.manager-unified-pane > .manager-hero,
.manager-unified-pane > .manager-safety,
.manager-unified-pane > .medical-management-shell {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.manager-unified-pane > .manager-hero {
  padding: 0.82rem 1rem;
  background: #f2f7f8;
}

.manager-unified-pane > .manager-hero h1 {
  font-size: clamp(1.55rem, 2.5vw, 2.05rem);
}

.manager-unified-pane > .manager-hero .intro {
  max-width: 52rem;
  font-size: 0.76rem;
  line-height: 1.42;
}

.manager-unified-pane > .manager-safety {
  grid-template-columns: minmax(12rem, 0.55fr) minmax(0, 1.7fr);
  gap: 0.55rem 0.85rem;
  padding: 0.58rem 1rem;
  background: #fffaf0;
}

.manager-unified-pane > .medical-management-shell {
  display: block;
  padding: 0;
  background: #fff;
}

.manager-unified-body > .manager-subpane,
.manager-unified-body > .manager-subpane-group,
.manager-unified-body > .medical-management-risk-actions,
.manager-unified-body > .medical-management-clear-action {
  width: 100%;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.manager-unified-body > .manager-subpane + .manager-subpane,
.manager-unified-body > .manager-subpane-group,
.manager-unified-body > .medical-management-risk-actions,
.manager-unified-body > .medical-management-clear-action {
  border-top: 1px solid var(--section-divider) !important;
}

/* Today remains the primary section, but uses a quieter heading and compact
   controls so the schedule—not decorative chrome—holds visual priority. */
.manager-unified-body .today-card-prominent {
  background: #f3f8f6;
}

.manager-unified-body .today-card-prominent .today-heading {
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 1rem;
  border-bottom: 1px solid #d6e4df;
  background: #eaf4f1;
}

.manager-unified-body .today-card-prominent .today-heading h2 {
  color: #173f33;
  font-size: clamp(1.35rem, 2.15vw, 1.7rem);
  letter-spacing: -0.035em;
  text-shadow: none;
}

.manager-unified-body .today-card-prominent .today-heading .eyebrow {
  color: #477165;
}

.manager-unified-body .today-heading-purpose {
  max-width: 38rem;
  margin-top: 0.18rem;
  color: #536d64;
  font-size: 0.65rem;
}

.manager-unified-body .today-card-prominent .section-heading-with-icon > .ui-icon-calendar {
  width: 2.35rem;
  height: 2.35rem;
  flex-basis: 2.35rem;
  border-color: #accbc1;
  border-radius: 0.55rem;
  background: #f8fcfa;
  color: #286b55;
  box-shadow: none;
}

.manager-unified-body .today-card-prominent .section-heading-with-icon > .ui-icon-calendar::before {
  font-size: 1.22rem;
}

.manager-unified-body .today-heading-meta {
  min-width: min(100%, 27rem);
  gap: 0.38rem;
}

.manager-unified-body .today-heading-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.38rem;
}

.manager-unified-body .today-heading-actions button {
  min-height: 2.1rem;
  padding: 0.38rem 0.58rem;
  border-radius: 0.42rem;
  box-shadow: none;
  font-size: 0.65rem;
}

.manager-unified-body .today-heading-context {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.manager-unified-body .today-card-prominent .today-heading time {
  color: #587067;
}

.manager-unified-body .today-priority-badge {
  border-color: #cfbd84;
  background: #fff8df;
  color: #665522;
  box-shadow: none;
}

.manager-unified-body .today-card-prominent .today-doses {
  min-height: 6.5rem;
  gap: 0.55rem;
  padding: 0.75rem 1rem 0.85rem;
  background: #f3f8f6;
}

.manager-unified-body .today-card-prominent .today-dose {
  min-height: 4.8rem;
  box-shadow: none;
}

/* Today's schedule is a single list. Status, timing, and risk treatments stay
   distinct within each row without turning every medication into a pane. */
.manager-unified-body .today-card-prominent .today-doses {
  display: block;
  min-height: 0;
  padding: 0;
  background: #fff;
}

.manager-unified-body .today-card-prominent .today-dose {
  min-height: 4.45rem;
  grid-template-columns: minmax(6.8rem, 0.22fr) minmax(0, 1fr) auto;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.manager-unified-body .today-card-prominent .today-dose + .today-dose {
  border-top: 1px solid var(--section-divider);
}

.manager-unified-body .today-card-prominent .today-dose::before {
  width: 0.24rem;
  background: #2f8064;
}

.manager-unified-body .today-card-prominent .today-dose.is-earlier {
  background: #f7f9f8;
}

.manager-unified-body .today-card-prominent .today-dose.is-earlier::before {
  background: #94a39e;
}

.manager-unified-body .today-card-prominent .today-dose.is-unscheduled {
  background: #fafbfb;
}

.manager-unified-body .today-card-prominent .today-dose.is-unscheduled::before {
  background: #aab5b1;
}

.manager-unified-body .today-card-prominent .today-dose-timing {
  padding: 0.68rem 0.72rem 0.68rem 0.9rem;
  border-right: 1px solid var(--section-divider);
  background: #f3f8f6;
}

.manager-unified-body .today-card-prominent .today-dose.is-earlier .today-dose-timing,
.manager-unified-body .today-card-prominent .today-dose.is-unscheduled .today-dose-timing {
  background: transparent;
}

.manager-unified-body .today-card-prominent .today-dose-copy {
  padding: 0.68rem 0.82rem;
}

.manager-unified-body .today-card-prominent .today-dose-copy strong {
  font-size: clamp(1.05rem, 1.75vw, 1.36rem);
}

.manager-unified-body .today-card-prominent .today-dose.is-unscheduled .today-dose-copy strong {
  font-size: clamp(1rem, 1.55vw, 1.24rem);
}

.manager-unified-body .today-card-prominent .today-reminder-badge {
  align-self: center;
  margin-right: 0.82rem;
}

.manager-unified-body .manager-overview > div {
  padding: 0.62rem 0.8rem;
}

.manager-unified-body .manager-overview strong {
  font-size: 1.08rem;
}

@media (max-width: 760px) {
  .manager-unified-pane > .manager-hero {
    gap: 0.35rem;
    padding: 0.72rem 0.78rem;
  }

  .manager-unified-pane > .manager-safety {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.58rem 0.78rem;
  }

  .manager-unified-body .today-card-prominent .today-heading {
    align-items: stretch;
    padding: 0.7rem 0.78rem;
  }

  .manager-unified-body .today-heading-meta {
    width: 100%;
    min-width: 0;
    justify-items: stretch;
  }

  .manager-unified-body .today-heading-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-unified-body .today-heading-actions button {
    justify-content: center;
  }

  .manager-unified-body .today-heading-context {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .manager-unified-body .today-heading-actions {
    grid-template-columns: 1fr;
  }

  .manager-unified-body .today-card-prominent .today-dose {
    grid-template-columns: 1fr;
  }

  .manager-unified-body .today-card-prominent .today-dose-timing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.52rem 0.72rem 0.52rem 0.9rem;
    border-right: 0;
    border-bottom: 1px solid var(--section-divider);
  }

  .manager-unified-body .today-card-prominent .today-reminder-badge {
    justify-self: start;
    margin: 0 0.72rem 0.65rem 0.9rem;
  }
}

/* Compact schedule hierarchy: Today and Current Plan share one organization
   model. Category mode nests chronological rows beneath concise category lines. */
.home-signed-in-workspace {
  display: flex;
  min-height: 1.8rem;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.42rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--pane-simple-border);
  border-radius: 0.3rem;
  background: #f6f9fa;
  color: #63767e;
  font-size: 0.52rem;
  line-height: 1.2;
}

.home-signed-in-workspace > span {
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.home-signed-in-workspace strong {
  min-width: 0;
  overflow: hidden;
  color: #345765;
  font-size: 0.56rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-signed-in-workspace a {
  margin-left: auto;
  color: #276650;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 0.12rem;
  white-space: nowrap;
}

.compact-group-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  padding: 0.12rem;
  border: 1px solid #b9c9d0;
  border-radius: 0.36rem;
  background: #fff;
}

.compact-group-controls > span {
  padding: 0 0.24rem;
  color: #708087;
  font-size: 0.5rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.compact-group-controls button {
  min-height: 1.55rem;
  padding: 0.22rem 0.34rem;
  border: 1px solid transparent;
  border-radius: 0.26rem;
  background: transparent;
  color: #536970;
  font: inherit;
  font-size: 0.55rem;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.compact-group-controls button.is-active {
  border-color: #7ca694;
  background: #e4f1ec;
  color: #174f3d;
}

.home-category-group + .home-category-group,
.today-category-group + .today-category-group,
.medication-category-group + .medication-category-group {
  border-top: 1px solid var(--section-divider);
}

.home-category-group > header,
.today-category-group > header,
.medication-category-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.42rem 0.68rem;
  border-bottom: 1px solid var(--section-divider);
  background: #e9f1f4;
}

.home-category-group > header h3,
.today-category-group > header h3,
.medication-category-group > header h3 {
  margin: 0;
  color: #284d5b;
  font-size: 0.72rem;
  line-height: 1.25;
}

.home-category-group > header span,
.today-category-group > header span,
.medication-category-group > header span {
  color: #687c84;
  font-size: 0.52rem;
  font-weight: 800;
  white-space: nowrap;
}

.home-category-hour-list,
.today-category-rows,
.medication-category-times {
  display: grid;
  min-width: 0;
}

.home-medication-list.is-category-grouped .home-medication-group {
  grid-template-columns: minmax(5.2rem, 0.14fr) minmax(0, 1fr);
}

.home-medication-list.is-category-grouped .home-medication-group > header {
  padding: 0.48rem 0.62rem;
  background: #f4f7f8;
}

.today-category-group .today-dose + .today-dose {
  border-top: 1px solid var(--section-divider);
}

.medication-category-times .medication-time-group {
  border: 0;
  border-radius: 0;
  background: #fff;
}

.medication-category-times .medication-time-group + .medication-time-group {
  border-top: 1px solid var(--section-divider);
}

.medication-category-times .medication-time-group > header {
  padding: 0.38rem 0.62rem;
  background: #f5f8f7;
}

.medication-category-times .medication-time-group-cards {
  gap: 0;
  padding: 0;
}

.medication-category-times .medication-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.medication-category-times .medication-card + .medication-card {
  border-top: 1px solid var(--section-divider);
}

/* Use the same compact, divider-led rhythm for schedule, summary, guidance,
   profile, and risk widgets instead of a collection of padded inner cards. */
:where(
  .manager-overview,
  .medical-management-risk-actions,
  .combined-risk-review-button,
  .home-public-medication-list li,
  .home-account-benefits,
  .calendar-navigation,
  .patient-condition-options label,
  .plan-risk-warning,
  .patient-risk-warning,
  .food-risk-warning
) {
  box-shadow: none !important;
}

.manager-overview > div,
.home-account-benefits,
.calendar-navigation,
.patient-condition-options label {
  padding: 0.48rem 0.62rem;
}

.medication-list {
  gap: 0.46rem;
  padding: 0.58rem;
}

.medication-time-group-cards {
  gap: 0;
  padding: 0;
}

.medication-time-group-cards .medication-card {
  border-width: 0;
  border-radius: 0;
  box-shadow: none;
}

.medication-time-group-cards .medication-card + .medication-card {
  border-top: 1px solid var(--section-divider);
}

@media (max-width: 760px) {
  .home-signed-in-workspace { flex-wrap: wrap; }
  .home-signed-in-workspace a { margin-left: 0; }
  .compact-group-controls { align-self: flex-start; }
  .compact-group-controls > span { display: none; }
  .home-medication-list.is-category-grouped .home-medication-group { grid-template-columns: 1fr; }
  .today-heading-context { flex-wrap: wrap; }
}

/* Accessible intent hierarchy for the Medication Manager. Display type marks
   destinations and medication names; compact label type marks metadata and
   controls. Color and row padding distinguish schedule, plan, safety, and
   supporting information without adding nested cards or decorative depth. */
.manager-page {
  color: var(--manager-ink);
  font-family: var(--font-body);
}

.manager-page :where(h1, h2, h3, .medication-primary-name) {
  font-family: var(--font-display);
}

.manager-page :where(
  .eyebrow,
  .manager-field > span,
  .manager-field > label,
  .field-legend,
  .weekday-fields legend,
  .time-fields legend,
  .today-dose-status,
  .medication-time-group > header span,
  .medication-category-group > header span,
  .manager-overview span
) {
  font-family: var(--font-label);
}

.manager-unified-pane > .manager-hero h1 {
  color: var(--manager-ink-strong);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
}

.manager-unified-pane > .manager-hero .eyebrow {
  color: #397083;
  font-size: 0.64rem;
  letter-spacing: 0.085em;
}

.manager-unified-pane > .manager-hero .intro {
  color: #425e69;
  font-size: 0.82rem;
  line-height: 1.55;
}

.manager-unified-pane > .manager-safety h2 {
  color: #6b4816;
  font-size: 1.05rem;
  font-weight: 900;
}

.manager-unified-pane > .manager-safety > p {
  color: #67583f;
  font-size: 0.74rem;
  line-height: 1.5;
}

.manager-unified-body .today-card-prominent .today-heading h2 {
  color: #123f34;
  font-size: clamp(1.65rem, 2.7vw, 2.15rem);
  font-weight: 900;
  line-height: 1.05;
}

.manager-unified-body .today-heading-purpose {
  color: #4e6b61;
  font-size: 0.7rem;
  line-height: 1.45;
}

.manager-unified-body .today-card-prominent .today-dose {
  min-height: 5.05rem;
}

.manager-unified-body .today-card-prominent .today-dose-timing {
  padding: 0.78rem 0.9rem 0.78rem 1rem;
}

.manager-unified-body .today-card-prominent .today-dose time {
  color: #145b47;
  font-size: clamp(1.24rem, 2vw, 1.48rem);
  font-weight: 950;
}

.manager-unified-body .today-card-prominent .today-dose-copy {
  gap: 0.22rem;
  padding: 0.78rem 1rem;
}

.manager-unified-body .today-card-prominent .today-dose-copy strong {
  color: #123d31;
  font-size: clamp(1.18rem, 1.9vw, 1.48rem);
  font-weight: 900;
  line-height: 1.08;
}

.manager-unified-body .today-card-prominent .today-dose-copy > span {
  color: #536b63;
  font-size: 0.76rem;
}

.manager-unified-body .today-card-prominent .today-dose-copy > .today-dose-purpose {
  color: #334f46;
  font-size: 0.75rem;
}

.manager-unified-body .today-card-prominent .today-dose-active-ingredient {
  color: #566f66;
  font-size: 0.73rem;
}

.manager-unified-body .today-card-prominent .today-dose-status {
  color: #28705a;
  font-size: 0.62rem;
  letter-spacing: 0.065em;
}

.manager-unified-body .manager-overview > div {
  padding: 0.72rem 0.9rem;
}

.manager-unified-body .manager-overview span {
  color: #5b7068;
  font-size: 0.67rem;
}

.manager-unified-body .manager-overview strong {
  color: #173f33;
  font-size: 1.28rem;
}

.medication-plan-emphasis .current-plan-heading h2 {
  color: #193f54;
  font-size: clamp(1.65rem, 2.6vw, 2.1rem);
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.05;
}

.medication-plan-emphasis:not([open]) .current-plan-heading h2 {
  font-size: 1.28rem;
}

.current-plan-heading-copy {
  color: #536c78;
  font-size: 0.74rem;
}

.today-category-group > header,
.medication-category-group > header {
  padding: 0.58rem 0.82rem;
  background: #dfeaf0;
}

.today-category-group > header h3,
.medication-category-group > header h3 {
  color: #173f50;
  font-size: 0.86rem;
  font-weight: 900;
}

.today-category-group > header span,
.medication-category-group > header span {
  color: #5f747d;
  font-size: 0.57rem;
}

.medication-category-times .medication-time-group > header,
.medication-time-group > header {
  padding: 0.52rem 0.75rem;
  background: #edf5f2;
}

.medication-time-group > header h3 {
  color: #215643;
  font-size: 0.82rem;
  font-weight: 900;
}

.medication-list {
  gap: 0.65rem;
  padding: 0.75rem;
}

.medication-card > header {
  gap: 0.45rem 0.9rem;
  padding: 0.82rem 0.95rem;
  background: #f1f7f4;
}

.medication-card h3,
.medication-card .medication-primary-name {
  color: #183f33;
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.12;
}

.medication-card > header span {
  color: #657a72;
  font-family: var(--font-label);
  font-size: 0.64rem;
  letter-spacing: 0.045em;
}

.medication-purpose-description {
  color: #314e44;
  font-size: 0.72rem;
  line-height: 1.45;
}

.medication-dose {
  background: #dcefe7;
  color: #175a45;
  font-size: 0.75rem;
  font-weight: 900;
}

.medication-schedule {
  padding: 0.7rem 0.95rem 0.24rem;
  color: #29493e;
  font-size: 0.83rem;
  line-height: 1.5;
}

.medication-instructions {
  padding: 0.2rem 0.95rem 0.72rem;
  color: #63766f;
  font-size: 0.73rem;
  line-height: 1.5;
}

.medication-card-actions {
  padding: 0.5rem 0.95rem;
}

.manager-field > span,
.manager-field > label,
.field-legend,
.weekday-fields legend,
.time-fields legend {
  color: #344f46;
  font-size: 0.72rem;
  letter-spacing: 0.045em;
}

.manager-field input,
.manager-field select,
.manager-field textarea,
.dose-time-input {
  min-height: 2.75rem;
  padding: 0.62rem 0.72rem;
  color: #203f35;
  font-size: 0.78rem;
}

.manager-field small {
  color: #687b74;
  font-size: 0.68rem;
}

.manager-page table th,
.manager-page table td {
  padding: 0.65rem 0.75rem;
}

.manager-page :where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid rgba(31, 111, 84, 0.28);
  outline-offset: 2px;
}

/* Signed-in utility destinations stay available without competing with the
   current-plan pane for attention. */
.home-signed-in-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.2rem 0.72rem;
  padding: 0.38rem 0.18rem 0;
  color: #697b82;
  font-family: var(--font-label);
  font-size: 0.56rem;
  line-height: 1.35;
}

.home-signed-in-links a {
  color: inherit;
  font-weight: 500;
  text-decoration-color: #aab7bc;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12rem;
}

.home-signed-in-links a:hover,
.home-signed-in-links a:focus-visible {
  color: #2d5969;
  text-decoration-color: currentColor;
}

@media (max-width: 760px) {
  .manager-unified-pane > .manager-hero h1 { font-size: clamp(1.85rem, 9vw, 2.45rem); }
  .manager-unified-body .today-card-prominent .today-heading h2 { font-size: clamp(1.5rem, 7vw, 1.9rem); }
  .medication-plan-emphasis .current-plan-heading h2 { font-size: 1.38rem; }
  .home-signed-in-links { justify-content: flex-start; padding-inline: 0.1rem; }
}

/* Complete daily timeline. Empty hours remain legible but intentionally fade
   behind the hours that contain a scheduled dose. */
.home-medication-group.is-empty {
  min-height: 1.38rem;
  background: #fdfefe;
}

.home-medication-group.is-empty > header {
  align-items: center;
  padding: 0.1rem 0.54rem;
  background: #fafcfc;
  opacity: 0.34;
}

.home-medication-group.is-empty > header > div {
  display: flex;
  align-items: baseline;
  gap: 0.42rem;
}

.home-medication-group.is-empty > header span,
.home-medication-group.is-empty > header h3 {
  margin: 0;
  font-size: 0.5rem;
  font-weight: 625;
  line-height: 1;
}

.home-medication-group.is-empty .home-medication-cards {
  min-height: 1.38rem;
  background: #fefefe;
}

.home-medication-group + .home-medication-group.is-empty {
  border-top-color: #eff3f4;
}

.home-medication-list > .home-empty-hours-disclosure,
.home-medication-list > * + .home-empty-hours-disclosure,
.home-medication-list > .home-empty-hours-disclosure + * {
  border-top: 1px solid #e7edef;
}

.home-medication-list > .home-empty-hours-disclosure:first-child {
  border-top: 0;
}

.home-empty-hours-disclosure > summary {
  display: grid;
  min-height: 1.55rem;
  grid-template-columns: minmax(5.8rem, 0.17fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.18rem 0.58rem;
  background: #fafcfc;
  color: #738188;
  cursor: pointer;
  list-style: none;
}

.home-empty-hours-disclosure > summary::-webkit-details-marker { display: none; }
.home-empty-hours-disclosure > summary strong { color: #63767d; font-size: 0.53rem; }
.home-empty-hours-disclosure > summary > span:not(.home-empty-hours-action) { font-size: 0.52rem; font-weight: 650; }
.home-empty-hours-action { color: #587079; font-size: 0.5rem; font-weight: 800; text-decoration: underline; text-underline-offset: 0.1rem; }
.home-empty-hours-disclosure[open] > summary { border-bottom: 1px solid #edf2f3; background: #f8fbfb; }
.home-empty-hours-disclosure[open] .home-empty-hours-action { font-size: 0; }
.home-empty-hours-disclosure[open] .home-empty-hours-action::after { content: "Hide hours"; font-size: 0.5rem; }
.home-empty-hour-rows { background: #fdfefe; }

.home-medication-group.has-dose > header {
  background: #e6f2ee;
  color: #173f34;
}

.home-medication-group.has-dose > header h3 {
  color: #173f34;
  font-size: 1.05rem;
  font-weight: 900;
}

.today-hour-group {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(6.7rem, 0.16fr) minmax(0, 1fr);
  border-top: 1px solid var(--section-divider);
  background: #fff;
}

.today-hour-group:first-child {
  border-top: 0;
}

.today-hour-group > header {
  display: grid;
  align-content: center;
  gap: 0.06rem;
  min-width: 0;
  padding: 0.48rem 0.68rem;
  border-right: 1px solid var(--section-divider);
  background: #edf5f2;
}

.today-hour-group > header > span:first-child {
  color: #5f776e;
  font-family: var(--font-label);
  font-size: 0.53rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.today-hour-group > header h3 {
  margin: 0;
  color: #1b5140;
  font-size: 0.9rem;
  line-height: 1.1;
}

.today-hour-count {
  color: #5f766e;
  font-size: 0.53rem;
  font-weight: 750;
}

.today-hour-rows {
  display: grid;
  min-width: 0;
}

.today-hour-rows .today-dose + .today-dose {
  border-top: 1px solid var(--section-divider);
}

.today-hour-group.is-empty {
  min-height: 1.85rem;
  background: #fbfcfc;
}

.today-hour-group.is-empty > header {
  display: flex;
  align-items: baseline;
  gap: 0.38rem;
  padding: 0.26rem 0.62rem;
  background: #f8faf9;
  opacity: 0.45;
}

.today-hour-group.is-empty > header h3,
.today-hour-group.is-empty > header > span:first-child,
.today-hour-group.is-empty .today-hour-count {
  color: #718079;
  font-size: 0.56rem;
  font-weight: 650;
}

.today-hour-group.is-empty .today-hour-rows {
  min-height: 1.85rem;
  background: #fcfdfd;
}

.today-hour-group.has-dose > header {
  background: #dfeee8;
}

.today-hour-group.is-current.has-dose > header {
  background: #cce6dc;
}

.today-hour-group.is-earlier.has-dose > header {
  background: #edf1ef;
}

.today-as-directed-group {
  margin-top: 0.3rem;
  border-top: 1px solid #d5c18d;
  border-bottom: 1px solid #d5c18d;
  background: #fffdf7;
}

.today-as-directed-group > header {
  background: #fff2cf;
}

.today-as-directed-group > header h3 {
  color: #6c4c12;
}

.today-hour-group .today-dose {
  min-height: 3.35rem;
  grid-template-columns: minmax(5.5rem, 0.18fr) minmax(0, 1fr) auto;
}

.today-hour-group .today-dose-timing {
  padding: 0.5rem 0.62rem;
}

.today-hour-group .today-dose time {
  font-size: 0.84rem;
}

.today-hour-group .today-dose-copy {
  display: grid;
  grid-template-columns: minmax(10rem, 1.35fr) minmax(5rem, 0.42fr) minmax(8rem, 0.85fr);
  align-items: center;
  gap: 0.35rem 0.72rem;
  padding: 0.55rem 0.78rem;
}

.today-hour-group .today-dose-copy strong {
  font-size: clamp(0.92rem, 1.35vw, 1.08rem);
}

.today-hour-group .today-dose-copy > span,
.today-hour-group .today-dose-copy > .today-dose-purpose {
  font-size: 0.68rem;
}

/* Dense Current Plan records keep identity, dose, purpose, schedule, and
   directions in aligned columns before falling back to a mobile stack. */
.current-plan-content .medication-card > header {
  grid-template-columns: minmax(12rem, 1.25fr) auto minmax(9rem, 0.72fr);
  align-items: center;
  gap: 0.42rem 0.8rem;
  padding: 0.68rem 0.82rem;
}

.current-plan-content .medication-purpose-description {
  grid-column: auto;
  margin: 0;
}

.medication-card-details {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(14rem, 1.2fr);
  align-items: start;
  border-top: 1px solid #e1e8e5;
  background: #fff;
}

.medication-card-details .medication-schedule,
.medication-card-details .medication-instructions {
  min-width: 0;
  margin: 0;
  padding: 0.58rem 0.82rem;
}

.medication-card-details .medication-instructions {
  border-left: 1px solid var(--section-divider);
}

.current-plan-content .medication-card-actions {
  align-items: center;
  justify-content: flex-end;
  padding: 0.38rem 0.82rem;
  background: #f8faf9;
}

/* Different manager subjects receive distinct flat bands rather than extra
   cards: blue for plan summary, amber for review, and rose for destructive. */
.manager-unified-body .manager-overview {
  background: #edf4f7;
}

.manager-unified-body .medical-management-risk-actions {
  background: #fff8e8;
}

.manager-unified-body .medical-management-clear-action {
  background: #fff5f4;
  color: #73423d;
}

@media (max-width: 900px) {
  .today-hour-group .today-dose-copy {
    grid-template-columns: minmax(9rem, 1fr) minmax(5rem, 0.45fr);
  }

  .today-hour-group .today-dose-purpose {
    grid-column: 1 / -1;
  }

  .current-plan-content .medication-card > header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .current-plan-content .medication-purpose-description {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .home-medication-group.is-empty,
  .today-hour-group {
    grid-template-columns: minmax(5.4rem, 0.28fr) minmax(0, 1fr);
  }

  .home-medication-group.is-empty > header {
    border-right: 1px solid var(--section-divider);
    border-bottom: 0;
  }

  .today-hour-group .today-dose-copy,
  .medication-card-details {
    grid-template-columns: 1fr;
  }

  .today-hour-group .today-dose-purpose {
    grid-column: auto;
  }

  .medication-card-details .medication-instructions {
    border-top: 1px solid var(--section-divider);
    border-left: 0;
  }
}

/* Signed-in plan resources use the same restrained pane and control language
   as the rest of the homepage instead of appearing as loose footer text. */
.home-signed-in-links.outer-pane {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin-top: 0.5rem;
  padding: 0.42rem 0.55rem;
  background: #f3f7f8;
  color: #506871;
  font-family: var(--font-body);
  font-size: 0.58rem;
}

.home-signed-in-links-label {
  color: #315766;
  font-family: var(--font-label);
  font-size: 0.53rem;
  font-weight: 900;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-signed-in-links > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
}

.home-signed-in-links a {
  display: inline-flex;
  min-height: 1.78rem;
  align-items: center;
  padding: 0.28rem 0.46rem;
  border: 1px solid #c5d3d8;
  border-radius: 0.34rem;
  background: #fff;
  color: #3e606c;
  font-size: 0.58rem;
  font-weight: 750;
  text-decoration: none;
}

.home-signed-in-links a:hover,
.home-signed-in-links a:focus-visible {
  border-color: #799dab;
  background: #e8f1f4;
  color: #214e5f;
}

/* Medication Manager context is intentionally subordinate to the schedule.
   The page name stays visible; explanatory, storage, and safety copy is
   collapsed until requested. */
.manager-unified-pane > .manager-hero-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem 0.8rem;
  padding: 0.48rem 0.7rem;
  background: #f5f8f9;
}

.manager-unified-pane > .manager-hero-compact h1 {
  color: #294d5b;
  font-family: var(--font-body);
  font-size: 1.16rem;
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.manager-unified-pane > .manager-hero-compact .eyebrow {
  margin-bottom: 0.08rem;
  color: #71838a;
  font-size: 0.5rem;
  letter-spacing: 0.055em;
}

.manager-context-disclosure {
  min-width: 0;
}

.manager-context-disclosure > summary,
.medical-management-maintenance > summary {
  color: #61767e;
  font-family: var(--font-label);
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  cursor: pointer;
}

.manager-context-disclosure > summary {
  padding: 0.32rem 0.44rem;
  border: 1px solid #c5d2d7;
  border-radius: 0.34rem;
  background: #fff;
  white-space: nowrap;
}

.manager-context-disclosure[open] {
  grid-column: 1 / -1;
}

.manager-context-disclosure[open] > summary {
  display: inline-block;
  margin-bottom: 0.35rem;
}

.manager-context-details {
  display: grid;
  grid-template-columns: minmax(15rem, 0.8fr) minmax(20rem, 1.2fr);
  gap: 0.65rem;
  padding: 0.52rem 0.62rem;
  border-top: 1px solid var(--section-divider);
  background: #fbfcfc;
}

.manager-unified-pane > .manager-hero-compact .manager-context-details .intro,
.manager-unified-pane > .manager-hero-compact .local-status,
.manager-context-details .manager-safety > p {
  margin: 0;
  color: #687980;
  font-family: var(--font-body);
  font-size: 0.62rem;
  line-height: 1.42;
}

.manager-unified-pane > .manager-hero-compact .local-status {
  margin-top: 0.25rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.manager-context-details .manager-safety {
  display: grid;
  grid-template-columns: minmax(10rem, 0.62fr) minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.manager-context-details .manager-safety h2 {
  margin: 0;
  color: #74551f;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 850;
}

.manager-context-details .manager-safety .eyebrow {
  color: #8a713e;
  font-size: 0.48rem;
}

.manager-unified-body .manager-overview > div {
  padding: 0.42rem 0.62rem;
}

.manager-unified-body .manager-overview span {
  font-size: 0.56rem;
}

.manager-unified-body .manager-overview strong,
.manager-unified-body .manager-overview .manager-next-summary strong {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
}

.manager-unified-body > .medical-management-maintenance {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--section-divider);
  border-radius: 0;
  background: #fff9f8;
}

.medical-management-maintenance > summary {
  padding: 0.42rem 0.62rem;
  color: #80605c;
  list-style-position: inside;
}

.medical-management-maintenance .medical-management-clear-action {
  margin: 0;
  padding: 0.5rem 0.62rem;
  border: 0;
  border-top: 1px solid #eadbd8;
  border-radius: 0;
  background: #fff5f4;
}

/* Comprehensive public directory controls and provenance. */
.rxnorm-source-summary {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
  max-width: 22rem;
}

.rxnorm-record-count {
  flex: 1 0 100%;
  color: #61747c;
  font-size: 0.56rem;
  font-weight: 700;
  text-align: right;
}

.rxnorm-directory-form > .rxnorm-directory-controls {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(13rem, 0.45fr) auto;
  gap: 0;
}

.rxnorm-directory-controls select {
  min-width: 0;
  min-height: 2.55rem;
  padding: 0.5rem 0.58rem;
  border: 1px solid #a9bec6;
  border-left: 0;
  border-radius: 0;
  background: #f8fbfc;
  color: #334f5a;
  font: inherit;
  font-size: 0.66rem;
}

.rxnorm-directory-controls input {
  border-radius: 0.48rem 0 0 0.48rem;
}

.rxnorm-directory-controls button {
  border-radius: 0 0.48rem 0.48rem 0;
}

/* Signed-out homepage: one practical start path followed by anonymous tools. */
.home-start-panel > .home-profile-start,
.home-start-panel > .home-anonymous-tools {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 0;
  background: #fbfcfc;
  box-shadow: none;
}

.home-start-panel > .home-private-options {
  display: grid;
  grid-template-columns: minmax(15rem, 0.72fr) minmax(25rem, 1.28fr);
  align-items: stretch;
  gap: 0.8rem 1rem;
  padding: 1rem !important;
  background: #153f4d !important;
  color: #fff;
}

.home-private-options-heading { align-self: center; }
.home-private-options-heading .eyebrow { margin-bottom: 0.28rem; color: #a9ded1; font-size: 0.58rem; }
.home-private-options-heading h2 { max-width: 34rem; margin: 0; color: #fff; font-size: clamp(1.35rem, 2.35vw, 1.9rem); line-height: 1.05; }
.home-private-options-heading > p:last-child { max-width: 42rem; margin: 0.45rem 0 0; color: #d4e4e8; font-size: 0.7rem; line-height: 1.48; }
.home-private-options-paths { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #6d929d; background: #fff; }
.home-private-path { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; gap: 0.15rem 0.48rem; min-width: 0; padding: 0.7rem 0.75rem; color: #234d5a; text-decoration: none; }
.home-private-path + .home-private-path { border-left: 1px solid #b8cdd3; }
.home-private-path > span { grid-row: 1 / 3; align-self: start; font-size: 1rem; }
.home-private-path strong { font-size: 0.72rem; line-height: 1.28; }
.home-private-path small { color: #647981; font-size: 0.59rem; line-height: 1.42; }
.home-private-path:hover,
.home-private-path:focus-visible { background: #edf7f4; outline: 2px solid #73b49f; outline-offset: -2px; }

.home-start-panel > .home-anonymous-tools { border-top: 1px solid var(--section-divider); }
.home-profile-start { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.65rem 1rem; }
.home-profile-start-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.7rem; }
.home-profile-start-heading .home-manager-gateway-mark { width: 3rem; height: 3rem; border-radius: 0.6rem; font-size: 1.12rem; box-shadow: none; }
.home-profile-start-heading h2,
.home-anonymous-tools h2 { margin: 0; color: #214a3e; font-size: 1rem; }
.home-profile-start-heading p:last-child,
.home-anonymous-tools > header > p:last-child { margin: 0.22rem 0 0; color: #60736c; font-size: 0.68rem; line-height: 1.45; }
.home-profile-start > .home-manager-gateway-action { grid-column: 2; grid-row: 1; min-height: 2.45rem; padding: 0.55rem 0.75rem; border-radius: 0.45rem; box-shadow: none; }
.home-profile-steps { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; border: 1px solid #d4e0dc; list-style: none; counter-reset: profile-step; }
.home-profile-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.12rem 0.45rem; padding: 0.58rem 0.65rem; counter-increment: profile-step; }
.home-profile-steps li + li { border-left: 1px solid #d4e0dc; }
.home-profile-steps li::before { grid-row: 1 / 3; display: grid; width: 1.4rem; height: 1.4rem; place-items: center; border-radius: 50%; background: #e2f0eb; color: #1f5c48; content: counter(profile-step); font-size: 0.62rem; font-weight: 900; }
.home-profile-steps strong { color: #294f43; font-size: 0.68rem; }
.home-profile-steps span { color: #6a7b75; font-size: 0.61rem; line-height: 1.4; }
.home-profile-privacy { display: grid; grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem 0.6rem; padding: 0.48rem 0.62rem; border-left: 0.22rem solid #708d98; background: #f1f6f7; }
.home-profile-privacy strong { color: #315763; font-size: 0.65rem; }
.home-profile-privacy span { color: #60747b; font-size: 0.62rem; line-height: 1.4; }
.home-anonymous-tools { display: grid; grid-template-columns: minmax(12rem, 0.32fr) minmax(0, 1fr); align-items: center; gap: 0.8rem 1rem; }
.home-anonymous-tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #d4dfe3; }
.home-anonymous-tool-grid a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.08rem 0.42rem; min-width: 0; padding: 0.52rem 0.58rem; color: #315765; text-decoration: none; }
.home-anonymous-tool-grid a + a { border-left: 1px solid #d4dfe3; }
.home-anonymous-tool-grid a > span { grid-row: 1 / 3; color: #34755f; font-size: 0.9rem; }
.home-anonymous-tool-grid strong { font-size: 0.65rem; }
.home-anonymous-tool-grid small { color: #6a7d84; font-size: 0.56rem; line-height: 1.35; }
.home-anonymous-tool-grid a:hover,
.home-anonymous-tool-grid a:focus-visible { background: #edf6f3; outline: 2px solid rgba(38, 111, 87, 0.16); outline-offset: -2px; }

/* Drug catalog searches stay visible but occupy only the space needed to type. */
.catalog-search-intro { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem 1.2rem; padding: 0.52rem 0.7rem !important; background: #f5f9fa; }
.catalog-search-intro .eyebrow { margin-bottom: 0.1rem; font-size: 0.5rem; letter-spacing: 0.08em; }
.catalog-search-intro h2 { margin: 0; color: #173f50; font-size: 1rem; }
.catalog-search-intro > p { max-width: 43rem; margin: 0; color: #60747d; font-size: 0.62rem; line-height: 1.4; text-align: right; }
.catalog-search-workspace { display: block; padding: 0; background: #fff; }
.catalog-search-workspace > .catalog-search-panel { display: grid; grid-template-columns: auto minmax(16rem, 1fr) auto; align-content: start; align-items: center; gap: 0.25rem 0.6rem; min-width: 0; margin: 0; padding: 0.68rem 0.72rem; border: 0; border-radius: 0; background: #f9fcfd; box-shadow: none; }
.catalog-search-copy { gap: 0.4rem; white-space: nowrap; }
.catalog-search-icon { width: 1.7rem; height: 1.7rem; flex-basis: 1.7rem; border-radius: 0.4rem; font-size: 0.95rem; }
.catalog-search-copy h3 { margin: 0; font-size: 0.74rem; }
.catalog-search-control input { min-height: 2.3rem; padding: 0.45rem 2.35rem 0.45rem 0.65rem; border-width: 1px; border-radius: 0.45rem; font-size: 0.74rem; box-shadow: none; }
.catalog-search-control button { right: 0.35rem; width: 1.65rem; height: 1.65rem; font-size: 0.9rem; }
.catalog-search-unified > .rxnorm-source-summary { display: grid; min-width: 11rem; gap: 0.06rem; padding-left: 0.55rem; border-left: 1px solid var(--section-divider); }
.catalog-search-unified > .rxnorm-source-summary strong { color: #315765; font-size: 0.58rem; }
.catalog-search-unified > .rxnorm-source-summary .rxnorm-record-count { color: #718188; font-size: 0.49rem; }
.catalog-search-status { grid-column: 2 / -1; font-size: 0.58rem; font-weight: 700; }
.catalog-search-help { grid-column: 1 / -1; color: #637982; font-size: 0.58rem; }
.catalog-search-help > summary,
.rxnorm-directory-notes > summary { color: #5c747e; font-size: 0.57rem; font-weight: 800; cursor: pointer; }
.catalog-search-help > div { display: grid; gap: 0.2rem; padding: 0.35rem 0.45rem; border-top: 1px solid #e0e8eb; background: #f8fafb; }
.catalog-search-help p,
.catalog-search-help .catalog-image-source-note { margin: 0; font-size: 0.58rem; line-height: 1.4; }
.catalog-search-results { grid-column: 1 / -1; grid-template-columns: 1fr; gap: 0; padding: 0; overflow: hidden auto; border: 1px solid #cadbe2; border-radius: 0.4rem; background: #fff; }
.catalog-search-results > * { border: 0; border-radius: 0; box-shadow: none; }
.catalog-search-results > * + * { border-top: 1px solid #e0e7ea; }
.catalog-search-results .catalog-search-result { min-height: 3.25rem; padding: 0.5rem 0.58rem; }
.catalog-search-results .rxnorm-result { padding: 0.52rem 0.58rem; }
.catalog-search-results .rxnorm-result h4 { font-size: 0.76rem; }
.catalog-search-results .rxnorm-result p { font-size: 0.57rem; }
.rxnorm-directory-caveat { margin: 0.35rem 0 0; padding: 0.4rem 0.45rem 0; font-size: 0.57rem; line-height: 1.4; }
.catalog-browse-disclosure { background: #fbfcfc; }
.catalog-browse-disclosure > summary { display: flex; min-height: 2.65rem; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.48rem 0.72rem; color: #315765; cursor: pointer; list-style: none; }
.catalog-browse-disclosure > summary::-webkit-details-marker { display: none; }
.catalog-browse-disclosure > summary > span:first-child { display: grid; gap: 0.05rem; }
.catalog-browse-disclosure > summary strong { font-size: 0.7rem; }
.catalog-browse-disclosure > summary small { color: #6b7e85; font-size: 0.55rem; font-weight: 650; }
.catalog-browse-disclosure > summary > span:last-child { font-size: 1rem; font-weight: 850; }
.catalog-browse-disclosure[open] > summary > span:last-child { transform: rotate(45deg); }
.catalog-browse-content { border-top: 1px solid var(--section-divider); background: #fff; }
.catalog-browse-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem; padding: 0.45rem 0.62rem; border-bottom: 1px solid var(--section-divider); background: #f5f8f9; }
.catalog-browse-toolbar .control-button { min-height: 2rem; padding: 0.35rem 0.48rem; font-size: 0.58rem; }
.catalog-browse-content > .comparison-card { margin: 0; border: 0; border-radius: 0; box-shadow: none; }

/* Representative dosage forms are supporting references, not a second visual
   centerpiece inside the drug dialog. */
.drug-modal .modal-media-section {
  margin-bottom: 0.7rem;
  padding: 0.58rem 0.65rem;
  border: 1px solid var(--pane-simple-border);
  border-radius: var(--pane-simple-radius);
  background: #f8fafb;
}

.drug-modal .modal-media-section .modal-section-heading { margin-bottom: 0.42rem; }
.drug-modal .modal-media-gallery { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.42rem; }
.drug-modal .modal-media-card { display: grid; min-height: 4.6rem; grid-template-columns: 5.25rem minmax(0, 1fr); border-radius: 0.38rem; box-shadow: none; }
.drug-modal .modal-media-card img,
.drug-modal .modal-media-fallback { width: 5.25rem; height: 100%; min-height: 4.6rem; aspect-ratio: auto; object-fit: cover; }
.drug-modal .modal-media-fallback { padding: 0.4rem; font-size: 0.58rem; }
.drug-modal .modal-media-card figcaption { align-content: center; gap: 0.1rem; padding: 0.42rem 0.48rem; }
.drug-modal .modal-media-card figcaption strong { font-size: 0.67rem; }
.drug-modal .modal-media-card figcaption span { font-size: 0.57rem; line-height: 1.35; }
.drug-modal .modal-media-caveat { margin-top: 0.42rem; font-size: 0.57rem; line-height: 1.4; }

/* Medication Manager is medication-first. Each current medication leads with
   identity, reference context, and risks; timing stays behind a compact
   disclosure instead of organizing or duplicating medication records. */
.current-medications-pane { margin: 0; background: #fff; }
.current-medications-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem 1rem;
  padding: 0.82rem 0.9rem;
  border-bottom: 1px solid #bdd2ca;
  background: #e5f1ed;
}
.current-medications-heading .section-heading-with-icon { align-items: center; }
.current-medications-heading .ui-icon-pill { background: #245f4c; color: #fff; }
.current-medications-heading .ui-icon-pill::before { content: "💊"; }
.current-medications-heading h2 { margin: 0; color: #173f34; font-size: clamp(1.45rem, 2.3vw, 1.85rem); }
.current-medications-heading .current-plan-heading-copy { max-width: 48rem; margin: 0.22rem 0 0; color: #526c63; font-size: 0.66rem; line-height: 1.45; }
.current-medications-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.35rem; }
.current-medication-count { display: inline-flex; align-items: baseline; gap: 0.18rem; padding: 0.34rem 0.46rem; border: 1px solid #acc7bd; background: #f8fbfa; color: #587067; font-family: var(--font-label); font-size: 0.55rem; font-weight: 800; text-transform: uppercase; }
.current-medication-count strong { color: #174b3b; font-size: 0.88rem; }
.current-medications-pane .current-plan-content { padding: 0; background: #fff; }
.current-medications-pane .medication-list { display: grid; gap: 0; }
.current-medications-pane .medication-category-group { border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.current-medications-pane .medication-category-group + .medication-category-group { border-top: 1px solid #afc5bd; }
.current-medications-pane .medication-category-group > header { padding: 0.38rem 0.72rem; background: #f2f6f4; }
.medication-category-medications { display: grid; }
.current-medications-pane .medication-card { border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.current-medications-pane .medication-card + .medication-card { border-top: 1px solid var(--section-divider); }
.current-plan-content .medication-card > header {
  grid-template-columns: minmax(12rem, 1.25fr) auto minmax(9rem, 0.72fr);
  padding: 0.72rem 0.82rem;
  border-bottom: 1px solid #e1e8e5;
  background: #f6faf8;
}
.medication-reference-information { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(24rem, 1.55fr); align-items: center; gap: 0.65rem 1rem; padding: 0.62rem 0.82rem; }
.medication-reference-summary { margin: 0; color: #334f46; font-size: 0.72rem; font-weight: 650; line-height: 1.46; }
.medication-reference-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid #dde7e3; }
.medication-reference-facts > div { min-width: 0; padding: 0.42rem 0.5rem; }
.medication-reference-facts > div:nth-child(even) { border-left: 1px solid #dde7e3; }
.medication-reference-facts > div:nth-child(n + 3) { border-top: 1px solid #dde7e3; }
.medication-reference-facts dt { color: #73837d; font-family: var(--font-label); font-size: 0.5rem; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase; }
.medication-reference-facts dd { overflow-wrap: anywhere; margin: 0.1rem 0 0; color: #29483e; font-size: 0.65rem; font-weight: 750; }
.medication-card-risk-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; min-height: 2.25rem; padding: 0.4rem 0.82rem; border-top: 1px solid #e4eae7; background: #f8faf9; }
.medication-card-risk-summary.has-risks { border-left: 0.24rem solid #c58a20; background: #fff8e8; }
.medication-card-risk-heading { color: #5b6e67; font-family: var(--font-label); font-size: 0.54rem; font-weight: 900; letter-spacing: 0.045em; text-transform: uppercase; }
.medication-card-risk-empty { color: #7b8984; font-size: 0.58rem; }
.medication-schedule-disclosure { border-top: 1px solid #e0e7e4; background: #fbfcfc; }
.medication-schedule-disclosure > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.42rem 0.65rem; min-height: 2.2rem; padding: 0.4rem 0.82rem; color: #3f6256; cursor: pointer; list-style: none; }
.medication-schedule-disclosure > summary::-webkit-details-marker { display: none; }
.medication-schedule-disclosure > summary strong { font-size: 0.64rem; }
.medication-schedule-disclosure > summary span { overflow: hidden; color: #6b7d76; font-size: 0.6rem; text-overflow: ellipsis; white-space: nowrap; }
.medication-schedule-disclosure > summary::after { content: "+"; color: #45695d; font-size: 0.86rem; font-weight: 900; }
.medication-schedule-disclosure[open] > summary::after { content: "−"; }
.medication-schedule-disclosure[open] > summary { border-bottom: 1px solid #e0e7e4; }
.medication-schedule-disclosure .medication-card-details { background: #fff; }
.current-medications-pane .medication-card-actions { padding: 0.36rem 0.82rem; border-top: 1px solid #e0e7e4; background: #f7f9f8; }

#todaySchedulePane > summary { cursor: pointer; list-style: none; }
#todaySchedulePane > summary::-webkit-details-marker { display: none; }
#todaySchedulePane:not([open]) .today-heading { border-bottom: 0; }
.today-schedule-toggle { margin-left: auto; color: #45695d; font-size: 0.61rem; font-weight: 850; white-space: nowrap; }
.today-schedule-toggle::after { margin-left: 0.35rem; content: "+"; font-size: 0.86rem; }
#todaySchedulePane[open] .today-schedule-toggle::before { content: "Hide "; }
#todaySchedulePane[open] .today-schedule-toggle { font-size: 0; }
#todaySchedulePane[open] .today-schedule-toggle::before,
#todaySchedulePane[open] .today-schedule-toggle::after { font-size: 0.61rem; }
#todaySchedulePane[open] .today-schedule-toggle::after { content: "−"; }
.today-schedule-content { border-top: 1px solid var(--section-divider); background: #fff; }
.today-schedule-content > .today-heading-context { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.38rem 0.7rem; border-bottom: 1px solid var(--section-divider); background: #f6f9f8; }

@media (max-width: 760px) {
  .home-signed-in-links.outer-pane { grid-template-columns: 1fr; }
  .home-signed-in-links > div { justify-content: flex-start; }
  .manager-unified-pane > .manager-hero-compact { grid-template-columns: minmax(0, 1fr) auto; }
  .manager-unified-pane > .manager-hero-compact h1 { font-size: 1.05rem; }
  .manager-context-details, .manager-context-details .manager-safety { grid-template-columns: 1fr; }
  .home-profile-start { grid-template-columns: 1fr; }
  .home-start-panel > .home-private-options { grid-template-columns: 1fr; }
  .home-private-options-paths { grid-template-columns: 1fr; }
  .home-private-path + .home-private-path { border-top: 1px solid #b8cdd3; border-left: 0; }
  .home-profile-start > .home-manager-gateway-action { grid-column: 1; grid-row: auto; justify-self: start; }
  .home-profile-steps { grid-template-columns: 1fr; }
  .home-profile-steps li + li { border-top: 1px solid #d4e0dc; border-left: 0; }
  .home-profile-privacy { grid-template-columns: 1fr; }
  .home-anonymous-tools { grid-template-columns: 1fr; }
  .home-anonymous-tool-grid { grid-template-columns: 1fr 1fr; }
  .home-anonymous-tool-grid a:nth-child(odd) { border-left: 0; }
  .home-anonymous-tool-grid a:nth-child(n + 3) { border-top: 1px solid #d4dfe3; }
  .catalog-search-intro { align-items: flex-start; flex-direction: column; }
  .catalog-search-intro > p { text-align: left; }
  .catalog-search-workspace > .catalog-search-panel { grid-template-columns: 1fr; }
  .catalog-search-unified > .rxnorm-source-summary { grid-column: 1; padding: 0.3rem 0 0; border-top: 1px solid var(--section-divider); border-left: 0; }
  .catalog-search-status { grid-column: 1; }
  .current-medications-heading { grid-template-columns: 1fr; align-items: start; }
  .current-medications-heading-actions { justify-content: flex-start; }
  .medication-reference-information { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .home-empty-hours-disclosure > summary { grid-template-columns: minmax(4.7rem, 0.3fr) minmax(0, 1fr) auto; }
  .current-plan-content .medication-card > header { grid-template-columns: minmax(0, 1fr) auto; }
  .current-plan-content .medication-purpose-description { grid-column: 1 / -1; }
  .medication-reference-facts { grid-template-columns: 1fr; }
  .medication-reference-facts > div:nth-child(even) { border-left: 0; }
  .medication-reference-facts > div + div { border-top: 1px solid #dde7e3; }
  .today-schedule-content > .today-heading-context { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* MyMed Closed Loop branch */
.closed-loop-command { margin-bottom: 1rem; border: 2px solid #2f8064; border-radius: 1rem; background: linear-gradient(135deg,#effaf6,#f7fbff); overflow:hidden; }
.closed-loop-command > header { display:flex; justify-content:space-between; gap:1rem; padding:1.2rem 1.3rem; }
.closed-loop-command h2 { margin:.15rem 0 .3rem; font-size:1.55rem; color:#173f33; }
.closed-loop-command p { margin:0; max-width:52rem; }
.closed-loop-stats { display:flex; gap:.55rem; align-items:stretch; }
.closed-loop-stats span { min-width:7rem; display:grid; place-content:center; text-align:center; padding:.65rem; border:1px solid #bfd9d0; border-radius:.75rem; background:white; font-size:.7rem; font-weight:800; text-transform:uppercase; }
.closed-loop-stats strong { font-size:1.5rem; color:#176a52; }
.closed-loop-flow { display:flex; align-items:center; justify-content:center; gap:.65rem; padding:.7rem 1rem; background:#173f33; color:white; font-size:.78rem; font-weight:900; letter-spacing:.02em; }
.dose-confirmation-actions { display:flex; gap:.35rem; align-items:center; padding:.7rem; flex-wrap:wrap; }
.dose-action,.dose-action-undo { border:1px solid #9bbdb1; border-radius:.55rem; background:white; padding:.48rem .65rem; font-weight:850; cursor:pointer; }
.dose-action-taken { background:#1d765b; border-color:#1d765b; color:white; }
.dose-action-skipped { color:#8a4a3b; }
.dose-confirmation-state { padding:.48rem .65rem; border-radius:.55rem; font-weight:900; background:#e7f5ef; color:#176a52; }
.dose-confirmation-state.is-skipped { background:#f8ece8; color:#8a4a3b; }
.dose-confirmation-state.is-snoozed { background:#fff4d9; color:#765b18; }
.today-dose.dose-needs-attention { border-color:#c97863; box-shadow:0 0 0 2px rgba(201,120,99,.12); }
.today-dose.dose-needs-attention .today-dose-status { color:#a84e3b; }
@media (max-width:800px){.closed-loop-command>header{display:grid}.closed-loop-stats{display:grid;grid-template-columns:repeat(3,1fr)}.closed-loop-stats span{min-width:0}.closed-loop-flow{overflow-x:auto;justify-content:flex-start}.today-card-prominent .today-dose{grid-template-columns:1fr}.dose-confirmation-actions{padding:.5rem 1rem 1rem}}
