/*
 * Shared editorial design tokens and patient-guide components.
 * The guide variables are also reused by the polished staff and urgent-care pages.
 */

body.patient-guide-shell {
  --guide-navy: #153953;
  --guide-navy-deep: #102d43;
  --guide-blue: #2f78b7;
  --guide-blue-soft: #eaf3fa;
  --guide-green: #4f9468;
  --guide-green-soft: #edf7f0;
  --guide-ink: #183144;
  --guide-muted: #5d7180;
  --guide-border: #d7e4ec;
  --guide-border-strong: #bfd3df;
  --guide-paper: #ffffff;
  --guide-canvas: #f4f8fa;
  --guide-warm: #a65d2c;
  --guide-warm-soft: #fff8f1;
  --guide-warm-border: #ebd4be;
  --guide-shadow: 0 18px 44px rgba(17, 49, 72, 0.10);
  --guide-shadow-soft: 0 10px 28px rgba(17, 49, 72, 0.075);
  background:
    radial-gradient(circle at 88% 8%, rgba(79, 148, 104, 0.10), transparent 25rem),
    linear-gradient(180deg, #edf4f8 0%, #f9fbfc 44%, #eef5f8 100%);
  color: var(--guide-ink);
}

/* Keyboard-only access to the guide body. */
.guide-skip-link {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 5000;
  padding: 11px 18px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--guide-navy-deep);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -160%);
  transition: transform 0.18s ease;
}

.guide-skip-link:focus {
  transform: translate(-50%, 0);
}

.patient-guide {
  width: min(100%, 1280px);
  box-sizing: border-box;
  margin: 42px auto 72px;
  padding: 0 28px;
}

.patient-guide:focus {
  outline: none;
}

/* Opening treatment panel. */
.patient-guide .guide-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: center;
  gap: clamp(30px, 4vw, 56px);
  max-width: none;
  margin: 0;
  padding: clamp(34px, 5vw, 62px);
  overflow: hidden;
  border: 1px solid var(--guide-border-strong);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(250, 253, 254, 0.99) 58%, rgba(238, 247, 241, 0.98) 100%);
  box-shadow: var(--guide-shadow);
}

.patient-guide .guide-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--guide-blue) 0 67%, var(--guide-green) 67% 100%);
}

.patient-guide .guide-hero::after {
  content: "";
  position: absolute;
  right: -86px;
  bottom: -118px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(79, 148, 104, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 30px rgba(79, 148, 104, 0.035),
    0 0 0 70px rgba(47, 120, 183, 0.025);
  pointer-events: none;
}

.guide-hero-copy,
.guide-figure {
  position: relative;
  z-index: 1;
}

.guide-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  color: var(--guide-blue);
  font-size: 0.79rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.guide-kicker-dot {
  color: var(--guide-green);
  font-size: 1rem;
  line-height: 1;
}

.guide-hero h1 {
  max-width: 17ch;
  margin: 0;
  color: var(--guide-navy-deep);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 4.2vw, 4.25rem);
  font-weight: 700;
  line-height: 1.045;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.guide-intro {
  max-width: 67ch;
  margin-top: 24px;
  padding-left: 19px;
  border-left: 3px solid var(--guide-green);
}

.guide-intro p {
  margin: 0;
  color: #385165;
  font-size: clamp(1.02rem, 1.25vw, 1.16rem);
  line-height: 1.74;
}

.guide-intro p + p {
  margin-top: 11px;
}

.guide-intro a {
  color: var(--guide-blue);
  font-weight: 700;
  text-underline-offset: 3px;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 27px;
}

.guide-print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  box-sizing: border-box;
  padding: 11px 18px;
  border: 1px solid var(--guide-navy);
  border-radius: 999px;
  background: var(--guide-navy);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 7px 18px rgba(21, 57, 83, 0.17);
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.guide-print-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.guide-print-button:hover {
  transform: translateY(-2px);
  background: var(--guide-blue);
  box-shadow: 0 10px 24px rgba(21, 57, 83, 0.22);
}

.guide-print-button:focus-visible,
.guide-back-link:focus-visible,
.guide-top-link:focus-visible,
.guide-toc a:focus-visible,
.guide-credit a:focus-visible {
  outline: 3px solid rgba(47, 120, 183, 0.32);
  outline-offset: 3px;
}

/* Educational image and licensing line. */
.guide-figure {
  width: 100%;
  max-width: 470px;
  justify-self: end;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--guide-border);
  border-radius: 22px;
  background: var(--guide-paper);
  box-shadow: var(--guide-shadow-soft);
}

