:root {
  color-scheme: light;
  --bg: #eef5e8;
  --bg-2: #dceacb;
  --surface: #ffffff;
  --ink: #142015;
  --muted: #5a6f52;
  --line: #c8d8bb;
  --green: #466f2e;
  --green-dark: #173515;
  --green-soft: #edf8e4;
  --mint: #cceab1;
  --aqua: #dff5f2;
  --gold: #f4d46a;
  --olive: #6f7f2a;
  --forest: #0f3d24;
  --shadow: 0 18px 42px rgba(37, 73, 29, 0.16);
}

/* FamCare primary-care makeover pass, May 2026.
   Keeps the SynapseRx-style tool density while moving the brand away from blue. */
:root {
  --bg: #edf5e9;
  --bg-2: #dbe8d1;
  --surface: #ffffff;
  --ink: #102017;
  --muted: #617567;
  --line: #cbdcc8;
  --green: #2f8f5b;
  --green-dark: #12391f;
  --green-soft: #eef8ed;
  --mint: #d8f2d2;
  --aqua: #e5f6ed;
  --gold: #e6c85c;
  --olive: #697b31;
  --forest: #0b2b18;
  --shadow: 0 22px 54px rgba(19, 57, 31, 0.15);
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(168, 208, 138, 0.40), transparent 27%),
    radial-gradient(circle at 100% 0%, rgba(47, 143, 91, 0.18), transparent 29%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(237,245,233,0.95)),
    url("assets/family-medicine-bg.svg");
  background-size: auto, auto, auto, 920px auto;
  background-attachment: fixed;
}

.header {
  background:
    radial-gradient(circle at 18% -40%, rgba(101, 148, 70, 0.42), transparent 34%),
    linear-gradient(135deg, #081b10 0%, #12391f 48%, #39521f 100%);
  border-bottom: 1px solid rgba(189, 222, 193, 0.30);
  box-shadow: 0 16px 34px rgba(8, 27, 16, 0.24);
}

.header-top {
  min-height: 76px;
  padding: 12px 28px 9px;
}

.brand-lockup {
  color: #fff;
}

.brand-logo {
  width: 58px;
  height: 58px;
  border-color: rgba(255,255,255,0.52);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.brand-lockup strong {
  color: #fff;
  font-size: 1.48rem;
}

.brand-lockup small {
  color: #cfe8d0;
  font-weight: 650;
}

.drug-count {
  color: #cfe8d0;
  font-weight: 850;
}

.text-btn {
  color: #e9f8e9;
  border-color: rgba(218, 238, 212, 0.28);
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.text-btn.active {
  color: var(--green-dark);
  background: #e8f8df;
  border-color: #e8f8df;
}

.search-wrap {
  margin: 0 18px 0;
  padding: 8px;
  border: 1px solid rgba(213, 233, 211, 0.72);
  border-radius: 18px;
  background: rgba(247, 252, 245, 0.96);
  box-shadow: 0 14px 30px rgba(5, 20, 11, 0.18);
}

.history-btn,
#search-button {
  min-height: 40px;
  border-color: #c2ddc3;
  background: #ffffff;
  box-shadow: 0 3px 0 rgba(94, 129, 77, 0.16), 0 8px 14px rgba(19, 57, 31, 0.08);
}

#search-input {
  min-height: 42px;
  border-color: transparent;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d7e6d4;
}

.tabs {
  top: 126px;
  padding: 9px 18px 11px;
  background: rgba(246, 251, 243, 0.96);
  box-shadow: inset 0 -1px 0 rgba(123, 153, 109, 0.22), 0 10px 24px rgba(19, 57, 31, 0.06);
}

.tab {
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.32)),
    var(--tab-bg, #f2fbf5);
  box-shadow: 0 3px 0 var(--tab-border, #bfe2cf), 0 9px 16px rgba(19, 57, 31, 0.08);
}

.content {
  grid-template-columns: 246px minmax(0, 1fr);
  max-width: 1660px;
  margin: 0 auto;
}

.home-mode .content {
  width: min(1280px, calc(100% - 28px));
  max-width: 1280px;
}

.sidebar {
  top: 180px;
  max-height: calc(100vh - 248px);
  padding: 12px 10px 110px 0;
}

.sidebar-item {
  margin-bottom: 7px;
  padding: 10px 12px;
  border-radius: 11px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--class-border) 16%, transparent), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, var(--class-bg, #f2fbf5) 100%);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--class-border) 38%, transparent), 0 10px 20px rgba(19, 57, 31, 0.06);
}

.sidebar-item.active {
  color: #fff;
  background:
    radial-gradient(circle at 100% 10%, rgba(214, 234, 192, 0.30), transparent 33%),
    linear-gradient(135deg, #12391f 0%, #2f6740 100%);
  border-color: #6da265;
  box-shadow: 0 3px 0 #9dbd72, 0 16px 26px rgba(18, 57, 31, 0.18);
}

.sidebar-item.active span,
.sidebar-item.active strong {
  color: #fff;
}

.main-panel {
  padding: 22px 18px 110px;
  max-width: 1260px;
}

.home-shell {
  padding-top: 16px;
}

.hero-card {
  border-radius: 24px;
  border-color: rgba(196, 225, 181, 0.38);
  background:
    linear-gradient(112deg, rgba(255,255,255,0.10) 0 11%, transparent 11% 18%, rgba(255,255,255,0.08) 18% 24%, transparent 24%),
    radial-gradient(circle at 82% 20%, rgba(208, 238, 175, 0.42), transparent 24%),
    radial-gradient(circle at 0% 100%, rgba(230, 200, 92, 0.20), transparent 25%),
    linear-gradient(135deg, #07190d 0%, #12391f 45%, #5f7a2d 100%);
  box-shadow: 0 28px 68px rgba(18, 57, 31, 0.31);
}

.hero-brand {
  max-width: 800px;
}

.hero-brand img {
  width: 120px;
  height: 120px;
  border-radius: 22px;
}

.hero-brand p {
  color: #d8f4ce;
}

.quick-actions button {
  border-color: rgba(216, 242, 210, 0.72);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(234, 247, 229, 0.96));
  box-shadow: 0 5px 0 rgba(157, 189, 114, 0.72), 0 18px 26px rgba(5, 26, 12, 0.20);
}

.clinical-pulse {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 16px 0 8px;
}

.clinical-pulse button,
.guide-card,
.class-card,
.mini-card,
.visual-note,
.info-section,
.interaction-card,
.empty-state,
.reference-note,
.calculator-card,
.my-list-card,
.lab-signal,
.lab-table-section,
.algorithm-phase {
  border-radius: 14px;
  box-shadow: 0 9px 22px rgba(19, 57, 31, 0.075);
}

.section-title {
  margin-top: 22px;
  border-left-color: #2f8f5b;
  color: #12391f;
  letter-spacing: 0.01em;
}

.class-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.class-card {
  min-height: 116px;
  border-bottom-width: 5px;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--class-border) 26%, transparent), 0 13px 24px rgba(19, 57, 31, 0.08);
}

.class-card strong {
  font-size: 0.94rem;
}

