:root {
  --bg: #f6f9fd;
  --surface: #ffffff;
  --surface-blue: #eef7ff;
  --text: #102033;
  --muted: #5d6f86;
  --blue: #1769e0;
  --blue-dark: #0e4fae;
  --blue-soft: #dceeff;
  --border: #dbe7f3;
  --shadow: 0 18px 50px rgba(25, 72, 125, 0.12);
  --radius: 24px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 48%, #ffffff 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

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

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219, 231, 243, 0.8);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-inner { min-height: 76px; }

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

.brand-text-wrap {
  display: grid;
  gap: 2px;
  line-height: 1.05;
}

.brand-title {
  font-weight: 800;
}

.brand-powered {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a:hover { color: var(--blue); }

.section { padding: 88px 0; }

.hero { padding-top: 76px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.85fr);
  gap: 40px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.25;
}

.hero-subtitle {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.search-card,
.hero-panel,
.step-card,
.trust-container,
.disclaimer-card,
.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.search-card {
  max-width: 780px;
  margin: 32px 0 20px;
  padding: 18px;
}

.search-card label {
  display: block;
  margin: 0 0 10px 4px;
  font-weight: 800;
}

.search-row {
  display: flex;
  gap: 12px;
}

input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 17px 18px;
  color: var(--text);
  font: inherit;
  outline: none;
}

input[type="search"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 105, 224, 0.12);
}

button {
  border: 0;
  border-radius: 16px;
  padding: 16px 22px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.search-row button {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(23, 105, 224, 0.22);
}

.search-row button:hover { background: var(--blue-dark); }

.search-note {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.example-area {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--muted);
  font-weight: 700;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.example-chip {
  padding: 9px 13px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 1px solid #c7e3ff;
  border-radius: 999px;
  font-size: 0.93rem;
}

.example-chip:hover { background: #cfe8ff; }

.hero-panel {
  padding: 34px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-blue) 100%);
}


.hero-panel p,
.step-card p,
.trust-card p,
.disclaimer-card p,
.result-section-card p { color: var(--muted); }

.hero-panel ul {
  margin: 22px 0 0;
  padding-left: 20px;
  color: var(--text);
  font-weight: 600;
}

.results-section { padding: 0 0 20px; }

.result-card {
  padding: 30px;
  scroll-margin-top: 100px;
  overflow: hidden;
}

.hidden { display: none; }

.result-topline {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 0.85rem;
  font-weight: 800;
}

.result-status {
  margin-bottom: 24px;
  padding: 16px 18px;
  border: 1px solid #c7e3ff;
  border-radius: 18px;
  color: var(--blue-dark);
  background: var(--surface-blue);
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.result-section-card {
  min-width: 0;
  max-width: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  overflow-wrap: anywhere;
}

.result-section-card:last-child { grid-column: 1 / -1; }

.section-heading {
  max-width: 720px;
  margin-bottom: 30px;
}

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

.step-card,
.trust-card { padding: 26px; }

.step-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--blue);
  font-weight: 900;
}

.trust-section { padding-top: 36px; }

.trust-container {
  padding: 40px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
}

.trust-intro {
  max-width: 790px;
  margin-bottom: 28px;
}

.trust-intro p:last-child { color: var(--muted); font-size: 1.08rem; }

.trust-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
}

.disclaimer-section { padding-top: 20px; }

.disclaimer-card {
  padding: 30px;
  box-shadow: none;
}

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