.guide-image-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  overflow: hidden;
  background: #eef3f6;
}

.guide-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-figure--diagram .guide-image-frame,
.guide-figure--object .guide-image-frame {
  padding: 22px;
  box-sizing: border-box;
  background:
    linear-gradient(145deg, #ffffff 0%, #f2f7fa 100%);
}

.guide-figure--diagram .guide-image-frame img,
.guide-figure--object .guide-image-frame img,
.guide-figure--portrait .guide-image-frame img {
  object-fit: contain;
}

.guide-figure--wide .guide-image-frame {
  height: 245px;
  padding: 24px 18px;
}

.guide-figure--clinical .guide-image-frame {
  background: #e8eef1;
}

.guide-figure figcaption {
  padding: 17px 19px 18px;
  border-top: 1px solid var(--guide-border);
  background: #ffffff;
}

.guide-figure-caption {
  margin: 0;
  color: var(--guide-ink);
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.52;
}

.guide-credit {
  margin: 8px 0 0;
  color: var(--guide-muted);
  font-size: 0.69rem;
  line-height: 1.48;
}

.guide-credit a {
  color: inherit;
  text-decoration-color: #9fb3c0;
  text-underline-offset: 2px;
}

.guide-credit a:hover {
  color: var(--guide-blue);
}

/* Main reading area. The table of contents appears first in the DOM so it
   remains useful before the article on narrow screens. */
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 276px;
  grid-template-areas: "article toc";
  align-items: start;
  gap: 28px;
  margin-top: 28px;
}

.guide-article {
  grid-area: article;
  min-width: 0;
  padding: clamp(30px, 4.4vw, 58px);
  border: 1px solid var(--guide-border);
  border-radius: 24px;
  background: var(--guide-paper);
  box-shadow: var(--guide-shadow-soft);
  counter-reset: guide-section;
}

.patient-guide .guide-section {
  max-width: none;
  margin: 0;
  padding: 0 0 35px;
  border-bottom: 1px solid #e2ebf0;
  counter-increment: guide-section;
  scroll-margin-top: calc(var(--header-height) + 28px);
}

.patient-guide .guide-section + .guide-section {
  margin-top: 36px;
}

.patient-guide .guide-section:last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}