.class-card small {
  color: color-mix(in srgb, var(--class-text) 64%, #4d6b5a);
}

.guide-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.guide-card {
  border-bottom-color: #6fa35a;
  background:
    radial-gradient(circle at 96% 10%, rgba(105, 123, 49, 0.16), transparent 30%),
    linear-gradient(145deg, #ffffff 0%, #f4faf0 100%);
}

.drug-profile,
.tool-panel {
  max-width: 1220px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

.profile-main {
  min-width: 0;
}

.profile-main .drug-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-rail {
  position: sticky;
  top: 190px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-bottom: 110px;
  scrollbar-width: thin;
  scrollbar-color: #9fbd74 transparent;
}

.rail-card {
  border: 1px solid #cbdcc8;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(127, 179, 78, 0.10), transparent 30%),
    linear-gradient(180deg, #fff 0%, #f8fcf5 100%);
  box-shadow: 0 12px 26px rgba(19, 57, 31, 0.08);
  padding: 14px;
}

.rail-card h3 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-actions,
.rail-links {
  display: grid;
  gap: 8px;
}

.rail-actions button,
.rail-links a {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #c3dfc1;
  border-radius: 12px;
  background: #fff;
  color: var(--green-dark);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  padding: 0 12px;
  box-shadow: 0 3px 0 rgba(109, 162, 101, 0.16);
}

.rail-actions button:hover,
.rail-links a:hover {
  border-color: #91bd7b;
  background: #f3fbef;
}

.rail-links a::after {
  content: ">";
  color: var(--green);
  font-weight: 950;
}

.rail-pearl {
  border-color: #d8ca87;
  background:
    radial-gradient(circle at 100% 0%, rgba(230, 200, 92, 0.18), transparent 30%),
    linear-gradient(180deg, #fffef7 0%, #f8f4db 100%);
}

.rail-pearl p {
  margin: 0;
  color: #37492d;
  line-height: 1.45;
  font-weight: 700;
}

.decision-support-panel {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #cbdcc8;
  border-left: 5px solid #214f2f;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(127, 179, 78, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f6fbf2 100%);
  box-shadow: 0 13px 26px rgba(19, 57, 31, 0.08);
}

.decision-support-panel h3 {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.decision-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.decision-support-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d4e4cf;
  border-radius: 14px;
  background: #fff;
}

.decision-support-card.fit {
  border-color: #a7d5a9;
  background: linear-gradient(180deg, #f7fff5 0%, #eaf8e8 100%);
}

.decision-support-card.caution {
  border-color: #dfa45f;
  background: linear-gradient(180deg, #fffaf2 0%, #fff0dc 100%);
}

.decision-support-card.monitor {
  border-color: #a7c9b0;
  background: linear-gradient(180deg, #fbfffb 0%, #edf8ed 100%);
}

.decision-support-card.pearl {
  border-color: #d8ca87;
  background: linear-gradient(180deg, #fffef7 0%, #f8f4db 100%);
}

.decision-support-card span {
  display: block;
  margin-bottom: 4px;
  color: #5f7759;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.decision-support-card h4 {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 0.94rem;
}

.decision-support-card ul {
  margin: 0;
  padding-left: 18px;
}

.decision-support-card li {
  margin: 0 0 6px;
  color: #203624;
  line-height: 1.42;
}

.profile-hero,
.tool-head {
  border-radius: 20px;
  padding: 20px;
  background:
    radial-gradient(circle at 88% 18%, rgba(221, 244, 204, 0.36), transparent 26%),
    linear-gradient(135deg, #102317 0%, #1c5a35 45%, color-mix(in srgb, var(--class-border, #9dbd72) 70%, #f7ffef) 100%);
  box-shadow: 0 4px 0 rgba(105, 123, 49, 0.18), 0 22px 44px rgba(19, 57, 31, 0.16);
}

.profile-hero h2,
.tool-head h2 {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
}

.profile-actions button,
.tool-head button,
.selected-pill {
  min-height: 38px;
  box-shadow: 0 3px 0 rgba(109, 162, 101, 0.20), 0 8px 14px rgba(19, 57, 31, 0.08);
}

.drug-metric-grid {
  gap: 11px;
  margin: 14px 0;
}

.mini-card {
  min-height: 104px;
  border-color: #ccdfc7;
  background:
    radial-gradient(circle at 103% 103%, rgba(127, 179, 78, 0.16), transparent 36%),
    linear-gradient(180deg, #fff 0%, #f8fcf5 100%);
}

.clinical-bottom-line {
  border-left-color: #214f2f;
  background:
    radial-gradient(circle at 99% 16%, rgba(127, 179, 78, 0.12), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #f4fbef 100%);
}

.visual-note.warning {
  border-color: #d49a58;
  background: linear-gradient(180deg, #fffaf2 0%, #fff2df 100%);
}

.visual-note.monitor {
  border-color: #a8caa1;
  background: linear-gradient(180deg, #fcfffb 0%, #eef9ec 100%);
}

.visual-note.special {
  border-color: #d2c688;
  background: linear-gradient(180deg, #fffef7 0%, #f8f4db 100%);
}

.profile-grid {
  gap: 12px;
}

.info-section {
  border-top-color: #a8caa1;
  background:
    radial-gradient(circle at 100% 0%, rgba(127, 179, 78, 0.07), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fbfef9 100%);
}

.compare-table {
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(19, 57, 31, 0.08);
}

.compare-head {
  background: #ecf7e9;
}

.bottom-nav {
  right: 50%;
  left: auto;
  bottom: 16px;
  width: min(1040px, calc(100% - 48px));
  transform: translateX(50%);
  grid-template-columns: repeat(10, minmax(76px, 1fr));
  padding: 8px;
  border: 1px solid rgba(196, 218, 193, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(19, 57, 31, 0.18);
}

.bottom-nav button {
  min-height: 62px;
  border-right: 0;
  border-radius: 13px;
  color: #50665a;
  font-size: 0.68rem;
}

.bottom-nav button.active {
  background:
    radial-gradient(circle at 50% 5%, rgba(127, 179, 78, 0.23), transparent 38%),
    linear-gradient(180deg, #f2fbef 0%, #e4f4dd 100%);
  box-shadow: inset 0 0 0 1px #b7d8aa, 0 3px 0 #99bd76;
}

.bottom-nav button.active::before {
  display: none;
}

.bottom-nav .nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 2px;
  border: 1px solid #d1e5ce;
  border-radius: 9px;
  background: #fff;
  box-shadow: inset 0 -3px 0 rgba(105, 123, 49, 0.09);
}

@media (max-width: 1100px) {
  .class-grid,
  .guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .clinical-pulse {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-rail {
    position: static;
    max-height: none;
    overflow: visible;
    padding-bottom: 0;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(204, 234, 177, 0.78), transparent 28%),
    radial-gradient(circle at 98% 12%, rgba(91, 121, 52, 0.18), transparent 30%),
    linear-gradient(180deg, #fbfdf8 0%, var(--bg) 46%, #e4efd8 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  padding-bottom: 62px;
}

body[data-text-size="small"] {
  font-size: 12px;
}

body[data-text-size="large"] {
  font-size: 16px;
}

html[data-text-size="small"] {
  font-size: 14px;
}

html[data-text-size="normal"] {
  font-size: 16px;
}

html[data-text-size="large"] {
  font-size: 18px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: calc(100vh - 62px);
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 253, 248, 0.95);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(37, 73, 29, 0.07);
  backdrop-filter: blur(14px);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px 6px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  padding: 3px;
  border: 1px solid #d8e5cc;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(37, 73, 29, 0.12);
}

.brand-lockup strong {
  display: block;
  color: var(--green-dark);
  font-size: 1.32rem;
  line-height: 1.05;
}

.brand-lockup small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.drug-count {
  color: var(--green);
  font-size: 0.82rem;
  white-space: nowrap;
}

.text-btn,
.auth-btn,
.history-btn,
#search-button {
  min-height: 31px;
  padding: 0 12px;
  border: 1px solid #b9dcca;
  border-radius: 999px;
  color: var(--green-dark);
  background: #fbfff7;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(37, 73, 29, 0.07);
}

.text-btn {
  min-width: 34px;
  padding: 0 8px;
}

.text-btn.active {
  color: #fff;
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 9px;
}

.search-icon {
  position: absolute;
  left: 68px;
  color: var(--muted);
  font-size: 1.2rem;
  pointer-events: none;
}

#search-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid #cfe1d6;
  border-radius: 999px;
  outline: none;
  color: var(--ink);
  background: #fbfffd;
}

#search-input:focus {
  border-color: #6ab88f;
  box-shadow: 0 0 0 3px rgba(22, 138, 90, 0.12);
}

.search-results {
  position: absolute;
  right: 92px;
  bottom: 0;
  left: 57px;
  z-index: 30;
  max-height: 310px;
  overflow: auto;
  transform: translateY(calc(100% + 5px));
  border: 1px solid #bdd8cb;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-results button,
.search-empty {
  display: block;
  width: 100%;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid #eef5f0;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.search-results button:hover {
  background: var(--green-soft);
}

.search-results strong,
.search-results span {
  display: block;
}

.search-results span,
.search-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.tabs {
  position: sticky;
  top: 103px;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 44px;
  overflow-x: auto;
  padding: 7px 14px;
  background: rgba(247, 251, 242, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.tabs:empty {
  display: none;
}

.tab {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 11px;
  border: 1.5px solid var(--tab-border, #bfe2cf);
  border-radius: 10px;
  color: var(--tab-text, var(--green-dark));
  background: var(--tab-bg, #f2fbf5);
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 2px 0 var(--tab-border, #bfe2cf), 0 7px 14px rgba(13, 82, 58, 0.06);
}

.tab span {
  opacity: 0.62;
  font-size: 0.72rem;
}

.tab.active {
  outline: 2px solid rgba(22, 138, 90, 0.18);
}

.subclass-rail {
  display: flex;
  flex: 1 0 100%;
  gap: 6px;
  overflow-x: auto;
  padding-top: 2px;
}

.subtab {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #c9d9bd;
  border-radius: 999px;
  color: #38522d;
  background: #fbfff7;
  font-size: 0.74rem;
  font-weight: 850;
}

.subtab span {
  color: var(--muted);
  font-size: 0.68rem;
}

.subtab.active {
  color: #fff;
  border-color: var(--green-dark);
  background: linear-gradient(135deg, var(--green-dark), var(--olive));
}

.subtab.active span {
  color: #eaf5dc;
}

.content {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  width: 100%;
  max-width: none;
  margin: 0;
}

.home-mode .content {
  display: block;
  width: min(1180px, calc(100% - 24px));
  max-width: 1180px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 148px;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding: 9px 8px 18px 0;
}

.home-mode .sidebar {
  display: none;
}

.sidebar-item {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  padding: 9px 10px;
  border: 1px solid var(--class-border, #bfe2cf);
  border-left-width: 5px;
  border-radius: 9px;
  color: var(--class-text, var(--green-dark));
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, var(--class-bg, #f2fbf5) 100%);
  text-align: left;
  box-shadow: 0 2px 0 rgba(7, 82, 60, 0.08);
}

.sidebar-item strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.2;
}

.sidebar-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.sidebar-item.active {
  transform: translateX(2px);
  box-shadow: 0 2px 0 var(--class-border, #bfe2cf), 0 9px 18px rgba(13, 82, 58, 0.14);
}

.clinical-side {
  border-left-color: var(--green);
  background:
    radial-gradient(circle at 98% 20%, rgba(21, 146, 97, 0.13), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #eefaf2 100%);
}

.main-panel {
  min-width: 0;
  padding: 14px 14px 26px;
  max-width: 1180px;
}

.home-shell {
  padding: 10px 0 28px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 28px 28px 24px;
  border: 1px solid rgba(190, 230, 209, 0.55);
  border-radius: 18px;
  background:
    linear-gradient(110deg, rgba(255,255,255,.08) 0 12%, transparent 12% 18%, rgba(255,255,255,.08) 18% 22%, transparent 22%),
    radial-gradient(circle at 82% 22%, rgba(204, 234, 177, 0.48) 0 0, transparent 22%),
    radial-gradient(circle at 12% 100%, rgba(244, 212, 106, 0.18), transparent 24%),
    linear-gradient(135deg, #102711 0%, #1e4d24 52%, #7d8f36 100%);
  box-shadow: 0 24px 56px rgba(37, 73, 29, 0.28);
}

.hero-card::after {
  position: absolute;
  right: -36px;
  bottom: -52px;
  width: 260px;
  height: 260px;
  border: 22px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  content: "";
}

.hero-illustration {
  position: absolute;
  inset: 18px 20px auto auto;
  width: 180px;
  height: 96px;
  opacity: 0.92;
  pointer-events: none;
}

.hero-illustration span {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.hero-illustration span:nth-child(1) {
  right: 10px;
  top: 6px;
  width: 122px;
  height: 12px;
  transform: rotate(-18deg);
}

.hero-illustration span:nth-child(2) {
  right: 44px;
  top: 42px;
  width: 92px;
  height: 12px;
  transform: rotate(28deg);
}

.hero-illustration span:nth-child(3) {
  right: 78px;
  top: 20px;
  width: 18px;
  height: 76px;
  background: rgba(244, 212, 106, 0.28);
  transform: rotate(3deg);
}

.hero-brand {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  max-width: 760px;
  margin: 0 auto 20px;
  color: #fff;
}

.hero-brand img {
  width: 112px;
  height: 112px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 34px rgba(10, 39, 17, 0.24);
  object-fit: contain;
}

.hero-brand p {
  margin: 0 0 4px;
  color: #d3fbe3;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-brand h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 0.95;
}

.hero-brand strong {
  display: block;
  margin-top: 5px;
  color: #e9fff0;
  font-size: 1.04rem;
}

.hero-search {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: 0 auto;
}

.hero-search span {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.4rem;
}

.hero-search input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px 0 50px;
  border: 0;
  border-radius: 999px;
  outline: none;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.quick-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin: 16px auto 0;
}

.quick-actions button {
  min-height: 82px;
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 13px;
  color: var(--green-dark);
  background: linear-gradient(180deg, #fff 0%, #eef9f2 100%);
  box-shadow: 0 4px 0 rgba(188, 223, 204, 0.9), 0 13px 22px rgba(8, 58, 45, 0.16);
}

.quick-actions span,
.bottom-nav span {
  display: block;
}

.feature-icon,
.nav-icon {
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  box-shadow: none;
}

.quick-actions span {
  margin-bottom: 4px;
  font-size: 1.45rem;
}

.quick-actions strong {
  display: block;
  font-size: 0.86rem;
}

.quick-actions small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.section-title {
  margin: 18px 0 10px;
  padding-left: 10px;
  border-left: 4px solid #3ba976;
  color: var(--green-dark);
  font-size: 1rem;
  font-weight: 900;
}

.clinical-pulse {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0 4px;
}

.clinical-pulse button {
  position: relative;
  min-height: 82px;
  overflow: hidden;
  padding: 11px 13px;
  border: 1px solid #bfe2cf;
  border-radius: 12px;
  color: var(--green-dark);
  background:
    radial-gradient(circle at 100% 0%, rgba(244, 212, 106, 0.22), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #effbf4 100%);
  text-align: left;
  box-shadow: 0 7px 18px rgba(13, 82, 58, 0.07);
}

.clinical-pulse button::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(21, 146, 97, 0.08);
}

.clinical-pulse span,
.clinical-pulse strong,
.clinical-pulse small {
  position: relative;
  z-index: 1;
  display: block;
}

.clinical-pulse span {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.clinical-pulse .feature-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border-radius: 12px;
  color: #0f5f38;
  background: linear-gradient(180deg, #ffffff 0%, #e7f5da 100%);
  box-shadow: inset 0 -2px 0 rgba(47, 143, 91, 0.12), 0 8px 14px rgba(14, 70, 42, 0.10);
  font-size: 0.95rem;
  text-transform: none;
}

.clinical-pulse strong {
  margin-top: 5px;
  font-size: 0.96rem;
  line-height: 1.15;
}

.clinical-pulse small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.guide-card {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  padding: 10px;
  border: 1px solid #b7ddc7;
  border-bottom: 4px solid #23a46a;
  border-radius: 10px;
  color: var(--green-dark);
  background:
    radial-gradient(circle at 92% 10%, rgba(21, 146, 97, 0.14), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #f1fbf4 100%);
  text-align: left;
  box-shadow: 0 7px 18px rgba(13, 82, 58, 0.08);
}

.guide-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 64px;
  height: 64px;
  border: 12px solid rgba(21, 146, 97, 0.08);
  border-radius: 999px;
}

.guide-card > span,
.guide-card strong,
.guide-card small,
.guide-card em {
  position: relative;
  z-index: 1;
  display: block;
}

.guide-card > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #c4e5d1;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: inset 0 -3px 0 rgba(21, 146, 97, 0.08);
  font-size: 1.25rem;
}

.guide-card strong {
  margin-top: 4px;
  font-size: 0.82rem;
}

.guide-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.guide-card em {
  margin-top: 6px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.class-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 11px 12px 10px;
  border: 1.5px solid var(--class-border);
  border-bottom-width: 4px;
  border-radius: 12px;
  color: var(--class-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.32)),
    var(--class-bg);
  text-align: left;
  box-shadow: 0 7px 17px rgba(13, 82, 58, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.class-card::after {
  content: "";
  position: absolute;
  top: -26px;
  right: -28px;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--class-border) 20%, transparent);
}

.class-card::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 34px;
  height: 1px;
  background: color-mix(in srgb, var(--class-border) 38%, transparent);
}

.class-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 11px 23px rgba(13, 82, 58, 0.12);
}

.class-card strong,
.class-card small,
.class-card b,
.class-card em {
  position: relative;
  z-index: 1;
  display: block;
}

.class-card strong {
  font-size: 0.9rem;
  line-height: 1.16;
}

.class-card small {
  margin-top: 6px;
  color: #45665b;
  font-size: 0.72rem;
  line-height: 1.3;
  min-height: 2.6em;
}

.class-card b {
  margin-top: 8px;
  color: color-mix(in srgb, var(--class-text) 70%, #334b5f);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.25;
}

.class-card em {
  margin-top: 7px;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.class-bar {
  position: relative;
  z-index: 1;
  display: block;
  height: 6px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.class-bar i {
  display: block;
  width: var(--fill, 50%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--class-border), color-mix(in srgb, var(--class-border) 58%, white));
}

.drug-profile,
.tool-panel {
  max-width: 920px;
}

.profile-hero,
.tool-head {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1.5px solid var(--class-border, var(--line));
  border-radius: 14px;
  background:
    radial-gradient(circle at 88% 20%, color-mix(in srgb, var(--class-border, #159261) 30%, transparent), transparent 24%),
    linear-gradient(135deg, color-mix(in srgb, var(--class-text, #173515) 82%, #102016) 0%, color-mix(in srgb, var(--class-border, #159261) 64%, #f6fffb) 100%);
  box-shadow: 0 4px 0 rgba(13, 82, 58, 0.08), 0 14px 26px rgba(13, 82, 58, 0.08);
}

.profile-hero > div:not(.profile-watermark),
.tool-head > * {
  position: relative;
  z-index: 1;
}

.profile-watermark {
  position: absolute;
  right: 18px;
  bottom: -8px;
  color: rgba(255, 255, 255, 0.18);
  font-size: 5.7rem;
  line-height: 1;
  transform: rotate(-12deg);
  pointer-events: none;
}

.profile-hero span {
  display: inline-block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-hero h2,
.tool-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.profile-hero p,
.tool-head p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.profile-actions,
.tool-head {
  flex-wrap: wrap;
}

.profile-actions {
  display: flex;
  gap: 8px;
}

.profile-actions button,
.tool-head button,
.selected-pill {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #acd6bf;
  border-radius: 999px;
  color: var(--green-dark);
  background: #fff;
  font-weight: 900;
}

.drug-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 11px 0;
}

.mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 9px;
  min-width: 0;
  min-height: 94px;
  overflow: hidden;
  padding: 11px;
  border: 1px solid #cfe5da;
  border-radius: 12px;
  background:
    radial-gradient(circle at 105% 100%, rgba(21, 146, 97, 0.12), transparent 36%),
    #fff;
  box-shadow: 0 7px 18px rgba(13, 82, 58, 0.06);
}

.mini-card > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #c5e4d0;
  border-radius: 10px;
  background: #f5fff8;
  font-size: 1.15rem;
}

.mini-card h3 {
  margin: 0 0 5px;
  color: #4d6258;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-card p {
  margin: 0;
  color: #172620;
  font-size: 0.78rem;
  line-height: 1.42;
}

.mini-card.caution {
  border-color: #f5b2a2;
  background:
    radial-gradient(circle at 105% 100%, rgba(245, 178, 162, 0.18), transparent 38%),
    #fff8f3;
}

.clinical-bottom-line {
  position: relative;
  margin: 11px 0 12px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid #bce0cb;
  border-left: 4px solid var(--green);
  border-radius: 13px;
  background:
    radial-gradient(circle at 98% 20%, rgba(21, 146, 97, 0.10), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #f5fff8 100%);
  box-shadow: 0 8px 20px rgba(13, 82, 58, 0.06);
}

.clinical-bottom-line span {
  display: block;
  margin-bottom: 5px;
  color: var(--green-dark);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.clinical-bottom-line p {
  margin: 0;
  color: #172620;
  font-size: 0.88rem;
  line-height: 1.55;
}

.clinical-fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.pc-overlay-panel {
  margin: 14px 0;
  border: 1px solid rgba(116, 143, 84, 0.34);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(202, 221, 167, 0.24), transparent 32%),
    linear-gradient(135deg, #fbfdf8 0%, #eef6e7 100%);
  box-shadow: 0 16px 34px rgba(30, 52, 32, 0.08);
  padding: 14px;
}

.pc-overlay-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.pc-overlay-head span {
  color: #456235;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pc-overlay-head h3 {
  margin: 2px 0 0;
  color: #193820;
  font-size: 1rem;
}

.pc-overlay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pc-overlay-grid article {
  min-width: 0;
  border: 1px solid rgba(123, 157, 94, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.pc-overlay-grid h4 {
  margin: 0 0 8px;
  color: #21442b;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pc-overlay-grid ul {
  margin: 0;
  padding-left: 18px;
}

.pc-overlay-grid li {
  margin: 5px 0;
  overflow-wrap: anywhere;
}

.visual-note {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 12px 13px;
  border: 1px solid #cfe0d5;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fcf9 100%);
  box-shadow: 0 7px 18px rgba(13, 82, 58, 0.055);
}

.visual-note::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(21, 146, 97, 0.06);
}

.visual-note h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual-note h3 span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #c7e7d5;
  border-radius: 8px;
  background: #fff;
  font-size: 1rem;
}

.visual-note ul {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.visual-note li,
.visual-note p {
  margin: 0;
  color: #243a33;
  font-size: 0.8rem;
  line-height: 1.45;
}

.visual-note li::before {
  content: "•";
  color: var(--green);
  font-weight: 950;
  margin-right: 6px;
}

.visual-note.warning {
  border-color: #f4ad7a;
  background: linear-gradient(180deg, #fffaf4 0%, #fff3e8 100%);
}

.visual-note.warning h3 {
  color: #8b2d13;
}

.visual-note.monitor {
  border-color: #b7d1e8;
  background: linear-gradient(180deg, #f9fdff 0%, #eef7ff 100%);
}

.visual-note.special {
  border-color: #cfc1f1;
  background: linear-gradient(180deg, #fff 0%, #f7f2ff 100%);
}

.use-chips,
.selected-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.use-chips span,
.use-chips button,
.selected-row span {
  padding: 6px 10px;
  border: 1px solid #bfe2cf;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.tool-guidance {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(84, 143, 181, 0.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 96% 0%, rgba(56, 182, 201, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff, #f4f9fc);
}

.tool-guidance strong,
.tool-guidance p,
.tool-guidance span {
  display: block;
}

.tool-guidance strong {
  color: var(--fc-navy, #102640);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.tool-guidance p {
  margin: 5px 0;
  color: #263b46;
  font-size: 0.9rem;
  line-height: 1.35;
}

.tool-guidance span {
  color: var(--fc-muted, #5e6f7d);
  font-size: 0.76rem;
  font-weight: 850;
}

.use-chips button {
  cursor: pointer;
}

.clinical-profile .profile-hero {
  background:
    radial-gradient(circle at 88% 15%, rgba(189, 244, 211, 0.42), transparent 28%),
    linear-gradient(135deg, #e7f6f0 0%, #f8fffb 100%);
}

.pathway-strip {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.pathway-step {
  position: relative;
  min-height: 58px;
  padding: 9px 10px 9px 38px;
  overflow: hidden;
  border: 1px solid #c6e4d1;
  border-radius: 12px;
  color: var(--green-dark);
  background:
    radial-gradient(circle at 100% 0%, rgba(21, 146, 97, 0.13), transparent 34%),
    #ffffff;
  box-shadow: 0 7px 18px rgba(13, 82, 58, 0.06);
  font-size: 0.78rem;
  font-weight: 900;
}

.pathway-step b {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 7px;
  color: #fff;
  background: var(--green);
  font-size: 0.72rem;
}

.lab-dashboard {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.lab-quick-read {
  grid-column: 1 / -1;
  margin: 12px 0 2px;
  padding: 12px 14px;
  border: 1px solid #a9cfad;
  border-left: 5px solid var(--green);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(227, 241, 203, 0.92), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 98% 0%, rgba(127, 179, 78, 0.18), transparent 30%);
  box-shadow: 0 10px 22px rgba(31, 75, 45, 0.08);
}

.lab-quick-read span,
.lab-pattern-map h3 {
  display: block;
  margin: 0 0 6px;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lab-quick-read p {
  margin: 0;
  color: #203624;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.45;
}

.lab-pattern-map {
  grid-column: 1 / -1;
  margin: 12px 0;
  padding: 13px;
  border: 1px solid #ccdccc;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf4 100%);
  box-shadow: 0 12px 25px rgba(19, 57, 31, 0.07);
}

.pattern-map-grid {
  display: grid;
  gap: 9px;
}

.pattern-map-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.85fr) minmax(180px, 1.25fr) minmax(180px, 1.35fr);
  gap: 10px;
  align-items: stretch;
  padding: 9px;
  border: 1px solid #d9e5d5;
  border-radius: 12px;
  background: #fff;
}

.pattern-map-row div {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 10px;
  background: #f8fbf4;
}

.pattern-map-row span {
  display: block;
  margin-bottom: 4px;
  color: #5f7759;
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pattern-map-row strong,
.pattern-map-row p {
  margin: 0;
  color: #203624;
  font-size: 0.84rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pattern-map-row strong {
  display: block;
  font-weight: 900;
}

.lab-signal {
  min-width: 0;
  min-height: 108px;
  padding: 10px 11px;
  border: 1px solid #c8e0d1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(13, 82, 58, 0.06);
  overflow-wrap: anywhere;
}

.lab-signal strong,
.lab-signal h3 {
  display: block;
  margin-bottom: 7px;
  color: var(--green-dark);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.lab-signal h3 {
  margin-top: 0;
}

.signal-list {
  display: grid;
  gap: 6px;
}

.signal-list p {
  margin: 0;
  padding: 7px 8px;
  border: 1px solid rgba(70, 111, 46, 0.12);
  border-radius: 8px;
  color: #243a33;
  background: rgba(255, 255, 255, 0.62);
  color: #243a33;
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lab-signal.high {
  border-color: #f3c193;
  background: #fffaf0;
}

.lab-signal.low {
  border-color: #b7d3f4;
  background: #f5fbff;
}

.lab-signal.order {
  border-color: #aee0c2;
  background: #f5fff8;
}

.clinical-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.clinical-links button {
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #c8d8bb;
  border-radius: 12px;
  color: var(--green-dark);
  background:
    radial-gradient(circle at 100% 0%, rgba(111, 127, 42, 0.12), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f4faed 100%);
  text-align: left;
  box-shadow: 0 7px 18px rgba(37, 73, 29, 0.07);
}

.clinical-links span,
.clinical-links strong {
  display: block;
}

.clinical-links span {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.clinical-links strong {
  margin-top: 5px;
  font-size: 0.82rem;
  line-height: 1.2;
}

.lab-table-section,
.algorithm-board {
  grid-column: 1 / -1;
}

.lab-action-map,
.algorithm-decision-map {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.algorithm-decision-map {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lab-action-map article,
.algorithm-decision-map article,
.clinical-tag-panel {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(64, 101, 130, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(circle at 96% 0%, rgba(56, 182, 201, 0.11), transparent 34%),
    linear-gradient(180deg, #ffffff, #f7fbfd);
  box-shadow: 0 12px 24px rgba(23, 55, 82, 0.07);
}

.lab-action-map article.order,
.algorithm-decision-map article.start {
  border-left: 4px solid #38a6b8;
}

.lab-action-map article.pattern,
.algorithm-decision-map article.decide {
  border-left: 4px solid #596bc5;
}

.lab-action-map article.action,
.algorithm-decision-map article.treat {
  border-left: 4px solid #278b83;
}

.algorithm-decision-map article.stop {
  border-left: 4px solid #d97054;
}

.lab-action-map span,
.algorithm-decision-map span,
.clinical-tag-panel h3 {
  display: block;
  margin: 0 0 7px;
  color: var(--fc-muted, #5e6f7d);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lab-action-map h3,
.algorithm-decision-map h3 {
  margin: 0 0 9px;
  color: var(--fc-navy, #102640);
  font-size: 0.96rem;
  line-height: 1.18;
}

.lab-action-map ul,
.algorithm-decision-map ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lab-action-map li,
.algorithm-decision-map li {
  padding: 8px 9px;
  border-radius: 10px;
  color: #263b46;
  background: rgba(235, 244, 250, 0.74);
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.clinical-tag-panel {
  grid-column: 1 / -1;
}

.clinical-tag-panel h3 {
  color: var(--fc-navy, #102640);
}

.clinical-tag-panel div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.clinical-tag-panel span {
  padding: 7px 10px;
  border: 1px solid rgba(84, 143, 181, 0.2);
  border-radius: 999px;
  color: var(--fc-navy, #102640);
  background: #f3f8fb;
  font-size: 0.78rem;
  font-weight: 850;
}

.lab-table-section {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(37, 73, 29, 0.06);
}

.lab-table-section h3 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 0.92rem;
}

.lab-table {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(145px, 0.9fr) minmax(180px, 1.1fr) minmax(220px, 1.45fr);
  overflow: hidden;
  border: 1px solid #dce8d2;
  border-radius: 10px;
}

.lab-table > div {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid #e5efdd;
  border-bottom: 1px solid #e5efdd;
  color: #243a33;
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lab-table > div:nth-child(4n) {
  border-right: 0;
}

.lab-table-head {
  color: var(--green-dark) !important;
  background: #edf8e4;
  font-size: 0.72rem !important;
  font-weight: 950;
  text-transform: uppercase;
}

.algorithm-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.algorithm-phase {
  position: relative;
  min-width: 0;
  min-height: 180px;
  padding: 12px;
  border: 1px solid #c8d8bb;
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0%, rgba(111, 127, 42, 0.14), transparent 34%),
    linear-gradient(145deg, #ffffff, #f5faef);
  box-shadow: 0 7px 18px rgba(37, 73, 29, 0.07);
}

.algorithm-phase b {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #fff;
  background: var(--green-dark);
  font-size: 0.74rem;
}

.algorithm-phase h3 {
  margin: 9px 0 8px;
  color: var(--green-dark);
  font-size: 0.9rem;
}

.algorithm-phase div {
  display: grid;
  gap: 6px;
}

.algorithm-phase p {
  margin: 0;
  padding: 7px 8px;
  border-radius: 8px;
  color: #263b2a;
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.info-section,
.interaction-card,
.empty-state,
.reference-note {
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfffd 100%);
  box-shadow: 0 6px 18px rgba(13, 82, 58, 0.05);
}

.info-section {
  padding: 13px 14px;
  border-top: 4px solid #d7efe0;
}

.clinical-disclosure {
  padding: 0;
  overflow: hidden;
  border-top: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.clinical-disclosure:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(13, 82, 58, 0.08);
}

.profile-grid > .clinical-disclosure.wide {
  grid-column: 1 / -1;
}

.clinical-disclosure.primary {
  border-left: 4px solid #357aa2;
}

.clinical-disclosure.caution {
  border-left: 4px solid #c96c4a;
}

.clinical-disclosure .disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.clinical-disclosure .disclosure-summary span {
  color: var(--green-dark);
  font-size: 0.92rem;
  font-weight: 950;
}

.clinical-disclosure .disclosure-summary b {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(64, 101, 130, 0.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clinical-disclosure .disclosure-summary::after {
  content: "+";
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #2d668f, #3f9aa5);
  font-weight: 950;
}

.clinical-disclosure.is-open .disclosure-summary {
  border-bottom: 1px solid rgba(64, 101, 130, 0.12);
  background: linear-gradient(180deg, rgba(245, 250, 253, 0.92), rgba(255, 255, 255, 0.64));
}

.clinical-disclosure.is-open .disclosure-summary::after {
  content: "-";
}

.clinical-disclosure .disclosure-body {
  padding: 13px 14px 15px;
}

.clinical-disclosure:not(.is-open) .disclosure-body {
  display: none;
}

.info-section h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 0.92rem;
}

.info-section p,
.info-section ul,
.info-section dl {
  margin: 0;
  color: #243a33;
  line-height: 1.55;
}

.info-section ul {
  padding-left: 18px;
}

.info-section dl {
  display: grid;
  gap: 8px;
}

.info-section dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.info-section dd {
  margin: 2px 0 0;
}

.reference-note {
  margin-top: 10px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  background: #fbfffd;
}

.empty-state {
  padding: 46px 20px;
  color: var(--muted);
  text-align: center;
}

.tool-panel {
  display: grid;
  gap: 12px;
}

.compare-table {
  display: grid;
  grid-template-columns: minmax(130px, 0.75fr) repeat(var(--compare-cols), minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(13, 82, 58, 0.06);
}

.compare-corner,
.compare-head,
.compare-label,
.compare-cell {
  padding: 11px 12px;
  border-right: 1px solid #e4efe8;
  border-bottom: 1px solid #e4efe8;
}

.compare-head {
  color: var(--green-dark);
  background: var(--green-soft);
}

.compare-head strong,
.compare-head span {
  display: block;
}

.compare-head span {
  color: var(--muted);
  font-size: 0.76rem;
}

.compare-label {
  color: var(--green-dark);
  background: #fbfffd;
  font-weight: 900;
}

.compare-cell {
  color: #243a33;
  line-height: 1.5;
}

.interaction-grid {
  display: grid;
  gap: 10px;
}

.interaction-card {
  padding: 14px;
}

.interaction-card > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.interaction-card span {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.interaction-card h3 {
  margin: 8px 0;
}

.interaction-card p {
  margin: 5px 0 0;
  line-height: 1.55;
}

.my-list-panel {
  max-width: 1180px;
}

.my-list-head {
  margin-bottom: 12px;
}

.tool-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tool-head-actions button {
  min-height: 34px;
}

.my-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.my-list-card {
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--class-border);
  border-bottom-width: 4px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--class-border) 18%, transparent), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, var(--class-bg) 100%);
  box-shadow: 0 8px 20px rgba(13, 82, 58, 0.08);
}

.my-list-open {
  display: block;
  width: 100%;
  min-height: 126px;
  padding: 13px 14px 9px;
  border: 0;
  color: var(--class-text);
  background: transparent;
  text-align: left;
}

.my-list-open span {
  display: block;
  color: var(--class-text);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.my-list-open strong {
  display: block;
  margin-top: 8px;
  color: #172620;
  font-size: 1.1rem;
  line-height: 1.15;
}

.my-list-open small {
  display: block;
  margin-top: 7px;
  color: #45665b;
  font-size: 0.78rem;
  line-height: 1.42;
}

.my-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 12px;
}

.my-list-actions button,
.my-list-empty button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #acd6bf;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.74rem;
  font-weight: 900;
}

.my-list-empty {
  padding: 18px;
}

.my-list-empty strong,
.my-list-empty p {
  display: block;
  margin: 0 0 8px;
}

.calculator-panel {
  max-width: 1180px;
}

.calculator-head {
  margin-bottom: 12px;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.calculator-card {
  padding: 13px;
  border: 1px solid #cfe0d5;
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0%, rgba(21, 146, 97, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fbfffd 100%);
  box-shadow: 0 8px 20px rgba(13, 82, 58, 0.065);
}

.calculator-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.calculator-card-head > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #c4e5d1;
  border-radius: 10px;
  background: #fff;
  font-size: 1.2rem;
}

.calculator-card h3 {
  margin: 0;
  color: var(--green-dark);
  font-size: 0.95rem;
}

.calculator-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.calculator-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.calc-field {
  position: relative;
  display: grid;
  gap: 4px;
}

.calc-field span {
  color: #4f6a5e;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.calc-field input,
.calc-field select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #c7dfd0;
  border-radius: 10px;
  padding: 8px 10px;
  color: #172620;
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.calc-field em {
  position: absolute;
  right: 10px;
  bottom: 9px;
  color: #6a7f73;
  font-size: 0.7rem;
  font-style: normal;
  pointer-events: none;
}

.calculator-result {
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid #cfe5da;
  border-radius: 11px;
  background: #f7fcf9;
}

.calculator-result span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calculator-result strong {
  display: block;
  margin-top: 4px;
  color: var(--green-dark);
  font-size: 1.35rem;
}

.calculator-result p {
  margin: 6px 0 0;
  color: #243a33;
  font-size: 0.78rem;
  line-height: 1.45;
}

.calculator-card.amber .calculator-result {
  border-color: #ecc66e;
  background: #fff9e8;
}

.calculator-card.red .calculator-result {
  border-color: #f0a2a2;
  background: #fff5f5;
}

.calculator-card.green .calculator-result {
  border-color: #a8dfbc;
  background: #f1fff6;
}

.calculator-card details {
  margin-top: 9px;
  color: #365246;
  font-size: 0.78rem;
}

.calculator-card summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 900;
}

.calculator-card details p {
  margin: 7px 0 0;
  line-height: 1.5;
}

.severity-high {
  border-color: #f2a6a6;
  background: #fff7f7;
}

.severity-high span {
  color: #861111;
  background: #ffe1e1;
}

.severity-moderate {
  border-color: #f1cb6e;
  background: #fffcf0;
}

.severity-moderate span {
  color: #73530a;
  background: #fff0b8;
}

.severity-low,
.clean {
  border-color: #b9dfc8;
  background: #fbfffd;
}

.severity-low span {
  color: var(--green-dark);
  background: var(--green-soft);
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 251, 244, 0.98));
  border-top: 1px solid #cfe2d6;
  box-shadow: 0 -12px 24px rgba(13, 82, 58, 0.08);
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 58px;
  padding: 5px 4px;
  border: 0;
  border-right: 1px solid #e1efe6;
  color: #526b60;
  background: transparent;
  font-size: 0.68rem;
  font-weight: 800;
}

.bottom-nav button.active {
  color: var(--green-dark);
  background:
    radial-gradient(circle at 50% 12%, rgba(21, 146, 97, 0.16), transparent 36%),
    #e4f8ed;
}

.bottom-nav button.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 42px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: var(--green);
}

.bottom-nav span {
  display: block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1.12rem;
  line-height: 1;
  box-shadow: none;
}

.bottom-nav .nav-icon {
  color: currentColor;
  font-size: 1.12rem;
  font-weight: 400;
}

.detail-dialog {
  width: min(820px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 14px;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-head p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dialog-head h2 {
  margin: 0;
  color: var(--green-dark);
}

.dialog-head button {
  align-self: start;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.dialog-body {
  padding: 16px;
}

@media (max-width: 860px) {
  .header-actions .drug-count,
  .header-actions .text-btn {
    display: none;
  }

  .content {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: flex;
    gap: 7px;
    max-height: none;
    overflow-x: auto;
    padding: 8px 10px;
  }

  .sidebar-item {
    flex: 0 0 170px;
  }

  .tabs {
    top: 101px;
  }

  .profile-grid,
  .class-grid,
  .guide-grid,
  .my-list-grid,
  .calculator-grid,
  .drug-metric-grid,
  .clinical-fit-grid,
  .pc-overlay-grid,
  .lab-dashboard,
  .lab-action-map,
  .algorithm-decision-map,
  .algorithm-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lab-table {
    grid-template-columns: minmax(110px, 0.8fr) minmax(130px, 0.9fr) minmax(180px, 1.2fr) minmax(220px, 1.4fr);
    overflow-x: auto;
  }

  .clinical-pulse,
  .pathway-strip,
  .clinical-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    padding-bottom: 66px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-lockup strong {
    font-size: 1.05rem;
  }

  .brand-lockup small,
  #search-button,
  .history-btn {
    display: none;
  }

  .search-icon {
    left: 25px;
  }

  .search-results {
    right: 14px;
    left: 14px;
  }

  .tabs {
    top: 91px;
  }

  .hero-card {
    padding: 18px 14px;
  }

  .hero-brand {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-brand img {
    margin: 0 auto;
  }

  .quick-actions,
  .clinical-pulse,
  .pathway-strip,
  .lab-dashboard,
  .lab-action-map,
  .algorithm-decision-map,
  .algorithm-board,
  .clinical-links,
  .drug-metric-grid,
  .clinical-fit-grid,
  .pc-overlay-grid,
  .profile-grid,
  .class-grid,
  .my-list-grid,
  .calculator-grid,
  .calculator-fields,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    overflow-x: auto;
    grid-template-columns: repeat(10, minmax(78px, 1fr));
  }

  .profile-hero,
  .tool-head {
    display: grid;
  }

  .compare-table {
    display: block;
  }

  .compare-corner {
    display: none;
  }

  .compare-head,
  .compare-label,
  .compare-cell {
    border-right: 0;
  }

  .lab-table {
    display: block;
  }

  .lab-table-head {
    display: none;
  }

  .lab-table > div {
    border-right: 0;
  }

  .lab-table > div:nth-child(4n + 1) {
    color: var(--green-dark);
    background: #edf8e4;
    font-weight: 950;
  }
}

/* Final FamCare makeover layer. Placed last so it wins over the older prototype rules. */
:root {
  --bg: #edf5e9;
  --bg-2: #dbe8d1;
  --surface: #ffffff;
  --ink: #102017;
  --muted: #617567;
  --line: #cbdcc8;
  --green: #2f8f5b;
  --green-dark: #12391f;
  --green-soft: #eef8ed;
  --mint: #d8f2d2;
  --aqua: #e5f6ed;
  --gold: #e6c85c;
  --olive: #697b31;
  --forest: #0b2b18;
  --shadow: 0 22px 54px rgba(19, 57, 31, 0.15);
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(168, 208, 138, 0.40), transparent 27%),
    radial-gradient(circle at 100% 0%, rgba(47, 143, 91, 0.18), transparent 29%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(237,245,233,0.95)),
    url("assets/family-medicine-bg.svg");
  background-size: auto, auto, auto, 920px auto;
  background-attachment: fixed;
}

.header {
  background:
    radial-gradient(circle at 18% -40%, rgba(101, 148, 70, 0.42), transparent 34%),
    linear-gradient(135deg, #081b10 0%, #12391f 48%, #39521f 100%);
  border-bottom: 1px solid rgba(189, 222, 193, 0.30);
  box-shadow: 0 16px 34px rgba(8, 27, 16, 0.24);
}

.header-top {
  min-height: 76px;
  padding: 12px 28px 9px;
}

.brand-lockup,
.brand-lockup strong {
  color: #fff;
}

.brand-lockup strong {
  font-size: 1.48rem;
}

.brand-lockup small,
.drug-count {
  color: #cfe8d0;
}

.brand-logo {
  width: 58px;
  height: 58px;
  border-color: rgba(255,255,255,0.52);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.text-btn {
  color: #e9f8e9;
  border-color: rgba(218, 238, 212, 0.28);
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.text-btn.active {
  color: var(--green-dark);
  background: #e8f8df;
  border-color: #e8f8df;
}

.search-wrap {
  margin: 0 18px;
  padding: 8px;
  border: 1px solid rgba(213, 233, 211, 0.72);
  border-radius: 18px;
  background: rgba(247, 252, 245, 0.96);
  box-shadow: 0 14px 30px rgba(5, 20, 11, 0.18);
}

.history-btn,
#search-button {
  min-height: 40px;
  border-color: #c2ddc3;
  background: #ffffff;
  box-shadow: 0 3px 0 rgba(94, 129, 77, 0.16), 0 8px 14px rgba(19, 57, 31, 0.08);
}

#search-input {
  min-height: 42px;
  border-color: transparent;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d7e6d4;
}

.tabs {
  top: 126px;
  padding: 9px 18px 11px;
  background: rgba(246, 251, 243, 0.96);
  box-shadow: inset 0 -1px 0 rgba(123, 153, 109, 0.22), 0 10px 24px rgba(19, 57, 31, 0.06);
}

.tab {
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.32)),
    var(--tab-bg, #f2fbf5);
  box-shadow: 0 3px 0 var(--tab-border, #bfe2cf), 0 9px 16px rgba(19, 57, 31, 0.08);
}

.content {
  grid-template-columns: 246px minmax(0, 1fr);
  max-width: 1660px;
  margin: 0 auto;
}

.home-mode .content {
  width: min(1280px, calc(100% - 28px));
  max-width: 1280px;
}

.sidebar {
  top: 180px;
  max-height: calc(100vh - 248px);
  padding: 12px 10px 110px 0;
}

.sidebar-item {
  margin-bottom: 7px;
  padding: 10px 12px;
  border-radius: 11px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--class-border) 16%, transparent), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, var(--class-bg, #f2fbf5) 100%);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--class-border) 38%, transparent), 0 10px 20px rgba(19, 57, 31, 0.06);
}

.sidebar-item.active {
  color: #fff;
  background:
    radial-gradient(circle at 100% 10%, rgba(214, 234, 192, 0.30), transparent 33%),
    linear-gradient(135deg, #12391f 0%, #2f6740 100%);
  border-color: #6da265;
  box-shadow: 0 3px 0 #9dbd72, 0 16px 26px rgba(18, 57, 31, 0.18);
}

.sidebar-item.active span,
.sidebar-item.active strong {
  color: #fff;
}

.main-panel {
  padding: 22px 18px 110px;
  max-width: 1260px;
}

.hero-card {
  border-radius: 24px;
  border-color: rgba(196, 225, 181, 0.38);
  background:
    linear-gradient(112deg, rgba(255,255,255,0.10) 0 11%, transparent 11% 18%, rgba(255,255,255,0.08) 18% 24%, transparent 24%),
    radial-gradient(circle at 82% 20%, rgba(208, 238, 175, 0.42), transparent 24%),
    radial-gradient(circle at 0% 100%, rgba(230, 200, 92, 0.20), transparent 25%),
    linear-gradient(135deg, #07190d 0%, #12391f 45%, #5f7a2d 100%);
  box-shadow: 0 28px 68px rgba(18, 57, 31, 0.31);
}

.hero-brand img {
  width: 120px;
  height: 120px;
  border-radius: 22px;
}

.hero-brand p {
  color: #d8f4ce;
}

.quick-actions button {
  border-color: rgba(216, 242, 210, 0.72);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(234, 247, 229, 0.96));
  box-shadow: 0 5px 0 rgba(157, 189, 114, 0.72), 0 18px 26px rgba(5, 26, 12, 0.20);
}

.clinical-pulse {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 16px 0 8px;
}

.class-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.class-card {
  min-height: 116px;
  border-bottom-width: 5px;
  border-radius: 14px;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--class-border) 26%, transparent), 0 13px 24px rgba(19, 57, 31, 0.08);
}

.class-card strong {
  font-size: 0.94rem;
}

.class-card small {
  color: color-mix(in srgb, var(--class-text) 64%, #4d6b5a);
}

.guide-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.guide-card {
  border-bottom-color: #6fa35a;
  background:
    radial-gradient(circle at 96% 10%, rgba(105, 123, 49, 0.16), transparent 30%),
    linear-gradient(145deg, #ffffff 0%, #f4faf0 100%);
}

.clinical-pulse button,
.guide-card,
.mini-card,
.visual-note,
.info-section,
.interaction-card,
.empty-state,
.reference-note,
.calculator-card,
.my-list-card,
.lab-signal,
.lab-table-section,
.algorithm-phase {
  border-radius: 14px;
  box-shadow: 0 9px 22px rgba(19, 57, 31, 0.075);
}

.drug-profile,
.tool-panel {
  max-width: 1220px;
}

.profile-hero,
.tool-head {
  border-radius: 20px;
  padding: 20px;
  background:
    radial-gradient(circle at 88% 18%, rgba(221, 244, 204, 0.36), transparent 26%),
    linear-gradient(135deg, #102317 0%, #1c5a35 45%, color-mix(in srgb, var(--class-border, #9dbd72) 70%, #f7ffef) 100%);
  box-shadow: 0 4px 0 rgba(105, 123, 49, 0.18), 0 22px 44px rgba(19, 57, 31, 0.16);
}

.profile-hero h2,
.tool-head h2 {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
}

.profile-actions button,
.tool-head button,
.selected-pill {
  min-height: 38px;
  box-shadow: 0 3px 0 rgba(109, 162, 101, 0.20), 0 8px 14px rgba(19, 57, 31, 0.08);
}

.mini-card {
  min-height: 104px;
  border-color: #ccdfc7;
  background:
    radial-gradient(circle at 103% 103%, rgba(127, 179, 78, 0.16), transparent 36%),
    linear-gradient(180deg, #fff 0%, #f8fcf5 100%);
}

.clinical-bottom-line {
  border-left-color: #214f2f;
  background:
    radial-gradient(circle at 99% 16%, rgba(127, 179, 78, 0.12), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #f4fbef 100%);
}

.visual-note.warning {
  border-color: #d49a58;
  background: linear-gradient(180deg, #fffaf2 0%, #fff2df 100%);
}

.visual-note.monitor {
  border-color: #a8caa1;
  background: linear-gradient(180deg, #fcfffb 0%, #eef9ec 100%);
}

.visual-note.special {
  border-color: #d2c688;
  background: linear-gradient(180deg, #fffef7 0%, #f8f4db 100%);
}

.info-section {
  border-top-color: #a8caa1;
  background:
    radial-gradient(circle at 100% 0%, rgba(127, 179, 78, 0.07), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fbfef9 100%);
}

.compare-table {
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(19, 57, 31, 0.08);
}

.compare-head {
  background: #ecf7e9;
}

.bottom-nav {
  right: 50%;
  left: auto;
  bottom: 16px;
  width: min(1040px, calc(100% - 48px));
  transform: translateX(50%);
  grid-template-columns: repeat(10, minmax(76px, 1fr));
  padding: 8px;
  border: 1px solid rgba(196, 218, 193, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(19, 57, 31, 0.18);
}

.bottom-nav button {
  min-height: 62px;
  border-right: 0;
  border-radius: 13px;
  color: #50665a;
  font-size: 0.68rem;
}

.bottom-nav button.active {
  background:
    radial-gradient(circle at 50% 5%, rgba(127, 179, 78, 0.23), transparent 38%),
    linear-gradient(180deg, #f2fbef 0%, #e4f4dd 100%);
  box-shadow: inset 0 0 0 1px #b7d8aa, 0 3px 0 #99bd76;
}

.bottom-nav button.active::before {
  display: none;
}

.bottom-nav .nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 2px;
  border: 1px solid #d1e5ce;
  border-radius: 9px;
  background: #fff;
  box-shadow: inset 0 -3px 0 rgba(105, 123, 49, 0.09);
}

@media (max-width: 1100px) {
  .class-grid,
  .guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .clinical-pulse {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .tabs {
    top: 117px;
  }

  .sidebar {
    top: auto;
  }

  .bottom-nav {
    width: calc(100% - 20px);
    overflow-x: auto;
    grid-template-columns: repeat(10, minmax(86px, 1fr));
  }
}

@media (max-width: 560px) {
  .search-wrap {
    margin: 0 10px;
  }

  .tabs {
    top: 105px;
  }

  .class-grid,
  .guide-grid,
  .clinical-pulse {
    grid-template-columns: 1fr;
  }

  .profile-main .drug-metric-grid {
    grid-template-columns: 1fr;
  }

  .decision-support-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile containment pass: keep the medication rail scrollable without widening the page. */
@media (max-width: 860px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .content,
  .main-panel,
  .drug-profile,
  .tool-panel {
    min-width: 0;
    max-width: 100%;
  }

  .sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
  }

  .sidebar-item {
    flex: 0 0 158px;
  }
}

/* Lab reasoning layer: show pattern maps as compact clinical tables. */
.lab-quick-read,
.lab-pattern-map {
  grid-column: 1 / -1;
}

@media (max-width: 860px) {
  .pattern-map-row {
    grid-template-columns: 1fr;
  }
}

/* New FamCare wordmark logo pass. */
.brand-logo.brand-wordmark {
  width: 116px;
  height: 62px;
  padding: 4px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  object-fit: contain;
}

.brand-emblem {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(245, 241, 225, 0.42);
  border-radius: 16px;
  color: #17352a;
  background:
    radial-gradient(circle at 72% 18%, rgba(200, 166, 77, 0.34), transparent 28%),
    linear-gradient(145deg, #fffdf8 0%, #edf3e8 100%);
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.brand-copy {
  display: block;
}

.brand-copy strong {
  color: #fffdf8;
}

.brand-copy small {
  color: #d7dfd3;
}

.hero-brand.hero-wordmark {
  display: flex;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto 18px;
}

.brand-hero-lockup {
  width: min(520px, 100%);
  padding: 24px 30px 22px;
  border: 1px solid rgba(245, 241, 225, 0.52);
  border-radius: 24px;
  color: #17211d;
  background:
    radial-gradient(circle at 90% 15%, rgba(200, 166, 77, 0.18), transparent 26%),
    linear-gradient(145deg, rgba(255,253,248,0.98), rgba(244,246,238,0.98));
  text-align: center;
  box-shadow: 0 18px 42px rgba(20, 33, 28, 0.22);
}

.brand-hero-lockup span {
  display: block;
  color: #245f58;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: none;
}

.brand-hero-lockup h1 {
  margin: 3px 0 4px;
  color: #17352a;
  font-size: clamp(2.35rem, 4vw, 4.35rem);
  line-height: 0.95;
}

.brand-hero-lockup p {
  margin: 0;
  color: #536058;
  font-size: 1.06rem;
  font-weight: 850;
}

.brand-hero-lockup small {
  display: block;
  max-width: 390px;
  margin: 9px auto 0;
  color: #66716a;
  font-size: 0.82rem;
  line-height: 1.32;
}

.hero-brand.hero-wordmark img {
  width: min(430px, 92%);
  height: auto;
  max-height: 178px;
  padding: 10px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.97);
  object-fit: contain;
  box-shadow: 0 20px 38px rgba(10, 39, 17, 0.24);
}

@media (max-width: 560px) {
  .brand-logo.brand-wordmark {
    width: 112px;
    height: 48px;
    padding: 3px 6px;
    border-radius: 12px;
  }

  .hero-brand.hero-wordmark img {
    width: min(320px, 96%);
    padding: 8px 10px;
  }

  .brand-emblem {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .brand-hero-lockup {
    padding: 19px 18px 18px;
  }
}

/* Visual polish pass: make the home screen feel like a clinical workspace. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 24%, rgba(70, 111, 46, 0.12), transparent 22%),
    radial-gradient(circle at 94% 64%, rgba(47, 143, 91, 0.10), transparent 24%),
    linear-gradient(90deg, rgba(18, 57, 31, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 57, 31, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.74), rgba(0,0,0,0.12));
}

.hero-card {
  min-height: 304px;
  padding: 30px 32px 26px;
  border-color: rgba(221, 244, 210, 0.34);
  background:
    radial-gradient(circle at 78% 18%, rgba(214, 244, 174, 0.30), transparent 22%),
    radial-gradient(circle at 92% 80%, rgba(230, 200, 92, 0.16), transparent 26%),
    linear-gradient(115deg, rgba(255,255,255,0.11) 0 9%, transparent 9% 15%, rgba(255,255,255,0.06) 15% 23%, transparent 23%),
    linear-gradient(135deg, #06150c 0%, #0f351e 42%, #56732b 100%);
  box-shadow: 0 30px 70px rgba(9, 34, 17, 0.34);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.62;
  mask-image: radial-gradient(circle at 70% 40%, #000, transparent 66%);
}

.hero-illustration {
  display: none;
}

.hero-clinical-art {
  position: absolute;
  inset: 28px 30px auto auto;
  width: min(40%, 430px);
  height: 220px;
  pointer-events: none;
  opacity: 0.92;
}

.family-mark {
  position: absolute;
  right: 74px;
  top: 28px;
  width: 150px;
  height: 124px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,0.22), transparent 28%),
    rgba(219, 248, 210, 0.10);
  box-shadow: inset 0 0 0 1px rgba(235,255,229,0.18);
}

.family-mark .person {
  position: absolute;
  bottom: 20px;
  width: 38px;
  height: 54px;
  border-radius: 22px 22px 14px 14px;
  background: rgba(230, 250, 221, 0.24);
}

.family-mark .person::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -25px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(230, 250, 221, 0.25);
  transform: translateX(-50%);
}

.family-mark .one {
  left: 18px;
  height: 66px;
}

.family-mark .two {
  left: 62px;
  width: 32px;
  height: 45px;
}

.family-mark .three {
  right: 15px;
  height: 72px;
}

.stetho-line {
  position: absolute;
  right: 12px;
  top: 6px;
  width: 260px;
  height: 182px;
  border: 8px solid rgba(232, 252, 225, 0.24);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-10deg);
}

.stetho-line::before,
.stetho-line::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(232, 252, 225, 0.26);
}

.stetho-line::before {
  right: -16px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  box-shadow: inset 0 0 0 12px rgba(11, 43, 24, 0.58);
}

.stetho-line::after {
  left: 35px;
  top: -16px;
  width: 18px;
  height: 18px;
}

.vital-strip {
  position: absolute;
  left: 0;
  bottom: 26px;
  display: flex;
  align-items: end;
  gap: 8px;
  height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(230, 250, 221, 0.22);
  border-radius: 16px;
  background: rgba(8, 27, 16, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.vital-strip i {
  display: block;
  width: 12px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #e6c85c, #a7d37b);
}

.vital-strip i:nth-child(1) { height: 24px; }
.vital-strip i:nth-child(2) { height: 40px; }
.vital-strip i:nth-child(3) { height: 30px; }
.vital-strip i:nth-child(4) { height: 48px; }

.rx-capsules {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 98px;
  height: 72px;
}

.rx-capsules span {
  position: absolute;
  width: 48px;
  height: 18px;
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.80) 0 48%, rgba(127,179,78,0.55) 48%);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.rx-capsules span:nth-child(1) { right: 24px; top: 10px; transform: rotate(-24deg); }
.rx-capsules span:nth-child(2) { right: 0; top: 36px; transform: rotate(18deg); }
.rx-capsules span:nth-child(3) { right: 52px; top: 42px; transform: rotate(42deg); }

.hero-brand.hero-wordmark,
.hero-search,
.quick-actions {
  position: relative;
  z-index: 2;
}

.hero-brand.hero-wordmark {
  justify-content: flex-start;
}

.hero-brand.hero-wordmark img {
  width: min(384px, 48%);
  margin-left: 0;
}

.hero-search {
  max-width: 620px;
  margin-left: 0;
}

.quick-actions {
  max-width: 760px;
  margin-left: 0;
}

.feature-icon,
.class-visual {
  display: grid;
  place-items: center;
}

.feature-icon svg,
.class-visual svg {
  width: 1.35em;
  height: 1.35em;
}

.quick-actions .feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #0f5f38;
  background: linear-gradient(180deg, #ffffff 0%, #e9f7df 100%);
  box-shadow: inset 0 -3px 0 rgba(47, 143, 91, 0.11), 0 10px 18px rgba(8, 27, 16, 0.12);
}

.home-signal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 10px;
}

.home-signal-strip section {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  padding: 13px 14px 13px 58px;
  border: 1px solid #cadfbe;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(127, 179, 78, 0.15), transparent 30%),
    linear-gradient(145deg, #fff 0%, #f5fbef 100%);
  box-shadow: 0 13px 28px rgba(19, 57, 31, 0.08);
}

.home-signal-strip section > span {
  position: absolute;
  left: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #114224;
  background: #e9f7df;
}

.home-signal-strip strong,
.home-signal-strip small {
  display: block;
  position: relative;
  z-index: 1;
}

.home-signal-strip strong {
  color: var(--green-dark);
  font-size: 0.9rem;
}

.home-signal-strip small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.32;
}

.clinical-pulse button {
  border-bottom: 4px solid rgba(47, 143, 91, 0.42);
  background:
    radial-gradient(circle at 93% 18%, rgba(230, 200, 92, 0.18), transparent 27%),
    linear-gradient(145deg, #ffffff 0%, #f6fbf1 100%);
}

.clinical-pulse button:nth-child(2n) {
  background:
    radial-gradient(circle at 92% 14%, rgba(47, 143, 91, 0.13), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #eff9ef 100%);
}

.class-card {
  min-height: 138px;
  padding-top: 12px;
}

.class-card::after {
  width: 104px;
  height: 104px;
  border: 1px solid color-mix(in srgb, var(--class-border) 22%, transparent);
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--class-border) 18%, transparent), transparent 58%);
}

.class-visual {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
  border: 1px solid color-mix(in srgb, var(--class-border) 46%, white);
  border-radius: 13px;
  color: var(--class-text);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.50)),
    color-mix(in srgb, var(--class-border) 12%, white);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--class-border) 18%, transparent);
}

.guide-card {
  min-height: 116px;
  border-bottom-width: 5px;
}

.guide-card > .feature-icon {
  color: #174725;
}

.drug-profile,
.tool-panel,
.clinical-profile {
  border: 1px solid rgba(193, 218, 184, 0.70);
  background:
    radial-gradient(circle at 100% 0%, rgba(127,179,78,0.08), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,252,245,0.98));
}

.profile-hero {
  border-radius: 20px;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.12) 0 10%, transparent 10% 16%),
    radial-gradient(circle at 88% 20%, rgba(230, 200, 92, 0.25), transparent 26%),
    linear-gradient(135deg, #092113 0%, #1d5a33 54%, #7d8f36 100%);
}

.profile-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -52px;
  width: 210px;
  height: 210px;
  border: 24px solid rgba(255,255,255,0.10);
  border-radius: 50%;
}

@media (max-width: 860px) {
  .hero-clinical-art {
    width: 260px;
    height: 150px;
    opacity: 0.38;
  }

  .home-signal-strip {
    grid-template-columns: 1fr;
  }

  .hero-brand.hero-wordmark img {
    width: min(340px, 92%);
  }
}

@media (max-width: 560px) {
  .hero-card {
    min-height: 0;
    padding: 20px 14px;
  }

  .hero-clinical-art {
    display: none;
  }

  .hero-brand.hero-wordmark {
    justify-content: center;
  }

  .hero-search,
  .quick-actions {
    max-width: none;
  }

  .search-wrap {
    padding: 6px 7px;
  }

  #search-input {
    font-size: 0.86rem;
    padding-left: 34px;
  }

  .search-icon {
    left: 19px;
  }
}

/* Concept-match pass: open home like the generated full clinical workspace. */
.home-mode .content {
  width: min(1720px, calc(100% - 32px));
  max-width: 1720px;
}

.home-mode .main-panel {
  max-width: none;
  padding-top: 18px;
}

.home-shell {
  width: 100%;
}

.home-workspace {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.home-left-rail,
.home-right-rail section {
  border: 1px solid rgba(202, 223, 190, 0.74);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(127, 179, 78, 0.13), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 245, 0.98));
  box-shadow: 0 18px 42px rgba(19, 57, 31, 0.10);
}

.home-left-rail {
  position: sticky;
  top: 174px;
  display: grid;
  gap: 5px;
  padding: 12px;
}

.home-left-rail button {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 10px 6px 7px;
  border: 0;
  border-radius: 12px;
  color: #244633;
  background: transparent;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 850;
  text-align: left;
}

.home-left-rail button:hover,
.home-left-rail button.active {
  color: var(--green-dark);
  background:
    radial-gradient(circle at 0% 0%, rgba(230, 200, 92, 0.15), transparent 30%),
    linear-gradient(90deg, #eaf6e0, #f6fbef);
}

.home-left-rail .feature-icon {
  width: 30px;
  height: 30px;
  border: 1px solid #bdd9b6;
  border-radius: 10px;
  color: #0f5f38;
  background: #fff;
}

.home-center {
  min-width: 0;
}

.home-right-rail {
  position: sticky;
  top: 174px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 205px);
  overflow: auto;
  padding-bottom: 96px;
  scrollbar-width: thin;
  scrollbar-color: #9fbd74 transparent;
}

.home-right-rail section {
  padding: 15px;
}

.home-right-rail h3 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-right-rail p {
  margin: 0 0 12px;
  color: #253a2c;
  font-size: 0.86rem;
  line-height: 1.45;
}

.home-right-rail section > button,
.home-alert-list button,
.home-recent-list button {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c2dfc1;
  border-radius: 12px;
  background: #fff;
  color: var(--green-dark);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  text-align: left;
  box-shadow: 0 3px 0 rgba(109, 162, 101, 0.16);
}

.home-right-rail section > button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.home-right-rail section > button::after {
  content: ">";
  color: var(--green);
  font-weight: 950;
}

.home-recent-list,
.home-alert-list {
  display: grid;
  gap: 8px;
}

.home-recent-list button,
.home-alert-list button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 9px;
  align-items: center;
  padding: 8px;
}

.home-recent-list .feature-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #0f5f38;
  background: #e9f7df;
}

.home-recent-list strong,
.home-recent-list small,
.home-alert-list strong,
.home-alert-list small {
  display: block;
}

.home-recent-list small,
.home-alert-list small,
.rail-empty {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.28;
}

.home-alert-list button {
  grid-template-columns: 1fr;
  background:
    radial-gradient(circle at 100% 0%, rgba(127,179,78,0.13), transparent 30%),
    #fff;
}

.home-workspace .hero-card {
  min-height: 330px;
}

.home-workspace .hero-brand.hero-wordmark img {
  width: min(390px, 50%);
}

.home-workspace .class-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-workspace .guide-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (min-width: 861px) {
  .bottom-nav {
    color: #eaf7df;
    border-color: rgba(216, 242, 210, 0.22);
    background:
      radial-gradient(circle at 50% 0%, rgba(127, 179, 78, 0.22), transparent 48%),
      linear-gradient(135deg, #06150c 0%, #0f351e 100%);
    box-shadow: 0 18px 45px rgba(7, 28, 14, 0.28);
  }

  .bottom-nav button {
    color: #eaf7df;
  }

  .bottom-nav button.active {
    color: var(--green-dark);
    background: linear-gradient(180deg, #f0fbeb 0%, #d8efc8 100%);
  }
}

/* Final responsive guard: later desktop polish rules should never squeeze the drug profile beside the med rail on phones. */
@media (max-width: 860px) {
  .content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .main-panel {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 10px 96px !important;
    box-sizing: border-box;
  }

  .drug-profile,
  .tool-panel {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .sidebar {
    position: static !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 10px !important;
    box-sizing: border-box;
  }

  .sidebar-item {
    flex: 0 0 154px !important;
  }
}

/* Chief Complaint Workup Builder */
.workup-builder {
  grid-column: 1 / -1;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #bad8b7;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(230, 200, 92, 0.18), transparent 32%),
    linear-gradient(145deg, #ffffff 0%, #f2faee 100%);
  box-shadow: 0 18px 42px rgba(19, 57, 31, 0.10);
}

.workup-builder-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #d8e9d1;
  background:
    linear-gradient(112deg, rgba(255,255,255,0.08) 0 11%, transparent 11% 18%, rgba(255,255,255,0.08) 18% 24%, transparent 24%),
    linear-gradient(135deg, #0b2b18 0%, #174625 52%, #697b31 100%);
  color: #f7fff3;
}

.workup-builder-head span {
  display: block;
  color: #cfe8b4;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workup-builder-head h2 {
  margin: 4px 0 5px;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.05;
}

.workup-builder-head p {
  max-width: 820px;
  margin: 0;
  color: #e1f2dc;
  font-size: 0.9rem;
  line-height: 1.42;
}

.workup-builder-head button,
.symptom-chip-row button,
.workup-match-strip button,
.workup-drug-links button {
  border: 1px solid #bcd8b5;
  border-radius: 999px;
  color: #12391f;
  background: #ffffff;
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(105, 123, 49, 0.18);
}

.workup-builder-head button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
}

.hpi-box {
  display: grid;
  gap: 8px;
  padding: 16px 18px 0;
}

.hpi-box span {
  color: #2d5134;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hpi-box textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 14px 15px;
  border: 1px solid #bfd9bd;
  border-radius: 16px;
  outline: none;
  color: var(--ink);
  background: #fbfff8;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.72), 0 10px 24px rgba(19, 57, 31, 0.06);
}

.hpi-box textarea:focus {
  border-color: #2f8f5b;
  box-shadow: 0 0 0 3px rgba(47, 143, 91, 0.14);
}

.symptom-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px 16px;
}

.symptom-chip-row button {
  min-height: 31px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.symptom-chip-row button.active {
  color: #fff;
  border-color: #174625;
  background: linear-gradient(135deg, #174625, #3f7135);
}

#workup-output {
  padding: 0 18px 18px;
}

.workup-match-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.workup-match-strip button {
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 14px;
  text-align: left;
  background:
    radial-gradient(circle at 100% 0%, rgba(230, 200, 92, 0.16), transparent 34%),
    linear-gradient(145deg, #fff 0%, #f5fbef 100%);
}

.workup-match-strip strong,
.workup-match-strip small {
  display: block;
}

.workup-match-strip small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.workup-priority {
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #c9dfc2;
  border-left: 6px solid #2f8f5b;
  border-radius: 16px;
  background: linear-gradient(135deg, #f9fff6 0%, #edf8e8 100%);
}

.workup-priority span {
  color: #2f8f5b;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workup-priority h3 {
  margin: 4px 0 4px;
  color: #12391f;
  font-size: 1.25rem;
}

.workup-priority p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.workup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.workup-card {
  position: relative;
  overflow: hidden;
  padding: 15px 15px 14px;
  border: 1px solid #d2e2cd;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(47, 143, 91, 0.10), transparent 31%),
    #ffffff;
  box-shadow: 0 9px 22px rgba(19, 57, 31, 0.07);
}

.workup-card.danger {
  border-color: #e4b2a2;
  background:
    radial-gradient(circle at 100% 0%, rgba(205, 94, 60, 0.12), transparent 31%),
    #fffaf7;
}

.workup-card.wide {
  grid-column: 1 / -1;
}

.workup-card > span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 10px;
  color: #fff;
  background: #2f8f5b;
  font-size: 0.82rem;
  font-weight: 950;
}

.workup-card.danger > span {
  background: #b55439;
}

.workup-card h3 {
  margin: 0 0 9px;
  color: #12391f;
  font-size: 0.98rem;
}

.workup-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workup-list li {
  padding: 8px 10px;
  border: 1px solid #e2ecdc;
  border-radius: 10px;
  background: #fbfff8;
  color: #263b2b;
  font-size: 0.84rem;
  line-height: 1.38;
}

.danger .workup-list li {
  border-color: #f0d1c7;
  background: #fff7f3;
}

.differential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.differential-grid section {
  padding: 10px 11px;
  border: 1px solid #d7e8d1;
  border-radius: 12px;
  background: #fbfff8;
}

.differential-grid strong {
  display: block;
  color: #174625;
  font-size: 0.88rem;
}

.differential-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.workup-drug-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workup-drug-links button,
.workup-drug-links span {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.workup-drug-links span {
  border: 1px solid #d9e6d4;
  color: var(--muted);
  background: #f7fbf3;
}

@media (max-width: 860px) {
  .workup-builder-head,
  .workup-match-strip,
  .workup-grid,
  .differential-grid {
    grid-template-columns: 1fr;
  }

  .workup-builder-head {
    display: grid;
  }

  #workup-output,
  .hpi-box,
  .symptom-chip-row {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 1240px) {
  .home-workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .home-right-rail {
    display: none;
  }

  .home-workspace .class-grid,
  .home-workspace .guide-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .home-workspace {
    display: block;
  }

  .home-left-rail,
  .home-right-rail {
    display: none;
  }

  .home-mode .content {
    width: min(100% - 20px, 780px);
  }
}

/* Concept-match header: search lives in the dark app chrome on desktop. */
@media (min-width: 861px) {
  .header {
    min-height: 92px;
  }

  .header-top {
    min-height: 92px;
    padding: 12px 28px;
  }

  .brand-lockup {
    width: 210px;
    min-width: 210px;
  }

  .search-wrap {
    position: absolute;
    top: 17px;
    right: 315px;
    left: 250px;
    z-index: 25;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(216, 242, 210, 0.25);
    border-radius: 14px;
    background: rgba(4, 18, 9, 0.26);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 12px 24px rgba(4, 18, 9, 0.18);
  }

  .history-btn {
    display: none;
  }

  .search-icon {
    left: 18px;
    color: #d8f2d2;
  }

  #search-input {
    min-height: 54px;
    padding-left: 54px;
    border: 0;
    color: #f6fff3;
    background: transparent;
    box-shadow: none;
  }

  #search-input::placeholder {
    color: rgba(232, 248, 224, 0.78);
  }

  #search-button {
    min-height: 40px;
    margin-right: 7px;
    border-color: rgba(216, 242, 210, 0.28);
    color: #f6fff3;
    background: rgba(255,255,255,0.08);
    box-shadow: none;
  }

  .search-results {
    right: 0;
    left: 0;
  }

  .tabs {
    top: 92px;
  }

  .sidebar,
  .home-left-rail,
  .home-right-rail,
  .profile-rail {
    top: 146px;
  }
}

/* Anti-Christmas visual reset: keep green as a brand accent, not the whole interface. */
:root {
  --bg: #f4f6f0;
  --bg-2: #e7ece2;
  --surface: #fffdf8;
  --ink: #17211d;
  --muted: #66716a;
  --line: #d5dbcf;
  --green: #2f6f55;
  --green-dark: #18352a;
  --green-soft: #eef3e8;
  --mint: #dfead9;
  --aqua: #dbecea;
  --gold: #c8a64d;
  --olive: #747b51;
  --forest: #14251f;
  --shadow: 0 20px 50px rgba(35, 48, 42, 0.13);
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(191, 201, 177, 0.32), transparent 28%),
    radial-gradient(circle at 94% 12%, rgba(116, 123, 81, 0.12), transparent 25%),
    linear-gradient(180deg, #fbfbf6 0%, #eef3ed 100%),
    url("assets/family-medicine-bg.svg");
  background-size: auto, auto, auto, 1040px auto;
}

body::before {
  background:
    linear-gradient(90deg, rgba(38, 54, 47, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(38, 54, 47, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.42), rgba(0,0,0,0.08));
}

.header {
  background:
    radial-gradient(circle at 16% -38%, rgba(151, 160, 117, 0.24), transparent 33%),
    linear-gradient(135deg, #15231f 0%, #20342d 48%, #4c573b 100%);
  border-bottom-color: rgba(244, 238, 220, 0.18);
  box-shadow: 0 16px 34px rgba(25, 34, 30, 0.22);
}

.drug-count,
.brand-lockup small {
  color: #d7dfd3;
}

.text-btn {
  color: #f5f2e7;
  border-color: rgba(245, 241, 225, 0.24);
  background: rgba(255, 253, 248, 0.08);
}

.text-btn.active {
  color: #1d3129;
  border-color: #f7f3e8;
  background: #f7f3e8;
}

@media (min-width: 861px) {
  .search-wrap {
    border-color: rgba(245, 241, 225, 0.26);
    background: rgba(255, 253, 248, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035), 0 12px 24px rgba(20, 37, 31, 0.16);
  }

  .search-icon {
    color: #ded9c8;
  }

  #search-input {
    color: #fffdf8;
  }

  #search-input::placeholder {
    color: rgba(244, 240, 226, 0.76);
  }

  #search-button {
    color: #fffdf8;
    border-color: rgba(245, 241, 225, 0.28);
    background: rgba(255, 253, 248, 0.09);
  }
}

.home-left-rail,
.home-right-rail section,
.home-signal-strip section,
.clinical-pulse button,
.guide-card,
.class-card {
  border-color: rgba(204, 214, 198, 0.92);
  background:
    radial-gradient(circle at 96% 10%, rgba(200, 166, 77, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(255,253,248,0.98) 0%, rgba(246,248,240,0.98) 100%);
  box-shadow: 0 14px 34px rgba(35, 48, 42, 0.08);
}

.home-left-rail button {
  color: #33453d;
}

.home-left-rail button:hover,
.home-left-rail button.active {
  color: #18352a;
  background:
    linear-gradient(90deg, rgba(219, 236, 234, 0.86), rgba(250, 248, 239, 0.92));
}

.home-left-rail .feature-icon,
.home-signal-strip section > span,
.clinical-pulse .feature-icon,
.quick-actions .feature-icon,
.class-visual {
  color: #245f58;
  border-color: #c9d9d4;
  background: linear-gradient(180deg, #ffffff 0%, #edf4ee 100%);
  box-shadow: inset 0 -2px 0 rgba(36, 95, 88, 0.08), 0 8px 14px rgba(35, 48, 42, 0.08);
}

.home-right-rail h3,
.section-title,
.home-signal-strip strong,
.clinical-pulse strong,
.guide-card strong,
.class-card strong {
  color: #18352a;
}

.home-right-rail section > button,
.home-alert-list button,
.home-recent-list button {
  border-color: #ccd9c7;
  background: #fffdf8;
  color: #18352a;
  box-shadow: 0 3px 0 rgba(116, 123, 81, 0.12);
}

.home-right-rail section > button::after {
  color: #245f58;
}

.section-title {
  border-left-color: #245f58;
}

.hero-card,
.home-workspace .hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 348px;
  padding: 30px clamp(26px, 4vw, 54px) 28px;
  border: 1px solid rgba(232, 226, 206, 0.24);
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 25%, rgba(219, 236, 234, 0.20), transparent 28%),
    radial-gradient(circle at 82% 88%, rgba(200, 166, 77, 0.14), transparent 30%),
    linear-gradient(112deg, rgba(255,255,255,0.08) 0 9%, transparent 9% 16%, rgba(255,255,255,0.045) 16% 23%, transparent 23%),
    linear-gradient(135deg, #17231f 0%, #243a32 50%, #586047 100%);
  box-shadow: 0 28px 68px rgba(30, 42, 37, 0.28);
}

.hero-card::before {
  background:
    linear-gradient(90deg, rgba(255,253,248,0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,253,248,0.038) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.55;
  mask-image: radial-gradient(circle at 50% 45%, #000, transparent 76%);
}

.hero-brand.hero-wordmark {
  justify-content: center;
  width: min(560px, 100%);
  margin: 0 auto 20px;
}

.hero-brand.hero-wordmark img,
.home-workspace .hero-brand.hero-wordmark img {
  width: min(380px, 100%);
  margin: 0 auto;
  padding: 10px 16px;
  border-radius: 22px;
  background: rgba(255,253,248,0.96);
  box-shadow: 0 18px 42px rgba(20, 33, 28, 0.22);
}

.hero-search {
  width: min(720px, 100%);
  max-width: 720px;
  margin: 0 auto 16px;
  border-color: rgba(245, 241, 225, 0.48);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 14px 30px rgba(20, 33, 28, 0.18);
}

.quick-actions {
  width: min(760px, 100%);
  max-width: 760px;
  margin: 0 auto;
}

.quick-actions button {
  border-color: rgba(220, 227, 212, 0.95);
  background: linear-gradient(180deg, rgba(255,253,248,0.98), rgba(239,244,234,0.98));
  box-shadow: 0 4px 0 rgba(157, 164, 133, 0.52), 0 16px 26px rgba(20, 33, 28, 0.15);
}

.hero-clinical-art {
  right: 42px;
  top: 52px;
  width: min(35%, 380px);
  opacity: 0.44;
}

.family-mark,
.stetho-line,
.vital-strip,
.rx-capsules {
  filter: saturate(0.55);
}

.family-mark {
  background: rgba(245, 241, 225, 0.08);
}

.stetho-line {
  border-color: rgba(245, 241, 225, 0.22);
  border-left-color: transparent;
  border-bottom-color: transparent;
}

.vital-strip {
  border-color: rgba(245, 241, 225, 0.18);
  background: rgba(20, 33, 28, 0.28);
}

.vital-strip i {
  background: linear-gradient(180deg, #c8a64d, #8ca59d);
}

.rx-capsules span {
  background: linear-gradient(90deg, rgba(255,253,248,0.84) 0 48%, rgba(139, 159, 151, 0.58) 48%);
}

.clinical-pulse button {
  border-bottom-color: rgba(36, 95, 88, 0.32);
}

.clinical-pulse button:nth-child(2n) {
  background:
    radial-gradient(circle at 92% 14%, rgba(139, 159, 151, 0.09), transparent 28%),
    linear-gradient(145deg, #fffdf8 0%, #f1f5ed 100%);
}

.class-card {
  background:
    linear-gradient(180deg, rgba(255,253,248,0.92), rgba(255,253,248,0.60)),
    color-mix(in srgb, var(--class-bg) 42%, #f8f8ef);
}

.class-card::after {
  opacity: 0.55;
}

.class-card small,
.class-card em,
.guide-card small,
.home-signal-strip small,
.clinical-pulse small,
.home-right-rail p {
  color: #66716a;
}

.bottom-nav {
  color: #f4f0e2;
  border-color: rgba(245, 241, 225, 0.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(200, 166, 77, 0.18), transparent 50%),
    linear-gradient(135deg, #17231f 0%, #23372f 100%);
  box-shadow: 0 18px 45px rgba(20, 33, 28, 0.26);
}

.bottom-nav button {
  color: #f4f0e2;
}

.bottom-nav .nav-icon {
  filter: saturate(0.75);
}

.bottom-nav button.active {
  color: #18352a;
  background: linear-gradient(180deg, #fffdf8 0%, #e9efdf 100%);
}

.profile-hero,
.workup-builder-head {
  background:
    linear-gradient(112deg, rgba(255,255,255,0.06) 0 11%, transparent 11% 18%, rgba(255,255,255,0.04) 18% 24%, transparent 24%),
    linear-gradient(135deg, #101b18 0%, #263a34 56%, #5a6044 100%);
  box-shadow:
    inset 0 0 0 999px rgba(7, 18, 13, 0.14),
    0 4px 0 rgba(105, 123, 49, 0.15),
    0 18px 36px rgba(19, 57, 31, 0.16);
}

.clinical-profile .profile-hero h2,
.clinical-profile .profile-hero p,
.clinical-profile .profile-hero span,
.workup-builder-head h2,
.workup-builder-head p {
  color: #fffdf6;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.workup-builder,
.workup-priority,
.workup-card,
.workup-list li,
.differential-grid section {
  border-color: #d4dccf;
  background: #fffdf8;
}

.decision-row-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.decision-row-grid section {
  padding: 12px;
  border: 1px solid #d4dccf;
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(120, 143, 73, 0.10), transparent 38%),
    #fffdf8;
}

.decision-row-grid strong {
  display: block;
  margin-bottom: 7px;
  color: #183f2d;
}

.decision-row-grid p {
  margin: 6px 0 0;
}

.workup-card.danger {
  border-color: #dcc8b7;
  background: #fff9f1;
}

.workup-card > span {
  background: #245f58;
}

.workup-lab-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workup-lab-links button,
.workup-lab-links span {
  padding: 8px 10px;
  border: 1px solid #b8cfc4;
  border-radius: 999px;
  color: #183f2d;
  background: #f3f8f3;
  font-weight: 800;
  font-size: 0.82rem;
}

.workup-lab-links button {
  cursor: pointer;
}

.workup-card.danger > span {
  background: #9b6846;
}

.symptom-chip-row button.active {
  border-color: #245f58;
  background: linear-gradient(135deg, #245f58, #60756b);
}

@media (min-width: 1241px) {
  .home-workspace {
    grid-template-columns: 218px minmax(780px, 1fr) 330px;
  }
}

@media (max-width: 860px) {
  .hero-card,
  .home-workspace .hero-card {
    min-height: 0;
    padding: 22px 14px;
  }

  .decision-row-grid {
    grid-template-columns: 1fr;
  }

  .hero-clinical-art {
    display: none;
  }

  .hero-brand.hero-wordmark img,
  .home-workspace .hero-brand.hero-wordmark img {
    width: min(320px, 96%);
  }
}

/* Tone-down pass: charcoal/sage foundation with green reserved for brand and action accents. */
.header {
  background:
    radial-gradient(circle at 16% -38%, rgba(186, 171, 120, 0.18), transparent 33%),
    linear-gradient(135deg, #202724 0%, #2b3631 52%, #555c4b 100%);
}

.hero-card,
.home-workspace .hero-card,
.profile-hero,
.workup-builder-head {
  background:
    radial-gradient(circle at 78% 25%, rgba(139, 159, 151, 0.16), transparent 28%),
    radial-gradient(circle at 82% 88%, rgba(200, 166, 77, 0.13), transparent 30%),
    linear-gradient(112deg, rgba(255,255,255,0.075) 0 9%, transparent 9% 16%, rgba(255,255,255,0.04) 16% 23%, transparent 23%),
    linear-gradient(135deg, #202724 0%, #2d3934 55%, #5c624f 100%);
}

.bottom-nav {
  background:
    radial-gradient(circle at 50% 0%, rgba(200, 166, 77, 0.15), transparent 50%),
    linear-gradient(135deg, #202724 0%, #2c3933 100%);
}

.home-right-rail {
  scrollbar-color: #a9ad98 transparent;
}

.clinical-pulse button,
.guide-card,
.class-card,
.home-signal-strip section,
.home-right-rail section,
.home-left-rail {
  background:
    radial-gradient(circle at 96% 10%, rgba(200, 166, 77, 0.06), transparent 30%),
    linear-gradient(145deg, rgba(255,253,248,0.99) 0%, rgba(247,247,239,0.99) 100%);
}

.home-left-rail button:hover,
.home-left-rail button.active {
  background:
    linear-gradient(90deg, rgba(219, 236, 234, 0.74), rgba(250, 248, 239, 0.95));
}

.brand-lockup small {
  display: block !important;
}

/* Hero background image selected May 2026. Keep the box cinematic, but preserve search/button readability. */
.hero-card,
.home-workspace .hero-card {
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(8, 33, 22, 0.94) 0%, rgba(8, 33, 22, 0.72) 42%, rgba(8, 33, 22, 0.18) 100%),
    radial-gradient(circle at 18% 30%, rgba(235, 229, 190, 0.13), transparent 34%),
    url("assets/hero-primary-care-bg.png") center right / cover no-repeat;
  border-color: rgba(209, 194, 135, 0.34);
  box-shadow: 0 30px 72px rgba(14, 31, 23, 0.34);
}

.hero-card::before {
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 253, 248, 0.032) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.34;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.68) 48%, transparent 100%);
}

.hero-illustration,
.hero-clinical-art {
  display: none;
}

.hero-brand.hero-wordmark {
  position: relative;
  z-index: 2;
}

.brand-hero-lockup {
  color: #fffdf5;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}

.brand-hero-lockup span,
.brand-hero-lockup small {
  color: rgba(246, 243, 221, 0.9);
}

.brand-hero-lockup p {
  color: #dceecf;
}

.hero-search,
.quick-actions {
  position: relative;
  z-index: 2;
}

.hero-search {
  border-color: rgba(230, 221, 183, 0.62);
  background: rgba(255, 253, 248, 0.96);
}

.quick-actions button {
  border-color: rgba(215, 224, 201, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.95), rgba(235, 242, 228, 0.94));
}

.hero-card .brand-hero-lockup {
  border-color: rgba(231, 218, 165, 0.30);
  background:
    radial-gradient(circle at 86% 18%, rgba(214, 190, 104, 0.16), transparent 30%),
    linear-gradient(145deg, rgba(7, 28, 19, 0.72), rgba(17, 49, 34, 0.58));
  color: #fffdf6;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(3px);
}

.hero-card .brand-hero-lockup h1 {
  color: #fffdf6;
}

.hero-card .brand-hero-lockup span {
  color: rgba(223, 211, 157, 0.94);
}

.hero-card .brand-hero-lockup p {
  color: #d8efc8;
}

.hero-card .brand-hero-lockup small {
  color: rgba(255, 253, 246, 0.84);
}

@media (max-width: 860px) {
  .hero-card,
  .home-workspace .hero-card {
    background-position: 67% center;
  }

  .hero-card .brand-hero-lockup {
    width: min(100%, 420px);
    padding: 20px 18px 18px;
  }
}

/* Main app background selected May 2026. Hero keeps its own darker image. */
body {
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.58), rgba(239, 246, 235, 0.64)),
    url("assets/app-background.png") center top / cover fixed no-repeat;
}

body::before {
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 253, 246, 0.72), transparent 36%),
    linear-gradient(90deg, rgba(25, 55, 42, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(25, 55, 42, 0.015) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  opacity: 0.72;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.26), rgba(0,0,0,0.06));
}

.drug-select-empty {
  min-height: min(56vh, 620px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.drug-select-empty .feature-icon {
  width: 58px;
  height: 58px;
  color: #245f58;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 14px 38px rgba(25, 55, 42, 0.12);
}

.drug-select-empty strong {
  color: #18352a;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  letter-spacing: 0;
}

.drug-select-empty p {
  max-width: 420px;
  margin: 0;
  color: #536058;
  font-weight: 750;
  line-height: 1.45;
}

/* Preferred FamCare logo asset, cleaned so the wordmark reads "FamCare" only. */
.brand-lockup {
  gap: 10px;
}

.brand-logo.brand-wordmark {
  display: block;
  width: 82px;
  height: 58px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  object-fit: contain;
  object-position: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong {
  color: #fffdf8;
}

.brand-copy small {
  color: rgba(241, 242, 232, 0.82);
}

.hero-card .brand-hero-lockup {
  width: min(500px, 100%);
  padding: 18px 24px 20px;
}

.hero-card .brand-hero-lockup img {
  display: block;
  width: min(310px, 92%);
  max-height: 186px;
  margin: 0 auto 7px;
  padding: 8px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  object-fit: contain;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.hero-card .brand-hero-lockup span {
  margin-top: 0;
  color: rgba(223, 211, 157, 0.94);
}

.hero-card .brand-hero-lockup h1 {
  display: none;
}

@media (max-width: 560px) {
  .brand-logo.brand-wordmark {
    width: 72px;
    height: 52px;
  }

  .brand-copy strong {
    font-size: 1rem;
  }

  .hero-card .brand-hero-lockup img {
    width: min(260px, 96%);
    max-height: 156px;
  }
}

/* Professional polish pass: calmer clinical workstation feel without changing the app flow. */
:root {
  --pro-ink: #18231f;
  --pro-muted: #5f6b63;
  --pro-line: rgba(42, 58, 50, 0.13);
  --pro-surface: rgba(255, 253, 248, 0.92);
  --pro-surface-solid: #fffdf8;
  --pro-accent: #2d6a4f;
  --pro-accent-dark: #173b2c;
  --pro-gold: #c8a64d;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.78), rgba(241, 246, 237, 0.80)),
    url("assets/app-background.png") center top / cover fixed no-repeat;
}

body::before {
  opacity: 0.48;
}

.header {
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.06), transparent 42%),
    linear-gradient(135deg, #1a2420 0%, #27332e 54%, #404938 100%);
  border-bottom-color: rgba(255, 253, 248, 0.16);
  box-shadow: 0 14px 34px rgba(16, 24, 21, 0.20);
}

.header-top {
  min-height: 70px;
  padding: 11px 28px 8px;
}

.brand-logo.brand-wordmark {
  width: 74px;
  height: 52px;
  border-radius: 13px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.20);
}

.brand-lockup strong {
  font-size: 1.34rem;
  letter-spacing: -0.01em;
}

.brand-copy small {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.search-wrap {
  max-width: 920px;
  margin: 0 auto 10px;
  padding: 6px;
  border-color: rgba(255, 253, 248, 0.22);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, 0.10), 0 10px 24px rgba(0, 0, 0, 0.15);
}

#search-input {
  min-height: 42px;
  color: #1e2d27;
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: none;
}

#search-input::placeholder,
.hero-search input::placeholder {
  color: rgba(77, 88, 81, 0.66);
  opacity: 1;
}

.search-icon {
  color: #273a33;
  opacity: 0.88;
}

.history-btn,
#search-button,
.text-btn {
  border-radius: 13px;
}

#search-button {
  color: var(--pro-accent-dark);
  background: linear-gradient(180deg, #fffdf8, #eef3e8);
}

.home-mode .content {
  width: min(1360px, calc(100% - 32px));
  max-width: 1360px;
}

@media (min-width: 1241px) {
  .home-workspace {
    grid-template-columns: 206px minmax(0, 1fr) 300px;
    gap: 18px;
  }
}

.home-left-rail,
.home-right-rail section,
.home-signal-strip section,
.clinical-pulse button,
.class-card,
.guide-card,
.mini-card,
.info-section,
.empty-state,
.tool-panel,
.drug-profile {
  border-color: var(--pro-line);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.95), rgba(249, 250, 243, 0.90));
  box-shadow: 0 14px 34px rgba(27, 40, 33, 0.08);
  backdrop-filter: blur(7px);
}

.home-left-rail {
  padding: 10px;
}

.home-left-rail button {
  min-height: 42px;
  color: #253a31;
  border-radius: 11px;
}

.home-left-rail button:hover,
.home-left-rail button.active {
  color: var(--pro-accent-dark);
  background: linear-gradient(90deg, rgba(226, 239, 220, 0.86), rgba(255, 253, 248, 0.92));
}

.home-left-rail .feature-icon,
.home-signal-strip section > span,
.quick-actions .feature-icon,
.clinical-pulse .feature-icon,
.guide-card .feature-icon {
  color: var(--pro-accent-dark);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(237, 245, 232, 0.94));
  box-shadow: inset 0 -2px 0 rgba(45, 106, 79, 0.10), 0 8px 18px rgba(24, 35, 31, 0.10);
}

.hero-card,
.home-workspace .hero-card {
  display: grid;
  grid-template-columns: minmax(430px, 0.92fr) minmax(260px, 1fr);
  align-content: center;
  align-items: center;
  justify-items: stretch;
  min-height: 430px;
  padding: 36px clamp(28px, 4vw, 58px);
  background:
    linear-gradient(90deg, rgba(7, 28, 19, 0.94) 0%, rgba(7, 28, 19, 0.76) 44%, rgba(7, 28, 19, 0.10) 100%),
    radial-gradient(circle at 20% 28%, rgba(200, 166, 77, 0.16), transparent 34%),
    url("assets/hero-primary-care-bg.png") center right / cover no-repeat;
  border-radius: 26px;
  box-shadow: 0 32px 74px rgba(14, 31, 23, 0.31);
}

.hero-brand.hero-wordmark,
.hero-search,
.quick-actions {
  grid-column: 1;
  width: min(100%, 660px);
  max-width: 660px;
  margin-left: 0;
  margin-right: auto;
}

.hero-brand.hero-wordmark {
  margin-bottom: 18px;
}

.hero-card .brand-hero-lockup {
  width: min(390px, 100%);
  margin: 0;
  padding: 16px 18px 15px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.08), rgba(255, 253, 248, 0.03));
  text-align: left;
  box-shadow: none;
}

.hero-card .brand-hero-lockup img {
  width: min(245px, 82%);
  max-height: 145px;
  margin: 0 0 9px;
  padding: 8px 10px;
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.hero-card .brand-hero-lockup span {
  margin: 0 0 2px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.hero-card .brand-hero-lockup p {
  margin: 0;
  color: #f7f3df;
  font-size: clamp(1.32rem, 2vw, 1.85rem);
  font-weight: 950;
  letter-spacing: -0.01em;
  line-height: 1.06;
  text-transform: none;
}

.hero-card .brand-hero-lockup small {
  max-width: 360px;
  margin: 8px 0 0;
  color: rgba(255, 253, 246, 0.82);
  font-size: 0.88rem;
  line-height: 1.42;
}

.hero-search {
  margin-bottom: 14px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.17);
}

.hero-search input {
  font-size: 0.98rem;
}

.quick-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-actions button {
  min-height: 96px;
  border-radius: 18px;
  border-color: rgba(255, 253, 248, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(238, 245, 232, 0.91));
  box-shadow: 0 5px 0 rgba(47, 66, 45, 0.34), 0 16px 30px rgba(0, 0, 0, 0.16);
}

.quick-actions button:hover {
  transform: translateY(-1px);
}

.quick-actions strong {
  color: #18231f;
  letter-spacing: -0.01em;
}

.home-signal-strip {
  margin-top: 16px;
  gap: 12px;
}

.home-signal-strip section {
  min-height: 100px;
  padding: 15px 16px 15px 60px;
  border-radius: 18px;
}

.home-signal-strip strong,
.clinical-pulse strong,
.class-card strong,
.guide-card strong {
  color: #1e3329;
  letter-spacing: -0.01em;
}

.home-signal-strip small,
.clinical-pulse small,
.class-card small,
.guide-card small,
.home-right-rail p {
  color: var(--pro-muted);
}

.clinical-pulse {
  gap: 10px;
}

.clinical-pulse button {
  min-height: 152px;
  padding: 16px 14px;
  border-radius: 18px;
}

.clinical-pulse button span:not(.feature-icon),
.home-right-rail h3,
.section-title {
  color: var(--pro-accent-dark);
  letter-spacing: 0.055em;
}

.class-card,
.guide-card {
  border-radius: 17px;
  border-bottom-width: 4px;
}

.class-card:hover,
.guide-card:hover,
.clinical-pulse button:hover,
.home-right-rail section > button:hover,
.home-alert-list button:hover {
  box-shadow: 0 18px 38px rgba(27, 40, 33, 0.13);
}

.home-right-rail {
  top: 166px;
}

.home-right-rail section {
  padding: 17px;
  border-radius: 18px;
}

.home-right-rail h3 {
  margin-bottom: 9px;
  font-size: 0.76rem;
}

.home-right-rail section > button,
.home-alert-list button {
  border-color: var(--pro-line);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 3px 0 rgba(42, 58, 50, 0.09);
}

.bottom-nav {
  width: min(1040px, calc(100% - 34px));
  min-height: 74px;
  padding: 9px 12px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(27, 36, 32, 0.98) 0%, rgba(38, 51, 45, 0.98) 100%);
  box-shadow: 0 18px 46px rgba(18, 26, 22, 0.25);
}

.bottom-nav button {
  min-width: 84px;
  min-height: 56px;
  border-radius: 15px;
  font-size: 0.75rem;
}

.bottom-nav .nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.92);
}

.bottom-nav button.active {
  background: linear-gradient(180deg, #fffdf8, #e9f1df);
}

.drug-select-empty {
  min-height: min(58vh, 640px);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 253, 248, 0.62), transparent 42%);
}

@media (max-width: 980px) {
  .hero-card,
  .home-workspace .hero-card {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px 18px;
  }

  .hero-card .brand-hero-lockup {
    width: min(390px, 100%);
    margin: 0 auto;
    text-align: center;
  }

  .hero-card .brand-hero-lockup img {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-search,
  .quick-actions {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 640px) {
  .header-top {
    padding: 9px 12px 6px;
  }

  .brand-logo.brand-wordmark {
    width: 64px;
    height: 48px;
  }

  .hero-card .brand-hero-lockup {
    padding: 12px 10px;
  }

  .hero-card .brand-hero-lockup img {
    width: min(190px, 88%);
    max-height: 122px;
    margin-bottom: 6px;
  }

  .hero-card .brand-hero-lockup p {
    font-size: 1.18rem;
  }

  .hero-card .brand-hero-lockup small {
    max-width: 280px;
    font-size: 0.8rem;
    line-height: 1.28;
  }

  .hero-search {
    min-height: 52px;
    margin-bottom: 12px;
    border-radius: 17px;
  }

  .quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .quick-actions button {
    min-height: 82px;
    padding: 9px 5px;
    border-radius: 16px;
  }

  .quick-actions .feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .quick-actions strong {
    font-size: 0.78rem;
  }

  .quick-actions small {
    font-size: 0.68rem;
    line-height: 1.1;
  }

  .bottom-nav {
    width: calc(100% - 20px);
  }
}

/* Command-center home revision: make the first screen behave like an app surface, not a marketing hero. */
.hero-card.command-card,
.home-workspace .hero-card.command-card {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(240px, 1fr);
  align-content: center;
  gap: 12px 24px;
  min-height: 354px;
  padding: 28px clamp(26px, 3.6vw, 46px);
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(10, 28, 22, 0.96) 0%, rgba(15, 39, 31, 0.84) 47%, rgba(12, 30, 23, 0.22) 100%),
    radial-gradient(circle at 18% 20%, rgba(209, 194, 135, 0.16), transparent 30%),
    url("assets/hero-primary-care-bg.png") center right / cover no-repeat;
}

.command-card .hero-brand.hero-wordmark,
.command-card .hero-search,
.command-card .command-flow,
.command-card .quick-actions {
  grid-column: 1;
  width: min(100%, 680px);
  max-width: 680px;
  margin-left: 0;
  margin-right: auto;
}

.command-card .hero-brand.hero-wordmark {
  margin-bottom: 4px;
}

.command-card .brand-hero-lockup {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  width: min(560px, 100%);
  padding: 14px 16px;
  border: 1px solid rgba(245, 241, 225, 0.24);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.13), rgba(255, 253, 248, 0.045));
  text-align: left;
  box-shadow: none;
}

.command-card .brand-hero-lockup img {
  width: 126px;
  max-height: 88px;
  margin: 0;
  padding: 7px;
  border-radius: 15px;
}

.command-card .brand-hero-lockup span {
  color: rgba(223, 211, 157, 0.94);
  font-size: 0.78rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.command-card .brand-hero-lockup p {
  margin-top: 2px;
  color: #fffdf6;
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  line-height: 0.98;
}

.command-card .brand-hero-lockup small {
  max-width: 390px;
  margin-top: 7px;
  color: rgba(255, 253, 246, 0.80);
  font-size: 0.86rem;
  line-height: 1.36;
}

.command-card .hero-search {
  height: 58px;
  margin: 6px 0 0;
  border-radius: 18px;
}

.command-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.command-flow button {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  column-gap: 8px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(245, 241, 225, 0.30);
  border-radius: 15px;
  color: #f8f3df;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.13), rgba(255, 253, 248, 0.055));
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, 0.12);
  cursor: pointer;
  text-align: left;
}

.command-flow button:hover {
  transform: translateY(-1px);
  border-color: rgba(209, 194, 135, 0.50);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.18), rgba(255, 253, 248, 0.08));
}

.command-flow span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  color: #173b2c;
  background: #f8f3df;
  font-weight: 950;
  font-size: 0.78rem;
}

.command-flow strong {
  color: #fffdf6;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.command-flow small {
  color: rgba(255, 253, 246, 0.68);
  font-size: 0.72rem;
  line-height: 1.1;
}

.command-card .quick-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.command-card .quick-actions button {
  min-height: 76px;
  padding: 9px 10px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(239, 244, 234, 0.92));
  box-shadow: 0 4px 0 rgba(24, 35, 31, 0.22), 0 14px 24px rgba(0, 0, 0, 0.14);
}

.command-card .quick-actions .feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.command-card .quick-actions strong {
  font-size: 0.86rem;
}

.command-card .quick-actions small {
  font-size: 0.7rem;
}

.home-signal-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clinical-pulse {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clinical-pulse button {
  min-height: 118px;
  grid-template-columns: 42px 1fr;
  text-align: left;
}

.clinical-pulse button .feature-icon {
  grid-row: span 3;
}

.clinical-pulse button span:not(.feature-icon),
.clinical-pulse button strong,
.clinical-pulse button small {
  align-self: center;
}

@media (max-width: 980px) {
  .hero-card.command-card,
  .home-workspace .hero-card.command-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .command-card .brand-hero-lockup {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .command-card .brand-hero-lockup img {
    width: 150px;
    max-height: 105px;
  }
}

@media (max-width: 640px) {
  .hero-card.command-card,
  .home-workspace .hero-card.command-card {
    padding: 18px;
    gap: 10px;
  }

  .command-card .brand-hero-lockup {
    padding: 12px;
  }

  .command-card .brand-hero-lockup img {
    width: 140px;
    max-height: 94px;
  }

  .command-card .brand-hero-lockup p {
    font-size: 1.25rem;
  }

  .command-card .brand-hero-lockup small {
    font-size: 0.78rem;
  }

  .command-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-flow button {
    min-height: 58px;
  }

  .clinical-pulse {
    grid-template-columns: 1fr;
  }
}

/* Header balance pass: open the search lane and reduce the side bulk. */
@media (min-width: 861px) {
  .header {
    min-height: 84px;
  }

  .header-top {
    min-height: 84px;
    padding: 10px 24px;
  }

  .brand-lockup {
    width: 190px;
    min-width: 190px;
    gap: 9px;
  }

  .brand-logo.brand-wordmark {
    width: 66px;
    height: 48px;
    border-radius: 12px;
  }

  .brand-lockup strong {
    font-size: 1.24rem;
  }

  .brand-copy small {
    font-size: 0.76rem;
  }

  .header-actions {
    gap: 8px;
  }

  .drug-count {
    min-width: 74px;
    text-align: right;
  }

  .text-btn {
    width: 38px;
    height: 38px;
  }

  .search-wrap {
    top: 14px;
    left: 222px;
    right: 252px;
    max-width: none;
    min-height: 56px;
    padding: 5px;
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.12);
    box-shadow:
      inset 0 0 0 1px rgba(255, 253, 248, 0.08),
      0 10px 24px rgba(10, 18, 15, 0.16);
  }

  .search-icon {
    left: 22px;
    color: #26372f;
    opacity: 0.88;
  }

  #search-input {
    min-height: 46px;
    padding-left: 54px;
    color: #23342c;
    border-radius: 14px;
    background: rgba(255, 253, 248, 0.97);
  }

  #search-input::placeholder {
    color: rgba(86, 94, 88, 0.68);
  }

  #search-button {
    min-height: 44px;
    margin-right: 0;
    padding: 0 18px;
    color: var(--pro-accent-dark);
    border-color: rgba(255, 253, 248, 0.70);
    border-radius: 14px;
    background: linear-gradient(180deg, #fffdf8, #eef3e8);
    box-shadow: 0 2px 0 rgba(20, 35, 28, 0.10);
  }

  .tabs {
    top: 84px;
  }

  .sidebar,
  .home-left-rail,
  .home-right-rail,
  .profile-rail {
    top: 138px;
  }
}

@media (min-width: 1500px) {
  .search-wrap {
    left: 232px;
    right: 320px;
  }
}

/* Home rail balance pass: make the left navigation slimmer so the clinical workspace
   gets the visual weight instead of the side rail. */
.home-mode .content {
  width: min(1480px, calc(100% - 28px));
  max-width: 1480px;
}

.home-workspace {
  grid-template-columns: 156px minmax(0, 1fr) 300px;
  gap: 18px;
}

.home-left-rail {
  padding: 10px 8px;
  gap: 4px;
}

.home-left-rail button {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px;
  min-height: 40px;
  padding: 6px 7px 6px 5px;
  border-radius: 10px;
  font-size: 0.75rem;
  line-height: 1.1;
}

.home-left-rail .feature-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
}

@media (min-width: 1241px) {
  .home-workspace {
    grid-template-columns: 156px minmax(0, 1fr) 300px;
  }
}

@media (min-width: 1600px) {
  .home-mode .content {
    width: min(1560px, calc(100% - 32px));
    max-width: 1560px;
  }

  .home-workspace {
    grid-template-columns: 164px minmax(0, 1fr) 310px;
    gap: 20px;
  }
}

@media (max-width: 1240px) {
  .home-left-rail {
    padding: 8px;
  }
}

/* App chrome polish: keep the clinical canvas central and make navigation feel
   quieter, more refined, and less like a heavy themed frame. */
@media (min-width: 861px) {
  .header {
    min-height: 82px;
    background:
      linear-gradient(180deg, rgba(253, 252, 246, 0.94), rgba(246, 249, 241, 0.88));
    border-bottom: 1px solid rgba(188, 203, 183, 0.70);
    box-shadow: 0 14px 34px rgba(25, 37, 31, 0.10);
    backdrop-filter: blur(18px) saturate(1.1);
  }

  .header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #163c26, #75934f 45%, #d2b45d 100%);
    opacity: 0.82;
  }

  .header-top {
    min-height: 82px;
    padding: 11px 26px;
  }

  .brand-lockup {
    color: #17251d;
  }

  .brand-lockup strong {
    color: #17251d;
    letter-spacing: -0.03em;
  }

  .brand-copy small {
    color: #526158;
  }

  .brand-logo.brand-wordmark {
    border-color: rgba(189, 207, 181, 0.86);
    background: #fffef9;
    box-shadow: 0 10px 22px rgba(36, 55, 42, 0.12);
  }

  .search-wrap {
    top: 13px;
    min-height: 58px;
    padding: 5px;
    border: 1px solid rgba(181, 198, 175, 0.82);
    background: rgba(255, 254, 249, 0.84);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.80),
      0 12px 28px rgba(34, 48, 39, 0.11);
  }

  #search-input {
    min-height: 46px;
    color: #17241d;
    border: 1px solid rgba(207, 217, 201, 0.86);
    background: rgba(255, 255, 252, 0.98);
    box-shadow: inset 0 1px 2px rgba(24, 35, 30, 0.05);
  }

  #search-input:focus {
    border-color: rgba(69, 121, 86, 0.64);
    box-shadow: 0 0 0 4px rgba(80, 132, 86, 0.12);
  }

  #search-button {
    color: #fffef9;
    border-color: rgba(33, 75, 48, 0.72);
    background: linear-gradient(180deg, #315b3d, #183a26);
    box-shadow: 0 8px 18px rgba(26, 62, 38, 0.20);
  }

  .drug-count {
    color: #334538;
    font-weight: 900;
  }

  .text-btn {
    color: #2f4336;
    border-color: rgba(190, 204, 183, 0.88);
    background: rgba(255, 254, 249, 0.76);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.80), 0 6px 16px rgba(33, 46, 38, 0.08);
  }

  .text-btn.active {
    color: #fffef9;
    border-color: #284c34;
    background: linear-gradient(180deg, #3e6747, #1f3f2b);
  }

  .tabs {
    top: 82px;
  }

  .sidebar,
  .home-left-rail,
  .home-right-rail,
  .profile-rail {
    top: 136px;
  }
}

.bottom-nav {
  width: min(1010px, calc(100% - 40px));
  min-height: 68px;
  padding: 8px;
  border: 1px solid rgba(186, 199, 179, 0.84);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 254, 249, 0.93), rgba(243, 247, 238, 0.91));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 20px 46px rgba(28, 41, 34, 0.16);
  backdrop-filter: blur(18px) saturate(1.08);
}

.bottom-nav button {
  min-width: 78px;
  min-height: 52px;
  padding: 5px 7px;
  border-radius: 14px;
  color: #445449;
  font-size: 0.70rem;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.bottom-nav button:hover {
  color: #193522;
  background: rgba(232, 241, 225, 0.72);
}

.bottom-nav button.active {
  color: #173321;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 190, 103, 0.18), transparent 45%),
    linear-gradient(180deg, rgba(231, 242, 221, 0.98), rgba(213, 233, 199, 0.95));
  box-shadow:
    inset 0 0 0 1px rgba(74, 112, 66, 0.14),
    0 6px 14px rgba(46, 74, 47, 0.12);
}

.bottom-nav button.active::before {
  top: auto;
  bottom: 4px;
  width: 30px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #284d32, #8ba34f);
}

.bottom-nav .nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(186, 201, 180, 0.72);
  border-radius: 10px;
  background: rgba(255, 254, 249, 0.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 5px 10px rgba(31, 45, 37, 0.07);
  font-size: 1rem;
}

.bottom-nav button.active .nav-icon {
  border-color: rgba(79, 121, 71, 0.28);
  background: rgba(255, 254, 249, 0.95);
}

@media (max-width: 860px) {
  .bottom-nav {
    width: calc(100% - 18px);
    min-height: 64px;
    padding: 7px;
    border-radius: 18px 18px 0 0;
  }

  .bottom-nav button {
    min-width: 64px;
  }
}

/* Home flow pass: center the command content and make the hero search act like
   the real starting point of the app. */
.hero-card.command-card,
.home-workspace .hero-card.command-card {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: center;
  min-height: 382px;
  padding: 28px clamp(28px, 4vw, 56px);
  background:
    radial-gradient(circle at 50% 50%, rgba(9, 27, 20, 0.92) 0%, rgba(9, 27, 20, 0.78) 42%, rgba(9, 27, 20, 0.36) 76%),
    linear-gradient(90deg, rgba(8, 33, 22, 0.28), rgba(8, 33, 22, 0.08) 50%, rgba(8, 33, 22, 0.28)),
    url("assets/hero-primary-care-bg.png") center center / cover no-repeat;
}

.command-card .hero-brand.hero-wordmark,
.command-card .hero-search,
.command-card .command-flow,
.command-card .quick-actions {
  grid-column: 1;
  width: min(100%, 760px);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.command-card .hero-brand.hero-wordmark {
  display: flex;
  justify-content: center;
}

.command-card .brand-hero-lockup {
  grid-template-columns: 112px minmax(0, 1fr);
  width: min(680px, 100%);
  padding: 15px 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 253, 248, 0.12), transparent 58%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.16), rgba(255, 253, 248, 0.055));
  backdrop-filter: blur(10px);
}

.command-card .brand-hero-lockup img {
  width: 112px;
  max-height: 82px;
}

.command-card .brand-hero-lockup p {
  font-size: clamp(1.75rem, 2.7vw, 2.55rem);
}

.command-card .brand-hero-lockup small {
  max-width: 490px;
}

.command-card .hero-search {
  position: relative;
  z-index: 6;
  height: auto;
  min-height: 60px;
  margin-top: 10px;
  border: 1px solid rgba(245, 241, 225, 0.34);
  background: rgba(255, 253, 248, 0.97);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.hero-search span {
  pointer-events: none;
}

.command-card .hero-search input {
  min-height: 60px;
  color: #18251d;
  font-size: 1rem;
  box-shadow: none;
}

.home-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 20;
  overflow: hidden;
  max-height: 286px;
  border: 1px solid rgba(191, 207, 184, 0.92);
  border-radius: 16px;
  background: rgba(255, 254, 249, 0.98);
  box-shadow: 0 22px 44px rgba(14, 31, 23, 0.24);
}

.home-search-results button,
.home-search-results .search-empty {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid rgba(215, 224, 207, 0.78);
  color: #17241d;
  background: transparent;
  text-align: left;
}

.home-search-results button:hover {
  background: #eef6e9;
}

.home-search-results strong {
  color: #17241d;
  font-weight: 900;
}

.home-search-results span,
.home-search-results .search-empty {
  color: #59675d;
  font-size: 0.78rem;
}

.home-start-steps {
  display: grid;
  gap: 9px;
  margin: 0 0 12px;
  padding: 0;
  counter-reset: start-step;
  list-style: none;
}

.home-start-steps li {
  position: relative;
  padding-left: 32px;
  color: #253a2c;
  line-height: 1.25;
  counter-increment: start-step;
}

.home-start-steps li::before {
  content: counter(start-step);
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  color: #fffef9;
  background: linear-gradient(180deg, #315b3d, #183a26);
  font-size: 0.74rem;
  font-weight: 950;
}

.home-start-steps strong,
.home-start-steps span {
  display: block;
}

.home-start-steps strong {
  color: #1d3125;
  font-size: 0.82rem;
}

.home-start-steps span {
  margin-top: 2px;
  color: #657166;
  font-size: 0.75rem;
}

.command-flow {
  width: min(100%, 760px);
}

.command-flow button {
  justify-content: start;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.18), rgba(255, 253, 248, 0.07));
}

.command-card .quick-actions {
  width: min(100%, 640px);
}

@media (max-width: 980px) {
  .command-card .brand-hero-lockup {
    grid-template-columns: 1fr;
    width: min(520px, 100%);
  }
}

/* Navigation cleanup: the bottom nav is the primary navigation, so the home page
   no longer needs a duplicate left toolbar. */
.home-mode .content {
  width: min(1560px, calc(100% - 28px));
  max-width: 1560px;
}

.home-workspace {
  grid-template-columns: minmax(0, 1fr) 314px;
  gap: 22px;
}

.home-left-rail {
  display: none;
}

.home-center {
  width: 100%;
}

.home-workspace .hero-card.command-card {
  min-height: 402px;
}

@media (min-width: 1600px) {
  .home-mode .content {
    width: min(1680px, calc(100% - 34px));
    max-width: 1680px;
  }

  .home-workspace {
    grid-template-columns: minmax(0, 1fr) 322px;
  }
}

/* More refined bottom navigation with subtle color coding by workflow. */
.bottom-nav {
  width: min(1060px, calc(100% - 44px));
  min-height: 70px;
  padding: 8px 10px;
  border-color: rgba(178, 190, 176, 0.78);
  border-radius: 24px;
  background:
    radial-gradient(circle at 14% 0%, rgba(56, 112, 84, 0.08), transparent 32%),
    radial-gradient(circle at 86% 0%, rgba(178, 129, 67, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 252, 0.96), rgba(244, 247, 240, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 18px 44px rgba(24, 35, 29, 0.15);
}

.bottom-nav button {
  --nav-accent: #2f6f4f;
  --nav-soft: #e9f3e8;
  min-width: 78px;
  min-height: 54px;
  color: #46524a;
  border-radius: 16px;
  font-size: 0.69rem;
  letter-spacing: -0.01em;
}

.bottom-nav button[data-mode="home"] { --nav-accent: #4b7d3c; --nav-soft: #edf6e5; }
.bottom-nav button[data-mode="drugs"] { --nav-accent: #9b6a2f; --nav-soft: #fff3df; }
.bottom-nav button[data-mode="interact"] { --nav-accent: #b26b3e; --nav-soft: #fff0e7; }
.bottom-nav button[data-mode="compare"] { --nav-accent: #476a8f; --nav-soft: #e9f0fa; }
.bottom-nav button[data-mode="dx"] { --nav-accent: #8a5a9e; --nav-soft: #f3eafa; }
.bottom-nav button[data-mode="labs"] { --nav-accent: #2d7d78; --nav-soft: #e8f6f4; }
.bottom-nav button[data-mode="algorithms"] { --nav-accent: #5f7891; --nav-soft: #edf3f7; }
.bottom-nav button[data-mode="workup"] { --nav-accent: #315f4a; --nav-soft: #e8f3ed; }
.bottom-nav button[data-mode="calculators"] { --nav-accent: #8a6b2d; --nav-soft: #faf1d9; }
.bottom-nav button[data-mode="mylist"] { --nav-accent: #b48a2b; --nav-soft: #fff6d9; }

.bottom-nav .nav-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: var(--nav-accent);
  border-color: color-mix(in srgb, var(--nav-accent) 22%, #ffffff);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), var(--nav-soft));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.86),
    0 6px 14px rgba(33, 45, 38, 0.07);
  filter: saturate(0.9);
}

.bottom-nav .nav-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav button:hover {
  color: #17271d;
  background: color-mix(in srgb, var(--nav-soft) 78%, #ffffff);
}

.bottom-nav button.active {
  color: #16251d;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--nav-accent) 20%, transparent), transparent 48%),
    linear-gradient(180deg, color-mix(in srgb, var(--nav-soft) 86%, #ffffff), rgba(255,255,255,0.84));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--nav-accent) 18%, transparent),
    0 8px 18px rgba(37, 52, 42, 0.11);
}

.bottom-nav button.active::before {
  bottom: 5px;
  width: 28px;
  background: linear-gradient(90deg, var(--nav-accent), color-mix(in srgb, var(--nav-accent) 60%, #d4b45d));
}

.bottom-nav button.active .nav-icon {
  color: #fffdf8;
  border-color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--nav-accent) 76%, #ffffff), var(--nav-accent));
  box-shadow: 0 7px 16px color-mix(in srgb, var(--nav-accent) 25%, transparent);
}

@media (max-width: 1240px) {
  .home-workspace {
    grid-template-columns: 1fr;
  }

  .home-right-rail {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
    padding-bottom: 0;
  }
}

/* 2026-05-29 color direction: SynapseRx-adjacent clinical blues with teal,
   gold, and coral accents. This keeps the FamCare identity but gets away from
   the all-green read. */
:root {
  --fc-navy: #102640;
  --fc-navy-2: #18395a;
  --fc-blue: #246fa8;
  --fc-blue-soft: #e9f3fb;
  --fc-cyan: #38b6c9;
  --fc-teal: #278b83;
  --fc-mint: #dff5ed;
  --fc-gold: #d3a842;
  --fc-coral: #d97054;
  --fc-plum: #6b5ab7;
  --fc-ink: #14243a;
  --fc-muted: #607186;
  --fc-line: rgba(34, 72, 105, 0.16);
  --fc-surface: rgba(255, 255, 255, 0.92);
  --fc-shadow: 0 24px 56px rgba(16, 38, 64, 0.14);
}

body {
  color: var(--fc-ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 182, 201, 0.12), transparent 31%),
    radial-gradient(circle at 84% 18%, rgba(36, 111, 168, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(245, 250, 253, 0.88), rgba(249, 252, 250, 0.9)),
    url("assets/app-background.png") center top / cover fixed no-repeat;
}

body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.38) 38%, rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at 50% 18%, rgba(36, 111, 168, 0.08), transparent 42%);
}

.header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 12% 0%, rgba(56, 182, 201, 0.26), transparent 26%),
    radial-gradient(circle at 82% 20%, rgba(211, 168, 66, 0.12), transparent 25%),
    linear-gradient(110deg, #0d2138, #153451 54%, #214b58);
  box-shadow: 0 16px 36px rgba(12, 31, 52, 0.18);
}

.brand-lockup {
  color: #f8fbff;
}

.header .brand-copy strong {
  color: #f8fbff;
}

.header .brand-copy small {
  color: rgba(237, 247, 255, 0.86);
}

.brand-copy small,
.drug-count {
  color: rgba(237, 247, 255, 0.78);
}

.search-wrap {
  border-color: rgba(159, 202, 225, 0.28);
  background: rgba(9, 27, 47, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 26px rgba(9, 24, 43, 0.18);
}

.search-wrap input,
.command-card .hero-search,
.hero-search input {
  color: var(--fc-ink);
  background: rgba(255, 255, 255, 0.97);
}

#search-button,
.text-btn.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, var(--fc-cyan), var(--fc-blue));
  box-shadow: 0 10px 20px rgba(18, 69, 108, 0.22);
}

.text-btn {
  color: rgba(244, 249, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.tabs {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(233, 243, 251, 0.86));
  border-bottom-color: rgba(69, 126, 165, 0.2);
}

.home-workspace .hero-card.command-card {
  background:
    radial-gradient(circle at 50% 48%, rgba(9, 29, 49, 0.78) 0%, rgba(9, 29, 49, 0.58) 44%, rgba(9, 29, 49, 0.3) 74%),
    linear-gradient(90deg, rgba(8, 30, 54, 0.62), rgba(18, 71, 101, 0.22) 52%, rgba(7, 24, 42, 0.5)),
    url("assets/hero-primary-care-bg.png") center center / cover no-repeat;
  border-color: rgba(172, 216, 232, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 28px 60px rgba(10, 34, 55, 0.28);
}

.command-card .brand-hero-lockup {
  border-color: rgba(205, 230, 241, 0.28);
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 182, 201, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(10, 36, 58, 0.26));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.brand-hero-lockup span {
  color: #cdebf4;
}

.brand-hero-lockup p {
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
}

.brand-hero-lockup small {
  color: rgba(241, 248, 252, 0.84);
}

.command-card .hero-search {
  border-color: rgba(202, 225, 237, 0.42);
  box-shadow: 0 20px 40px rgba(5, 22, 39, 0.24);
}

.entry-lanes {
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 760px);
  max-width: 760px;
  gap: 12px;
  margin: 0 auto 4px;
}

.entry-lanes button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: center;
  min-height: 94px;
  padding: 13px 15px;
  border: 1px solid rgba(202, 225, 237, 0.32);
  border-radius: 18px;
  color: #f7fbff;
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 182, 201, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(8, 30, 54, 0.24));
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 34px rgba(5, 22, 39, 0.18);
}

.entry-lanes button.primary-lane {
  border-color: rgba(83, 209, 226, 0.48);
  background:
    radial-gradient(circle at 100% 0%, rgba(83, 209, 226, 0.24), transparent 36%),
    linear-gradient(135deg, rgba(36, 111, 168, 0.28), rgba(255, 255, 255, 0.16));
}

.entry-lanes button:hover {
  transform: translateY(-1px);
  border-color: rgba(83, 209, 226, 0.68);
}

.entry-lanes .feature-icon {
  grid-row: span 3;
  width: 42px;
  height: 42px;
  color: #0f4667;
  background: linear-gradient(180deg, #ffffff, #dff2fb);
}

.entry-lanes span,
.entry-lanes strong,
.entry-lanes small {
  display: block;
}

.entry-lanes span {
  color: #bfe5f1;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.entry-lanes strong {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.05;
}

.entry-lanes small {
  color: rgba(241, 248, 252, 0.82);
  font-size: 0.76rem;
  line-height: 1.22;
}

.symptom-starters {
  z-index: 7;
  display: flex;
  width: min(100%, 760px);
  max-width: 760px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 2px auto 4px;
}

.symptom-starters > span {
  color: rgba(239, 247, 251, 0.8);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.symptom-starters button {
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(198, 225, 239, 0.34);
  border-radius: 999px;
  color: #f7fbff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 0.74rem;
  font-weight: 850;
  cursor: pointer;
}

.symptom-starters button:hover {
  transform: translateY(-1px);
  border-color: rgba(71, 196, 216, 0.7);
  background:
    linear-gradient(180deg, rgba(56, 182, 201, 0.28), rgba(36, 111, 168, 0.18));
}

.command-flow button {
  border-color: rgba(191, 222, 236, 0.28);
}

.command-flow button span {
  color: var(--fc-navy);
  background: linear-gradient(180deg, #ffffff, #dff2fb);
}

.command-flow button strong,
.command-flow button small {
  color: #f8fbff;
}

.quick-actions button {
  border-color: rgba(203, 224, 236, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(235, 246, 250, 0.86));
  color: var(--fc-ink);
}

.quick-actions button:nth-child(1) .feature-icon { color: var(--fc-teal); }
.quick-actions button:nth-child(2) .feature-icon { color: var(--fc-coral); }
.quick-actions button:nth-child(3) .feature-icon { color: var(--fc-plum); }

.home-right-rail section,
.home-signal-strip section,
.clinical-pulse button,
.guide-card,
.info-section,
.drug-profile,
.compare-panel,
.interaction-panel,
.calculator-card,
.workup-builder,
.pathway-panel,
.lab-card {
  border-color: var(--fc-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 253, 0.9));
  box-shadow: var(--fc-shadow);
}

.home-right-rail h3,
.section-title,
.clinical-pulse strong,
.home-signal-strip strong,
.guide-card strong {
  color: var(--fc-navy);
}

.home-right-rail p,
.home-start-steps span,
.clinical-pulse small,
.home-signal-strip small,
.guide-card small {
  color: var(--fc-muted);
}

.home-start-steps li::before {
  background: linear-gradient(180deg, var(--fc-cyan), var(--fc-blue));
}

.home-right-rail section > button,
.home-alert-list button,
.clinical-pulse button:hover,
.guide-card:hover {
  border-color: rgba(56, 182, 201, 0.28);
}

.home-right-rail section > button::after {
  color: var(--fc-blue);
}

.home-alert-list button:nth-child(1) { border-left: 4px solid var(--fc-plum); }
.home-alert-list button:nth-child(2) { border-left: 4px solid var(--fc-teal); }
.home-alert-list button:nth-child(3) { border-left: 4px solid var(--fc-blue); }
.home-alert-list button:nth-child(4) { border-left: 4px solid var(--fc-gold); }

.clinical-pulse button:nth-child(1) { --tile-accent: var(--fc-teal); }
.clinical-pulse button:nth-child(2) { --tile-accent: var(--fc-coral); }
.clinical-pulse button:nth-child(3) { --tile-accent: var(--fc-plum); }
.clinical-pulse button:nth-child(4) { --tile-accent: #7b5fbd; }
.clinical-pulse button:nth-child(5) { --tile-accent: var(--fc-cyan); }
.clinical-pulse button:nth-child(6) { --tile-accent: var(--fc-gold); }

.clinical-pulse button {
  background:
    radial-gradient(circle at 18px 18px, color-mix(in srgb, var(--tile-accent, var(--fc-blue)) 18%, transparent), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 252, 0.9));
}

.clinical-pulse .feature-icon,
.guide-card .feature-icon,
.home-signal-strip .feature-icon {
  color: var(--tile-accent, var(--fc-blue));
  background:
    linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--tile-accent, var(--fc-blue)) 12%, #eef7fb));
}

.class-card {
  background:
    radial-gradient(circle at 85% 8%, color-mix(in srgb, var(--class-border) 18%, transparent), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--class-bg) 56%, #f8fbff));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 24px rgba(23, 55, 82, 0.08);
}

.system-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-workspace .system-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.system-card {
  min-height: 154px;
  padding: 14px 14px 12px;
}

.system-card .class-visual {
  width: 38px;
  height: 38px;
  margin-bottom: 9px;
}

.system-card strong {
  font-size: 1.04rem;
}

.system-card small {
  min-height: 3.7em;
}

.system-card .class-bar {
  margin-top: 10px;
}

.system-overview {
  display: grid;
  gap: 14px;
  padding-bottom: 120px;
}

.system-overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  overflow: hidden;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--class-border) 44%, rgba(71, 95, 118, 0.22));
  border-radius: 24px;
  color: color-mix(in srgb, var(--class-text) 74%, var(--fc-navy));
  background:
    radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--class-border) 20%, transparent), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--class-bg) 52%, #f8fbff));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 20px 42px rgba(23, 55, 82, 0.1);
}

.system-overview-hero .class-visual {
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
}

.system-overview-hero .system-eyebrow {
  display: block;
  color: color-mix(in srgb, var(--class-text) 76%, var(--fc-slate));
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-overview-hero h2 {
  margin: 5px 0 6px;
  color: var(--fc-navy);
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.system-overview-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--pro-muted);
  font-weight: 750;
  line-height: 1.35;
}

.system-overview-hero dl {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  gap: 9px;
  margin: 0;
}

.system-overview-hero dl div {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--class-border) 38%, rgba(255, 255, 255, 0.72));
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.system-overview-hero dt {
  color: var(--pro-muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.system-overview-hero dd {
  margin: 3px 0 0;
  color: var(--fc-navy);
  font-size: 1.35rem;
  font-weight: 950;
}

.system-flow-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.system-flow-row button,
.system-overview-grid article {
  border: 1px solid rgba(64, 101, 130, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 28px rgba(23, 55, 82, 0.08);
}

.system-flow-row button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  padding: 14px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.system-flow-row button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--class-border) 48%, rgba(64, 101, 130, 0.18));
  box-shadow: 0 18px 34px rgba(23, 55, 82, 0.12);
}

.system-flow-row span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  color: var(--class-text);
  background: color-mix(in srgb, var(--class-bg) 78%, #ffffff);
  font-weight: 950;
}

.system-flow-row strong {
  color: var(--fc-navy);
  font-size: 0.92rem;
}

.system-flow-row small {
  color: var(--pro-muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.system-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.system-overview-grid article {
  padding: 16px;
}

.system-overview-grid article.wide {
  grid-column: 1 / -1;
}

.system-overview-grid h3 {
  margin: 0 0 12px;
  color: var(--fc-navy);
  font-size: 1.02rem;
}

.system-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.system-section-head span {
  display: block;
  margin-bottom: 4px;
  color: color-mix(in srgb, var(--class-text) 72%, var(--fc-slate));
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-section-head h3 {
  margin: 0;
}

.system-section-head > button {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--class-border) 44%, rgba(74, 104, 130, 0.2));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: color-mix(in srgb, var(--class-text) 70%, var(--fc-navy));
  font-size: 0.76rem;
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(23, 55, 82, 0.08);
}

.system-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.system-link-grid button,
.system-med-row button {
  min-height: 70px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--class-border) 34%, rgba(74, 104, 130, 0.18));
  border-radius: 15px;
  background:
    radial-gradient(circle at 96% 0%, color-mix(in srgb, var(--class-border) 14%, transparent), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.9));
  color: var(--fc-navy);
  text-align: left;
}

.system-link-grid button.active {
  border-color: color-mix(in srgb, var(--class-border) 68%, rgba(74, 104, 130, 0.18));
  background:
    radial-gradient(circle at 96% 0%, color-mix(in srgb, var(--class-border) 22%, transparent), transparent 38%),
    linear-gradient(180deg, color-mix(in srgb, var(--class-bg) 70%, #ffffff), rgba(255, 255, 255, 0.95));
  box-shadow:
    inset 4px 0 0 var(--class-border),
    0 12px 22px rgba(23, 55, 82, 0.1);
}

.system-link-grid.clinical button {
  border-left-width: 4px;
}

.system-link-grid.guideline button {
  min-height: 84px;
  border-color: color-mix(in srgb, var(--class-border) 54%, rgba(50, 78, 99, 0.18));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--class-bg) 62%, #ffffff), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at 94% 10%, color-mix(in srgb, var(--class-border) 22%, transparent), transparent 42%);
  box-shadow:
    inset 4px 0 0 color-mix(in srgb, var(--class-border) 80%, var(--fc-navy)),
    0 12px 24px rgba(23, 55, 82, 0.08);
}

.system-link-grid.guideline strong::before {
  content: "Guideline";
  display: inline-block;
  margin: 0 8px 4px 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--class-bg) 70%, #ffffff);
  color: color-mix(in srgb, var(--class-text) 76%, var(--fc-navy));
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-link-grid strong,
.system-link-grid small,
.system-med-row strong,
.system-med-row small {
  display: block;
}

.system-link-grid strong,
.system-med-row strong {
  font-size: 0.84rem;
  line-height: 1.18;
}

.system-link-grid small,
.system-med-row small {
  margin-top: 4px;
  color: var(--pro-muted);
  font-size: 0.7rem;
  line-height: 1.25;
}

.system-med-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.class-card strong,
.class-card em {
  color: color-mix(in srgb, var(--class-text) 78%, var(--fc-navy));
}

.class-bar {
  background: rgba(34, 72, 105, 0.11);
}

.class-bar i {
  background: linear-gradient(90deg, var(--class-border), var(--fc-cyan));
}

.bottom-nav {
  border-color: rgba(54, 101, 134, 0.2);
  background:
    radial-gradient(circle at 18% 0%, rgba(56, 182, 201, 0.16), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(211, 168, 66, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(235, 244, 250, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 18px 46px rgba(12, 31, 52, 0.16);
}

.bottom-nav button {
  color: #52657a;
}

.bottom-nav button[data-mode="home"] { --nav-accent: #246fa8; --nav-soft: #e8f3fb; }
.bottom-nav button[data-mode="systems"] { --nav-accent: #2f8f73; --nav-soft: #e6f5ef; }
.bottom-nav button[data-mode="drugs"] { --nav-accent: #278b83; --nav-soft: #e7f6f3; }
.bottom-nav button[data-mode="interact"] { --nav-accent: #d97054; --nav-soft: #fff0eb; }
.bottom-nav button[data-mode="compare"] { --nav-accent: #596bc5; --nav-soft: #eef0ff; }
.bottom-nav button[data-mode="dx"] { --nav-accent: #7a5db2; --nav-soft: #f2ecfb; }
.bottom-nav button[data-mode="labs"] { --nav-accent: #38a6b8; --nav-soft: #e8f7fa; }
.bottom-nav button[data-mode="algorithms"] { --nav-accent: #315f86; --nav-soft: #e8f1f8; }
.bottom-nav button[data-mode="workup"] { --nav-accent: #1f7a9a; --nav-soft: #e7f4f8; }
.bottom-nav button[data-mode="calculators"] { --nav-accent: #d3a842; --nav-soft: #fff6dc; }
.bottom-nav button[data-mode="mylist"] { --nav-accent: #b477ba; --nav-soft: #f8ecfb; }

.bottom-nav button:hover {
  color: var(--fc-navy);
}

.bottom-nav button.active {
  color: var(--fc-navy);
}

.home-search-results {
  border-color: rgba(84, 143, 181, 0.24);
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 24px 48px rgba(16, 38, 64, 0.18);
}

.home-search-results button:hover {
  background: var(--fc-blue-soft);
}

.home-search-results strong {
  color: var(--fc-navy);
}

.home-search-results span,
.home-search-results .search-empty {
  color: var(--fc-muted);
}

.profile-hero,
.clinical-profile .profile-hero,
.workup-builder-head {
  border-color: rgba(166, 204, 225, 0.26);
  background:
    radial-gradient(circle at 86% 16%, rgba(56, 182, 201, 0.18), transparent 34%),
    radial-gradient(circle at 14% 0%, rgba(211, 168, 66, 0.1), transparent 30%),
    linear-gradient(120deg, rgba(15, 40, 68, 0.92), rgba(31, 93, 132, 0.74)),
    url("assets/app-background.png") center / cover no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 38px rgba(12, 31, 52, 0.13);
}

.profile-hero span,
.profile-hero h2,
.profile-hero p,
.workup-builder-head span,
.workup-builder-head h2,
.workup-builder-head p {
  color: #f7fbff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

.workup-builder-head button {
  color: var(--fc-navy);
  border-color: rgba(255, 255, 255, 0.56);
  background: linear-gradient(180deg, #ffffff, #e9f3fb);
}

.sidebar-item.clinical-side,
.sidebar-item {
  border-color: rgba(70, 128, 167, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 248, 252, 0.84));
}

.sidebar-item.clinical-side.active,
.sidebar-item.active {
  color: #fff;
  border-color: rgba(66, 181, 202, 0.54);
  background:
    radial-gradient(circle at 86% 12%, rgba(56, 182, 201, 0.22), transparent 36%),
    linear-gradient(135deg, var(--fc-navy), var(--fc-blue));
  box-shadow: 0 12px 24px rgba(19, 64, 103, 0.18);
}

.sidebar-item.active strong,
.sidebar-item.active span {
  color: #fff;
}

.hpi-box textarea {
  border-color: rgba(77, 139, 180, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.symptom-chip-row button {
  color: var(--fc-navy);
  border-color: rgba(77, 139, 180, 0.23);
  background: linear-gradient(180deg, #ffffff, #f0f7fb);
}

.symptom-chip-row button.active {
  color: #ffffff;
  border-color: rgba(56, 182, 201, 0.7);
  background: linear-gradient(180deg, var(--fc-cyan), var(--fc-blue));
}

.workup-match-strip button,
.workup-priority,
.workup-card {
  border-color: rgba(54, 101, 134, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 249, 252, 0.9));
}

.workup-match-empty {
  display: grid;
  align-content: center;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px dashed rgba(84, 143, 181, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.workup-match-empty strong,
.workup-match-empty small {
  display: block;
}

.workup-match-empty strong {
  color: var(--fc-navy);
  font-size: 0.86rem;
}

.workup-match-empty small {
  margin-top: 4px;
  color: var(--fc-muted);
  font-size: 0.72rem;
}

.workup-match-strip button:first-child,
.workup-priority {
  border-color: rgba(56, 182, 201, 0.28);
  background:
    radial-gradient(circle at 94% 10%, rgba(56, 182, 201, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(235, 246, 250, 0.93));
}

.workup-card > span {
  background: linear-gradient(180deg, var(--fc-cyan), var(--fc-blue));
}

.workup-card.danger > span {
  background: linear-gradient(180deg, var(--fc-coral), #b94d3b);
}

.workup-priority span,
.workup-card h3,
.workup-match-strip strong {
  color: var(--fc-navy);
}

.workup-priority p,
.workup-card li,
.workup-match-strip small {
  color: var(--fc-muted);
}

.match-strip-label {
  display: grid;
  align-content: center;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(54, 101, 134, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(16, 38, 64, 0.96), rgba(31, 93, 132, 0.88));
  box-shadow: 0 12px 22px rgba(12, 31, 52, 0.13);
}

.match-strip-label span,
.match-strip-label strong {
  display: block;
  color: #f7fbff;
}

.match-strip-label span {
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.78;
}

.match-strip-label strong {
  margin-top: 3px;
  font-size: 0.9rem;
}

.workup-match-strip {
  grid-template-columns: 1.05fr repeat(3, minmax(0, 1fr));
}

.workup-match-strip button.active {
  border-color: rgba(56, 182, 201, 0.5);
  background:
    radial-gradient(circle at 94% 12%, rgba(56, 182, 201, 0.2), transparent 34%),
    linear-gradient(180deg, #ffffff, #eaf7fb);
  box-shadow: inset 0 0 0 1px rgba(56, 182, 201, 0.18);
}

.workup-action-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(56, 182, 201, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 182, 201, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(237, 247, 252, 0.92));
  box-shadow: 0 16px 32px rgba(12, 31, 52, 0.08);
}

.workup-action-bar span {
  display: block;
  color: var(--fc-blue);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workup-action-bar strong {
  display: block;
  margin-top: 3px;
  color: var(--fc-navy);
  font-size: 1.05rem;
}

.workup-action-bar p {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--fc-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.workup-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.workup-action-buttons button,
.workup-lab-links button,
.workup-lab-links span {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(77, 139, 180, 0.24);
  border-radius: 999px;
  color: var(--fc-navy);
  background: linear-gradient(180deg, #ffffff, #eef7fb);
  font-size: 0.77rem;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(16, 38, 64, 0.06);
}

.workup-action-buttons button:first-child {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(180deg, var(--fc-cyan), var(--fc-blue));
}

.workup-flow-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.flow-step {
  position: relative;
  overflow: hidden;
  min-height: 206px;
  padding: 13px 13px 12px;
  border: 1px solid rgba(54, 101, 134, 0.15);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 182, 201, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 253, 0.92));
  box-shadow: 0 12px 24px rgba(12, 31, 52, 0.07);
}

.flow-step.danger {
  border-color: rgba(217, 112, 84, 0.22);
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 112, 84, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 247, 244, 0.92));
}

.flow-step > span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--fc-cyan), var(--fc-blue));
  font-weight: 950;
}

.flow-step.danger > span {
  background: linear-gradient(180deg, var(--fc-coral), #b94d3b);
}

.flow-step strong {
  display: block;
  color: var(--fc-navy);
  font-size: 0.95rem;
}

.flow-step p {
  margin: 5px 0 8px;
  color: var(--fc-muted);
  font-size: 0.76rem;
  line-height: 1.32;
}

.flow-step ul,
.flow-step ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-step li {
  color: #263d55;
  font-size: 0.72rem;
  line-height: 1.28;
}

.flow-step li strong {
  display: inline;
  margin-right: 4px;
  font-size: 0.74rem;
}

.flow-step li span {
  display: block;
  margin-top: 2px;
  color: var(--fc-muted);
}

.flow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.flow-tags b {
  padding: 5px 7px;
  border: 1px solid rgba(56, 182, 201, 0.23);
  border-radius: 999px;
  color: var(--fc-navy);
  background: #ffffff;
  font-size: 0.69rem;
}

/* Home cleanup and production context pass */
.utility-btn {
  position: relative;
  z-index: 42;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(203, 224, 236, 0.42);
  border-radius: 999px;
  color: #eef8ff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.06));
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.utility-btn:hover {
  border-color: rgba(83, 209, 226, 0.62);
  background:
    linear-gradient(180deg, rgba(83, 209, 226, 0.22), rgba(255, 255, 255, 0.08));
}

.header-actions {
  position: relative;
  z-index: 42;
}

.entry-lanes {
  width: min(100%, 680px);
  max-width: 680px;
  gap: 10px;
  margin-bottom: 8px;
}

.entry-lanes button {
  min-height: 76px;
  padding: 10px 12px;
  border-radius: 16px;
}

.entry-lanes .feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.entry-lanes span {
  font-size: 0.62rem;
}

.entry-lanes strong {
  font-size: 0.9rem;
}

.entry-lanes small {
  font-size: 0.71rem;
}

.command-card .quick-actions {
  width: min(100%, 600px);
  max-width: 600px;
  gap: 9px;
  margin-inline: auto;
}

.command-card .quick-actions button,
.quick-actions button {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 68px;
  padding: 8px 9px;
  text-align: center;
}

.command-card .quick-actions .feature-icon,
.quick-actions .feature-icon {
  width: 31px;
  height: 31px;
  margin: 0 auto 3px;
  border-radius: 11px;
}

.command-card .quick-actions strong,
.quick-actions strong {
  font-size: 0.82rem;
  line-height: 1.05;
}

.command-card .quick-actions small,
.quick-actions small {
  font-size: 0.66rem;
  line-height: 1.1;
}

.rail-button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-right-rail .rail-button-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(203, 224, 236, 0.54);
  border-radius: 12px;
  color: var(--fc-navy);
  background: #ffffff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 4px 10px rgba(9, 44, 70, 0.08);
}

.home-right-rail .rail-button-row button::after {
  content: none;
}

.home-help-card {
  border-color: rgba(83, 209, 226, 0.24) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(83, 209, 226, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 252, 0.98)) !important;
}

.legal-callout {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 13px 14px;
  border: 1px solid rgba(224, 174, 55, 0.42);
  border-left: 5px solid #d69a1f;
  border-radius: 14px;
  color: #583f0d;
  background: #fff8e4;
}

.legal-callout strong,
.legal-callout span {
  display: block;
}

.legal-callout strong {
  font-size: 0.82rem;
}

.legal-callout span {
  font-size: 0.78rem;
  line-height: 1.4;
}

.help-flow,
.source-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}

.help-flow section,
.source-list section {
  padding: 12px;
  border: 1px solid rgba(203, 224, 236, 0.7);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff, #f5fafc);
}

.help-flow section {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 4px 10px;
  align-items: start;
}

.help-flow b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(180deg, #2a8fb8, #176583);
  font-size: 0.78rem;
}

.help-flow strong,
.help-flow span,
.source-list strong,
.source-list span {
  display: block;
}

.help-flow strong,
.source-list strong {
  color: var(--fc-ink);
  font-size: 0.84rem;
}

.help-flow span,
.source-list span {
  margin-top: 3px;
  color: var(--fc-muted);
  font-size: 0.78rem;
  line-height: 1.38;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.dialog-actions button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(23, 101, 131, 0.32);
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(180deg, #1c7899, #145a75);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(12, 52, 69, 0.16);
}

.detail-dialog[data-locked="true"]::backdrop {
  background: rgba(4, 14, 24, 0.62);
  backdrop-filter: blur(5px);
}

.legal-gate {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.18), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(45, 125, 89, 0.18), transparent 30%),
    rgba(8, 19, 31, 0.76);
  backdrop-filter: blur(8px);
}

.legal-gate-card {
  width: min(820px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  color: #173147;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.94));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.legal-gate-head span,
.legal-gate-scroll h2 {
  color: #256f59;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 950;
}

.legal-gate-head h1 {
  margin: 6px 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.legal-gate-head p,
.legal-gate-scroll p,
.legal-page-shell p {
  color: #4b6072;
  line-height: 1.55;
}

.legal-gate-scroll {
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(37, 111, 89, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.legal-gate-scroll section + section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(23, 49, 71, 0.1);
}

.legal-gate-scroll a {
  color: #165f91;
  font-weight: 900;
}

.legal-gate-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid rgba(37, 111, 89, 0.16);
  border-radius: 16px;
  background: #f6fbf6;
  color: #173147;
  font-weight: 850;
}

.legal-gate-check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #256f59;
}

.legal-gate-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.legal-gate-actions small {
  color: #637487;
  font-weight: 800;
}

.legal-gate-actions button,
.legal-back,
.utility-link {
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(23, 101, 131, 0.25);
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, #1d6f97, #154f71);
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(14, 48, 69, 0.18);
}

.legal-gate-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.legal-page {
  min-height: 100vh;
  padding: 32px;
  background: #f4f8f2 url("assets/app-background.png") center/cover fixed no-repeat;
}

.legal-page-shell {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid rgba(25, 80, 110, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 26px 80px rgba(33, 52, 45, 0.16);
}

.legal-page-shell h1 {
  margin: 18px 0 6px;
  color: var(--fc-ink);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.legal-page-shell h2,
.source-group h3 {
  color: var(--fc-ink);
}

.legal-updated {
  font-weight: 850;
}

.legal-page-shell section + section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(23, 49, 71, 0.1);
}

.source-group {
  margin-top: 24px;
}

.source-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(23, 101, 131, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
}

.source-card + .source-card {
  margin-top: 10px;
}

.source-card p {
  margin: 6px 0 0;
}

.source-card a {
  flex: 0 0 auto;
  color: #165f91;
  font-weight: 950;
  text-decoration: none;
}

@media (max-width: 760px) {
  .profile-hero-actions {
    justify-content: flex-start;
  }

  .screen-use-guide,
  .quick-answer-card {
    grid-template-columns: 1fr;
  }

  .entry-lanes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1160px) {
  .workup-flow-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workup-match-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .workup-action-bar,
  .workup-flow-panel,
  .workup-match-strip {
    grid-template-columns: 1fr;
  }

  .workup-action-buttons {
    justify-content: flex-start;
  }
}

/* Phase 9 product polish: clinical workstation finish.
   Keep this as the final visual override layer so future redesign work has one clear handoff point. */
:root {
  --fc-navy: #102640;
  --fc-blue: #2b74a8;
  --fc-teal: #1f8f89;
  --fc-sage: #6f8f63;
  --fc-amber: #d8a93d;
  --fc-plum: #8c6bb1;
  --fc-ink: #16283a;
  --fc-muted: #5f7082;
  --fc-line: rgba(35, 75, 102, 0.16);
  --fc-panel: rgba(255, 255, 255, 0.88);
  --fc-glass: rgba(255, 255, 255, 0.72);
}

body {
  color: var(--fc-ink);
  background:
    linear-gradient(180deg, rgba(250, 252, 250, 0.88), rgba(239, 247, 250, 0.92)),
    url("assets/app-background.png") center / cover fixed no-repeat;
}

.header {
  background:
    radial-gradient(circle at 12% -60%, rgba(72, 151, 187, 0.38), transparent 34%),
    radial-gradient(circle at 86% -35%, rgba(216, 169, 61, 0.24), transparent 30%),
    linear-gradient(135deg, #101f2e 0%, #16304a 50%, #1f4e62 100%);
  box-shadow: 0 12px 30px rgba(12, 33, 50, 0.22);
}

.header-top {
  min-height: 70px;
  padding: 10px clamp(18px, 3vw, 40px) 7px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 15px;
}

.brand-lockup strong {
  font-size: 1.36rem;
}

.brand-lockup small,
.drug-count {
  color: #d5e9f4;
}

.search-wrap {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  border-color: rgba(205, 226, 236, 0.76);
  background: rgba(255, 255, 255, 0.94);
}

.history-btn,
#search-button {
  border-color: #c9dce9;
  color: var(--fc-navy);
  background: linear-gradient(180deg, #ffffff, #f0f6fa);
}

#search-button {
  color: #fff;
  background: linear-gradient(180deg, #2b74a8, #1a567d);
  border-color: rgba(43, 116, 168, 0.42);
}

#search-input,
.hero-search input {
  color: var(--fc-ink);
}

.content {
  max-width: 1720px;
}

.home-mode .content {
  width: min(1480px, calc(100% - 28px));
  max-width: 1480px;
}

.home-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: clamp(16px, 2vw, 28px);
}

.home-center {
  min-width: 0;
}

.hero-card.command-card,
.home-workspace .hero-card.command-card {
  min-height: 500px;
  display: grid;
  place-items: center;
  padding: clamp(28px, 4vw, 54px);
  border: 1px solid rgba(207, 229, 238, 0.30);
  background:
    linear-gradient(90deg, rgba(9, 22, 34, 0.58), rgba(9, 22, 34, 0.34)),
    url("assets/hero-primary-care-bg.png") center center / cover no-repeat;
  box-shadow: 0 30px 90px rgba(13, 42, 61, 0.30);
}

.command-card .hero-brand.hero-wordmark,
.command-card .hero-search,
.entry-lanes,
.quick-actions {
  width: min(760px, 100%);
}

.command-card .brand-hero-lockup {
  justify-content: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(13, 28, 42, 0.56);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(10px);
  text-align: left;
}

.command-card .brand-hero-lockup img {
  flex: 0 0 auto;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.94);
}

.command-card .brand-hero-lockup span {
  color: #f4ddb2;
}

.command-card .brand-hero-lockup p {
  color: #ffffff;
  font-size: clamp(2.4rem, 5vw, 4.3rem);
}

.command-card .brand-hero-lockup small {
  color: #d8edf5;
}

.entry-lanes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.entry-lanes button,
.quick-actions button {
  min-height: 112px;
  border: 1px solid rgba(216, 231, 238, 0.80);
  border-bottom: 4px solid var(--lane-accent, var(--fc-blue));
  border-radius: 18px;
  color: var(--fc-ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 250, 0.90));
  box-shadow: 0 15px 26px rgba(10, 32, 45, 0.16);
}

.entry-lanes button:nth-child(1) { --lane-accent: var(--fc-blue); }
.entry-lanes button:nth-child(2) { --lane-accent: var(--fc-teal); }
.entry-lanes button:nth-child(3) { --lane-accent: var(--fc-amber); }
.entry-lanes button:nth-child(4) { --lane-accent: var(--fc-plum); }

.quick-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-actions button {
  min-height: 92px;
  border-bottom-width: 5px;
}

.home-right-rail section,
.home-signal-strip section,
.guide-card,
.class-card,
.tool-panel,
.drug-profile,
.calculator-card,
.my-list-card,
.empty-state,
.info-section {
  border-color: var(--fc-line);
  background:
    radial-gradient(circle at 100% 0%, rgba(43, 116, 168, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(249, 252, 252, 0.90));
  box-shadow: 0 14px 34px rgba(21, 50, 67, 0.09);
}

.home-right-rail h3,
.section-title,
.tool-head h2,
.library-hero h2,
.calculator-card h3,
.my-list-open strong {
  color: var(--fc-ink);
}

.home-right-rail section > button,
.home-alert-list button,
.home-recent-list button,
.my-list-actions button,
.tool-head-actions button {
  border-color: rgba(43, 116, 168, 0.22);
  color: var(--fc-navy);
  background: linear-gradient(180deg, #ffffff, #f3f8fb);
}

.home-alert-list button:nth-child(1) { border-left: 4px solid var(--fc-blue); }
.home-alert-list button:nth-child(2) { border-left: 4px solid var(--fc-teal); }
.home-alert-list button:nth-child(3) { border-left: 4px solid var(--fc-navy); }
.home-alert-list button:nth-child(4) { border-left: 4px solid var(--fc-amber); }

.system-card {
  min-height: 140px;
}

.system-card .class-visual {
  color: var(--class-text);
  background: rgba(255, 255, 255, 0.74);
}

.profile-hero,
.clinical-profile .profile-hero,
.library-hero {
  border: 1px solid rgba(206, 225, 235, 0.22);
  background:
    radial-gradient(circle at 92% 18%, rgba(244, 221, 178, 0.34), transparent 22%),
    linear-gradient(135deg, #11263b 0%, #1c516f 55%, #2c7774 100%);
  box-shadow: 0 22px 58px rgba(18, 55, 76, 0.22);
}

.profile-hero span,
.profile-hero h2,
.profile-hero p,
.clinical-profile .profile-hero span,
.clinical-profile .profile-hero h2,
.clinical-profile .profile-hero p,
.library-hero span,
.library-hero h2,
.library-hero p {
  color: #ffffff;
}

.algorithm-decision-map,
.algorithm-board {
  gap: 12px;
}

.algorithm-phase,
.algorithm-decision-map article {
  border-top: 5px solid var(--phase-accent, var(--fc-blue));
}

.algorithm-phase:nth-child(1),
.algorithm-decision-map article.start { --phase-accent: var(--fc-blue); }
.algorithm-phase:nth-child(2),
.algorithm-decision-map article.decide { --phase-accent: var(--fc-teal); }
.algorithm-phase:nth-child(3),
.algorithm-decision-map article.treat { --phase-accent: var(--fc-amber); }
.algorithm-phase:nth-child(4),
.algorithm-decision-map article.stop { --phase-accent: #c65f5f; }

.drug-select-empty {
  min-height: 360px;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(248, 252, 253, 0.90)),
    url("assets/app-background.png") center / cover no-repeat;
}

.bottom-nav {
  border: 1px solid rgba(195, 216, 228, 0.72);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(18, 45, 63, 0.20);
}

.bottom-nav button {
  color: #3e5669;
  background: transparent;
}

.bottom-nav button:hover {
  background: var(--nav-soft);
}

.bottom-nav button.active {
  color: var(--nav-accent);
  background: linear-gradient(180deg, #ffffff, var(--nav-soft));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nav-accent) 26%, transparent), 0 4px 0 color-mix(in srgb, var(--nav-accent) 22%, transparent);
}

.bottom-nav button.active .nav-icon {
  color: var(--nav-accent);
  background: #ffffff;
}

@media (max-width: 1100px) {
  .entry-lanes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header-top {
    min-height: auto;
  }

  .search-wrap {
    width: calc(100% - 20px);
  }

  .hero-card.command-card,
  .home-workspace .hero-card.command-card {
    min-height: 540px;
    padding: 22px;
  }

  .command-card .brand-hero-lockup {
    display: grid;
    text-align: center;
  }

  .entry-lanes,
  .quick-actions {
    grid-template-columns: 1fr;
  }
}

/* Phase 9 correction pass after browser check: keep the hero readable and compact. */
.hero-card.command-card,
.home-workspace .hero-card.command-card {
  min-height: 620px;
  align-content: center;
  justify-items: center;
  gap: 16px;
}

.command-card .brand-hero-lockup {
  padding: 18px 20px;
}

.command-card .brand-hero-lockup img {
  width: 96px;
  height: 96px;
}

.command-card .brand-hero-lockup p {
  font-size: clamp(2.1rem, 4.4vw, 3.7rem);
}

.entry-lanes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(760px, 100%);
  max-width: 760px;
}

.entry-lanes button {
  min-height: 92px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-items: start;
  gap: 4px 10px;
  padding: 13px 15px;
  color: var(--fc-ink);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--lane-accent) 16%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 252, 0.92));
}

.entry-lanes button.primary-lane {
  border-color: rgba(43, 116, 168, 0.42);
  background:
    radial-gradient(circle at 100% 0%, rgba(43, 116, 168, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 248, 252, 0.92));
}

.entry-lanes .feature-icon {
  grid-row: span 3;
}

.entry-lanes span {
  color: color-mix(in srgb, var(--lane-accent) 72%, #203246);
}

.entry-lanes strong {
  color: var(--fc-ink);
}

.entry-lanes small {
  color: var(--fc-muted);
}

@media (max-width: 760px) {
  .hero-card.command-card,
  .home-workspace .hero-card.command-card {
    min-height: auto;
  }

  .entry-lanes {
    grid-template-columns: 1fr;
  }
}

/* Local hero reset, June 2026: keep every starting path visible and make the
   first screen feel like a command surface instead of a clipped card row. */
.hero-card.command-card,
.home-workspace .hero-card.command-card {
  min-height: auto;
  padding: clamp(24px, 3vw, 38px);
  gap: 14px;
}

.command-card .hero-brand.hero-wordmark,
.command-card .hero-search,
.entry-lanes,
.quick-actions {
  width: min(920px, 100%);
  max-width: 920px;
}

.command-card .brand-hero-lockup {
  justify-content: center;
  max-width: 760px;
  margin-inline: auto;
}

.command-card .brand-hero-lockup img {
  width: 86px;
  height: 86px;
}

.command-card .brand-hero-lockup p {
  font-size: clamp(1.9rem, 3.8vw, 3.15rem);
  line-height: 0.98;
}

.entry-lanes {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.entry-lanes button {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 5px;
  padding: 12px;
  overflow: hidden;
}

.entry-lanes .feature-icon {
  grid-row: auto;
  width: 34px;
  height: 34px;
}

.entry-lanes span {
  font-size: 0.62rem;
  letter-spacing: 0.09em;
}

.entry-lanes strong {
  font-size: 0.9rem;
  line-height: 1.06;
}

.entry-lanes small {
  font-size: 0.68rem;
  line-height: 1.18;
}

.deep-dive-term-grid,
.deep-dive-med-map,
.source-link-strip {
  padding: 18px;
  border: 1px solid var(--fc-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(21, 50, 67, 0.08);
}

.deep-dive-term-grid h3,
.deep-dive-med-map h3,
.source-link-strip h3 {
  margin: 0 0 12px;
  color: var(--fc-ink);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deep-dive-term-grid > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.deep-dive-term-grid article {
  padding: 14px;
  border: 1px solid rgba(43, 116, 168, 0.18);
  border-left: 5px solid var(--fc-blue);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f5f9fb);
}

.deep-dive-term-grid strong,
.deep-dive-med-map span {
  color: var(--fc-navy);
  font-weight: 900;
}

.deep-dive-term-grid p,
.deep-dive-term-grid small,
.deep-dive-med-map h4,
.deep-dive-med-map dd {
  color: var(--fc-muted);
}

.deep-dive-term-grid p {
  margin: 8px 0;
  font-weight: 800;
}

.deep-dive-med-map > div {
  display: grid;
  gap: 12px;
}

.deep-dive-med-map article {
  padding: 16px;
  border: 1px solid rgba(47, 129, 111, 0.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(47, 129, 111, 0.10), transparent 30%),
    linear-gradient(180deg, #ffffff, #f7fbfa);
}

.deep-dive-med-map h4 {
  margin: 8px 0 12px;
  font-size: 1rem;
  line-height: 1.35;
}

.deep-dive-med-map dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.deep-dive-med-map dt {
  color: var(--fc-ink);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deep-dive-med-map dd {
  margin: 3px 0 0;
}

.source-link-strip div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.source-link-strip a {
  padding: 9px 12px;
  border: 1px solid rgba(43, 116, 168, 0.22);
  border-radius: 999px;
  color: var(--fc-navy);
  background: linear-gradient(180deg, #ffffff, #f2f8fb);
  font-weight: 850;
  text-decoration: none;
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.profile-hero-actions button {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: var(--fc-navy);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(21, 50, 67, 0.12);
  font-weight: 900;
  cursor: pointer;
}

.screen-use-guide {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(43, 116, 168, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(43, 116, 168, 0.08), transparent 44%),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(21, 50, 67, 0.07);
}

.screen-use-guide span,
.quick-answer-card span,
.factor-filter > span {
  display: block;
  color: var(--fc-blue);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.screen-use-guide strong {
  display: block;
  margin-top: 4px;
  color: var(--fc-ink);
  font-size: 1rem;
  line-height: 1.25;
}

.screen-use-guide ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: var(--fc-muted);
  font-weight: 750;
}

.quick-answer-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(43, 116, 168, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(43, 116, 168, 0.10), transparent 36%),
    linear-gradient(180deg, #ffffff, #f4f9fc);
  box-shadow: 0 14px 30px rgba(21, 50, 67, 0.08);
}

.quick-answer-card h3 {
  margin: 5px 0 0;
  color: var(--fc-ink);
  font-size: 1.05rem;
  line-height: 1.16;
}

.quick-answer-card article {
  padding: 12px;
  border: 1px solid rgba(43, 116, 168, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
}

.quick-answer-card article.caution {
  border-color: rgba(201, 111, 45, 0.22);
  background: rgba(255, 248, 239, 0.94);
}

.quick-answer-card article > strong {
  display: block;
  margin-bottom: 7px;
  color: var(--fc-ink);
  font-weight: 950;
}

.quick-answer-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--fc-muted);
  font-weight: 720;
}

.factor-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(43, 116, 168, 0.13);
  border-radius: 16px;
  background: rgba(245, 250, 252, 0.78);
}

.factor-filter button {
  padding: 8px 11px;
  border: 1px solid rgba(43, 116, 168, 0.20);
  border-radius: 999px;
  color: var(--fc-navy);
  background: #ffffff;
  font-weight: 850;
  cursor: pointer;
}

.factor-filter button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--fc-blue), var(--fc-teal));
  box-shadow: 0 10px 22px rgba(43, 116, 168, 0.18);
}

.ladder-step.factor-match,
.choice-factor-grid article.active {
  border-color: rgba(38, 122, 154, 0.45);
  box-shadow: inset 0 0 0 2px rgba(38, 122, 154, 0.10), 0 12px 26px rgba(38, 122, 154, 0.12);
}

.my-list-sections {
  display: grid;
  gap: 24px;
}

.my-list-sections > section > h3 {
  margin: 0 0 12px;
  color: var(--fc-ink);
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.my-list-card.clinical-shortcut {
  border-color: rgba(43, 116, 168, 0.20);
  background:
    radial-gradient(circle at 100% 0%, rgba(43, 116, 168, 0.10), transparent 34%),
    rgba(255, 255, 255, 0.94);
}

.search-intent-hint {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(43, 116, 168, 0.12);
  color: var(--fc-blue);
  background: rgba(232, 243, 251, 0.72);
  font-size: 0.78rem;
  font-weight: 900;
}

.treatment-ladder {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(43, 116, 168, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 141, 173, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 252, 0.94));
  box-shadow: 0 16px 36px rgba(21, 50, 67, 0.10);
}

.treatment-ladder-head {
  display: grid;
  gap: 6px;
  max-width: 920px;
}

.treatment-ladder-head span {
  width: max-content;
  padding: 6px 10px;
  border: 1px solid rgba(43, 116, 168, 0.18);
  border-radius: 999px;
  color: var(--fc-blue);
  background: rgba(235, 246, 251, 0.9);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.treatment-ladder-head h3 {
  margin: 0;
  color: var(--fc-ink);
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  line-height: 1.12;
}

.treatment-ladder-head p {
  margin: 0;
  color: var(--fc-muted);
  font-weight: 750;
  line-height: 1.45;
}

.ladder-steps {
  display: grid;
  gap: 12px;
}

.ladder-step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(43, 116, 168, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(43, 116, 168, 0.08), transparent 36%),
    rgba(255, 255, 255, 0.92);
}

.ladder-step > b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--fc-blue), var(--fc-teal));
  box-shadow: 0 10px 20px rgba(43, 116, 168, 0.20);
  font-weight: 950;
}

.ladder-step span {
  display: block;
  margin-bottom: 4px;
  color: var(--fc-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ladder-step h4 {
  margin: 0 0 8px;
  color: var(--fc-ink);
  font-size: 1.02rem;
  line-height: 1.24;
}

.ladder-step p {
  margin: 8px 0 0;
  color: var(--fc-ink);
  font-weight: 700;
  line-height: 1.45;
}

.ladder-if,
.ladder-monitor {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.42;
}

.ladder-if {
  border: 1px solid rgba(201, 111, 45, 0.26);
  background: rgba(255, 248, 239, 0.95);
}

.ladder-monitor {
  border: 1px solid rgba(47, 129, 111, 0.22);
  background: rgba(239, 249, 246, 0.95);
}

.ladder-if strong,
.ladder-monitor strong {
  display: block;
  margin-bottom: 3px;
  color: var(--fc-ink);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ladder-if p,
.ladder-monitor p {
  margin: 0;
  color: var(--fc-muted);
}

.choice-factor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.choice-factor-grid article {
  padding: 12px;
  border: 1px solid rgba(43, 116, 168, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.choice-factor-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--fc-blue);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.choice-factor-grid strong {
  display: block;
  color: var(--fc-ink);
  font-weight: 950;
  line-height: 1.25;
}

.choice-factor-grid p {
  margin: 6px 0 0;
  color: var(--fc-muted);
  font-weight: 700;
  line-height: 1.38;
}

@media (max-width: 1180px) {
  .entry-lanes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .entry-lanes {
    grid-template-columns: 1fr;
  }
}
