:root {
  --paper: #f2f5f3;
  --panel: #e6e3d6;
  --ink: #14292e;
  --soft: #45595d;
  --scrub: #0e5a54;
  --scrub-deep: #0a3f3b;
  --line: #c3cdc9;
  --gold: #f2b33d;
  --gold-ink: #231a02;
  --on-scrub: #f2f5f3;
  --todo: #ffe9a8;
  --alert: #a3241b;
  --alert-bg: #fbecea;
  --display: "Young Serif", Georgia, serif;
  --body: "Atkinson Hyperlegible", Verdana, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1f22;
    --panel: #172d31;
    --ink: #e9efec;
    --soft: #b4c3c0;
    --scrub: #7fd0c4;
    --scrub-deep: #0a3f3b;
    --line: #34494d;
    --todo: #5a4708;
    --alert: #ff9d92;
    --alert-bg: #3a1c19;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1f22;
  --panel: #172d31;
  --ink: #e9efec;
  --soft: #b4c3c0;
  --scrub: #7fd0c4;
  --scrub-deep: #0a3f3b;
  --line: #34494d;
  --todo: #5a4708;
  --alert: #ff9d92;
  --alert-bg: #3a1c19;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
html.big { font-size: 131.25%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4.4rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: .5rem; }
h4 { font-size: 1.0625rem; margin: 1.25rem 0 .25rem; }
p { margin: 0 0 1rem; max-width: 68ch; }
ul, ol { padding-left: 1.2rem; max-width: 68ch; }
li { margin-bottom: .45rem; }
a { color: var(--scrub); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.lede { font-size: 1.25rem; color: var(--soft); }
.todo { background: var(--todo); padding: 0 .25em; border-radius: 3px; }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; background: var(--gold); color: var(--gold-ink); padding: .5rem 1rem; z-index: 20; }

/* Buttons */
.btn {
  display: inline-block; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  padding: .8rem 1.3rem; border-radius: 999px; border: 2px solid transparent; min-height: 3rem;
}
.btn-call { background: var(--gold); color: var(--gold-ink); }
.btn-call:hover { background: #ffc657; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover:not(:disabled) { border-color: var(--scrub); }
.btn-quiet:disabled { opacity: .4; cursor: default; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 1rem; padding-block: .6rem; }
.name { font-family: var(--display); font-size: 1.2rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.top .bar { display: flex; gap: 1.25rem; }
.top .bar a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.name { white-space: nowrap; }
.top .bar a:hover { text-decoration: underline; }
.top .btn { padding: .5rem 1rem; min-height: 2.6rem; white-space: nowrap; }
@media (max-width: 76rem) { .top .bar { display: none; } }

/* Phone and tablet menu */
.menu { display: none; }
@media (max-width: 76rem) {
  .top details.menu { display: block; order: 5; border: 0; max-width: none; }
  .top .menu summary::after, .top .menu[open] summary::after { content: none; }
  .top .menu summary { font-size: 1rem; }
  .menu summary {
    list-style: none; cursor: pointer; font-weight: 700; padding: .5rem 1rem; min-height: 2.6rem;
    display: flex; align-items: center; gap: .5rem; border: 2px solid var(--ink); border-radius: 999px;
  }
  .menu summary::-webkit-details-marker { display: none; }
  .menu summary::before { content: ""; width: 1.1rem; height: .75rem; border-block: 2px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }
  .menu[open] summary { background: var(--ink); color: var(--paper); }
  .menu-panel {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 2px solid var(--ink);
    padding: .5rem 1rem 1.5rem; max-height: calc(100vh - 4rem); overflow-y: auto;
    display: grid; gap: 0 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  }
  .menu-h { font-family: var(--display); font-size: 1.15rem; margin: 1rem 0 .25rem; color: var(--scrub); }
  .menu-panel a { display: block; padding: .8rem 0; color: var(--ink); text-decoration: none; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .menu-panel a:hover { text-decoration: underline; }
}
@media (max-width: 40rem) { .menu-panel { padding-bottom: 6.5rem; } }
@media (max-width: 34rem) { #text-size { display: none; } }

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem); }
.hero .lede { margin-top: 1.25rem; max-width: 46ch; }
.hero-grid { display: grid; gap: 2.5rem; }
@media (min-width: 58rem) { .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: start; } }
h1 span { display: block; }
.ask { font-family: var(--display); font-size: 1.3rem; margin: 0 0 .25rem; }
.paths { list-style: none; padding: 0; margin: 0; max-width: none; border-top: 2px solid var(--ink); }
.paths li { margin: 0; border-bottom: 1px solid var(--line); }
.paths a {
  display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; align-items: center;
  padding: 1rem .25rem; color: var(--ink); text-decoration: none;
}
.paths b { font-size: 1.2rem; }
.paths span { grid-column: 1; color: var(--soft); }
.paths svg { grid-row: 1 / span 2; grid-column: 2; width: 1.6rem; height: 1.6rem; color: var(--scrub); transition: transform .15s; }
.paths a:hover { background: var(--panel); }
.paths a:hover svg { transform: translateY(4px); }

/* Sections */
.band { padding-block: clamp(3rem, 7vw, 5.5rem); }
.band-panel { background: var(--panel); }
.band-scrub { background: var(--scrub-deep); color: var(--on-scrub); }
.band-scrub a { color: var(--gold); }
.band-scrub .lede { color: #c9dcd8; }

.problem { display: grid; gap: 1rem 3rem; padding-block: 2.25rem; border-top: 1px solid var(--line); }
.problem:first-of-type { border-top: 2px solid var(--ink); margin-top: 2rem; }
@media (min-width: 52rem) { .problem { grid-template-columns: 18rem 1fr; } }
.problem h3 { font-size: 1.7rem; }
.problem .feel { color: var(--soft); }

.two { display: grid; gap: 2rem 3rem; }
@media (min-width: 52rem) { .two { grid-template-columns: 1fr 1fr; } }

/* Recovery */
.ops { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.75rem 0 1.5rem; }
.ops button {
  font: inherit; font-weight: 700; cursor: pointer; padding: .7rem 1.2rem; min-height: 3rem;
  border-radius: 999px; border: 2px solid #5d8e88; background: transparent; color: var(--on-scrub);
}
.ops button[aria-selected="true"] { background: var(--on-scrub); color: var(--scrub-deep); border-color: var(--on-scrub); }
.stages { list-style: none; padding: 0; margin: 0; max-width: none; }
.stages > li { padding: 1.25rem 0; border-top: 1px solid #2f6661; margin: 0; }
.stages h3 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: .75rem; }
.stages p { font-size: 1.15rem; }
.js .stages > li { display: none; border-top: 0; min-height: 15rem; }
.js .stages > li.on { display: block; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; margin-bottom: 1rem; }
.rail::before { content: ""; position: absolute; left: 0; right: 0; top: .55rem; height: 2px; background: #2f6661; }
.stop {
  position: relative; font: inherit; font-size: .9rem; cursor: pointer; background: none; border: 0;
  color: #c9dcd8; padding: 1.7rem .2rem .5rem; text-align: left; line-height: 1.25;
}
.stop::before {
  content: ""; position: absolute; top: 0; left: 0; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--scrub-deep); border: 2px solid #5d8e88;
}
.stop.done::before { background: #5d8e88; }
.stop[aria-pressed="true"] { color: var(--gold); font-weight: 700; }
.stop[aria-pressed="true"]::before { background: var(--gold); border-color: var(--gold); }
@media (max-width: 40rem) {
  .stop { font-size: 0; padding-bottom: 0; }
  .stop[aria-pressed="true"] { font-size: 0; }
}
.stage-nav { display: flex; gap: .75rem; margin-top: .5rem; }
.band-scrub .btn-quiet { color: var(--on-scrub); border-color: #5d8e88; }
.fine { font-size: .95rem; color: var(--soft); }
.band-scrub .fine { color: #c9dcd8; margin-top: 1.5rem; }

/* Checklist */
.checks { list-style: none; padding: 0; }
.checks label { display: grid; grid-template-columns: 1.6rem 1fr; gap: .75rem; align-items: start; cursor: pointer; }
.checks input { width: 1.4rem; height: 1.4rem; margin-top: .2rem; accent-color: var(--scrub); }

/* After surgery */
.alert { border: 2px solid var(--alert); border-radius: .75rem; padding: 1.25rem 1.5rem; margin: 2rem 0; max-width: 46rem; background: var(--alert-bg); }
.alert h3 { color: var(--alert); }
.alert ul { margin: .5rem 0 1rem; font-weight: 700; }
.alert p { margin: 0; }
details.concern { max-width: none; }
.three { display: grid; gap: 0 2.5rem; padding-bottom: 1.5rem; }
@media (min-width: 56rem) { .three { grid-template-columns: 1fr 1fr 1fr; } }
.three > div { min-width: 0; }
.three h4 { margin-top: .25rem; }
.three ul { margin: 0; }
.three > div:last-child h4 { color: var(--alert); }
.call-line { margin-top: 2rem; font-size: 1.15rem; }
.jump { list-style: none; padding: 0; margin: 1.5rem 0 0; max-width: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.jump li { margin: 0; }
.jump a { display: block; padding: .55rem 1rem; border: 2px solid var(--ink); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; }
.jump a:hover { background: var(--ink); color: var(--panel); }

.meds { margin: 2.5rem 0 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }

.places { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 2.5rem; margin: 1.5rem 0; border-top: 2px solid var(--ink); }
.places > div { padding: 1rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.places dt { font-family: var(--display); font-size: 1.3rem; margin-bottom: .35rem; }
.places dd { margin: 0; }

/* FAQ */
details { border-top: 1px solid var(--line); max-width: 46rem; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 700; font-size: 1.15rem; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: .25rem; top: .8rem; font-size: 1.5rem; font-weight: 400; color: var(--scrub); }
details[open] summary::after { content: "\2212"; }

.pubs { max-width: 52rem; }
.pubs ol { max-width: none; padding-left: 2.2rem; }
.pubs li { margin-bottom: .8rem; font-size: .95rem; }
.pubs p { font-size: .95rem; max-width: none; }

/* About + visit */
.portrait {
  aspect-ratio: 4 / 5; max-width: 22rem; background: var(--panel); border: 2px dashed var(--line);
  border-radius: 12rem 12rem 1rem 1rem; display: grid; place-items: center; text-align: center; padding: 2rem; color: var(--soft);
}
.portrait-img { display: block; width: 100%; max-width: 22rem; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: 12rem 12rem 1rem 1rem; }
.facts { list-style: none; padding: 0; border-top: 2px solid var(--ink); }
.facts li { padding: .7rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.team-photo { margin: 2rem 0 0; max-width: 46rem; }
.team-photo img { display: block; width: 100%; height: auto; max-width: 100%; border-radius: 1rem; }
.team-photo figcaption { color: var(--soft); margin-top: .5rem; }
.team { list-style: none; padding: 0; margin: 2rem 0; max-width: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); border-top: 2px solid var(--ink); }
.team li { margin: 0; padding: 1.25rem 1rem 1.25rem 0; border-bottom: 1px solid var(--line); }
.team h3 { margin-bottom: .15rem; }
.profile { margin: .6rem 0 0; }
.team .role { color: var(--soft); margin: 0; }
.urgent { border-left: 6px solid var(--gold); padding: 1rem 1.25rem; background: var(--panel); margin-top: 2rem; max-width: 46rem; }
.urgent p:last-child { margin-bottom: 0; }
.phone { font-family: var(--display); font-size: clamp(2rem, 6vw, 3.2rem); color: var(--ink); text-decoration: none; display: inline-block; margin-bottom: .5rem; }
address { font-style: normal; margin-bottom: 1rem; }
.park { margin: .25rem 0 2rem; }
.park li { margin-bottom: .5rem; }

footer { padding-block: 2.5rem 6rem; border-top: 1px solid var(--line); font-size: .95rem; color: var(--soft); }
footer p { max-width: 75ch; }

/* Call bar on phones */
.callbar { display: none; }
@media (max-width: 40rem) {
  .callbar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: .6rem 1rem; background: var(--paper); border-top: 1px solid var(--line);
  }
  .callbar .btn { display: block; text-align: center; }
  .top .btn-call { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .paths svg { transition: none; }
}

@media print {
  .top, .callbar, .hero, .band:not(#prepare), footer, #print-list { display: none !important; }
  body { background: #fff; color: #000; }
  .band-panel { background: #fff; padding: 0; }
}
