:root {
  --purple: #3f2a75;
  --purple-mid: #5b458f;
  --purple-soft: #f4f1fa;
  --green: #1d8a4e;
  --green-deep: #146b3c;
  --gold: #f0b42c;
  --gold-deep: #e39a14;
  --gold-hot: #f6c445;
  --ink: #243028;
  --muted: #5e6570;
  --line: #e3deef;
  --mint: #e6f3e4;
  --mint-deep: #d5ead3;
  --paper: #ffffff;
  --footer: #f3f1fc;
  --isi: #fbfaf6;
  --rust: #b85a48;
  --max: 1180px;
  --header: 92px;
  --tray: 200px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  font-size: 16.5px;
  line-height: 1.45;
}

body.has-tray { padding-bottom: var(--tray); }
body.has-tray:has(.isi-tray.is-hidden) { padding-bottom: 0; }

img { max-width: 100%; height: auto; }

a { color: var(--purple); }

a:hover { color: var(--green-deep); }

p { margin: 0 0 0.65em; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }

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

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

sup { font-size: 0.68em; line-height: 0; }

/* Header */
.site-header {
  background: var(--purple);
  color: #fff;
}

.audience {
  margin: 0;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.01em;
  padding: 8px 16px 0;
  color: #f3f0fa;
}

.audience-sep {
  opacity: 0.6;
  margin: 0 8px;
}

.audience-link {
  color: #fff !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.audience-link:hover {
  color: var(--mint) !important;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 52px;
  padding: 4px 16px 8px;
}

.nav-toggle {
  display: none;
  position: absolute;
  right: 14px;
  top: 8px;
  width: 44px;
  height: 40px;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 2px;
}

#site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px;
}

#site-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 12px;
  display: inline-block;
  border-radius: 4px;
}

#site-nav a:hover,
#site-nav a:focus-visible,
#site-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.14);
}

#site-nav .has-sub ul a {
  color: var(--purple);
  background: transparent;
}

#site-nav .has-sub ul a:hover,
#site-nav .has-sub ul a:focus-visible {
  background: var(--purple-soft);
  color: var(--purple);
}

.has-sub { position: relative; display: flex; align-items: stretch; }

.sub-toggle {
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  width: 28px;
  height: auto;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.sub-toggle:hover,
.sub-toggle:focus-visible,
.has-sub:hover .sub-toggle,
.has-sub:focus-within .sub-toggle { background: rgba(255, 255, 255, 0.14); }

#site-nav .has-sub > ul {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(40, 20, 80, 0.18);
  padding: 6px;
  z-index: 20;
  flex-direction: column;
  align-items: stretch;
}

#site-nav .has-sub.open > ul { display: flex; }

.has-sub ul a {
  color: var(--purple);
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 6px;
}

.has-sub ul a:hover,
.has-sub ul a:focus-visible { background: var(--purple-soft); }

/* Hero — artwork sits at the bottom of the banner. The banner grows when
   the copy is taller than the art, so the logo line is never clipped. */
