/* ============ patient voices ============ */
.voices { background: var(--cream); }
.voices-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; }
.voices-list { display: grid; gap: 0; margin: 0; padding: 0; }
.voice { padding: 40px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 40px 1fr; gap: 32px; align-items: start; }
.voice:last-child { border-bottom: 1px solid var(--rule); }
.voice .mark { font-family: var(--f-display); font-size: 56px; line-height: 0.6; color: var(--copper); margin-top: 14px; font-style: italic; }
.voice blockquote { margin: 0; font-family: var(--f-display); font-weight: 400; font-style: italic; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.45; color: var(--ink); letter-spacing: -0.005em; max-width: 56ch; text-wrap: pretty; }
.voice .cite { margin-top: 20px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.voice .cite .who { color: var(--ink); letter-spacing: 0.12em; }
.voice .cite .stars { letter-spacing: 0.1em; color: var(--copper); font-size: 12px; }
.voice .cite .src { color: var(--ink-4); }
.voices-note { margin-top: 32px; font-size: 12px; color: var(--ink-4); font-family: var(--f-mono); letter-spacing: 0.08em; }
.voices-note a { color: var(--navy); border-bottom: 1px solid color-mix(in oklab, var(--navy) 40%, transparent); }

@media (max-width: 900px) {
  .voices-grid { grid-template-columns: 1fr; gap: 32px; }
  .voice { grid-template-columns: 28px 1fr; gap: 18px; padding: 28px 0; }
  .voice .mark { font-size: 44px; margin-top: 8px; }
}

/* ============ tokens ============ */
:root {
  --cream: #F5F1EA;
  --cream-2: #EDE6D8;
  --cream-3: #E4DBC7;
  --paper: #FBF8F2;
  --ink: #1A1A1A;
  --ink-2: #3A3A3A;
  --ink-3: #6B6B6B;
  --ink-4: #A8A39A;
  --navy: #0B2B47;
  --navy-2: #163E63;
  --navy-3: #2A5680;
  --copper: #003B5C;
  --copper-soft: #7FB3D5;
  --rule: #D9D2C1;
  --rule-navy: rgba(245, 241, 234, 0.18);

  --f-display: "Playfair Display", "Canela", "Didot", "Times New Roman", serif;
  --f-sans: "Inter Tight", "Söhne", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Inter Tight", "Söhne", -apple-system, "Helvetica Neue", Arial, sans-serif;

  --maxw: 1360px;
  --gutter: clamp(20px, 4vw, 72px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-y: scroll;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }

/* ============ type ============ */
.display {
  font-family: var(--f-display);
  font-weight: 350;
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 0.98;
  font-variation-settings: "SOFT" 30, "opsz" 144;
}
.eyebrow {
  font-family: var(--f-sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  font-feature-settings: "ss01", "cv11";
}
.eyebrow.on-dark { color: var(--copper-soft); }
.num-index {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
p.lede {
  font-family: var(--f-display);
  font-weight: 350;
  font-size: clamp(24px, 2.1vw, 30px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}

/* ============ layout ============ */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: clamp(72px, 10vw, 160px);
  border-top: 1px solid var(--rule);
}
.section.dark { background: var(--navy); color: var(--cream); border-color: var(--rule-navy); }
.section.dark .eyebrow { color: var(--copper-soft); }

.grid { display: grid; gap: clamp(24px, 3vw, 48px); }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-12 { grid-template-columns: repeat(12, 1fr); }
@media (max-width: 900px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .g-12 { grid-template-columns: repeat(6, 1fr); }
}

/* ============ nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--cream) 85%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 18px;
  gap: 32px;
}
.nav-actions { display: flex; gap: 20px; align-items: center; flex-shrink: 0; }
.nav .cta { white-space: nowrap; }
.nav-phone { white-space: nowrap; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  line-height: 1;
  color: inherit;
}
.wordmark .mark {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.wordmark .mark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.wordmark .mark .mark-img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Invert on dark footers so the navy logo reads on navy */
.wordmark[style*="cream"] .mark-img, footer .wordmark .mark-img { filter: brightness(0) invert(1) brightness(0.96); }
.wordmark .wm-text {
  display: inline-flex; flex-direction: column; gap: 4px;
  line-height: 1;
}
.wordmark .wm-name {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.02em;
  font-variation-settings: "SOFT" 30, "opsz" 144;
  color: inherit;
  white-space: nowrap;
  line-height: 1;
}
.wordmark .wm-sub {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  line-height: 1;
}
.section.dark .wordmark .wm-sub,
.footer .wordmark .wm-sub { color: color-mix(in oklab, var(--cream) 55%, transparent); }
.wordmark .dot {
  width: 6px; height: 6px; background: var(--copper); border-radius: 0;
  display: inline-block; transform: translateY(-2px);
}
.wordmark small {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 4px;
}
.nav-links {
  display: flex; gap: 28px; align-items: center;
  font-family: var(--f-sans);
  font-size: 15.5px;
  letter-spacing: 0.01em;
}
.nav-links a { color: var(--ink-2); position: relative; padding: 6px 0; }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--copper);
}
.nav-phone {
  font-family: var(--f-mono); font-size: 13.5px; color: var(--ink-2);
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none;
  transition: color .18s ease;
}
.nav-phone:hover { color: var(--copper); }
.nav-phone::before {
  content: "";
  width: 12px; height: 12px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>") no-repeat center / contain;
  opacity: 0.7;
  transition: opacity .18s ease;
}
.nav-phone:hover::before { opacity: 1; }

/* Phone icon — applies to tel: links in mobile drawer, footer contact, and contact page address blocks */
.nav-drawer .nd-foot a[href^="tel:"],
.footer a[href^="tel:"],
#contact-offices a[href^="tel:"] {
  display: inline-flex; align-items: center; gap: 7px;
  white-space: nowrap;
}
.nav-drawer .nd-foot a[href^="tel:"]::before,
.footer a[href^="tel:"]::before,
#contact-offices a[href^="tel:"]::before {
  content: "";
  width: 11px; height: 11px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>") no-repeat center / contain;
  opacity: 0.85;
  color: var(--copper);
}
.footer a[href^="tel:"]::before { color: var(--copper-soft, #d18a6b); }
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  background: var(--navy); color: var(--cream);
  font-size: 14px; letter-spacing: 0.02em;
  border: 1px solid var(--navy);
  transition: background .2s ease, transform .2s ease;
}
.cta:hover { background: var(--navy-2); }
.cta.ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.cta.ghost:hover { background: var(--navy); color: var(--cream); }
.cta.dark-ghost { background: transparent; color: var(--cream); border-color: var(--cream); }
.cta.dark-ghost:hover { background: var(--cream); color: var(--navy); }
.cta .arrow { display: inline-block; transform: translateY(0px); }

.nav-actions .cta { font-weight: 600; font-size: 13.5px; letter-spacing: 0.03em; padding: 13px 22px; }

/* ============ placeholders ============ */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      color-mix(in oklab, var(--navy) 100%, transparent) 0 1px,
      transparent 1px 10px),
    var(--navy);
  color: var(--cream);
  overflow: hidden;
}
.ph.cream {
  background:
    repeating-linear-gradient(135deg,
      color-mix(in oklab, var(--ink) 100%, transparent) 0 1px,
      transparent 1px 10px),
    var(--cream-2);
  color: var(--ink-2);
}
.ph .label {
  position: absolute; left: 16px; bottom: 14px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: lowercase;
}
.ph .label::before { content: "[ "; opacity: 0.6; }
.ph .label::after { content: " ]"; opacity: 0.6; }
.ph .dims {
  position: absolute; right: 16px; top: 14px;
  font-family: var(--f-mono); font-size: 10px; opacity: 0.5;
  letter-spacing: 0.08em;
}

