/* ==========================================================================
   Vaughan Endoscopy Clinic
   Design notes: the patient population skews 50+, and a large share of
   traffic arrives the night before a procedure on a phone, looking for prep
   instructions. So: 18px base, high contrast, large tap targets, no
   low-contrast grey-on-grey, and prep content readable without pinch-zoom.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --navy-900: #0b2540;
  --navy-800: #10314f;
  --navy-700: #16436b;
  --navy-600: #1d5588;
  --navy-100: #e6eef6;
  --navy-50:  #f2f7fb;

  --sage-700: #45704d;
  --sage-600: #5f9169;
  --sage-500: #7fa987;
  --sage-100: #e7f0e9;
  --sage-50:  #f2f8f3;

  --ink:      #16202b;
  --ink-soft: #44535f;
  /* #667887 gave only 4.56:1 on white and dropped to 4.14:1 on the tinted
     surfaces this palette uses (navy-50, sage-50, shell, amber-100), so muted
     text failed AA anywhere it sat on a tint. #5b6b7a clears 4.97:1 on the
     worst of them. */
  --ink-mute: #5b6b7a;

  --paper:    #ffffff;
  --shell:    #f7f9fb;
  --line:     #dde5ec;
  --line-soft:#e9eef3;

  --amber-100:#fdf3dc;
  --amber-700:#8a6414;
  --rose-100: #fceceb;
  --rose-700: #9c3a34;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(11,37,64,.06), 0 1px 3px rgba(11,37,64,.05);
  --shadow:    0 2px 4px rgba(11,37,64,.05), 0 8px 24px rgba(11,37,64,.07);
  --shadow-lg: 0 4px 8px rgba(11,37,64,.05), 0 20px 48px rgba(11,37,64,.10);

  --wrap: 1140px;
  --wrap-narrow: 760px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-600); text-underline-offset: 3px; }
a:hover { color: var(--navy-800); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; color: var(--navy-900); margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 1.08rem + .5vw, 1.4rem); }
h4 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 650; letter-spacing: -.005em; }
p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.35em; }
li { margin-bottom: .45em; }
strong { font-weight: 650; color: var(--navy-900); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

:focus-visible {
  outline: 3px solid var(--sage-600);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--navy-900); color: #fff; padding: .8rem 1.2rem;
  border-radius: 0 0 var(--r) 0; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

/* --- Layout primitives -------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.4rem; }
.wrap-narrow { max-width: var(--wrap-narrow); }
.section { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section--tight { padding-block: clamp(2.2rem, 1.6rem + 2.5vw, 3.5rem); }
.section--shell { background: var(--shell); }
.section--navy { background: var(--navy-900); color: #dce7f1; }
.section--navy h2, .section--navy h3 { color: #fff; }

.grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px)  { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); }
                             .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.lede { font-size: clamp(1.1rem, 1.02rem + .4vw, 1.3rem); color: var(--ink-soft); line-height: 1.6; }
.eyebrow {
  font-family: var(--font-sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--sage-700);
  margin: 0 0 .7rem;
}
.section--navy .eyebrow { color: var(--sage-500); }
.center { text-align: center; }
.section-head { max-width: 68ch; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 620;
  padding: .95rem 1.6rem; min-height: 54px;
  border-radius: var(--r); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.btn-primary:hover { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.btn-secondary { background: var(--paper); color: var(--navy-700); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--navy-600); background: var(--navy-50); color: var(--navy-800); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* --- Header ------------------------------------------------------------- */
.topbar {
  background: var(--navy-900); color: #cfdded;
  font-size: .88rem; padding: .5rem 0;
}
.topbar .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; align-items: center; justify-content: space-between; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; display: inline-block; padding: .45rem 0; }
.topbar a:hover { text-decoration: underline; color: #fff; }
.topbar-item { display: inline-flex; align-items: center; gap: .45rem; }
.topbar svg { width: 16px; height: 16px; flex: none; opacity: .85; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background-color .25s ease;
}
.site-header .wrap { max-width: 1260px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; flex: none; }
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-family: var(--font-serif); font-weight: 650; font-size: 1.12rem; color: var(--navy-900); letter-spacing: -.01em; }
.brand-sub { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-700); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r);
  padding: .6rem .9rem; min-height: 48px; font-family: var(--font-sans);
  font-size: .95rem; font-weight: 620; color: var(--navy-800); cursor: pointer;
}
.nav-toggle:hover { border-color: var(--navy-600); }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
/* Scoped to the list on purpose. A bare `.site-nav a` outranks `.btn-primary`
   on specificity and repaints the CTA's label in body-text grey on navy. */
