:root {
  --ink: #17202a;
  --muted: #667085;
  --line: #d8e2e8;
  --paper: #ffffff;
  --soft: #f4f8f8;
  --teal: #0f8b8d;
  --teal-dark: #086c70;
  --navy: #132b43;
  --coral: #d96b5f;
  --gold: #caa75d;
  --shadow: 0 20px 60px rgba(19, 43, 67, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  color: #ffffff;
  background: linear-gradient(180deg, rgba(10, 28, 43, 0.76), rgba(10, 28, 43, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.14);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-links a,
.header-action {
  opacity: 0.92;
}

.nav-links a:hover,
.header-action:hover {
  opacity: 1;
}

.header-action {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 128px clamp(20px, 6vw, 86px) 80px;
  color: #ffffff;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center right;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(9, 28, 41, 0.92) 0%, rgba(9, 28, 41, 0.78) 36%, rgba(9, 28, 41, 0.26) 72%, rgba(9, 28, 41, 0.08) 100%),
    linear-gradient(180deg, rgba(9, 28, 41, 0.34), rgba(9, 28, 41, 0.2));
}

.doctor-hero .hero-shade {
  background:
    linear-gradient(90deg, rgba(13, 32, 49, 0.94) 0%, rgba(13, 32, 49, 0.8) 38%, rgba(13, 32, 49, 0.3) 72%, rgba(13, 32, 49, 0.1) 100%),
    linear-gradient(180deg, rgba(13, 32, 49, 0.3), rgba(13, 32, 49, 0.18));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f0b2a9;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 600px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 42px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
}

.button-primary {
  color: #ffffff;
  background: var(--teal);
}

.button-primary:hover {
  background: var(--teal-dark);
}

.button-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-stats {
  display: grid;
  max-width: 680px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-stats div {
  min-width: 0;
  padding: 18px;
  background: rgba(12, 37, 54, 0.55);
}

.hero-stats strong {
  display: block;
  font-size: 1.35rem;
}

.hero-stats span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.trust-strip span {
  padding: 20px 16px;
  text-align: center;
  color: var(--navy);
  font-weight: 800;
  border-right: 1px solid var(--line);
}

.trust-strip span:last-child {
  border-right: 0;
}

.section {
  padding: clamp(72px, 9vw, 120px) clamp(20px, 6vw, 86px);
}

.specialty-directory {
  background: #ffffff;
}

.specialty-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.specialty-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.specialty-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 139, 141, 0.42);
  box-shadow: 0 16px 42px rgba(19, 43, 67, 0.12);
}

.specialty-card span {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.specialty-card strong {
  color: var(--navy);
  font-size: 1.05rem;
  line-height: 1.25;
}

.specialty-hero {
  min-height: 78vh;
  display: grid;
  align-items: center;
  padding: 130px clamp(20px, 6vw, 86px) 76px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(13, 32, 49, 0.94) 0%, rgba(13, 32, 49, 0.8) 45%, rgba(13, 32, 49, 0.52) 100%),
    linear-gradient(135deg, #132b43 0%, #0f8b8d 54%, #d96b5f 100%);
}

.specialty-hero-content {
  max-width: 820px;
}

.specialty-hero h1 {
  max-width: 860px;
}

.specialty-hero p:not(.eyebrow) {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.oncology-hero {
  background:
    linear-gradient(90deg, rgba(31, 35, 64, 0.94), rgba(31, 35, 64, 0.72)),
    linear-gradient(135deg, #132b43, #7f4c8a 48%, #d96b5f);
}

.orthopedics-hero {
  background:
    linear-gradient(90deg, rgba(19, 43, 67, 0.94), rgba(19, 43, 67, 0.7)),
    linear-gradient(135deg, #132b43, #0f8b8d 48%, #caa75d);
}

.cardiology-hero {
  background:
    linear-gradient(90deg, rgba(52, 28, 39, 0.94), rgba(52, 28, 39, 0.7)),
    linear-gradient(135deg, #132b43, #b34153 50%, #d96b5f);
}

.neurology-hero {
  background:
    linear-gradient(90deg, rgba(18, 40, 58, 0.94), rgba(18, 40, 58, 0.7)),
    linear-gradient(135deg, #132b43, #3d7891 50%, #caa75d);
}

.surgery-hero {
  background:
    linear-gradient(90deg, rgba(24, 45, 55, 0.94), rgba(24, 45, 55, 0.7)),
    linear-gradient(135deg, #132b43, #0f8b8d 42%, #d96b5f);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(40px, 8vw, 92px);
  align-items: start;
}

.section-intro {
  max-width: 620px;
}

h2 {
  margin-bottom: 18px;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.section-intro p,
.request-panel p,
.evidence-band p {
  color: var(--muted);
  font-size: 1.04rem;
}

.steps {
  display: grid;
  gap: 18px;
}

.step,
.feature-grid article,
.price-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.step {
  display: grid;
  grid-template-columns: 70px 1fr;
  column-gap: 18px;
  padding: 24px;
}

.step span {
  color: var(--gold);
  font-weight: 800;
}

.step h3 {
  margin-bottom: 6px;
  color: var(--navy);
}

.step p {
  grid-column: 2;
  margin-bottom: 0;
  color: var(--muted);
}

.evidence-band {
  background: var(--soft);
}

.evidence-band > div:first-child {
  max-width: 760px;
  margin-bottom: 36px;
}

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

.feature-grid article {
  padding: 26px;
}

.feature-grid h3,
.price-card h3 {
  color: var(--navy);
}

.feature-grid p,
.price-card p {
  color: var(--muted);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.price-card {
  padding: 30px;
}

.price-card.highlighted {
  border-color: rgba(15, 139, 141, 0.5);
  box-shadow: var(--shadow);
}

.price {
  margin-bottom: 12px;
  color: var(--navy) !important;
  font-size: 2rem;
  font-weight: 800;
}

.price-card a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--teal-dark);
  font-weight: 800;
}

.workflow-section {
  background: #ffffff;
}

.workflow-list {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.workflow-list article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.workflow-list article:last-child {
  border-bottom: 1px solid var(--line);
}

.workflow-list span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--teal);
  font-weight: 800;
}

.workflow-list h3 {
  margin-bottom: 6px;
  color: var(--navy);
}

.workflow-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.doctor-fit {
  background: var(--soft);
}

.request-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.64fr);
  gap: clamp(32px, 7vw, 80px);
  color: #ffffff;
  background: var(--navy);
}

.request-panel h2,
.request-panel .eyebrow {
  color: #ffffff;
}

.request-panel p {
  color: rgba(255, 255, 255, 0.75);
}

.request-form {
  display: grid;
  gap: 18px;
  align-self: start;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.request-form-note,
.request-form-status {
  margin: -4px 0 0;
  font-size: 0.9rem;
}

.request-form-status {
  min-height: 1.2em;
  color: #ffd2d2;
  font-weight: 800;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

select,
input,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font: inherit;
}

option {
  color: var(--ink);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.faq {
  max-width: 900px;
  margin: 0 auto;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 800;
}

.faq details p {
  margin: 12px 0 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(20px, 6vw, 86px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer .brand {
  color: var(--navy);
}

.footer-links {
  display: flex;
  gap: 18px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    background: rgba(10, 28, 43, 0.84);
    backdrop-filter: blur(14px);
  }

  .nav-links {
    order: 3;
    display: flex;
    width: 100%;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    line-height: 1;
  }

  .header-action {
    margin-left: auto;
  }

  .hero {
    min-height: 820px;
  }

  .hero-image {
    object-position: 65% center;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(9, 28, 41, 0.92) 0%, rgba(9, 28, 41, 0.76) 58%, rgba(9, 28, 41, 0.3) 100%);
  }

  .split,
  .request-panel {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .specialty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand {
    min-width: 0;
    font-size: 0.96rem;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .header-action {
    display: none;
  }

  .nav-links {
    gap: 8px;
  }

  .nav-links a {
    padding: 7px 9px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 760px;
    padding: 116px 20px 56px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .trust-strip,
  .feature-grid,
  .pricing-grid,
  .specialty-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .step p {
    grid-column: auto;
  }

  .request-form {
    padding: 20px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.portal-body {
  min-height: 100vh;
  background: var(--soft);
}

.welcome-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(19, 43, 67, 0.92), rgba(15, 139, 141, 0.68)),
    url("/assets/hero-consultation.png") center right / cover no-repeat;
}

.login-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(19, 43, 67, 0.94), rgba(15, 139, 141, 0.78)),
    url("/assets/hero-consultation.png") center right / cover no-repeat;
}

.doctor-login-body {
  background:
    linear-gradient(135deg, rgba(19, 43, 67, 0.95), rgba(23, 61, 63, 0.78)),
    url("/assets/doctor-hero.png") center right / cover no-repeat;
}

.ask-ai-body {
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(19, 43, 67, 0.96), rgba(15, 139, 141, 0.72)),
    url("/assets/hero-consultation.png") center right / cover no-repeat;
}

.ask-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  gap: clamp(32px, 7vw, 90px);
  align-items: center;
  padding: 130px clamp(20px, 6vw, 86px) 72px;
  color: #ffffff;
}

.ask-hero-copy h1 {
  max-width: 800px;
  margin-bottom: 22px;
}

.ask-hero-copy p:not(.eyebrow) {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.14rem;
}

.ask-card,
.chat-panel,
.summary-main,
.summary-cta {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.ask-card {
  padding: 30px;
  color: var(--ink);
}

.ask-card h2 {
  font-size: 1.7rem;
}

.ask-card li {
  margin-bottom: 12px;
  color: var(--muted);
}

.medical-note {
  margin: 20px 0 0;
  padding: 14px;
  border-left: 4px solid var(--coral);
  color: var(--navy);
  background: var(--soft);
  font-weight: 700;
}

.ask-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 360px 1fr;
}

.ask-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 34px;
  color: #ffffff;
  background: rgba(19, 43, 67, 0.9);
}

.ask-side h1 {
  font-size: 2.4rem;
}

.ask-side p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.76);
}

.ask-progress {
  display: grid;
  gap: 10px;
}

.ask-progress span {
  padding: 11px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.ask-progress .done,
.ask-progress .active {
  color: #ffffff;
  background: rgba(15, 139, 141, 0.72);
}

.chat-panel {
  align-self: center;
  width: min(980px, calc(100% - 48px));
  justify-self: center;
  padding: 26px;
  background: #ffffff;
}

.chat-header,
.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.chat-header h2 {
  margin-bottom: 0;
  font-size: 2rem;
}

.chat-thread {
  display: grid;
  gap: 14px;
  margin: 26px 0;
}

.chat-bubble {
  max-width: 78%;
  padding: 16px 18px;
  border-radius: 8px;
  background: var(--soft);
}

.chat-bubble p,
.chat-content {
  margin-bottom: 0;
  color: var(--muted);
}

.chat-content {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.chat-content h3,
.chat-content h4 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 1rem;
}

.chat-content ul,
.chat-content ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
}

.chat-content li {
  color: var(--muted);
  line-height: 1.65;
}

.chat-content code {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--ink);
  background: rgba(19, 43, 67, 0.08);
}

.chat-bubble.user {
  justify-self: end;
  color: #ffffff;
  background: var(--teal);
}

.chat-bubble.user p,
.chat-bubble.user .chat-content {
  color: rgba(255, 255, 255, 0.88);
}

.chat-bubble.recommendation {
  border: 1px solid rgba(15, 139, 141, 0.28);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(19, 43, 67, 0.08);
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

.chat-compose input {
  color: var(--ink);
  border-color: var(--line);
  background: #ffffff;
}

.ai-summary-shell {
  min-height: 100vh;
  background: var(--soft);
}

.summary-header {
  padding: 28px clamp(20px, 6vw, 86px);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.summary-header .brand {
  color: var(--navy);
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 22px;
  padding: clamp(48px, 7vw, 82px) clamp(20px, 6vw, 86px) 28px;
}

.summary-main,
.summary-cta {
  padding: clamp(26px, 4vw, 42px);
  background: #ffffff;
}

.summary-main h1 {
  color: var(--navy);
}

.summary-main p,
.summary-cta p {
  color: var(--muted);
}

.readiness-score {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 18px;
  border-radius: 8px;
  background: var(--soft);
}

.readiness-score span {
  color: var(--muted);
  font-weight: 800;
}

.readiness-score strong {
  color: var(--teal-dark);
  font-size: 1.4rem;
}

.readiness-meter {
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(19, 43, 67, 0.1);
}

.readiness-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 180ms ease;
}

.summary-cta {
  align-self: start;
  display: grid;
  gap: 16px;
}

.summary-link {
  color: var(--teal-dark);
  font-weight: 800;
}

.summary-details {
  padding-top: 24px;
}

.learn-hero {
  min-height: 64vh;
  display: grid;
  align-items: center;
  padding: 128px clamp(20px, 6vw, 86px) 70px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(19, 43, 67, 0.94), rgba(19, 43, 67, 0.68)),
    linear-gradient(135deg, #132b43, #0f8b8d 58%, #d96b5f);
}

.learn-hero h1 {
  max-width: 900px;
}

.learn-hero p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.16rem;
}

.directory-hero {
  min-height: 62vh;
  display: grid;
  align-items: end;
  padding: 140px clamp(20px, 6vw, 86px) 76px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(10, 28, 43, 0.94), rgba(10, 28, 43, 0.72)),
    url("/assets/hospital-hero.png") center / cover;
}

.directory-hero > div {
  max-width: 900px;
}

.directory-hero h1 {
  max-width: 920px;
  font-size: clamp(2.6rem, 5.4vw, 5.2rem);
}

.directory-hero p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.12rem;
}

.medicine-hero {
  background:
    linear-gradient(90deg, rgba(31, 35, 64, 0.94), rgba(31, 35, 64, 0.72)),
    linear-gradient(135deg, #132b43, #7f4c8a 54%, #0f8b8d);
}

.target-directory {
  background: #ffffff;
}

.target-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.target-card,
.target-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.target-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.target-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 139, 141, 0.42);
  box-shadow: 0 16px 42px rgba(19, 43, 67, 0.12);
}