.site-footer {
  padding: 30px 0;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.site-footer p { margin: 0; }

@media (max-width: 860px) {
  .header-inner,
  .footer-inner,
  .example-area {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav { gap: 14px; flex-wrap: wrap; }

  .hero-grid,
  .steps-grid,
  .trust-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .section { padding: 64px 0; }

  .hero { padding-top: 52px; }

  .result-section-card:last-child { grid-column: auto; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 28px, 1120px); }

  .site-header {
    position: static;
  }

  .header-inner {
    min-height: 66px;
  }

  .site-nav {
    display: none;
  }

  .search-row { flex-direction: column; }

  .search-row button,
  input[type="search"] { width: 100%; }

  .search-card,
  .hero-panel,
  .trust-container,
  .disclaimer-card,
  .result-card { border-radius: 20px; }

  .trust-container,
  .result-card { padding: 22px; }

  .result-section-card { padding: 18px; }

  h1 { letter-spacing: -0.055em; }
}

.search-row button:disabled {
  cursor: wait;
  opacity: 0.74;
}

.result-status-warning {
  border-color: #f3d58a;
  color: #76530a;
  background: #fff8e8;
}

.result-status-error {
  border-color: #f1b9b9;
  color: #8d2424;
  background: #fff0f0;
}

.result-topline-error {
  color: #8d2424;
  background: #ffe1e1;
}

.loading-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid #c7e3ff;
  border-radius: 20px;
  color: var(--blue-dark);
  background: linear-gradient(135deg, #ffffff 0%, var(--surface-blue) 100%);
}

.loading-card p { margin: 4px 0 0; color: var(--muted); }

.loading-spinner {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 4px solid #c7e3ff;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.result-metadata {
  margin: -6px 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}


.sources-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  border: 1px solid #b8cce3;
  border-radius: 50%;
  color: var(--blue-dark);
  background: #f3f8ff;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 800;
  box-shadow: none;
}

.sources-info-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: #f8fbff;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
}

.sources-info-card p {
  min-width: 0;
  margin: 0;
}

.result-section-card h4,
.source-card h4,
.excerpt-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.3;
}

.result-section-card-featured {
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
}

.findings-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.findings-list li + li { margin-top: 10px; }

.term-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.term-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #c7e3ff;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--surface-blue);
  font-size: 0.9rem;
  font-weight: 800;
}

.excerpt-section,
.sources-card { grid-column: 1 / -1; }

.excerpt-list,
.source-list {
  display: grid;
  gap: 14px;
}

.excerpt-card,
.source-card {
  min-width: 0;
  max-width: 100%;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfdff;
  overflow-wrap: anywhere;
}

.excerpt-card p,
.source-card p { margin-bottom: 0; }

.excerpt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.excerpt-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef4fb;
  font-size: 0.82rem;
  font-weight: 700;
}

.source-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--blue);
  font-weight: 800;
}

.source-link:hover { color: var(--blue-dark); }

.source-id,
.result-disclaimer,
.technical-details {
  color: var(--muted);
  font-size: 0.9rem;
}

.source-id { margin-top: 8px; }

.result-disclaimer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.technical-details {
  margin-top: 16px;
}

.technical-details summary {
  cursor: pointer;
  font-weight: 800;
}

.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -6px 0 16px;
  padding: 9px 14px;
  border: 1px solid #c7e3ff;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--surface-blue);
  font-size: 0.92rem;
  font-weight: 800;
}

.powered-by a,
.trust-card a,
.trust-intro a,
.excerpt-link {
  color: #1b48a8;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 800;
}

.pharmacist-container {
  position: relative;
  overflow: hidden;
  padding: 48px;
  border-color: #cfe0fb;
  background: radial-gradient(circle at 9% 18%, rgba(58, 115, 226, 0.13), transparent 24%), linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.pharmacist-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 36px;
}

.pharmacist-headshot {
  width: 128px;
  height: 128px;
  border: 6px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 20px 45px rgba(25, 72, 125, 0.18);
}

.pill-eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--blue-soft);
}

.pharmacist-container .trust-intro {
  max-width: 880px;
  margin-bottom: 0;
}

.pharmacist-container .trust-intro h2 {
  margin-bottom: 14px;
}

.pharmacist-container .trust-card {
  padding: 28px;
  border-color: #d8e6fa;
  border-radius: 22px;
  box-shadow: none;
}

.faq-section {
  padding-top: 28px;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-item {
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 34px rgba(25, 72, 125, 0.08);
}

.faq-item h3 {
  margin-bottom: 8px;
}

.faq-item p,
.excerpt-count,
.excerpt-source-note {
  color: var(--muted);
}

.excerpt-count {
  margin-bottom: 14px;
  font-weight: 800;
}

.excerpt-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.excerpt-link {
  flex: 0 0 auto;
  font-size: 0.9rem;
}

.excerpt-source-note {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 860px) {
  .pharmacist-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .powered-by {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 18px;
  }

  .pharmacist-container {
    padding: 24px;
  }

  .excerpt-card-heading {
    flex-direction: column;
    gap: 4px;
  }
}

/* Requested layout refinements */
.hero {
  padding-top: 56px;
  padding-bottom: 56px;
}

.hero-grid {
  align-items: start;
}

.hero-panel {
  margin-top: 0;
}

.search-card {
  margin-top: 24px;
}

.example-area {
  margin-bottom: 0;
}

#how-it-works {
  padding-top: 48px;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 1.25rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: -4px 26px 24px;
}