/* ============ footer ============ */
.footer {
  background: var(--navy); color: var(--cream);
  padding-block: 80px 40px;
}
.footer a { color: var(--cream); }
.footer .eyebrow { color: var(--copper-soft); }
.footer h4 {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper-soft);
  font-weight: 500;
  margin: 0 0 18px;
}
/* Symmetric footer: align all columns so headers / wordmark sit on same baseline, consistent spacing */
.footer .grid.g-12 { align-items: start; }
.footer .grid.g-12 > div > p { max-width: 32ch; }
.footer .grid.g-12 > div > .wordmark { margin-bottom: 4px; }
.footer .fine {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em;
  color: color-mix(in oklab, var(--cream) 50%, transparent);
  padding-top: 48px; border-top: 1px solid var(--rule-navy);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 64px;
  align-items: center;
}
.footer .fine .fine-hss {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--cream) 70%, transparent);
  line-height: 1;
  transition: opacity 160ms ease;
}
.footer .fine .fine-hss:hover { opacity: 0.85; }
.footer .fine .fine-hss img {
  height: 32px; width: auto; display: block;
  opacity: 1;
}

/* ============ utilities ============ */
.rule { height: 1px; background: var(--rule); }
.rule-dark { height: 1px; background: var(--rule-navy); }
.tabnum { font-variant-numeric: tabular-nums; }
.balance { text-wrap: balance; }
.muted { color: var(--ink-3); }
.inline-mark {
  background: linear-gradient(to top, var(--copper-soft) 40%, transparent 40%);
  padding: 0 2px;
}
hr.hair { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ============ form ============ */
.form-card {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(36px, 4vw, 56px);
  border: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 24px;
  position: relative;
}
.form-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 44px; height: 44px;
  border-top: 1px solid var(--copper);
  border-left: 1px solid var(--copper);
  pointer-events: none;
}
.form-card::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 44px; height: 44px;
  border-bottom: 1px solid var(--copper);
  border-right: 1px solid var(--copper);
  pointer-events: none;
}
.form-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4px;
}
.form-header .title {
  font-family: var(--f-display);
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.form-header .index {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.field > span {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.field > span::before {
  content: attr(data-n);
  color: var(--copper);
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0 12px;
  transition: border-color 160ms ease;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}
.field textarea {
  resize: vertical;
  min-height: 96px;
  padding-top: 14px;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 14px) 18px, calc(100% - 8px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
  cursor: pointer;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--copper);
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-4);
}
.form-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}
.form-footer .note {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-submit {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 26px;
  background: var(--navy);
  color: var(--cream);
  border: 1px solid var(--navy);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: background 160ms ease, transform 160ms ease;
}
.form-submit:hover {
  background: var(--copper);
  border-color: var(--copper);
}
.form-submit .arrow { transition: transform 200ms ease; }
.form-submit:hover .arrow { transform: translateX(4px); }
.form-received {
  padding: clamp(48px, 6vw, 72px);
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  text-align: left;
}
.form-received .eyebrow { color: var(--copper); margin-bottom: 16px; }
.form-received .display { font-size: 44px; color: var(--ink); margin-bottom: 16px; }
.form-received p { color: var(--ink-2); max-width: 48ch; font-size: 16px; line-height: 1.6; }

@media (max-width: 720px) {
  .form-card { grid-template-columns: 1fr; padding: 28px; }
  .form-header { flex-direction: column; gap: 8px; }
}

/* ============ form confirmation screen ============ */
.form-confirmation {
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--navy) 96%, var(--copper) 4%) 0%,
    var(--navy) 100%);
  color: var(--cream);
  display: block !important;
  grid-template-columns: 1fr !important;
  padding: 64px 56px !important;
  position: relative;
  overflow: hidden;
}
.form-confirmation[style*="display: none"] { display: none !important; }
.form-confirmation::before,
.form-confirmation::after { display: none; }
.form-confirmation .conf-mark {
  width: 56px; height: 56px;
  color: var(--copper-soft);
  margin-bottom: 32px;
}
.form-confirmation .conf-mark svg { width: 100%; height: 100%; display: block; }
.form-confirmation .conf-mark circle {
  stroke-dasharray: 164;
  stroke-dashoffset: 164;
  animation: conf-circle 700ms ease 120ms forwards;
}
.form-confirmation .conf-mark path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: conf-check 400ms ease 700ms forwards;
}
@keyframes conf-circle { to { stroke-dashoffset: 0; } }
@keyframes conf-check { to { stroke-dashoffset: 0; } }