.site-nav ul a {
  display: block; text-decoration: none; font-size: .96rem; font-weight: 560;
  color: var(--ink-soft); padding: .55rem .62rem; border-radius: var(--r-sm);
}
.site-nav ul a:hover { color: var(--navy-800); background: var(--navy-50); }
.site-nav ul a[aria-current="page"] { color: var(--navy-800); font-weight: 680; background: var(--navy-50); }

@media (max-width: 1159px) {
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); padding: .8rem 1.4rem 1.4rem;
    max-height: calc(100dvh - 78px); overflow-y: auto;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul a { padding: .85rem .8rem; font-size: 1.05rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .site-nav ul li:last-child a { border-bottom: 0; }
  .nav-cta { margin-top: 1rem; }
  .nav-cta .btn { width: 100%; }
}
@media (min-width: 1160px) {
  .nav-toggle { display: none; }
  /* The nav itself must be a row. Left as a block, the CTA drops onto its
     own line below the links and stretches the full header width. */
  .site-nav { display: flex; align-items: center; gap: 1.1rem; }
  .site-nav ul { display: flex; align-items: center; gap: .15rem; }
  .header-actions { display: flex; align-items: center; gap: 1rem; }
  .nav-cta { flex: none; }
  .nav-cta .btn { padding: .7rem 1.15rem; min-height: 46px; font-size: .94rem; white-space: nowrap; }
}
.header-actions { display: flex; align-items: center; gap: .7rem; }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(127,169,135,.20), transparent 62%),
    radial-gradient(900px 480px at 4% 108%, rgba(29,85,136,.13), transparent 60%),
    linear-gradient(178deg, #fbfdfe 0%, var(--shell) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding-block: clamp(3rem, 2rem + 5vw, 5.5rem); display: grid; gap: 3rem; align-items: center; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 4rem; } }
.hero h1 { margin-bottom: .55em; }
.hero .lede { max-width: 54ch; }

.status-pill {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--sage-100); color: var(--sage-700);
  border: 1px solid #cfe2d4; border-radius: 999px;
  padding: .45rem 1.05rem .45rem .8rem; font-size: .9rem; font-weight: 650;
  margin-bottom: 1.5rem;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sage-600); flex: none; box-shadow: 0 0 0 3px rgba(95,145,105,.22); }

.fact-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .8rem; }
.fact-list li { display: flex; gap: .75rem; align-items: flex-start; margin: 0; font-size: 1.02rem; color: var(--ink-soft); }
.fact-list svg { width: 22px; height: 22px; flex: none; color: var(--sage-600); margin-top: 2px; }
.fact-list strong { color: var(--navy-900); }

/* Hero side card */

/* --- Cards -------------------------------------------------------------- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.7rem;
  display: flex; flex-direction: column;
}
.card--link { text-decoration: none; color: inherit; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.card--link:hover { border-color: var(--navy-600); box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--ink-soft); font-size: .98rem; margin-bottom: 1rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 48px; height: 48px; border-radius: var(--r);
  background: var(--navy-50); color: var(--navy-700);
  display: grid; place-items: center; margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }
.card--sage .card-icon { background: var(--sage-100); color: var(--sage-700); }
.card-more { margin-top: auto; font-weight: 640; color: var(--navy-600); font-size: .95rem; display: inline-flex; align-items: center; gap: .4rem; }
.card--link:hover .card-more { gap: .65rem; }
.card-more svg { width: 16px; height: 16px; transition: transform .16s ease; }

/* --- Document list (prep PDFs) ------------------------------------------ */
.doc-list { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .doc-list--2 { grid-template-columns: 1fr 1fr; } }
.doc {
  display: flex; align-items: center; gap: 1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.05rem 1.2rem; text-decoration: none; color: inherit; min-height: 76px;
  transition: border-color .16s ease, background-color .16s ease;
  margin: 0;
}
.doc:hover { border-color: var(--navy-600); background: var(--navy-50); color: inherit; }
/* Emoji rather than a "PDF" badge: at a glance you can tell the drink prep
   from the diet sheet from the consent form. Marked aria-hidden so screen
   readers announce the document title, not "page facing up". */