.hero {
  position: relative;
  display: grid;
  align-items: stretch;
  background: linear-gradient(90deg, #ffbb36 0%, #ffc243 22%, #ffc754 48%, #ffc754 100%);
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  grid-area: 1 / 1;
  align-self: end;
  width: 100%;
  aspect-ratio: 1626 / 467;
  background: url("../Nuvessa_Cover_Doctor_PointUp_website.jpg") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16px);
  mask-image: linear-gradient(to bottom, transparent, #000 16px);
}

.hero-copy {
  position: relative;
  grid-area: 1 / 1;
  align-self: stretch;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(520px, 44%);
  margin-left: max(20px, calc((100% - var(--max)) / 2));
  padding: clamp(16px, 3.5%, 28px) 0 12px;
}

.brand-logo {
  display: block;
  width: min(340px, 92%);
  height: auto;
  margin: 0 0 0.55em;
}

.hero h1,
.hero .hero-kicker {
  margin: 0 0 0.35em;
  font-size: clamp(18px, 1.55vw, 26px);
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  color: #fff;
}

.hero .hero-lead {
  margin: 0;
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 700;
  font-style: normal;
  line-height: 1.15;
  color: #fff;
}

.onedone {
  display: block;
  width: min(470px, 100%);
  margin-top: auto;
  margin-bottom: 0.4em;
}

.hero .footnote,
.hero .footnote a { color: #fff; }

.hero .footnote { font-size: clamp(10px, 0.8vw, 12.5px); line-height: 1.3; margin: 0; }

.hero-break { display: inline; }

.hero .footnote a { text-underline-offset: 2px; }

/* Sections */
.section { padding: 26px 0 22px; }
.section.tight { padding-top: 8px; }

.section h2 {
  color: var(--purple);
  font-size: clamp(24px, 2.3vw, 30px);
  margin: 0 0 8px;
}

.section h3 {
  color: var(--purple);
  font-size: 26px;
  margin: 1.4em 0 0.45em;
}

.green { color: var(--green); }

.lede {
  font-size: 18px;
  font-weight: 600;
  color: var(--green);
  margin-top: 0;
}

.prescribe-one span {
  color: var(--gold-deep);
  font-size: 1.45em;
  line-height: 0;
}

.center-title { text-align: center; }

section[id] { scroll-margin-top: 16px; }

.split {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 36px;
  align-items: center;
}

.product-shot { width: min(100%, 340px); justify-self: end; }

.mint { background: var(--mint); }

.savings-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(200px, 1fr);
  gap: 16px 20px;
  align-items: center;
}

.wallet {
  position: static;
  width: min(100%, 196px);
  height: auto;
  justify-self: end;
  margin: 0;
}

.btn {
  display: inline;
  background: none;
  color: var(--purple) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
  padding: 0;
  border: 0;
}

.btn:hover { color: var(--green-deep) !important; }

.fine {
  font-size: 12.5px;
  line-height: 1.4;
  color: #5c6560;
  margin: 0.35em 0;
}

.savings-wrap .fine,
.patient-savings .fine {
  font-size: 15px;
  line-height: 1.45;
  color: #243028;
}

.checks { padding-left: 1.15em; margin: 0.4em 0 1em; }
.checks li { margin: 0.45em 0; }
.checks strong { color: var(--ink); }

.savings-graphic {
  display: block;
  width: min(100%, 920px);
  margin: 8px auto 0;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 28px;
  align-items: start;
  margin: 18px 0 8px;
}

.chart-row img {
  width: 100%;
  background: #fff;
  border-radius: 8px;
}

.adherence-chart {
  width: min(100%, 760px);
  display: block;
  margin: 8px auto 12px;
  background: #fff;
}

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

.refs { font-size: 14px; color: #4d5560; }
.refs a { color: var(--purple-mid); }

/* Tables */
.table-scroll { overflow-x: auto; margin: 16px 0 8px; }

table { border-collapse: collapse; width: 100%; min-width: 640px; background: #fff; }

.compare th, .compare td,
.convenience th, .convenience td {
  border: 1px solid #f0e2c4;
  padding: 12px 14px;
  text-align: center;
  vertical-align: middle;
  font-size: 16px;
}

.compare thead th {
  background: #fff6e4;
  color: var(--purple);
  font-size: 15px;
}

.compare thead th span,
.subhead { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 2px; }

.compare thead th.col-nuv { background: var(--purple); color: #fff; }
.compare thead th.col-nuv span { color: #efeafc; }

.compare tbody th {
  text-align: left;
  background: #fff6e8;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.compare td.yes { color: var(--purple); font-weight: 700; background: #e0d8ee; }
.compare td.alt { color: #4a3b32; font-weight: 600; background: #fee7c2; }

.compare .dot::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.4em;
  border-radius: 50%;
  vertical-align: 0.08em;
}
.compare .dot-green::before { background: #1d8a4e; }
.compare .dot-red::before { background: #d23b2f; }
.compare .dot-gold::before { background: #e0a21a; }

.convenience { min-width: 720px; background: transparent; }
.convenience caption {
  caption-side: top;
  text-align: center;
  font-weight: 700;
  color: var(--purple);
  padding: 0 0 10px;
  font-size: 18px;
}
.convenience th,
.convenience td { background: #fff; }
.convenience thead th { background: var(--purple); color: #fff; }
.convenience thead td.conv-cut {
  background: transparent;
  border: none;
  padding: 0;
}
.convenience thead th.conv-corner {
  background: #fff;
  color: var(--purple);
  text-align: left;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
}
.convenience thead tr:last-child th {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}
.convenience thead tr:last-child th.conv-corner {
  color: var(--purple);
  font-weight: 700;
  font-size: 15px;
  text-align: left;
}
.convenience tbody th { text-align: left; background: #fff; font-weight: 500; }

/* Resources */
.resource-panel {
  background: var(--purple);
  color: #fff;
  border-radius: 18px;
  padding: 22px 22px 26px;
  margin: 18px 0 28px;
}

.resource-panel h3 { color: #fff; text-align: center; margin: 0 0 16px; font-size: 26px; }

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

.resource-card {
  background: #fff;
  color: var(--purple);
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 12px 14px;
  text-align: center;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
}

.resource-card img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  object-position: center top;
  background: #fafafa;
}

.resource-card:hover { color: var(--green-deep); }

.cites { padding-left: 1.15em; }
.cites li { margin: 0.4em 0; }
.cites a { font-weight: 700; color: var(--purple); }
.cites a:hover { color: var(--green-deep); }

.patient-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr);
  gap: 28px 40px;
  align-items: start;
}

.patient-copy > h2:first-child { margin-top: 0; }

.section h3.patient-subhead {
  color: var(--green);
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 700;
  margin: 1.1em 0 0.35em;
}

.patient-savings {
  margin-top: 1.6em;
}

.patient-savings .lede {
  font-size: clamp(18px, 1.7vw, 22px);
  margin-bottom: 0.55em;
}

.patient-refs {
  grid-column: 1 / -1;
  margin: 8px 0 0;
}

.brochure-card {
  display: block;
  width: 100%;
  max-width: 300px;
  justify-self: end;
  background: #fff;
  border: 3px solid var(--purple);
  border-radius: 18px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  box-shadow: 5px 7px 18px rgba(36, 28, 58, 0.2);
}

.brochure-card-head {
  display: block;
  background: var(--purple);
  color: #fff;
  padding: 16px 14px 18px;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.15;
}

.brochure-card-body {
  display: block;
  background: #fff;
  padding: 28px 34px 32px;
}

.brochure-card img {
  display: block;
  width: 100%;
  max-width: 120px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.brochure-card:hover { color: #fff; }
.brochure-card:hover .brochure-card-head { background: var(--purple-mid); }

/* ISI */
.isi-onpage {
  background: #fff8f0;
  border-top: 0;
  padding: 18px 0 22px;
}

.isi-body h2 {
  font-size: 15px;
  letter-spacing: 0.01em;
  margin: 0 0 6px;
  color: var(--ink);
}

.isi-body h3 {
  font-size: 14.5px;
  margin: 0.7em 0 0.15em;
  color: var(--ink);
}

.isi-body p,
.isi-body li { font-size: 14px; margin: 0 0 0.35em; }

.isi-body ul { margin: 0.2em 0 0.7em; padding-left: 1.2em; }

.isi-tray {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--tray);
  background: #fff;
  border-top: 4px solid var(--purple);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.12);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: height 0.35s ease;
}

.isi-tray.is-hidden { display: none; }

.isi-tray.is-open { height: min(78vh, calc(100vh - 80px)); }

.isi-tray-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 6px 16px 0;
  flex: 0 0 auto;
}

.isi-expand {
  border: 0;
  background: #fff;
  color: #3d9b90;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
}

.isi-expand:hover,
.isi-expand:focus-visible { color: var(--purple); }

.isi-tray .isi-scroll {
  overflow: hidden;
  padding: 0 22px 12px;
  flex: 1 1 auto;
}

.isi-tray.is-open .isi-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Footer */
.site-footer {
  background: var(--footer);
  color: #3a3a3a;
  text-align: center;
  padding: 16px 0 22px;
  font-size: 13px;
  line-height: 1.45;
}

.site-footer .alembic { width: 190px; height: auto; margin: 8px 0 4px; }

.site-footer p { margin: 0.35em 0; }

.site-footer a { color: var(--purple); font-weight: 600; }

.footer-links { margin-top: 8px; }

.legal-page { padding: 36px 0 20px; }
.legal-page h1 { color: var(--purple); font-size: 34px; margin-top: 0; }
.legal-copy, .legal-copy * { font-family: var(--font); }
.legal-copy h2, .legal-copy h3, .legal-copy h4 { color: var(--purple); font-size: 1.2rem; }
.legal-copy p, .legal-copy li { font-size: 16.5px; color: var(--ink); }
.legal-copy a { font-weight: 600; }

.disclosure-list { padding: 0; list-style: none; }
.disclosure-list li {
  background: var(--purple-soft);
  border-radius: 10px;
  margin: 0 0 10px;
}
.disclosure-list a {
  display: block;
  padding: 14px 16px;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-bar { justify-content: flex-start; min-height: 54px; }
  #site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--purple);
    z-index: 30;
    padding: 6px 10px 14px;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.18);
  }
  #site-nav.open { display: block; }
  #site-nav ul { flex-direction: column; align-items: stretch; }
  #site-nav a { display: block; }
  .has-sub { flex-wrap: wrap; }
  .has-sub > a { flex: 1; }
  #site-nav .has-sub > ul {
    position: static;
    display: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
    min-width: 0;
    width: 100%;
    padding: 4px;
  }
  #site-nav .has-sub.open > ul { display: flex; }
  .has-sub ul a { color: #fff; }
  .has-sub ul a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

  #site-nav .has-sub ul a,
  #site-nav .has-sub ul a:hover,
  #site-nav .has-sub ul a:focus-visible {
    color: #fff;
    background: transparent;
  }
  .hero {
    /* Top edge of the cover photo. A darker gold here read as a second panel. */
    display: block;
    background: #ffc754;
    min-height: 0;
    aspect-ratio: auto;
  }
  .hero::before { content: none; display: none; }
  .hero-break { display: none; }
  .hero-copy {
    position: static;
    width: auto;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 24px 20px 0;
    display: block;
  }
  .onedone { margin-top: 8px; }
  .hero::after {
    content: "";
    display: block;
    /* Tall enough to show the physician and the 1, short enough that neither is cropped. */
    height: clamp(168px, 53vw, 340px);
    min-height: 0;
    margin-top: -1px;
    background: url("../Nuvessa_Cover_Doctor_PointUp_website.jpg") right center / cover no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8px);
    mask-image: linear-gradient(to bottom, transparent, #000 8px);
  }

  .split,
  .chart-row,
  .patient-layout,
  .resource-grid { grid-template-columns: 1fr; }
  .product-shot { justify-self: center; }
  .brand-logo { width: min(280px, 88%); margin-bottom: 0.7em; }
  .savings-wrap {
    grid-template-columns: minmax(0, 1.4fr) minmax(130px, 0.9fr);
    align-items: center;
  }
  .wallet { width: min(100%, 200px); }
  .brochure-card {
    max-width: 280px;
    margin: 8px auto 0;
    justify-self: center;
  }
  .section { padding: 32px 0; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .resource-card img { height: 180px; }
  :root { --tray: 168px; }
  .savings-wrap {
    grid-template-columns: 1fr;
  }
  .savings-wrap .wallet {
    justify-self: center;
    margin-top: 14px;
  }
}

/* ==========================================================================
   Popup Modal (Healthcare Provider Confirmation)
   ========================================================================== */
/* Background blur when modal is open */
body.modal-open > *:not(.modal-overlay) {
  filter: blur(5px);
  transition: filter 0.25s ease;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 10, 36, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 50px 16px 24px;
  box-sizing: border-box;
  overflow-y: auto;
}

.modal-overlay.is-active,
.modal-overlay.in,
.modal-overlay.show {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #ffffff;
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
  padding: 32px 28px 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  text-align: center;
  position: relative;
  transform: translateY(-20px) scale(0.98);
  transition: transform 0.25s ease;
  margin: 10px auto 0;
  box-sizing: border-box;
}

.modal-overlay.is-active .modal-box,
.modal-overlay.in .modal-box,
.modal-overlay.show .modal-box {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--purple);
}

.modal-title {
  color: var(--purple);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 20px;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.modal-btn:hover {
  transform: translateY(-1px);
}

.modal-btn-yes {
  background-color: #69b6ac;
  color: #ffffff !important;
  border-color: #69b6ac;
  box-shadow: 0 3px 8px rgba(105, 182, 172, 0.35);
}

.modal-btn-yes:hover {
  background-color: #559e94;
  border-color: #559e94;
  color: #ffffff !important;
}

.modal-btn-no {
  background-color: var(--purple);
  color: #ffffff !important;
  border-color: var(--purple);
  box-shadow: 0 3px 8px rgba(71, 43, 116, 0.35);
}

.modal-btn-no:hover {
  background-color: var(--purple-deep);
  border-color: var(--purple-deep);
  color: #ffffff !important;
}

.modal-text {
  font-size: 13.5px;
  color: #666;
  margin: 0;
  line-height: 1.4;
  font-style: italic;
}

@media (max-width: 480px) {
  .modal-overlay {
    padding: 24px 12px 20px;
  }
  .modal-box {
    margin: 0 auto;
    padding: 26px 18px 20px;
  }
  .modal-title {
    font-size: 19px;
  }
  .modal-btn {
    min-width: 95px;
    padding: 8px 18px;
    font-size: 14px;
  }
}

@media print {
  .isi-tray, .nav-toggle, .wallet { display: none !important; }
  body.has-tray { padding-bottom: 0; }
  .hero { min-height: 0; }
  a { text-decoration: underline; }
}