.guide-section h2 {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin: 0 0 19px;
  color: var(--guide-navy-deep);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.15vw, 1.9rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.guide-section h2::before {
  content: counter(guide-section, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  margin-top: -2px;
  border: 1px solid #c9dce7;
  border-radius: 12px;
  background: var(--guide-blue-soft);
  color: var(--guide-blue);
  font-family: Arial, sans-serif;
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.055em;
}

.guide-section h2::after,
.guide-toc-heading::after {
  content: none;
}

.guide-section p {
  max-width: 74ch;
  margin: 0;
  color: #304a5c;
  font-size: 1.035rem;
  line-height: 1.78;
}

.guide-section p + p,
.guide-section ul + p,
.guide-section p + ul {
  margin-top: 14px;
}

.guide-section a:not(.btn) {
  color: var(--guide-blue);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.guide-section ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
  columns: auto;
}

.guide-section li {
  position: relative;
  margin: 0;
  padding: 10px 13px 10px 41px;
  break-inside: auto;
  border: 1px solid #e0e9ee;
  border-radius: 11px;
  background: #f8fbfc;
  color: #304a5c;
  font-size: 1rem;
  line-height: 1.58;
}

.guide-section li::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 17px;
  width: 8px;
  height: 8px;
  border: 3px solid rgba(79, 148, 104, 0.32);
  border-radius: 50%;
  background: var(--guide-green);
  box-sizing: content-box;
}

/* Reassurance and call-us content are set apart without dominating the page. */
.patient-guide .guide-section--reassurance {
  margin-right: -18px;
  margin-left: -18px;
  padding: 24px 18px 28px;
  border: 1px solid #d4e6da;
  border-radius: 18px;
  background: linear-gradient(145deg, #fbfefc 0%, var(--guide-green-soft) 100%);
}

.guide-section--reassurance h2::before {
  border-color: #c4ddcd;
  background: #e3f2e8;
  color: #37724e;
}

.patient-guide .guide-section--contact {
  margin-right: -18px;
  margin-left: -18px;
  padding: 24px 18px 28px;
  border: 1px solid var(--guide-warm-border);
  border-radius: 18px;
  background: linear-gradient(145deg, #fffdfb 0%, var(--guide-warm-soft) 100%);
}

.guide-section--contact h2 {
  color: #743d1d;
}

.guide-section--contact h2::before {
  border-color: #e6c6a9;
  background: #fff0e2;
  color: var(--guide-warm);
}

.guide-section--contact li {
  border-color: #edddcf;
  background: rgba(255, 255, 255, 0.74);
}

.guide-section--contact li::before {
  border-color: rgba(166, 93, 44, 0.22);
  background: var(--guide-warm);
}

/* Sticky section index. */
.guide-toc {
  grid-area: toc;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.guide-toc-inner {
  padding: 22px 18px 19px;
  border: 1px solid var(--guide-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--guide-shadow-soft);
  backdrop-filter: blur(7px);
}

.guide-toc-eyebrow {
  margin: 0;
  color: var(--guide-green);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.guide-toc-heading {
  margin: 4px 0 14px;
  color: var(--guide-navy-deep);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.38rem;
  line-height: 1.22;
}

.guide-toc ol {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  columns: auto;
}

.guide-toc li {
  margin: 0;
}

.guide-toc a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 9px 8px;
  border-radius: 10px;
  color: #3d5667;
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.38;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.guide-toc a:hover {
  background: var(--guide-blue-soft);
  color: var(--guide-navy-deep);
  transform: translateX(2px);
}



.guide-toc-label {
  padding-top: 4px;
}

/* End-of-guide navigation. */
.guide-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 42px;
  padding-top: 27px;
  border-top: 1px solid var(--guide-border);
}

.guide-footer-actions .guide-back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  box-sizing: border-box;
  margin: 0;
  padding: 11px 19px;
  border: 1px solid var(--guide-navy);
  border-radius: 999px;
  background: var(--guide-navy);
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.25;
  box-shadow: 0 7px 18px rgba(21, 57, 83, 0.15);
}

.guide-back-link::before {
  content: "←";
  font-size: 1.08rem;
  line-height: 1;
}

.guide-footer-actions .guide-back-link:hover {
  background: var(--guide-blue);
  color: #ffffff;
}

.guide-top-link {
  color: var(--guide-muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration-color: #9fb2bf;
  text-underline-offset: 4px;
}

.guide-top-link:hover {
  color: var(--guide-blue);
}

/* Prevent the site's generic section and heading rules from leaking into
   the guide components on responsive layouts. */
@media (max-width: 1050px) {
  .patient-guide .guide-hero {
    grid-template-columns: 1fr;
  }

  .guide-hero h1 {
    max-width: 20ch;
  }

  .guide-figure {
    max-width: none;
    justify-self: stretch;
  }

  .guide-image-frame {
    height: min(380px, 48vw);
    min-height: 250px;
  }

  .guide-figure--wide .guide-image-frame {
    height: 245px;
    min-height: 0;
  }
}

@media (max-width: 900px) {
  .patient-guide {
    margin-top: 28px;
    padding: 0 20px;
  }

  .guide-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "toc"
      "article";
  }

  .guide-toc {
    position: static;
  }

  .guide-toc-inner {
    padding: 20px;
  }

  .guide-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px 12px;
  }
}

@media (max-width: 620px) {
  .patient-guide {
    margin: 18px auto 48px;
    padding: 0 12px;
  }

  .patient-guide .guide-hero {
    gap: 27px;
    padding: 31px 20px 22px;
    border-radius: 20px;
  }

  .guide-hero h1 {
    font-size: clamp(2rem, 11vw, 2.8rem);
    line-height: 1.06;
  }

  .guide-intro {
    margin-top: 19px;
    padding-left: 14px;
  }

  .guide-intro p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .guide-print-button {
    width: 100%;
  }

  .guide-figure {
    border-radius: 16px;
  }

  .guide-image-frame,
  .guide-figure--wide .guide-image-frame {
    height: 245px;
    min-height: 0;
  }

  .guide-figure--diagram .guide-image-frame,
  .guide-figure--object .guide-image-frame {
    padding: 14px;
  }

  .guide-figure figcaption {
    padding: 14px 15px 16px;
  }

  .guide-layout {
    gap: 18px;
    margin-top: 18px;
  }

  .guide-toc-inner,
  .guide-article {
    border-radius: 18px;
  }

  .guide-toc ol {
    grid-template-columns: 1fr;
  }

  .guide-article {
    padding: 28px 19px;
  }

  .patient-guide .guide-section {
    padding-bottom: 29px;
  }

  .patient-guide .guide-section + .guide-section {
    margin-top: 30px;
  }

  .guide-section h2 {
    grid-template-columns: 37px minmax(0, 1fr);
    gap: 11px;
    font-size: 1.42rem;
  }

  .guide-section h2::before {
    width: 35px;
    height: 35px;
    border-radius: 10px;
  }

  .guide-section p {
    font-size: 1rem;
    line-height: 1.72;
  }

  .guide-section li {
    padding: 10px 11px 10px 37px;
    font-size: 0.97rem;
  }

  .guide-section li::before {
    left: 14px;
  }

  .patient-guide .guide-section--reassurance,
  .patient-guide .guide-section--contact {
    margin-right: -7px;
    margin-left: -7px;
    padding: 21px 13px 24px;
  }

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

  .guide-footer-actions .guide-back-link {
    justify-content: center;
    width: 100%;
  }

  .guide-top-link {
    align-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-skip-link,
  .guide-print-button,
  .guide-toc a {
    transition: none;
  }
}

@media print {
  @page {
    margin: 0.55in;
  }

  body.patient-guide-shell {
    padding: 0 !important;
    background: #ffffff !important;
    color: #111111;
  }

  .guide-skip-link,
  .corner-logo-box,
  body.patient-guide-shell > header,
  body.patient-guide-shell > footer,
  .guide-actions,
  .guide-toc,
  .guide-footer-actions {
    display: none !important;
  }

  .patient-guide {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .patient-guide .guide-hero {
    display: block;
    padding: 0 0 18px;
    overflow: visible;
    border: 0;
    border-bottom: 2px solid #153953;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
  }

  .patient-guide .guide-hero::before,
  .patient-guide .guide-hero::after {
    content: none;
  }

  .guide-kicker {
    color: #153953;
  }

  .guide-hero h1 {
    max-width: none;
    color: #102d43;
    font-size: 29pt;
  }

  .guide-intro {
    max-width: none;
    margin-top: 12px;
  }

  .guide-intro p {
    color: #222222;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .guide-figure {
    float: right;
    width: 37%;
    max-width: 3.3in;
    margin: 0 0 16px 24px;
    border-radius: 10px;
    box-shadow: none;
  }

  .guide-image-frame,
  .guide-figure--wide .guide-image-frame {
    height: 1.85in;
    min-height: 0;
  }

  .guide-figure figcaption {
    padding: 8px 10px;
  }

  .guide-figure-caption {
    font-size: 8.5pt;
  }

  .guide-credit {
    font-size: 6.5pt;
  }

  .guide-layout {
    display: block;
    margin-top: 22px;
  }

  .guide-article {
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .patient-guide .guide-section,
  .patient-guide .guide-section--reassurance,
  .patient-guide .guide-section--contact {
    max-width: none;
    margin: 0;
    padding: 0 0 14px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    break-inside: avoid;
  }

  .patient-guide .guide-section + .guide-section {
    margin-top: 14px;
  }

  .guide-section h2 {
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 8px;
    color: #102d43;
    font-size: 14pt;
  }

  .guide-section h2::before {
    width: 27px;
    height: 27px;
    border-color: #b8cbd7;
    border-radius: 7px;
    background: #eef4f7;
    color: #153953;
    font-size: 7pt;
  }

  .guide-section p,
  .guide-section li {
    color: #222222;
    font-size: 9.5pt;
    line-height: 1.42;
  }

  .guide-section ul {
    gap: 4px;
    margin-top: 7px;
  }

  .guide-section li {
    padding: 3px 0 3px 18px;
    border: 0;
    background: #ffffff;
  }

  .guide-section li::before {
    top: 9px;
    left: 3px;
    width: 5px;
    height: 5px;
    border: 0;
    background: #153953;
  }

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

/* A quiet label prepares readers for the one intraoral clinical photograph. */
.guide-figure--clinical .guide-image-frame {
  position: relative;
}

.guide-figure--clinical .guide-image-frame::before {
  content: "Clinical image";
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: rgba(16, 45, 67, 0.84);
  color: #ffffff;
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

@media print {
  .guide-figure--clinical .guide-image-frame::before {
    display: none;
  }
}

/* -------------------------------------------------------------------------
 * Unnumbered section hierarchy
 * Typography and spacing now carry the hierarchy without decorative 01/02
 * labels in section headings or contents navigation.
 * ---------------------------------------------------------------------- */
.guide-article {
  counter-reset: none;
}

.patient-guide .guide-section {
  counter-increment: none;
}

.guide-section h2 {
  display: block;
  grid-template-columns: none;
  gap: 0;
}

.guide-section h2::before {
  content: none;
  display: none;
}

.guide-toc a {
  display: block;
  grid-template-columns: none;
  gap: 0;
  padding: 10px 11px;
}

.guide-toc-label {
  display: block;
  padding-top: 0;
}





/* -------------------------------------------------------------------------
 * Single-column reading layout
 * Individual guides use a centered single-column reading layout, while the
 * two guide directories and Urgent Dental retain their compact contents panels.
 * ---------------------------------------------------------------------- */
.guide-layout.guide-layout--no-toc {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "article";
  gap: 0;
}

.guide-layout--no-toc .guide-article {
  width: 100%;
  box-sizing: border-box;
}

.patient-guide:not(.guide-directory):not(.practice-page) > .guide-layout--no-toc {
  width: min(100%, 1040px);
  margin-right: auto;
  margin-left: auto;
}

@media (max-width: 900px) {
  .guide-layout.guide-layout--no-toc {
    grid-template-areas: "article";
  }
}

/* -------------------------------------------------------------------------
 * Restored patient-guide contents navigation
 * The links read as lightweight navigation rather than conventional buttons:
 * a quiet outline, paper-toned background, and a restrained active state.
 * This is deliberately scoped to patient guides only.
 * ---------------------------------------------------------------------- */
body.patient-guide-has-toc .guide-toc-inner {
  padding: 22px 18px 19px;
  border-color: #ccdce5;
  background: rgba(255, 255, 255, 0.965);
}

body.patient-guide-has-toc .guide-toc-heading {
  margin-bottom: 4px;
}



body.patient-guide-has-toc .guide-toc ol {
  gap: 7px;
}

body.patient-guide-has-toc .guide-toc a {
  position: relative;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  min-height: 42px;
  box-sizing: border-box;
  padding: 9px 11px 9px 12px;
  border: 1px solid #dae6ec;
  border-radius: 11px;
  background: rgba(249, 252, 253, 0.72);
  color: #405868;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.36;
  text-decoration: none;
  box-shadow: none;
  transform: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

body.patient-guide-has-toc .guide-toc a::after {
  content: "›";
  flex: 0 0 auto;
  color: #79909e;
  font-family: Arial, sans-serif;
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 1;
  transition: color 160ms ease, transform 160ms ease;
}

body.patient-guide-has-toc .guide-toc-label {
  display: block;
  min-width: 0;
  padding: 0;
}

body.patient-guide-has-toc .guide-toc a:hover {
  border-color: #b9ced9;
  background: #f4f9fb;
  color: var(--guide-navy-deep);
  transform: translateX(2px);
}

body.patient-guide-has-toc .guide-toc a:hover::after {
  color: var(--guide-blue);
  transform: translateX(2px);
}

body.patient-guide-has-toc .guide-toc a[aria-current="location"] {
  border-color: #b8d3c2;
  background: #f2f8f4;
  color: #285d3c;
  box-shadow: inset 3px 0 0 var(--guide-green);
}

body.patient-guide-has-toc .guide-toc a[aria-current="location"]::after {
  color: var(--guide-green);
}

body.patient-guide-has-toc .guide-toc a:focus-visible {
  border-color: #9ebdce;
  outline: 3px solid rgba(47, 120, 183, 0.24);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  body.patient-guide-has-toc .guide-toc-inner {
    padding: 19px;
  }

  body.patient-guide-has-toc .guide-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.patient-guide-has-toc .guide-toc a {
    height: 100%;
  }
}

@media (max-width: 620px) {
  body.patient-guide-has-toc .guide-toc-inner {
    padding: 17px 16px 15px;
  }

  

  body.patient-guide-has-toc .guide-toc ol {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
    margin-right: -16px;
    padding: 1px 16px 5px 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 0 16px;
    scroll-snap-type: inline proximity;
    scrollbar-width: thin;
  }

  body.patient-guide-has-toc .guide-toc li {
    flex: 0 0 min(78vw, 290px);
    scroll-snap-align: start;
  }

  body.patient-guide-has-toc .guide-toc a {
    min-height: 48px;
    padding: 10px 12px;
    background: #fbfdfe;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.patient-guide-has-toc .guide-toc a,
  body.patient-guide-has-toc .guide-toc a::after {
    transition: none;
  }
}


/* Patient-guide contents navigation restored */
.patient-guide-toc .guide-toc-inner {
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #c6d7e0 transparent;
}

.patient-guide-toc .guide-toc-inner::-webkit-scrollbar {
  width: 7px;
}

.patient-guide-toc .guide-toc-inner::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #c6d7e0;
  background-clip: padding-box;
}

.patient-guide-toc .guide-toc ol {
  gap: 7px;
}

.patient-guide-toc .guide-toc a,
.patient-guide-toc a {
  position: relative;
  display: block;
  min-height: 0;
  box-sizing: border-box;
  padding: 10px 31px 10px 12px;
  border: 1px solid #dce8ee;
  border-radius: 11px;
  background: rgba(249, 252, 253, 0.78);
  color: #3d5667;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.38;
  text-decoration: none;
  box-shadow: 0 2px 7px rgba(17, 49, 72, 0.025);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.patient-guide-toc a::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: 12px;
  color: #78909e;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-52%);
  transition: color 160ms ease, transform 160ms ease;
}

.patient-guide-toc a:hover {
  border-color: #bfd6e2;
  background: #f5fafc;
  color: var(--guide-navy-deep);
  box-shadow: 0 4px 12px rgba(17, 49, 72, 0.055);
  transform: translateX(2px);
}

.patient-guide-toc a:hover::after {
  color: var(--guide-blue);
  transform: translate(2px, -52%);
}

.patient-guide-toc a[aria-current="location"] {
  border-color: #b8d2df;
  background:
    linear-gradient(90deg, rgba(79, 148, 104, 0.10), transparent 42%),
    #f8fbfd;
  color: var(--guide-navy-deep);
  box-shadow:
    inset 3px 0 0 var(--guide-green),
    0 4px 12px rgba(17, 49, 72, 0.05);
}

.patient-guide-toc a[aria-current="location"]::after {
  color: var(--guide-green);
}

@media (max-width: 900px) {
  .patient-guide-toc .guide-toc-inner {
    max-height: none;
    overflow: visible;
  }

  .patient-guide-toc .guide-toc ol {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 9px;
    scroll-padding-inline: 2px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #c6d7e0 transparent;
  }

  .patient-guide-toc .guide-toc li {
    flex: 0 0 clamp(205px, 58vw, 285px);
    scroll-snap-align: start;
  }

  .patient-guide-toc .guide-toc a {
    height: 100%;
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

@media (max-width: 620px) {
  .patient-guide-toc .guide-toc-inner {
    padding: 18px 16px 14px;
  }

  .patient-guide-toc .guide-toc-heading {
    margin-bottom: 11px;
  }

  .patient-guide-toc .guide-toc li {
    flex-basis: min(78vw, 260px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .patient-guide-toc a,
  .patient-guide-toc a::after {
    transition: none;
  }
}

/* Mobile containment for the horizontally scrollable guide index. Grid items
   default to a min-content width; explicitly allowing them to shrink keeps the
   section carousel inside the viewport instead of widening the whole page. */
@media (max-width: 900px) {
  body.patient-guide-has-toc .guide-layout,
  .guide-layout:has(> .patient-guide-toc) {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-layout > .patient-guide-toc,
  .guide-layout > .guide-article,
  .patient-guide-toc .guide-toc-inner,
  .patient-guide-toc nav,
  .patient-guide-toc ol {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .patient-guide-toc .guide-toc-inner {
    overflow: hidden;
  }

  .patient-guide-toc ol {
    width: 100%;
  }
}

/* Keep the guide's internal navigation independent from the site's primary
   navigation bar. The global nav rules set a fixed height and flex alignment,
   which are appropriate for the header but not for this compact section list. */
.patient-guide-toc nav {
  display: block;
  width: auto;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.patient-guide-toc nav ol {
  width: auto;
  margin: 0;
}

/* -------------------------------------------------------------------------
 * Mobile guide contents: natural top-to-bottom navigation
 * On narrow screens the contents panel sits above the article. Keep every
 * destination in a single full-width column so patients can scan and tap the
 * list normally instead of swiping a horizontal carousel.
 * ---------------------------------------------------------------------- */
@media (max-width: 900px) {
  body.patient-guide-has-toc .guide-toc-inner,
  .patient-guide-toc .guide-toc-inner {
    max-height: none;
    overflow: visible;
  }

  body.patient-guide-has-toc .guide-toc ol,
  .patient-guide-toc .guide-toc ol {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    overscroll-behavior: auto;
    scroll-padding: 0;
    scroll-snap-type: none;
    scrollbar-width: auto;
  }

  body.patient-guide-has-toc .guide-toc li,
  .patient-guide-toc .guide-toc li {
    display: block;
    flex: none;
    width: 100%;
    min-width: 0;
    margin: 0;
    scroll-snap-align: none;
  }

  body.patient-guide-has-toc .guide-toc a,
  .patient-guide-toc .guide-toc a {
    width: 100%;
    height: auto;
    min-height: 44px;
    padding: 10px 32px 10px 12px;
  }
}

@media (max-width: 620px) {
  body.patient-guide-has-toc .guide-toc ol,
  .patient-guide-toc .guide-toc ol {
    gap: 6px;
  }

  body.patient-guide-has-toc .guide-toc a,
  .patient-guide-toc .guide-toc a {
    min-height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
    font-size: 0.82rem;
  }
}

/* Quiet editorial and review metadata at the end of each patient guide. */
.guide-review-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-top: 24px;
  padding-top: 15px;
  border-top: 1px solid rgba(207, 222, 231, 0.72);
  color: #738895;
  font-size: 0.72rem;
  line-height: 1.5;
}

.guide-review-note p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.guide-review-note a {
  color: #617986;
  font-weight: 700;
  text-decoration-color: #b2c3cc;
  text-underline-offset: 2px;
}

.guide-review-note a:hover {
  color: var(--guide-blue);
}

@media (max-width: 620px) {
  .guide-review-note {
    display: grid;
    gap: 2px;
    margin-top: 21px;
    font-size: 0.69rem;
  }
}