.doc-icon {
  width: 44px; height: 44px; flex: none; border-radius: var(--r-sm);
  background: var(--shell); border: 1px solid var(--line-soft);
  display: grid; place-items: center;
  font-size: 1.35rem; line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.doc:hover .doc-icon { background: var(--paper); border-color: var(--navy-100); }
.doc-body { min-width: 0; }
.doc-title { font-weight: 640; color: var(--navy-900); display: block; line-height: 1.35; }
.doc-meta { font-size: .85rem; color: var(--ink-mute); }
.doc-arrow { margin-left: auto; color: var(--ink-mute); flex: none; }
.doc:hover .doc-arrow { color: var(--navy-600); }
.doc svg { width: 20px; height: 20px; }

/* --- Callouts ----------------------------------------------------------- */
.callout {
  border-radius: var(--r-lg); padding: 1.4rem 1.6rem;
  border: 1px solid var(--line); background: var(--navy-50);
  margin: 2rem 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout h3 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 650; margin-top: 0; display: flex; align-items: center; gap: .55rem; margin-bottom: .5rem; }
.callout svg { width: 22px; height: 22px; flex: none; }
.callout--warn { background: var(--amber-100); border-color: #f0dfb4; }
.callout--warn h3 { color: var(--amber-700); }
.callout--alert { background: var(--rose-100); border-color: #f3d3d0; }
.callout--alert h3 { color: var(--rose-700); }
.callout--sage { background: var(--sage-50); border-color: #d3e6d8; }
.callout--sage h3 { color: var(--sage-700); }

/* --- Stats / quality ---------------------------------------------------- */
.stat-band { display: grid; gap: 1.6rem; }
@media (min-width: 700px) { .stat-band { grid-template-columns: repeat(4, 1fr); } }
.stat { border-left: 3px solid var(--sage-500); padding-left: 1.1rem; }
.stat-value { font-family: var(--font-serif); font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.2rem); font-weight: 650; color: #fff; line-height: 1.1; }
.stat-label { font-size: .93rem; color: #adc3d6; margin-top: .3rem; }

/* --- Physician cards ---------------------------------------------------- */
.doc-grid { display: grid; gap: 1.4rem; }
@media (min-width: 700px) { .doc-grid { grid-template-columns: 1fr 1fr; } }
.physician { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem 1.6rem; }
.physician-name { font-family: var(--font-serif); font-size: 1.22rem; font-weight: 650; color: var(--navy-900); margin: 0 0 .15rem; }
.physician-cred { font-size: .87rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--sage-700); margin-bottom: .5rem; }
.physician-role {
  display: inline-block; font-size: .8rem; font-weight: 650; color: var(--navy-700);
  background: var(--navy-100); border-radius: 999px; padding: .18rem .7rem; margin-bottom: .8rem;
}
.physician p { font-size: .96rem; color: var(--ink-soft); margin-bottom: 0; }

/* --- FAQ / accordion ---------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.35rem 3rem 1.35rem 0;
  font-family: var(--font-serif); font-size: 1.13rem; font-weight: 600; color: var(--navy-900);
  position: relative; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .55rem; top: 50%;
  width: 11px; height: 11px; margin-top: -8px;
  border-right: 2.5px solid var(--sage-600); border-bottom: 2.5px solid var(--sage-600);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq summary:hover { color: var(--navy-600); }
.faq-body { padding: 0 1rem 1.5rem 0; color: var(--ink-soft); }
.faq-body > :last-child { margin-bottom: 0; }

/* --- Tables ------------------------------------------------------------- */
.table-scroll { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .97rem; }
th, td { text-align: left; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { background: var(--navy-50); font-family: var(--font-sans); font-weight: 650; color: var(--navy-900); font-size: .9rem; }
tr:last-child td { border-bottom: 0; }

/* --- Timeline (procedure day) ------------------------------------------- */
.timeline { list-style: none; margin: 2rem 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 3.4rem; margin-bottom: 1.8rem; }
.timeline li:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--sage-500); color: var(--sage-700);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; font-family: var(--font-sans);
}
.timeline h3 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 650; margin-top: 0; margin-bottom: .3rem; }
.timeline p { margin-bottom: 0; color: var(--ink-soft); font-size: .97rem; }

/* --- Page header (interior) --------------------------------------------- */
.page-head {
  background: linear-gradient(178deg, var(--navy-50) 0%, var(--shell) 100%);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.4rem, 1.8rem + 3vw, 4rem);
}
.page-head h1 { margin-bottom: .4em; }
.page-head .lede { max-width: 60ch; margin-bottom: 0; }
.crumbs { font-size: .88rem; color: var(--ink-mute); margin-bottom: 1rem; }
.crumbs a { color: var(--ink-mute); text-decoration: none; display: inline-block; padding: .2rem 0; }
.crumbs a:hover { color: var(--navy-600); text-decoration: underline; }
.crumbs span { margin: 0 .4rem; opacity: .55; }

/* --- Prose -------------------------------------------------------------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.6rem; }
.prose h3 { margin-top: 2rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul li::marker { color: var(--sage-600); }

/* --- Contact strip ------------------------------------------------------ */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.contact-line { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.3rem; }
.contact-line svg { width: 22px; height: 22px; color: var(--sage-600); flex: none; margin-top: 3px; }
.contact-line strong { display: block; margin-bottom: .1rem; }
.contact-line a { font-weight: 600; }
.map-frame { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--shell); min-height: 320px; }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }

/* --- CTA band ----------------------------------------------------------- */
.cta-band {
  background: linear-gradient(140deg, var(--navy-800) 0%, var(--navy-900) 62%, #08192c 100%);
  color: #d5e3f0; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 58ch; margin-inline: auto; color: #b9cde0; }
.cta-band .btn-row { justify-content: center; margin-top: 2rem; }

/* --- Footer ------------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: #a7bdd2; font-size: .95rem; padding-block: 3.5rem 0; }
.footer-grid { display: grid; gap: 2.4rem; padding-bottom: 3rem; }
@media (min-width: 760px)  { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.site-footer h2 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.1rem; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #a7bdd2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: var(--sage-500); }
.footer-brand p { margin-top: 1rem; font-size: .93rem; line-height: 1.6; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.13); padding-block: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  font-size: .88rem; color: #7f97ae;
}
.footer-bottom a { color: #7f97ae; display: inline-block; padding: .3rem 0; }
.emergency-note {
  background: rgba(156,58,52,.16); border: 1px solid rgba(214,120,113,.32);
  border-radius: var(--r); padding: .9rem 1.1rem; margin-bottom: 2rem;
  color: #f0c9c6; font-size: .92rem;
}
.emergency-note strong { color: #fff; }

/* --- Utility ------------------------------------------------------------ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mb-0 { margin-bottom: 0; }
.text-mute { color: var(--ink-mute); font-size: .92rem; }

@media print {
  .site-header, .topbar, .site-footer, .cta-band, .nav-toggle { display: none !important; }
  body { font-size: 12pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* --- Dropdown navigation ------------------------------------------------ */
.menu-trigger {
  display: flex; align-items: center; gap: .35rem; width: 100%;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-sans); font-size: .96rem; font-weight: 560;
  color: var(--ink-soft); padding: .55rem .62rem; border-radius: var(--r-sm);
  text-align: left;
}
.menu-trigger:hover { color: var(--navy-800); background: var(--navy-50); }
.menu-trigger svg { width: 15px; height: 15px; transition: transform .18s ease; opacity: .7; }
.menu-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.menu-trigger[aria-current="page"] { color: var(--navy-800); font-weight: 680; background: var(--navy-50); }

.submenu a {
  display: block; text-decoration: none; padding: .8rem .9rem;
  border-radius: var(--r); color: inherit;
}
.submenu a { white-space: normal; }
.submenu-title { display: block; font-weight: 650; color: var(--navy-900); font-size: 1rem; line-height: 1.3; white-space: normal; }
.submenu-desc  { display: block; font-size: .87rem; color: var(--ink-mute); line-height: 1.4; margin-top: .12rem; white-space: normal; }
.submenu a:hover { background: var(--navy-50); }
.submenu a:hover .submenu-title { color: var(--navy-600); }
.submenu a[aria-current="page"] { background: var(--navy-50); }

@media (max-width: 1159px) {
  .has-menu { border-bottom: 1px solid var(--line-soft); }
  .menu-trigger { padding: .85rem .8rem; font-size: 1.05rem; }
  .submenu { display: none; padding: 0 0 .7rem .4rem; }
  .submenu.is-open { display: block; }
  .submenu a { padding: .7rem .8rem; }
}
@media (min-width: 1160px) {
  .has-menu { position: relative; }
  .menu-trigger { width: auto; }
  .submenu {
    position: absolute; top: calc(100% + 10px); left: -.5rem;
    width: 360px; padding: .5rem;
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
  }
  .submenu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  /* Hover bridge so the pointer can travel from trigger to panel. */
  .has-menu::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
  .site-nav ul { gap: .1rem; }
  /* Scope nowrap to the top-level nav items. `.site-nav ul a` also matches
     the anchors inside the Procedures dropdown, which stopped their
     descriptions wrapping and pushed the text out past the panel edge. */
  .site-nav > ul > li > a, .menu-trigger { white-space: nowrap; }
}

/* --- Small-screen corrections ------------------------------------------- */
/* The brand lockup plus the Menu button overflow the header below ~560px,
   which clipped the button off the right edge. */
@media (max-width: 560px) {
  .header-inner { min-height: 68px; gap: .6rem; }
  .brand { gap: .6rem; min-width: 0; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: .97rem; }
  .brand-sub { font-size: .63rem; letter-spacing: .08em; }
  .nav-toggle { padding: .55rem .75rem; font-size: .9rem; }
  .site-nav { top: 68px; max-height: calc(100dvh - 68px); }
}
@media (max-width: 380px) {
  .brand-sub { display: none; }
  .nav-toggle { font-size: 0; gap: 0; padding: .6rem; }
  .nav-toggle svg { width: 22px; height: 22px; }
}

/* Tap targets. The patient population here skews older, so aim well above
   the 24px WCAG 2.2 minimum wherever there is room. */
/* Phone numbers are the primary conversion action; keep them comfortably
   above the 24px minimum wherever they appear. */
a[href^="tel:"] { display: inline-block; padding: .25rem 0; }
.site-footer li { margin-bottom: .2rem; }
.site-footer li a { display: inline-block; padding: .45rem 0; }

/* --- Motion polish ------------------------------------------------------ */
/* The sticky header sits flat against the page until you scroll, then lifts
   with a soft shadow. Keeps the top of the page clean and gives the header
   somewhere to go. */
.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(11,37,64,.06), 0 8px 28px rgba(11,37,64,.08);
  background: rgba(255,255,255,.97);
}