.target-card span {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.target-card h3,
.target-list h3 {
  color: var(--navy);
}

.target-card h3 {
  margin: 22px 0 12px;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.08;
}

.target-card p,
.target-list li {
  color: var(--muted);
}

.target-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.target-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 32px 0 0;
}

.target-search input {
  flex: 1 1 320px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.empty-state {
  margin: 32px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.target-list {
  padding: 24px;
}

.target-list h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.target-list ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.target-list li {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(216, 226, 232, 0.86);
  font-weight: 700;
}

.target-list li strong,
.target-list li span,
.target-list li p {
  display: block;
}

.target-list li strong {
  color: var(--navy);
}

.target-list li span {
  margin-top: 4px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.target-list li p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.target-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.medicine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.medicine-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(19, 43, 67, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.medicine-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 139, 141, 0.42);
  box-shadow: 0 16px 42px rgba(19, 43, 67, 0.12);
}

.medicine-card span {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.medicine-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.45rem;
  line-height: 1.12;
}

.medicine-card strong {
  color: var(--teal-dark);
}

.medicine-card p {
  color: var(--muted);
}

.medicine-page .article-body a {
  color: var(--teal-dark);
  font-weight: 800;
}

.learn-section {
  background: #ffffff;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.article-card {
  display: grid;
  gap: 12px;
  min-height: 270px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(19, 43, 67, 0.08);
}

.article-card span,
.article-meta span {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-card h3 {
  color: var(--navy);
  font-size: 1.35rem;
}

.article-card p {
  color: var(--muted);
}

.article-card small {
  color: var(--muted);
  font-weight: 700;
}

.article-card a {
  align-self: end;
  color: var(--teal-dark);
  font-weight: 800;
}

.article-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 128px 20px 80px;
}

.article-page h1 {
  color: var(--navy);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
}

.article-lead {
  color: var(--muted);
  font-size: 1.22rem;
}

.article-body {
  color: var(--ink);
  font-size: 1.05rem;
}

.article-body h2 {
  margin-top: 34px;
  font-size: 1.6rem;
}

.article-body p,
.article-body li {
  color: var(--muted);
}

.article-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: 44px;
  padding: 28px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--navy);
}

