/* VERSION: 1.0 | 2026-04-22
   Sydney Lithotripsy Clinic - single stylesheet
   Teal / ivory / signal orange. Fraunces + Inter + JetBrains Mono.
   ========================================================================== */

:root {
  --color-primary:        #0b4a54;
  --color-primary-dark:   #062a30;
  --color-primary-soft:   #d4e8ec;
  --color-secondary:      #f7f3ec;
  --color-secondary-deep: #e8dfd0;
  --color-accent:         #d96a2c;
  --color-accent-dark:    #b85722;

  --color-text:           #142428;
  --color-text-muted:     #4a5c5f;
  --color-text-inverse:   #ffffff;
  --color-line:           #d9d3c8;
  --color-bg:             #ffffff;
  --color-bg-soft:        #faf7f2;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(11, 36, 40, 0.06), 0 1px 3px rgba(11, 36, 40, 0.04);
  --shadow:    0 6px 18px rgba(11, 36, 40, 0.08), 0 2px 6px rgba(11, 36, 40, 0.04);
  --shadow-lg: 0 20px 50px rgba(11, 36, 40, 0.12), 0 8px 20px rgba(11, 36, 40, 0.06);

  --container: 1200px;
  --container-narrow: 880px;
  --pad-x: clamp(1rem, 4vw, 1.5rem);
  --bp-lg: 960px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
}

img, svg { max-width: 100%; display: block; height: auto; }

a {
  color: var(--color-primary);
  text-decoration-color: rgba(11, 74, 84, 0.35);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 2.5vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }

ul, ol { padding-left: 1.25rem; margin: 0 0 1rem; }
li + li { margin-top: 0.35rem; }

hr { border: 0; height: 1px; background: var(--color-line); margin: 2.5rem 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; outline: 3px solid var(--color-accent); }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.35rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }

.btn-accent {
  background: var(--color-accent);
  color: #1a1407;
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover { background: var(--color-accent-dark); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-ghost:hover { background: var(--color-primary); color: #fff; }

.btn-on-dark {
  background: #fff;
  color: var(--color-primary);
}
.btn-on-dark:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); }

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ----- Header ----- */
.top-bar {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
}
.top-bar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.45rem var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: center;
}
.top-bar-link { color: inherit; text-decoration: none; }
.top-bar-link:hover { text-decoration: underline; color: #fff; }
.top-bar-sep { opacity: 0.45; }

.main-header {
  background: #fff;
  border-bottom: 1px solid var(--color-line);
}
.main-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.65rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text);
}
.brand:hover { color: var(--color-primary); }
.brand-mark { color: var(--color-primary); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; gap: 0.1rem; }
.brand-main {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-sub {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  max-width: 18rem;
  line-height: 1.25;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  padding: 0 10px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

/* ----- Nav ----- */
.primary-nav {
  border-top: 1px solid var(--color-line);
  background: #fff;
}
.primary-nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.1rem;
  align-items: center;
  flex-wrap: wrap;
}
.nav-list > li { margin: 0; }
.nav-list > li > a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.95rem 0.75rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-list > li > a:hover,
.nav-list > li > a:focus-visible {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}
.nav-list > li > a.is-current {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.nav-caret { display: inline-flex; align-items: center; }
.nav-caret-icon { transition: transform 0.2s ease; }
.has-submenu { position: relative; }
.has-submenu:hover .nav-caret-icon,
.has-submenu:focus-within .nav-caret-icon { transform: rotate(180deg); }

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 50;
}
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu li { margin: 0; }
.submenu a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.92rem;
}
.submenu a:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); }

.nav-cta { margin-left: auto; padding: 0.45rem 0; }
.nav-cta .btn { padding: 0.55rem 1rem; font-size: 0.85rem; }

.has-submenu--wide .submenu--grouped {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 1rem;
  width: min(520px, calc(100vw - 2rem));
  min-width: 0;
  padding: 0.85rem 1rem;
}
.submenu-group { margin: 0; min-width: 0; }
.submenu-col { list-style: none; margin: 0; padding: 0; }
.submenu-col li { margin: 0; }
.submenu-head {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-primary);
  padding: 0.1rem 0.5rem 0.35rem;
  margin: 0 0 0.25rem;
  border-bottom: 1px solid var(--color-line);
  pointer-events: none;
}