/* Sections ease in as they arrive, using the native CSS scroll-driven
   animation timeline. No JavaScript on purpose: where `animation-timeline`
   is unsupported the @supports block simply does not apply and every section
   renders visible, so there is no path where a patient loads this page and
   finds the content missing. */
@keyframes vec-reveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    main > section + section,
    main > .page-head + section {
      animation: vec-reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 38%;
    }
  }
}

/* --- Document search ---------------------------------------------------- */
.doc-search { margin: 0 0 2rem; }
.doc-search-field {
  position: relative; display: flex; align-items: center;
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r); transition: border-color .16s ease, box-shadow .16s ease;
}
.doc-search-field:focus-within {
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgba(29,85,136,.28);
}
.doc-search-field > svg { width: 21px; height: 21px; flex: none; margin-left: 1rem; color: var(--ink-mute); }
.doc-search input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font-family: var(--font-sans); font-size: 1.02rem; color: var(--ink);
  padding: 1rem .9rem; min-height: 56px;
}
.doc-search input::placeholder { color: var(--ink-mute); }
.doc-search input::-webkit-search-cancel-button { display: none; }
.doc-search-clear {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; margin-right: .6rem;
  background: none; border: 0; border-radius: 50%;
  color: var(--ink-mute); cursor: pointer;
}
.doc-search-clear:hover { background: var(--shell); color: var(--navy-800); }
.doc-search-clear svg { width: 17px; height: 17px; }
.doc-search-hint { font-size: .89rem; color: var(--ink-mute); margin: .7rem .2rem 0; }
.doc-search-status { font-size: .92rem; font-weight: 600; color: var(--navy-800); margin: 1.2rem .2rem .8rem; }
.doc-search-status:empty { display: none; }
.doc-search-results[hidden] { display: none; }