.article-cta h2 {
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 1.6rem;
}

.article-cta p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
}

.article-cta > div:last-child {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.article-cta .summary-link {
  color: #ffffff;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: clamp(32px, 7vw, 90px);
  align-items: center;
  padding: clamp(24px, 6vw, 86px);
}

.welcome-shell {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 28px;
  padding: clamp(28px, 6vw, 72px);
}

.welcome-shell .brand {
  color: #ffffff;
}

.welcome-panel {
  width: min(100%, 620px);
  display: grid;
  gap: 22px;
  padding: clamp(28px, 5vw, 52px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.welcome-panel h1 {
  color: var(--navy);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
}

.welcome-panel p {
  max-width: 520px;
  color: var(--muted);
  font-size: 1.16rem;
}

.welcome-panel > span {
  color: var(--muted);
  font-size: 0.96rem;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.login-brand-panel {
  display: grid;
  gap: 80px;
  color: #ffffff;
}

.login-brand-panel h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.login-brand-panel p:not(.eyebrow) {
  max-width: 600px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
}

.login-card {
  display: grid;
  gap: 24px;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin-bottom: 10px;
  font-size: 2rem;
}

.login-card p {
  color: var(--muted);
}

.login-card form {
  display: grid;
  gap: 18px;
}

.login-card label {
  color: var(--navy);
}

.login-card input,
.login-card select,
.login-card textarea {
  color: var(--ink);
  border-color: var(--line);
  background: #ffffff;
}

.login-card textarea {
  min-height: 96px;
  padding-block: 12px;
  resize: vertical;
}

.login-card input::placeholder {
  color: #98a2b3;
}

.field-error {
  display: block;
  margin-top: 6px;
  color: #b42318;
  font-size: 0.86rem;
}

.form-alert {
  color: #b42318;
  font-size: 0.92rem;
}

.form-success {
  padding: 12px 14px;
  border-radius: 8px;
  color: #05603a;
  background: #d1fadf;
  font-weight: 700;
}

.account-logout-form button,
.welcome-secondary-actions button {
  border: 0;
  padding: 0;
  color: var(--teal-dark);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.welcome-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--teal-dark);
  font-weight: 800;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  overflow: visible;
  transition: grid-template-columns 180ms ease;
}

.portal-shell.sidebar-collapsed {
  grid-template-columns: 86px 1fr;
}

.portal-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 30px 24px;
  color: #ffffff;
  background: var(--navy);
  transition: padding 180ms ease;
}

.sidebar-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  position: absolute;
  top: 26px;
  right: -21px;
  z-index: 30;
  border: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}

.sidebar-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-collapsed .portal-sidebar {
  padding-inline: 16px;
}

.sidebar-collapsed .sidebar-toggle {
  right: -21px;
}

.sidebar-collapsed .portal-sidebar .brand {
  justify-content: center;
}

.portal-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-sidebar nav a i {
  width: 20px;
  flex: 0 0 20px;
  font-size: 1.08rem;
  text-align: center;
}

.sidebar-collapsed .portal-sidebar .brand span:last-child,
.sidebar-collapsed .portal-sidebar nav a span {
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  width: 0;
}

.sidebar-collapsed .portal-logout span {
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  width: 0;
}

.sidebar-collapsed .portal-sidebar nav a {
  justify-content: center;
  min-height: 44px;
  padding-inline: 0;
}

.sidebar-collapsed .portal-logout button {
  justify-content: center;
  min-height: 44px;
  padding-inline: 0;
}

.sidebar-collapsed .portal-sidebar nav a i {
  width: auto;
  flex-basis: auto;
}

.sidebar-collapsed .portal-logout i {
  width: auto;
  flex-basis: auto;
}

.portal-sidebar.doctor-side {
  background: #183547;
}

.portal-sidebar.hospital-side {
  background: #173d3f;
}

.portal-sidebar.admin-side {
  background: #2e3542;
}

.portal-sidebar nav {
  display: grid;
  gap: 8px;
}

.portal-logout {
  margin-top: auto;
}

.portal-logout button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.portal-logout button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.portal-logout i {
  width: 20px;
  flex: 0 0 20px;
  font-size: 1.08rem;
}

.portal-sidebar nav a {
  padding: 12px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.portal-sidebar nav a.active,
.portal-sidebar nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.portal-main {
  padding: 34px clamp(24px, 5vw, 64px) 56px calc(clamp(24px, 5vw, 64px) + 10px);
}

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.portal-topbar h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.portal-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.portal-kpis article,
.portal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(19, 43, 67, 0.08);
}

.portal-kpis article {
  padding: 20px;
}

.portal-kpis span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-kpis strong {
  color: var(--navy);
  font-size: 1.55rem;
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 18px;
}

.portal-panel {
  padding: 26px;
}

.portal-panel h2 {
  margin-bottom: 16px;
  font-size: 1.45rem;
}

.portal-panel p,
.timeline span,
.mock-table span {
  color: var(--muted);
}

.portal-panel a {
  color: var(--teal-dark);
  font-weight: 800;
}

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

.timeline li {
  position: relative;
  padding-left: 34px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: #ffffff;
}

.timeline li.done::before,
.timeline li.active::before {
  border-color: var(--teal);
  background: var(--teal);
}

.timeline strong,
.timeline span {
  display: block;
}

.mock-table {
  display: grid;
  gap: 10px;
}

.mock-table div {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.mock-table div:last-child {
  border-bottom: 0;
}

.mock-table em {
  color: var(--coral);
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.admin-table div {
  grid-template-columns: 150px 1fr 90px;
}

.user-admin-table div {
  grid-template-columns: minmax(220px, 0.8fr) minmax(220px, 1fr) 80px;
}

.user-admin-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(220px, 1fr) 80px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.user-admin-row:last-child {
  border-bottom: 0;
}

.user-admin-row:hover strong,
.user-admin-row:hover em {
  color: var(--teal-dark);
}

.user-admin-table strong a,
.user-admin-row strong {
  color: var(--navy);
}

.admin-user-form {
  display: grid;
  gap: 16px;
}

.admin-user-form label {
  color: var(--navy);
  font-weight: 800;
}

.admin-user-form input,
.admin-user-form select {
  margin-top: 8px;
}

.compact-table div {
  grid-template-columns: 140px 1fr 1px;
}

.admin-status {
  margin-bottom: 18px;
}

.bar-list {
  display: grid;
  gap: 18px;
}

.bar-list div {
  display: grid;
  gap: 8px;
}

.bar-list span {
  color: var(--navy);
  font-weight: 800;
}

.bar-list strong {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: var(--teal);
}

.check-list,
.message-list,
.thread {
  display: grid;
  gap: 12px;
}

.check-list div,
.message-list a {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.check-list div {
  position: relative;
  padding-left: 46px;
}

.check-list div::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--line);
}

.check-list .complete::before {
  background: var(--teal);
}

.check-list .missing::before {
  background: var(--coral);
}

.check-list span,
.message-list span {
  color: var(--muted);
}

.message-layout {
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
}

.message-list a.active {
  border-color: rgba(15, 139, 141, 0.45);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(19, 43, 67, 0.08);
}

.bubble {
  max-width: 78%;
  padding: 14px 16px;
  border-radius: 8px;
}

.bubble p {
  margin-bottom: 0;
}

.bubble.staff {
  background: var(--soft);
}

.bubble.patient {
  justify-self: end;
  color: #ffffff;
  background: var(--teal);
}

.bubble.patient p {
  color: rgba(255, 255, 255, 0.88);
}

.reply-box {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 12px;
  margin-top: 18px;
}

.reply-box input {
  color: var(--ink);
  border-color: var(--line);
  background: #ffffff;
}

.report-preview section {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.report-preview h3 {
  margin-bottom: 8px;
  color: var(--navy);
}

.doctor-match-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 22px;
  align-items: start;
  padding: 22px;
  border: 1px solid rgba(15, 139, 141, 0.28);
  border-radius: 8px;
  background: var(--soft);
}

.doctor-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--teal);
  font-weight: 800;
}