.conf-steps {
  display: grid; gap: 0;
  margin: 40px 0 48px;
  border-top: 1px solid var(--rule-navy);
}
.conf-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule-navy);
  align-items: start;
}
.conf-step .conf-n {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--copper-soft);
  padding-top: 4px;
}
.conf-step .conf-step-t {
  font-family: var(--f-display); font-weight: 400; font-size: 20px;
  color: var(--cream); margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.conf-step .conf-step-d {
  font-family: var(--f-sans); font-size: 14.5px; font-weight: 300;
  color: color-mix(in oklab, var(--cream) 72%, transparent);
  line-height: 1.55;
  max-width: 54ch;
}
.conf-actions {
  display: flex; align-items: center; gap: 32px;
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .form-confirmation { padding: 40px 24px !important; }
  .conf-step { grid-template-columns: 48px 1fr; gap: 14px; }
}

/* ============ tweaks panel ============ */
.tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  background: var(--paper);
  border: 1px solid var(--rule);
  width: 280px;
  box-shadow: 0 24px 60px rgba(11, 43, 71, 0.18);
  display: none;
  font-family: var(--f-sans);
}
.tweaks.open { display: block; }
.tweaks header {
  padding: 14px 16px; border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
}
.tweaks header button {
  background: none; border: 0; cursor: pointer; color: var(--ink-3);
  font-family: inherit; font-size: 14px;
}
.tweaks .row {
  padding: 12px 16px; border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 8px;
}
.tweaks .row:last-child { border-bottom: 0; }
.tweaks label {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}
.tweaks .seg {
  display: flex; border: 1px solid var(--rule);
}
.tweaks .seg button {
  flex: 1; padding: 8px; background: var(--paper); border: 0;
  font-family: var(--f-sans); font-size: 12px; cursor: pointer;
  color: var(--ink-2); border-right: 1px solid var(--rule);
}
.tweaks .seg button:last-child { border-right: 0; }
.tweaks .seg button[data-active="true"] { background: var(--navy); color: var(--cream); }