.doc-snippet {
  display: block; font-size: .88rem; color: var(--ink-mute);
  line-height: 1.5; margin-top: .25rem;
}
.doc-snippet mark {
  background: #fdf0c4; color: var(--ink);
  border-radius: 3px; padding: 0 .15em; font-weight: 600;
}
.doc-search-results .doc { align-items: flex-start; min-height: 0; padding: 1.1rem 1.2rem; }
.doc-search-results .doc-icon { margin-top: 2px; }
.doc-cat {
  display: inline-block; font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--sage-700); background: var(--sage-50);
  border: 1px solid #d8e7dc; border-radius: 999px;
  padding: .08rem .5rem; margin-left: .5rem; vertical-align: 2px;
}
.doc-search-empty {
  border: 1px dashed var(--line); border-radius: var(--r);
  padding: 1.6rem; text-align: center; color: var(--ink-soft);
}
.doc-search-empty p { margin: 0; }
.is-searching .doc-curated { display: none; }

/* --- Prep schedule tool -------------------------------------------------- */
.prep-form { max-width: 720px; }
.prep-fields { display: grid; gap: 1.2rem; margin-bottom: 1.8rem; }
@media (min-width: 620px) { .prep-fields { grid-template-columns: 1fr 1fr; } }

.field label, .prep-choice legend {
  display: block; font-weight: 650; color: var(--navy-900);
  margin-bottom: .5rem; font-size: 1.02rem;
}
.field input {
  width: 100%; font-family: var(--font-sans); font-size: 1.05rem;
  padding: .9rem 1rem; min-height: 56px;
  border: 1.5px solid var(--line); border-radius: var(--r);
  background: var(--paper); color: var(--ink);
}
/* Do not strip the outline on :focus. That selector outranks the global
   :focus-visible rule, so removing it here left keyboard users with only a
   12%-opacity ring. Mouse focus gets the soft ring; keyboard focus keeps the
   real outline on top of it. */
.field input:focus { border-color: var(--navy-600); box-shadow: 0 0 0 4px rgba(29,85,136,.28); }
.field input:focus:not(:focus-visible) { outline: none; }
.field-hint { font-size: .9rem; color: var(--ink-mute); margin: .5rem 0 0; }

.prep-choice { border: 0; padding: 0; margin: 0 0 1.6rem; }
.prep-choice legend { padding: 0; margin-bottom: .8rem; }
.choice {
  display: flex; gap: .9rem; align-items: flex-start;
  border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 1.1rem 1.2rem; margin-bottom: .7rem; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.choice:hover { border-color: var(--navy-600); background: var(--navy-50); }
.choice input { margin-top: .3rem; width: 20px; height: 20px; accent-color: var(--navy-700); flex: none; }
.choice:has(input:checked) { border-color: var(--navy-700); background: var(--navy-50); }
.choice-title { display: block; font-weight: 650; color: var(--navy-900); }
.choice-note { display: block; font-size: .92rem; color: var(--ink-mute); margin-top: .1rem; }

.checkbox { display: flex; gap: .7rem; align-items: center; margin-bottom: 1.8rem; cursor: pointer; min-height: 44px; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--navy-700); }
.btn-lg { font-size: 1.08rem; padding: 1.1rem 2rem; min-height: 60px; }

.prep-result { margin-top: 2.5rem; }
.prep-plan-head { border-top: 3px solid var(--sage-500); padding-top: 1.8rem; margin-bottom: 2rem; }
.prep-plan-head h2 { margin-bottom: .3rem; }
.prep-actions { margin-top: 1.4rem; }