/* ----- Main layout ----- */
main#main { min-height: 45vh; }

.page-header {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #fff 55%);
  border-bottom: 1px solid var(--color-line);
}
.page-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.75rem) var(--pad-x);
}
.page-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.page-header h1 { margin-bottom: 0.65rem; }
.page-header .lede {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 52rem;
  margin: 0;
}

.article-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3rem) var(--pad-x);
}
.article-inner {
  max-width: var(--container-narrow);
}
.article-inner.wide { max-width: var(--container); }

.doc-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 960px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr) 220px; }
}

.page-toc-wrap.is-hidden { display: none; }

.page-toc {
  font-size: 0.875rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--color-bg-soft);
  position: sticky;
  top: 1rem;
}
.page-toc h2 {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.page-toc ul { margin: 0; padding: 0; list-style: none; }
.page-toc li + li { margin-top: 0.35rem; }
.page-toc a { color: var(--color-text); text-decoration: none; font-weight: 500; }
.page-toc a:hover { color: var(--color-accent-dark); }

/* ----- Hero ----- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 85% 15%, rgba(217, 106, 44, 0.14), transparent 50%),
    radial-gradient(ellipse at 15% 85%, rgba(11, 74, 84, 0.12), transparent 50%),
    linear-gradient(180deg, var(--color-secondary) 0%, #fff 100%);
  overflow: hidden;
}
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(2.25rem, 6vw, 5rem) var(--pad-x) clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.hero-text .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.section-inner > .eyebrow:first-child,
.section-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
}
.hero-text h1 { margin-bottom: 1rem; }
.hero-text h1 em { font-style: italic; color: var(--color-primary); }
.hero-text .lede {
  font-size: 1.08rem;
  color: var(--color-text-muted);
  margin-bottom: 1.35rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-media { display: flex; justify-content: center; }
.hero-media img { max-width: min(420px, 100%); }

/* ----- Sections ----- */
.section {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.section-soft { background: var(--color-bg-soft); }
.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section-header { margin-bottom: 1.75rem; max-width: 48rem; }
.section-accent {
  width: 3rem;
  height: 3px;
  background: var(--color-accent);
  margin: 0.75rem 0 1rem;
}

/* ----- Tiles ----- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}
.tile {
  display: block;
  padding: 1.35rem 1.25rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.tile:hover {
  border-color: var(--color-primary-soft);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.tile h3 { margin: 0.5rem 0 0.45rem; font-size: 1.15rem; color: var(--color-primary); }
.tile p { margin: 0; font-size: 0.95rem; color: var(--color-text-muted); }
.tile-icon { color: var(--color-accent); margin-bottom: 0.25rem; }
.tile-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-primary);
}

/* ----- Callouts ----- */
.callout {
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--color-primary);
  background: var(--color-primary-soft);
}
.callout--emergency {
  border-left-color: var(--color-accent);
  background: #fff8f3;
}

/* ----- Timeline ----- */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.timeline > li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.75rem;
  border-left: 2px solid var(--color-line);
  padding-bottom: 0.25rem;
}
.timeline > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -0.85rem;
  top: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----- About grid ----- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}
.portrait-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-line);
  background: var(--color-secondary);
  max-width: 320px;
}
.portrait-card img { width: 100%; }

/* ----- Locations ----- */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.location-card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #fff;
}
.location-card h3 { margin: 0 0 0.5rem; color: var(--color-primary); }
.location-address { font-size: 0.95rem; color: var(--color-text-muted); margin: 0 0 0.75rem; }
.location-meta { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }
.location-meta li + li { margin-top: 0.35rem; }

/* ----- FAQ ----- */
.faq { max-width: 48rem; }
.faq-item {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
  background: #fff;
}
.faq-item summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item-body { padding: 0 1rem 1rem; color: var(--color-text-muted); }