.doctor-match-card h3 {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 1.6rem;
}

.match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.match-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.match-explainer {
  margin-top: 24px;
}

.match-explainer h3 {
  color: var(--navy);
}

.match-explainer li {
  margin-bottom: 8px;
  color: var(--muted);
}

.matching-options {
  margin-top: 18px;
}

.case-question {
  padding: 20px;
  border-left: 4px solid var(--teal);
  border-radius: 0 8px 8px 0;
  color: var(--navy) !important;
  background: var(--soft);
  font-size: 1.2rem;
  font-weight: 700;
}

.case-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 28px;
}

.case-summary-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.case-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.case-summary-grid strong {
  color: var(--navy);
}

.compact-list {
  display: grid;
  gap: 10px;
}

.compact-list a {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--soft);
}

.report-workspace {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.report-form {
  display: grid;
  gap: 18px;
}

.report-form textarea {
  min-height: 112px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .ask-hero,
  .ask-shell,
  .summary-grid,
  .article-grid,
  .medicine-grid,
  .target-card-grid,
  .target-list-grid,
  .article-cta {
    grid-template-columns: 1fr;
  }

  .ask-shell {
    min-height: auto;
  }

  .chat-panel {
    width: calc(100% - 32px);
    margin: 24px 0;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .chat-compose,
  .chat-header,
  .summary-header {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    gap: 42px;
  }

  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    gap: 18px;
    padding-top: 72px;
  }

  .sidebar-toggle {
    top: 18px;
    right: 20px;
  }

  .sidebar-collapsed .portal-sidebar .brand {
    justify-content: flex-start;
  }

  .sidebar-collapsed .portal-sidebar .brand span:last-child,
  .sidebar-collapsed .portal-sidebar nav a span {
    overflow: visible;
    white-space: normal;
    opacity: 1;
    width: auto;
  }

  .portal-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-grid,
  .portal-kpis,
  .message-layout,
  .report-workspace,
  .case-summary-grid {
    grid-template-columns: 1fr;
  }

  .portal-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .mock-table div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .mock-table em {
    text-align: left;
  }

  .reply-box {
    grid-template-columns: 1fr;
  }

  .bubble {
    max-width: 100%;
  }

  .doctor-match-card {
    grid-template-columns: 1fr;
  }
}