.prep-day { margin-bottom: 2.4rem; }
.prep-day h3 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .7rem;
  padding-bottom: .6rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem;
}
.prep-day-rel {
  font-family: var(--font-sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--sage-700);
  background: var(--sage-50); border: 1px solid #d8e7dc;
  border-radius: 999px; padding: .15rem .7rem;
}
.prep-steps { list-style: none; margin: 0; padding: 0; }
.prep-step { display: flex; gap: 1.1rem; padding: 1rem 0; border-bottom: 1px solid var(--line-soft); margin: 0; }
.prep-step:last-child { border-bottom: 0; }
.prep-time {
  flex: none; width: 92px; font-weight: 700; color: var(--navy-800);
  font-variant-numeric: tabular-nums; font-size: 1rem; padding-top: 1px;
}
.prep-body { min-width: 0; }
.prep-body strong { display: block; color: var(--navy-900); margin-bottom: .2rem; font-size: 1.04rem; }
.prep-detail { display: block; color: var(--ink-soft); font-size: .97rem; line-height: 1.55; }
.prep-step.is-critical { background: var(--amber-100); border-radius: var(--r); padding: 1rem 1.1rem; border-bottom: 0; margin-bottom: .5rem; }
.prep-step.is-critical .prep-time { color: var(--amber-700); }
@media (max-width: 560px) {
  .prep-step { flex-direction: column; gap: .3rem; }
  .prep-time { width: auto; }
}

/* A patient prints this and sticks it on the fridge. Give them the schedule
   and nothing else: no nav, no buttons, no marketing. */
@media print {
  .prep-form, .no-print, .page-head .crumbs, .prep-actions, .doc-search { display: none !important; }
  .prep-result { margin-top: 0; }
  .prep-step.is-critical { background: none; border: 1.5px solid #999; }
  .prep-day { break-inside: avoid; }
  .prep-step { break-inside: avoid; }
}

/* The single most-wanted thing on this site is a prep sheet the night before
   a procedure. Give it visual priority in the nav rather than burying it. */
.site-nav ul a.nav-priority { color: var(--navy-800); font-weight: 680; }
@media (min-width: 1160px) {
  .site-nav ul a.nav-priority {
    background: var(--sage-50);
    border: 1px solid #d8e7dc;
  }
  .site-nav ul a.nav-priority:hover { background: var(--sage-100); border-color: #cfe2d4; }
}

/* --- Homepage task router ----------------------------------------------- */
/* Three doors, above the fold. Previously the highest-urgency task on the
   site, finding your prep sheet the night before, sat 4.4 phone screens down
   the homepage. */
.task-router {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: 1.4rem;
}
.task-router-label {
  font-family: var(--font-sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink-mute);
  margin: .2rem .4rem 1rem;
}
.task {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.1rem; border-radius: var(--r);
  text-decoration: none; color: inherit; margin-bottom: .6rem;
  border: 1.5px solid var(--line);
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.task:last-of-type { margin-bottom: 0; }
.task:hover {
  border-color: var(--navy-600); background: var(--navy-50);
  color: inherit; transform: translateX(2px);
}
.task-icon {
  width: 46px; height: 46px; flex: none; border-radius: var(--r);
  background: var(--sage-100); color: var(--sage-700);
  display: grid; place-items: center;
}
.task-icon svg { width: 24px; height: 24px; }
.task-body { min-width: 0; flex: 1; }
.task-title { display: block; font-weight: 680; color: var(--navy-900); font-size: 1.06rem; line-height: 1.3; }
.task-note { display: block; font-size: .92rem; color: var(--ink-mute); margin-top: .12rem; line-height: 1.4; }
.task-arrow { width: 20px; height: 20px; flex: none; color: var(--ink-mute); }
.task:hover .task-arrow { color: var(--navy-600); }
.task-call { margin: 1.2rem .4rem .2rem 0; font-size: .95rem; color: var(--ink-soft); }

/* On a phone the router would otherwise sit below the entire hero. Put it
   directly under the headline, ahead of the supporting detail, so the
   primary task is reachable without scrolling. */
.hero-inner > .fact-list { margin-top: 0; }
@media (max-width: 959px) {
  .hero-intro { order: 1; }
  .task-router { order: 2; }
  .hero-inner > .fact-list { order: 3; }
  .hero-inner { gap: 2rem; }
}
@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: 1.15fr .85fr;
    grid-template-areas:
      "intro  router"
      "facts  router";
    align-items: start;
    row-gap: 2rem;
  }
  .hero-intro { grid-area: intro; }
  .hero-inner > .fact-list { grid-area: facts; }
  .task-router { grid-area: router; align-self: start; }
}
.prep-time.is-allday { color: var(--ink-mute); font-weight: 600; }

/* --- Referral fill-and-fax ---------------------------------------------- */
.referral-layout { display: grid; gap: 2.5rem; }
@media (min-width: 1040px) { .referral-layout { grid-template-columns: 1fr 1fr; align-items: start; } }
.referral-form fieldset { border: 0; padding: 0; margin: 0 0 2.2rem; }
.referral-form legend {
  font-family: var(--font-serif); font-size: 1.2rem; font-weight: 650;
  color: var(--navy-900); padding: 0; margin-bottom: .9rem;
  border-bottom: 1px solid var(--line); width: 100%; padding-bottom: .5rem;
}
.referral-form .checkbox { margin-bottom: .5rem; }
.referral-form .field { margin-bottom: 1rem; }
.referral-preview-wrap { position: sticky; top: 96px; }
.referral-preview {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1.6rem; font-size: .92rem;
}
.rf-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 2px solid var(--navy-900); padding-bottom: .8rem; margin-bottom: 1.2rem; font-size: .82rem; line-height: 1.45; }
.rf-title { font-weight: 800; letter-spacing: .04em; text-align: right; color: var(--navy-900); }
.rf-section { margin-bottom: 1.2rem; }
.rf-section h3 { font-family: var(--font-sans); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-700); margin-bottom: .5rem; }
.rf-line { display: flex; gap: .8rem; padding: .3rem 0; border-bottom: 1px dotted var(--line); }
.rf-label { flex: none; width: 130px; color: var(--ink-mute); }
.rf-value { font-weight: 600; color: var(--navy-900); }
.rf-list { margin: 0 0 .6rem; padding-left: 1.2rem; }
.rf-list li { margin-bottom: .2rem; font-weight: 600; color: var(--navy-900); }
.rf-empty { color: var(--rose-700); font-weight: 600; }
.rf-sign { display: flex; gap: .8rem; align-items: flex-end; margin-top: 1rem; }
.rf-signline { flex: 1; border-bottom: 1px solid var(--ink); height: 1.6rem; }
.rf-foot { margin-top: 1.4rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-soft); }