/* ----- Resource cards ----- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.resource-card {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.resource-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--color-primary-soft);
}
.resource-card-title { font-weight: 700; color: var(--color-primary); margin-bottom: 0.35rem; }
.resource-card-meta { font-size: 0.85rem; color: var(--color-text-muted); }

/* ----- Video ----- */
.video-wrap {
  max-width: 900px;
  margin: 0 auto 1.5rem;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-line);
  background: #0a3036;
}
.video-facade { width: 100%; height: 100%; position: relative; }
.video-facade__btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  cursor: pointer;
  position: relative;
  background: transparent;
}
.video-facade__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.35s ease;
}
.video-facade__btn:hover img { opacity: 1; transform: scale(1.02); }
.video-facade__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.video-facade__play::before {
  content: "";
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 24px rgba(11, 36, 40, 0.25);
}
.video-facade__play::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-left: 15px solid var(--color-accent);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
}
.video-facade.is-active .video-facade__btn { display: none; }
.video-facade.is-active iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ----- CTA band ----- */
.cta-band {
  background: linear-gradient(120deg, var(--color-primary-dark), var(--color-primary));
  color: rgba(255, 255, 255, 0.95);
}
.cta-band-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.5rem) var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.cta-band-title { margin: 0 0 0.35rem; font-size: clamp(1.25rem, 2.2vw, 1.6rem); color: #fff; }
.cta-band-lede { margin: 0; max-width: 36rem; opacity: 0.92; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

/* ----- Footer ----- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.88);
  padding-top: 2.5rem;
}
.site-footer a { color: rgba(255, 255, 255, 0.92); text-decoration-color: rgba(255, 255, 255, 0.35); }
.site-footer a:hover { color: #fff; }
.site-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x) 2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}
.site-footer h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 0.65rem;
}
.footer-list { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }
.footer-list li + li { margin-top: 0.4rem; }
.footer-blurb { font-size: 0.88rem; opacity: 0.88; line-height: 1.5; margin: 0.75rem 0 0; }
.brand--footer { color: #fff; }
.brand--footer:hover { color: #fff; opacity: 0.9; }

.site-footer-base {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem var(--pad-x) 2rem;
  font-size: 0.82rem;
  opacity: 0.85;
}
.site-footer-base p { margin: 0 0 0.5rem; }
.footer-ahpra, .footer-disclaimer { font-size: 0.78rem; opacity: 0.8; }

/* ----- Stats ----- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--color-primary);
  display: block;
}
.stat-label { font-size: 0.85rem; color: var(--color-text-muted); }

/* ----- Prose utilities ----- */
.prose-muted { color: var(--color-text-muted); font-size: 0.95rem; }
.article-inner code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--color-bg-soft);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.mono-note {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ----- Mobile nav ----- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 280px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; }
  .site-footer-inner { grid-template-columns: 1fr 1fr; }

  .top-bar-link--hide-sm,
  .top-bar-sep--hide-sm { display: none; }

  .menu-toggle { display: inline-flex; }

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(380px, 92vw);
    background: #fff;
    border-left: 1px solid var(--color-line);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
    z-index: 200;
    padding: calc(env(safe-area-inset-top, 0px) + 4.5rem) 1.25rem calc(env(safe-area-inset-bottom, 0px) + 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 0;
  }
  .primary-nav.open { transform: translateX(0); }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list > li > a {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--color-line);
    width: 100%;
    min-height: 48px;
  }
  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding: 0 0 0.5rem 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .has-submenu.open .submenu { max-height: 2000px; }
  .has-submenu > a { justify-content: space-between; }
  .nav-cta { margin: 1rem 0 0; padding: 0; }
  .nav-cta .btn { width: 100%; }

  body.menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 30, 35, 0.5);
    z-index: 150;
    backdrop-filter: blur(2px);
  }

  .has-submenu--wide .submenu--grouped {
    display: block;
    width: auto;
    padding: 0 0 0.5rem 0.5rem;
  }
  .submenu-group + .submenu-group { margin-top: 0.35rem; }
  .submenu-head {
    border-bottom: 0;
    padding: 0.5rem 0.25rem 0.1rem;
    color: var(--color-text-muted);
  }

  .doc-layout { grid-template-columns: 1fr; }
  .page-toc-wrap { order: -1; }
  .page-toc { position: static; }
}

@media (max-width: 720px) {
  .site-footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .brand-sub { display: none; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; }
}