/* ============ reveal ============ */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ mobile nav (hamburger) ============ */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  margin: -10px -10px -10px 0;
  cursor: pointer;
  color: var(--ink);
  z-index: 101;
  position: relative;
}
.nav-toggle svg { display: block; width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.nav-toggle .close-icon { display: none; }
body.nav-open .nav-toggle .open-icon { display: none; }
body.nav-open .nav-toggle .close-icon { display: block; }
.nav-drawer {
  display: none;
}

/* ============ responsive: tablet (≤1024px) ============ */
@media (max-width: 1024px) {
  .nav-inner { gap: 20px; }
  .nav-links { gap: 20px; font-size: 14.5px; }

  /* Relax the 12-col grid on tablet */
  .g-12 { grid-template-columns: repeat(12, 1fr); }
  .section { padding-block: clamp(56px, 8vw, 112px); }
}

/* ============ responsive: phone (≤760px) ============ */
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  body { font-size: 15.5px; }

  /* --- Nav: switch to hamburger --- */
  .nav-inner { padding-block: 14px; gap: 10px; align-items: flex-start; }
  .nav-links { display: none; }
  .nav-actions {
    gap: 6px;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    order: 2;
  }
  .nav-actions .cta { order: 1; }
  .nav-phone {
    order: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    align-self: center;
    font-family: var(--f-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }
  .nav-actions .cta {
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  .nav-actions .cta .arrow { display: none; }
  .nav-toggle { display: inline-flex; order: 3; }

  .wordmark { gap: 10px; }
  .wordmark .mark { width: 32px; height: 32px; }
  .wordmark .wm-name { font-size: 19px; }
  .wordmark .wm-sub { font-size: 9.5px; letter-spacing: 0.08em; }

  /* Drawer */
  .nav-drawer {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--cream);
    z-index: 99;
    padding: 88px 24px 32px;
    transform: translateY(-100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* In-drawer close button (in addition to the header hamburger, which also toggles). */
  .nd-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 50%;
    color: var(--ink);
    cursor: pointer;
    padding: 0;
    z-index: 1;
  }
  .nd-close:hover { background: var(--cream-2); }
  .nd-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; display: block; }
  body.nav-open .nav-drawer { transform: translateY(0); }
  body.nav-open { overflow: hidden; }
  .nav-drawer .nd-links {
    display: flex; flex-direction: column;
    font-family: var(--f-display);
    font-size: 32px;
    letter-spacing: -0.01em;
    line-height: 1.15;
    gap: 4px;
  }
  .nav-drawer .nd-links a {
    padding: 14px 0;
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
  }
  .nav-drawer .nd-links a[aria-current="page"] { color: var(--copper); }
  .nav-drawer .nd-foot {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
    font-family: var(--f-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    line-height: 2;
  }
  .nav-drawer .nd-foot a { color: var(--ink); display: block; }
  .nav-drawer .nd-cta {
    display: inline-flex; align-items: center; gap: 10px;
    margin-top: 24px;
    padding: 14px 22px;
    background: var(--navy); color: var(--cream);
    font-family: var(--f-sans); font-size: 14px; letter-spacing: 0.02em;
  }

  /* --- Grid collapse: all 12-col layouts stack on phone --- */
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr !important; }
  .g-12 { grid-template-columns: 1fr !important; }
  .g-12 > [style*="grid-column"] { grid-column: 1 / -1 !important; }

  /* --- Section padding tighter --- */
  .section { padding-block: clamp(48px, 9vw, 80px); }

  /* --- Type ramps: cap oversized hero/display headlines --- */
  .display { line-height: 1.02; }
  p.lede { font-size: 19px; line-height: 1.4; }

  /* --- Hero (index) --- */
  .nav { backdrop-filter: blur(8px); }

  /* --- Footer: stack columns --- */
  .footer .g-12 > [style*="grid-column"] { grid-column: 1 / -1 !important; }
  .footer .fine {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 32px;
    margin-top: 40px;
  }

  /* --- Forms: single column --- */
  form[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .form-card { grid-template-columns: 1fr !important; padding: 24px !important; }

  /* --- Proc rows tighter --- */
  .proc-row { grid-template-columns: 72px 1fr !important; gap: 14px !important; padding: 16px 0 !important; }
  .proc-row:hover { padding-inline: 0 !important; }
  .pr-thumb { width: 72px !important; }
  .pr-num, .pr-link { display: none !important; }
  .pr-title { font-size: 22px !important; }
  .pr-copy { font-size: 15px !important; line-height: 1.55; }

  /* --- Locations block --- */
  .loc { border-right: 0 !important; padding-inline: 0 !important; padding-block: 28px !important; }

  /* --- Credentials logos: wrap tighter, smaller --- */
  .section [style*="height: 48px"] img,
  .section img[style*="height: 48px"] { height: 38px !important; }
  .section img[style*="height: 56px"] { height: 44px !important; }
  .section img[style*="height: 34px"] { height: 28px !important; }
  .section img[style*="height: 36px"] { height: 30px !important; }

  /* --- Marquee: allow horizontal scroll --- */
  .marquee {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 32px !important;
  }
  .marquee::-webkit-scrollbar { display: none; }
  .marquee span { flex-shrink: 0; }

  /* --- Tweaks panel: smaller and dismissable --- */
  .tweaks {
    right: 12px; bottom: 12px; left: 12px;
    width: auto; max-width: 320px;
    max-height: 70vh;
    overflow-y: auto;
  }

  /* --- Shrink oversized inline headlines --- */
  h1.display, h2.display { text-wrap: balance; }
}

/* ============ responsive: small phone (≤420px) ============ */
@media (max-width: 420px) {
  .nav-inner { gap: 8px; }
  .nav-actions { gap: 6px; }
  .nav-phone { font-size: 11.5px; }
  .nav-actions .cta { padding: 8px 10px; font-size: 11px; letter-spacing: 0.04em; }
  .wordmark .wm-name { font-size: 18px; }
  .wordmark .wm-sub { font-size: 9px; letter-spacing: 0.07em; }
  .display { letter-spacing: -0.015em; }
}

/* ============ touch tweaks ============ */
@media (hover: none) {
  .proc-row:hover { background: transparent; padding-inline: 0; }
  .proc-row:hover .pr-thumb img { transform: none; }
  .cta:hover { background: var(--navy); }
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}


/* tagline style A — procedure hero subtitle */
[data-tagline="A"] .proc-hero .tagline {
  font-family: var(--f-sans);
  font-style: normal;
  font-weight: 300;
  font-size: clamp(19px, 1.55vw, 23px);
  line-height: 1.5;
  letter-spacing: 0.005em;
  color: color-mix(in oklab, var(--cream) 85%, transparent);
  max-width: 52ch;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-navy);
}

/* ============ mobile hardening (≤760px) ============ */
@media (max-width: 760px) {
  /* Prevent horizontal overflow anywhere */
  html, body { overflow-x: hidden; max-width: 100%; }
  img, video, iframe { max-width: 100%; height: auto; }

  /* Spacing rhythm: add breathing room between stacked grid children */
  .grid.g-12 { row-gap: 32px !important; }
  .grid.g-12 > [style*="grid-column"] + [style*="grid-column"] { margin-top: 8px; }

  /* More generous section padding so blocks don't stack visually */
  .section { padding-block: clamp(40px, 7vw, 64px) !important; }
  section.section + section.section { border-top: 1px solid var(--rule); }
  section.section.dark + section.section.dark { border-top: 1px solid var(--rule-navy); }

  /* Consistent card/callout interior padding */
  div[style*="padding: 20px"][style*="border:"],
  div[style*="padding: 24px"][style*="border:"] { padding: 22px !important; }

  /* Eyebrow → headline spacing */
  .eyebrow + h1.display, .eyebrow + h2.display { margin-top: 14px !important; }
  .display + p, .display + .lede { margin-top: 20px !important; }
  h1.display, h2.display { margin-bottom: 16px !important; }

  /* Dense text blocks: gap between paragraphs */
  p + p { margin-top: 14px; }

  /* --- Tighten oversized inline margin/padding values that were set for desktop --- */
  /* margin-top: 80px / 96px / 72px → cap ~40px on mobile */
  [style*="margin-top: 80px"],
  [style*="margin-top:80px"] { margin-top: 40px !important; }
  [style*="margin-top: 96px"],
  [style*="margin-top:96px"] { margin-top: 44px !important; }
  [style*="margin-top: 72px"],
  [style*="margin-top:72px"] { margin-top: 36px !important; }
  [style*="margin-top: 64px"],
  [style*="margin-top:64px"] { margin-top: 32px !important; }
  [style*="margin-top: 56px"],
  [style*="margin-top:56px"] { margin-top: 28px !important; }
  [style*="margin-top: 48px"],
  [style*="margin-top:48px"] { margin-top: 28px !important; }
  /* margin-bottom similarly */
  [style*="margin-bottom: 80px"],
  [style*="margin-bottom:80px"] { margin-bottom: 40px !important; }
  [style*="margin-bottom: 72px"],
  [style*="margin-bottom:72px"] { margin-bottom: 36px !important; }
  [style*="margin-bottom: 64px"],
  [style*="margin-bottom:64px"] { margin-bottom: 32px !important; }
  [style*="margin-bottom: 56px"],
  [style*="margin-bottom:56px"] { margin-bottom: 28px !important; }
  /* padding-block values */
  [style*="padding-block: 64px"],
  [style*="padding-block:64px"] { padding-block: 32px !important; }
  [style*="padding-block: 80px"],
  [style*="padding-block:80px"] { padding-block: 40px !important; }
  [style*="padding-block: 48px"],
  [style*="padding-block:48px"] { padding-block: 28px !important; }
  /* gap values for grids */
  [style*="gap: 64px"][style*="grid"],
  [style*="gap:64px"][style*="grid"] { gap: 28px !important; }
  [style*="gap: 80px"][style*="grid"],
  [style*="gap:80px"][style*="grid"] { gap: 32px !important; }

  /* Rein in oversized hero headlines that use clamp min of 56px */
  h1.display, .proc-hero h1, .res-hero h1 {
    font-size: clamp(40px, 10vw, 56px) !important;
    line-height: 1.04 !important;
    letter-spacing: -0.02em !important;
  }
  /* Big display paragraph quote / lede — tighten */
  p.lede { font-size: 17px !important; line-height: 1.55 !important; }
  .proc-hero .tagline, .res-hero .lede {
    font-size: 17px !important; line-height: 1.5 !important; max-width: none !important;
  }
  [data-tagline="A"] .proc-hero .tagline { font-size: 16px !important; }

  /* Oversized display text inside about philosophy quote */
  section.section.dark p[style*="font-size: clamp(22px"] {
    font-size: 19px !important;
    line-height: 1.45 !important;
  }

  /* Inline-styled bodies that set fixed 16px etc. — keep comfortable */
  p[style*="font-size: 16px"] { font-size: 16px !important; line-height: 1.7 !important; }

  /* About page: timeline (80px 120px 1fr) — stack to label + content */
  .tl div { grid-template-columns: 64px 1fr !important; gap: 4px 16px !important; padding: 12px 0 !important; }
  .tl div b { grid-row: 1; }
  .tl div span { grid-row: 1; grid-column: 2; align-self: baseline; }
  .tl div i { grid-row: 2; grid-column: 1 / -1; font-size: 16px !important; }

  /* Procedure cards already stack via existing rule; make the index number smaller */
  .proc-card .pc-idx { font-size: 13px !important; color: var(--ink-3); }
  .proc-card h3 { font-size: 24px !important; line-height: 1.15 !important; }
  .pc-media { max-width: 100% !important; aspect-ratio: 16/10 !important; }

  /* Procedure detail pages: candidate list, recovery rows — already handled in page-level CSS,
     but enforce minimum readable type where inline overrides exist */
  .rec-row .when { font-size: 11px !important; letter-spacing: 0.12em !important; }
  .rec-row .what h4 { font-size: 19px !important; }
  .tech-step .n { font-size: 11px !important; }
  .tech-step h4 { font-size: 20px !important; }

  /* Resources cards / step pills — prevent clipping */
  .res-stepper .wrap { overflow-x: auto !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .res-stepper .wrap::-webkit-scrollbar { display: none; }

  /* Related grid on procedure pages */
  .related-grid { grid-template-columns: 1fr !important; gap: 16px !important; }

  /* Inline flex rows that should wrap on phone */
  div[style*="justify-content: space-between"][style*="flex-wrap: wrap"] { gap: 16px !important; }

  /* Generic inline grid containers with large fixed columns — cap */
  div[style*="grid-template-columns: 180px 1fr"],
  div[style*="grid-template-columns: 80px 120px 1fr"],
  div[style*="grid-template-columns: 80px 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  /* CTAs: make full-width on phone for easier tap */
  .section .cta, .proc-hero .cta { padding: 14px 18px; font-size: 14px; min-height: 48px; }
  .nav-drawer .nd-cta { width: 100%; justify-content: center; }

  /* Min touch target: FAQ buttons, nav items */
  .faq-q { min-height: 48px; padding-block: 14px !important; font-size: 16px !important; }

  /* Inline padding blocks that use huge px — cap */
  div[style*="padding: 40px"][style*="border"],
  div[style*="padding: 48px"],
  div[style*="padding: 64px"] { padding: 24px !important; }

  /* Footer fine-print */
  .footer h4 { font-size: 11px !important; }
  .footer ul, .footer p { font-size: 13px !important; }
  .footer .fine { font-size: 11px !important; }
  .footer .fine .fine-hss img { height: 24px !important; }

  /* Credentials logo rows — allow horizontal scroll instead of cramming */
  section [style*="display: flex"][style*="gap: 64px"],
  section [style*="display:flex"][style*="gap: 64px"] {
    gap: 32px !important;
  }

  /* Patient voices: comfortable */
  .voice blockquote { font-size: 18px !important; line-height: 1.45 !important; }

  /* Form card tighter padding */
  .form-card input, .form-card textarea, .form-card select {
    font-size: 16px !important; /* prevent iOS zoom on focus */
  }
  input, textarea, select { font-size: 16px !important; }

  /* Ensure sections never produce sideways scroll from inline max-widths */
  .wrap { max-width: 100%; }
}

/* ============ small phone (≤400px) ============ */
@media (max-width: 400px) {
  h1.display, .proc-hero h1, .res-hero h1 {
    font-size: 38px !important;
  }
  :root { --gutter: 16px; }
  .wordmark .wm-name { font-size: 17px !important; }
  .wordmark .wm-sub { font-size: 8.5px !important; letter-spacing: 0.06em !important; }
  .nav-phone { font-size: 10.5px !important; }
  .nav-actions .cta { font-size: 10.5px !important; padding: 8px 9px !important; }
}

/* ============ tablet-portrait tightening (761px – 900px) ============ */
@media (min-width: 761px) and (max-width: 900px) {
  h1.display { font-size: clamp(48px, 7.5vw, 72px) !important; }
  .proc-hero h1, .res-hero h1 { font-size: clamp(44px, 7vw, 64px) !important; }
  p.lede { font-size: 18px !important; }
  /* Tech step 80px column fine, but cand-list 48px first col fine */
  /* Hero section stays 2 columns until 760, which is good */
}