@media print {
  .referral-preview-wrap { position: static; }
  .referral-preview { border: 0; padding: 0; font-size: 11pt; }
  .referral-layout { display: block; }
  .rf-section { break-inside: avoid; }
}

/* --- Tool promo ---------------------------------------------------------- */
.tool-promo {
  display: flex; align-items: center; gap: 1.1rem;
  background: linear-gradient(120deg, var(--sage-50) 0%, var(--navy-50) 100%);
  border: 1.5px solid #d3e6d8; border-radius: var(--r-lg);
  padding: 1.3rem 1.4rem; margin-bottom: 1.8rem;
  text-decoration: none; color: inherit;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.tool-promo:hover { border-color: var(--sage-600); color: inherit; transform: translateY(-1px); box-shadow: var(--shadow); }
.tool-promo-icon {
  width: 50px; height: 50px; flex: none; border-radius: var(--r);
  background: var(--paper); color: var(--sage-700);
  display: grid; place-items: center; border: 1px solid #d3e6d8;
}
.tool-promo-icon svg { width: 26px; height: 26px; }
.tool-promo-body { flex: 1; min-width: 0; }
.tool-promo-title { display: block; font-weight: 680; color: var(--navy-900); font-size: 1.08rem; line-height: 1.3; }
.tool-promo-note { display: block; font-size: .93rem; color: var(--ink-soft); margin-top: .2rem; line-height: 1.45; }

/* Section heading introducing a card grid or step list. Present mainly so the
   heading order stays h1 -> h2 -> h3 for screen-reader navigation. */
.section-lead { margin-bottom: 1.6rem; }