.excerpt-source-details {
  color: var(--muted);
  font-weight: 600;
}

.excerpt-card .source-id {
  margin: 4px 0 12px;
}

@media (max-width: 860px) {
  .hero {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  #how-it-works {
    padding-top: 40px;
  }
}

.autocomplete-root {
  position: relative;
  align-items: stretch;
}

.autocomplete-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.autocomplete-field input[type="search"] {
  width: 100%;
}

.suggestions-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(25, 72, 125, 0.12);
}

.suggestion-item {
  display: block;
  width: 100%;
  padding: 11px 16px;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: 600;
}

.suggestion-item:hover,
.suggestion-item:focus {
  color: var(--blue-dark);
  background: var(--surface-blue);
  outline: none;
}

.drug-summary-card {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.drug-summary-card h4 {
  margin-bottom: 14px;
}

.drug-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.drug-summary-detail {
  padding: 12px;
  border: 1px solid #e4edf7;
  border-radius: 14px;
  background: #ffffff;
}

.drug-summary-detail dt {
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.drug-summary-detail dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.fda-label-description {
  padding: 14px 16px;
  border-left: 4px solid var(--blue);
  border-radius: 14px;
  background: var(--surface-blue);
}

.medline-card {
  padding: 16px;
  border: 1px solid #cfe0fb;
  border-radius: 16px;
  background: #ffffff;
}

.terms-found-note {
  margin-bottom: 18px;
  color: var(--muted);
}

.medline-source {
  margin-bottom: 10px;
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

@media (max-width: 620px) {
  .autocomplete-field {
    width: 100%;
  }

  .suggestions-dropdown {
    max-height: 280px;
  }

  .drug-summary-list {
    grid-template-columns: 1fr;
  }
}

.suggestions-dropdown.hidden {
  display: none;
}

.footer-inner {
  flex-wrap: wrap;
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 800;
}

.footer-links a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sticky-pharmacist-cta {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 14px 26px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #3f78e8 0%, #0f2c6f 100%);
  box-shadow: 0 18px 48px rgba(16, 45, 111, 0.32);
  font-size: 1rem;
  font-weight: 900;
}

.sticky-pharmacist-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 54px rgba(16, 45, 111, 0.38);
}

.cta-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1rem;
}

.cookie-banner {
  position: fixed;
  right: 24px;
  bottom: 100px;
  left: 24px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(25, 72, 125, 0.18);
}

.cookie-banner p {
  margin: 4px 0 0;
  color: var(--muted);
}

.cookie-banner button {
  flex: 0 0 auto;
  color: #ffffff;
  background: var(--blue);
}

.cookie-banner.hidden {
  display: none;
}

.simple-page {
  min-height: 65vh;
}

.simple-page-card {
  max-width: 880px;
  padding: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.simple-page-card h1 {
  margin-bottom: 10px;
  font-size: clamp(2.4rem, 6vw, 4.3rem);
}

.simple-page-card h2 {
  margin-top: 30px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.simple-page-card p,
.contact-note {
  color: var(--muted);
}

.simple-page-card a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 800;
}

.updated-date {
  font-weight: 800;
}

.email-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  padding: 18px 22px;
  border-radius: 22px;
  color: #ffffff !important;
  background: linear-gradient(135deg, #3f78e8 0%, #0f2c6f 100%);
  box-shadow: 0 18px 42px rgba(16, 45, 111, 0.25);
  text-decoration: none !important;
}

.email-card small {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

@media (max-width: 620px) {
  .sticky-pharmacist-cta {
    right: 14px;
    bottom: 14px;
    left: auto;
    min-height: 48px;
    padding: 10px 14px;
    gap: 8px;
    justify-content: center;
    font-size: 0.82rem;
  }

  .sticky-pharmacist-cta .cta-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  .cookie-banner {
    right: 14px;
    bottom: 88px;
    left: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner button {
    width: 100%;
  }

  .simple-page-card {
    padding: 26px;
  }
}
