/* Dental Sleep Connect — theme stylesheet
   Fonts: Young Serif (display) and Hanken Grotesk (text), both SIL OFL, self-hosted. */

@font-face { font-family: "Young Serif"; src: url("../fonts/young-serif-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --navy: #12324a;
  --navy-deep: #0c2536;
  --teal: #2a86c5;
  --teal-ink: #17609a;      /* logo blue, dark enough for body-size text on light backgrounds */
  --blue: #eaf3f7;
  --paper: #fafbf9;
  --sage: #dde9e4;
  --lamp: #f5c04e;          /* single warm accent: the bedside lamp */
  --lamp-deep: #e9ad2b;
  --ink: #12324a;
  --ink-soft: #3b566a;
  --rule: #cfdde3;
  --white: #fff;
  --display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-panel: clamp(20px, 3vw, 36px);
  --r-card: 18px;
  --gutter: clamp(16px, 4vw, 40px);
  --inset: clamp(8px, 1.6vw, 20px);
  --section: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--paper); color: var(--ink-soft); font-family: var(--text); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }
strong { color: var(--ink); font-weight: 650; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: 12px; top: 12px; transform: translateY(-400%); z-index: 100; background: var(--navy); color: var(--white); padding: 0.7rem 1rem; border-radius: 8px; }
.skip-link:focus { transform: none; color: var(--white); }

/* ------------------------------------------------------------------ type */
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 5.4vw, 4.1rem); line-height: 1.05; letter-spacing: -0.012em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.12; letter-spacing: -0.008em; }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.25; }
:where(p, ul, ol, figure, table, details, form, .wp-block-buttons, .wp-block-group) { margin: 0; }
.lede { font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.5; max-width: 38em; }
main p, main li { max-width: 68ch; text-wrap: pretty; }

/* vertical rhythm: every stacked child gets space; grids opt out below */
main :where(.wp-block-group) > * + * { margin-top: 1.15rem; }
main :where(h2) + * { margin-top: 1.3rem; }
main :where(.wp-block-buttons) { margin-top: 1.9rem; }

/* --------------------------------------------------------------- buttons */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn, .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.7rem 1.45rem; border: 1.5px solid transparent; border-radius: 999px; background: var(--lamp); color: var(--navy); font: 650 1rem/1.2 var(--text); text-decoration: none; cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.btn:hover, .wp-block-button__link:hover { background: var(--lamp-deep); color: var(--navy); }
.is-style-outline > .wp-block-button__link { background: transparent; border-color: var(--navy); color: var(--navy); }
.is-style-outline > .wp-block-button__link:hover { background: var(--navy); color: var(--white); }
.is-style-quiet > .wp-block-button__link { background: var(--navy); color: var(--white); }
.is-style-quiet > .wp-block-button__link:hover { background: var(--navy-deep); color: var(--white); }
.btn--text { background: none; border-color: transparent; color: var(--teal-ink); text-decoration: underline; text-underline-offset: 0.2em; padding-inline: 0.5rem; }
.btn--text:hover { background: none; color: var(--navy); }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.site-header.is-stuck { border-bottom-color: var(--rule); }
.site-header__inner { max-width: 1320px; margin: 0 auto; padding: 0.7rem var(--gutter); display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; flex: none; }
.brand__logo { height: 62px; width: auto; flex: none; mix-blend-mode: multiply; }
.brand__name { font-family: var(--display); font-size: 1.02rem; line-height: 1.08; letter-spacing: -0.005em; }
.site-nav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.site-nav__list { display: flex; gap: clamp(0.9rem, 1.6vw, 1.6rem); list-style: none; margin: 0; padding: 0; }
.site-nav__list a { color: var(--ink); text-decoration: none; font-weight: 550; font-size: 0.97rem; padding: 0.4rem 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav__list a:hover, .site-nav__list a[aria-current="page"] { border-bottom-color: var(--teal); }
.site-nav__contact { display: none; }
.nav-toggle { display: none; }

@media (max-width: 1140px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.6rem; margin-left: auto; min-height: 44px; padding: 0.5rem 0.9rem; background: none; border: 1.5px solid var(--navy); border-radius: 999px; color: var(--navy); font: 650 0.95rem var(--text); cursor: pointer; }
  .nav-toggle__bars { width: 18px; height: 12px; border-block: 2px solid currentColor; position: relative; }
  .nav-toggle__bars::after { content: ""; position: absolute; inset: 3px 0 auto; border-top: 2px solid currentColor; }
  .site-nav { display: none; position: absolute; inset: 100% 0 auto; margin: 0; padding: 0.5rem var(--gutter) 1.5rem; background: var(--paper); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; gap: 1rem; max-height: calc(100dvh - 4rem); overflow-y: auto; box-shadow: 0 24px 40px -24px rgb(18 50 74 / 0.35); }
  .site-nav.is-open { display: flex; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__list a { display: block; padding: 0.95rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--rule); white-space: normal; }
  .site-nav__contact { display: block; }
}
@media (max-width: 560px) { .brand__logo { height: 46px; } }

/* ------------------------------------------------------------ containers */
.section { padding-block: var(--section); }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }
.section + .section:not(.band):not(.cta-final) { padding-top: 0; }
.band + .section, .hero + .section, .page-hero + .section { padding-top: var(--section) !important; }
.band { margin-inline: var(--inset); border-radius: var(--r-panel); }
.band--blue { background: var(--blue); }
.band--sage { background: var(--sage); }
.section__intro { font-size: 1.15rem; }

/* arch: the one recurring shape, echoing a dental arch */
.wp-block-image { margin: 0; }
.arch img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px var(--r-card) var(--r-card); }

/* ------------------------------------------------------------------ hero */
.hero { padding: var(--inset) var(--inset) 0; }
.hero__panel { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: end; background: var(--navy); color: #c9dbe4; border-radius: var(--r-panel); padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4.5rem) 0; overflow: hidden; }
body .hero__panel > * { margin-top: 0; }
.hero__copy { padding-bottom: clamp(2rem, 6vw, 5rem); align-self: center; }
.hero h1 { color: var(--white); max-width: 13em; }
.hero .lede { color: #d5e4eb; margin-top: 1.4rem; }
.hero__alt { margin-top: 1.4rem; font-size: 0.98rem; }
.hero__alt a, .hero a:not(.btn) { color: var(--white); }
.hero__media { align-self: end; justify-self: center; width: min(100%, 400px); }
.hero__media img { border-radius: 999px 999px 0 0; box-shadow: 0 0 0 clamp(14px, 2vw, 26px) rgb(42 134 197 / 0.3), 0 0 0 clamp(28px, 4vw, 52px) rgb(42 134 197 / 0.14); object-position: 62% 50%; }
.hero :focus-visible, .cta-final :focus-visible, .door--night :focus-visible, .page-hero--night :focus-visible { outline-color: var(--lamp); }

.facts { list-style: none; padding: clamp(1.75rem, 4vw, 2.75rem) var(--gutter) 0; max-width: 1200px; margin-inline: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 3vw, 3rem); }
body .facts { margin-top: 0; }
.facts li { padding-left: 1.1rem; border-left: 2px solid var(--teal); font-size: 1rem; line-height: 1.5; }
.facts strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.18rem; margin-bottom: 0.2rem; }

/* ---------------------------------------------------------------- finder */
.finder { margin-top: 2rem; max-width: 34rem; }
.finder label { display: block; font-weight: 650; font-size: 0.95rem; margin-bottom: 0.45rem; color: inherit; }
.finder__row { display: flex; gap: 0.4rem; padding: 0.4rem; background: var(--white); border: 1.5px solid var(--navy); border-radius: 999px; align-items: center; }
.finder__row:focus-within { outline: 3px solid var(--teal); outline-offset: 3px; }
.finder input { flex: 1; min-width: 0; height: 48px; border: 0; background: none; padding: 0 0.5rem 0 1.1rem; font: 500 1.05rem var(--text); color: var(--navy); border-radius: 999px; }
.finder input:focus { outline: none; }
.finder input::placeholder { color: #587081; }
.finder .btn { flex: none; }
.finder__note { margin-top: 0.7rem; font-size: 0.86rem; opacity: 0.85; }
.hero .finder label, .cta-final .finder label { color: var(--white); }
.hero .finder__row, .cta-final .finder__row { border-color: var(--white); }
.hero .finder__row:focus-within, .cta-final .finder__row:focus-within { outline-color: var(--lamp); }
@media (max-width: 560px) {
  .finder__row { flex-direction: column; align-items: stretch; border-radius: 26px; padding: 0.5rem; }
  .finder input { padding-inline: 0.9rem; }
}

/* ----------------------------------------------------------------- doors */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(0.75rem, 1.6vw, 1.25rem); margin-top: 2rem; }
body .doors > * { margin-top: 0; }
.door { border-radius: var(--r-panel); padding: clamp(1.5rem, 4vw, 3rem); display: flex; flex-direction: column; }
.door h3 { font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.15; max-width: 16em; }
.door .wp-block-buttons { margin-top: auto; padding-top: 1.9rem; }
.door--night { background: var(--navy); color: #d5e4eb; }
.door--night h3 { color: var(--white); }
.door--day { background: var(--sage); }

/* ----------------------------------------------------------------- split */
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
body .split > * { margin-top: 0; }
.split--flip .split__media { order: 2; }
.split--flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.split__media { max-width: 440px; width: 100%; justify-self: center; }
.split__copy ul { padding-left: 1.2rem; }
.split__copy li + li { margin-top: 0.45rem; }

/* --------------------------------------------------------------- compare */
.wp-block-table { margin: 2rem 0 0; overflow-x: auto; }
.compare table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
.compare th { font-family: var(--display); font-weight: 400; font-size: 1.25rem; color: var(--ink); text-align: left; padding: 0 1.25rem 0.9rem; border: 0; border-bottom: 2px solid var(--navy); }
.compare td { padding: 1rem 1.25rem; border: 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.compare td:first-child, .compare th:first-child { padding-left: 0; width: 22%; font-weight: 650; color: var(--ink); }
.band--blue .compare td { border-bottom-color: #c5d8e1; }

/* ---------------------------------------------------------------- honest */
.honest { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 2.25rem; }
body .honest > * { margin-top: 0; }
.honest__col { padding: 0 clamp(1.25rem, 4vw, 3.5rem) 0 0; }
.honest__col + .honest__col { padding: 0 0 0 clamp(1.25rem, 4vw, 3.5rem); border-left: 1px solid var(--rule); }
.honest ul { list-style: none; padding: 0; }
.honest li { position: relative; padding: 0.8rem 0 0.8rem 2rem; border-top: 1px solid var(--rule); }
.honest li::before { content: ""; position: absolute; left: 0.15rem; top: 1.28rem; width: 0.95rem; height: 0.5rem; border-left: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal); transform: rotate(-45deg) translateY(-3px); }
.honest__col--minus li::before { height: 0; border-left: 0; border-bottom-color: var(--navy); transform: none; top: 1.6rem; }
.band--blue .honest li, .band--blue .honest__col + .honest__col { border-color: #c5d8e1; }

/* ----------------------------------------------------------------- steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: 2.5rem; counter-reset: none; }
body .steps > * { margin-top: 0; }
.step { border-top: 2px solid var(--navy); padding-top: 1.1rem; }
.step__n { font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--teal); }
body .step h3 { margin-top: 0.7rem; }
body .step p:last-child { margin-top: 0.5rem; }
.steps-section--long .steps { grid-template-columns: 1fr; gap: 0; max-width: 860px; }
.steps-section--long .step { display: grid; grid-template-columns: 4.5rem 1fr; column-gap: 1rem; padding: 1.75rem 0; border-top: 1px solid var(--rule); }
.steps-section--long .step:first-child { border-top: 2px solid var(--navy); }
.steps-section--long .step__n { grid-row: span 2; font-size: 3.2rem; }
body .steps-section--long .step h3 { margin-top: 0.35rem; }

/* ------------------------------------------------------------ misc blocks */
.aside-layout { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
body .aside-layout > * { margin-top: 0; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); margin-top: 2.25rem; }
body .trio > * { margin-top: 0; }
.trio__item { border-top: 2px solid var(--navy); padding-top: 1.1rem; }
body .trio__item p { margin-top: 0.6rem; }
.note { background: var(--blue); border-left: 3px solid var(--teal); border-radius: 0 12px 12px 0; padding: 1rem 1.25rem; font-size: 0.98rem; max-width: 68ch; }
body .note { margin-top: 2rem; }
.band--blue .note { background: var(--white); }
.plain-list { list-style: none; padding: 0; }
ol.plain-list { list-style: decimal; padding-left: 1.2rem; }
.plain-list li + li { margin-top: 0.4rem; }
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 1.9rem; margin-top: 0.6rem; }
.checks li::before { content: ""; position: absolute; left: 0.1rem; top: 0.42rem; width: 0.9rem; height: 0.45rem; border-left: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal); transform: rotate(-45deg); }

/* ------------------------------------------------------------------- faq */
.faq { border-top: 2px solid var(--navy); }
body .faq { margin-top: 1.75rem; }
body .faq > * { margin-top: 0; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1.5rem; align-items: baseline; padding: 1.15rem 0; font-weight: 650; font-size: 1.1rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.6rem/0.8 var(--text); color: var(--teal-ink); flex: none; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.25rem; margin-top: 0; }
body .faq-section--full h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-top: 3.25rem; }
body .faq-section--full h2:first-child { margin-top: 0; }
body .faq-section--full .faq { margin-top: 1rem; }

/* ------------------------------------------------------------- final cta */
.cta-final { padding: 0 var(--inset) var(--inset); }
.cta-final__panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); background: var(--navy); color: #d5e4eb; border-radius: var(--r-panel); overflow: hidden; }
body .cta-final__panel > * { margin-top: 0; }
.cta-final__copy { padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4.5rem); align-self: center; }
.cta-final h2 { color: var(--white); }
.cta-final__media, .cta-final__media img { height: 100%; }
.cta-final__media img { width: 100%; object-fit: cover; object-position: 70% 50%; min-height: 260px; }

/* ------------------------------------------------------------- page hero */
.page-hero { padding: var(--inset) var(--inset) 0; }
.page-hero__panel { border-radius: var(--r-panel); padding: clamp(2.25rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4.5rem); background: var(--blue); }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); max-width: 17em; }
body .page-hero .lede { margin-top: 1.25rem; }
.page-hero--media .page-hero__panel { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: end; padding-bottom: 0; overflow: hidden; }
body .page-hero--media .page-hero__panel > * { margin-top: 0; }
.page-hero--media .page-hero__copy { padding-bottom: clamp(2.25rem, 6vw, 5rem); align-self: center; }
.page-hero--media .arch { width: min(100%, 340px); justify-self: center; }
.page-hero--media .arch img { border-radius: 999px 999px 0 0; aspect-ratio: 5 / 6; }
.page-hero--night .page-hero__panel { background: var(--navy); color: #d5e4eb; }
.page-hero--night h1 { color: var(--white); }
.page-hero--plain { padding-inline: 0; }
.page-hero--plain .page-hero__panel { background: none; border-radius: 0; padding: clamp(2.25rem, 6vw, 4rem) var(--gutter) 0; max-width: 820px; margin-inline: auto; }
.page-hero--plain .page-hero__copy { border-bottom: 2px solid var(--navy); padding-bottom: 2rem; }
.page-hero--plain h1 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }

/* ----------------------------------------------------------------- prose */
body .prose h2 { margin-top: 3rem; font-size: clamp(1.5rem, 2.6vw, 2rem); }
body .prose .wrap > h2:first-child, body .prose .note + h2 { margin-top: 0; }
body .prose .note:first-child { margin-top: 0; margin-bottom: 2.5rem; }
.prose ul:not(.plain-list), .prose ol { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.45rem; }
.prose--quiet { font-size: 0.98rem; }
body .prose--quiet h2 { font-size: 1.35rem; }
body .prose--legal h2 { font-size: 1.35rem; margin-top: 2.4rem; }

/* ------------------------------------------------------------- directory */
.directory .finder { margin-top: 0; max-width: 40rem; }
.notice { border-radius: 12px; padding: 0.9rem 1.15rem; font-size: 0.96rem; margin-top: 1.5rem; max-width: none; }
.notice--demo { background: #fff4d6; border: 1px dashed #b98a12; color: #4d3a05; }
.notice--demo strong, .notice--warn strong { color: inherit; }
.notice--warn { background: var(--blue); border-left: 3px solid var(--teal); border-radius: 0 12px 12px 0; }
.notice--ok { background: var(--sage); border-left: 3px solid var(--teal-ink); border-radius: 0 12px 12px 0; color: var(--ink); }
.notice--error { background: #fdecea; border-left: 3px solid #a4262c; border-radius: 0 12px 12px 0; color: #5c1418; }
.directory__status { margin-top: 1.75rem; font-weight: 600; color: var(--ink); }
.directory__list { list-style: none; padding: 0; margin-top: 1.1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1rem; }
.practice-card { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-card); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.65rem; max-width: none; }
.practice-card[hidden] { display: none; }
.practice-card__head { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.practice-card__name { font-size: 1.35rem; }
.practice-card__name a { color: var(--ink); text-decoration: none; }
.practice-card__name a:hover { text-decoration: underline; }
.practice-card__tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.practice-card__tags li { background: var(--blue); color: var(--ink); border-radius: 999px; padding: 0.2rem 0.75rem; font-size: 0.86rem; font-weight: 550; }
.practice-card__phone a { font-weight: 650; }
.practice-card__actions { margin-top: auto; padding-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: center; }
.badge { display: inline-block; border-radius: 6px; padding: 0.15rem 0.55rem; font-size: 0.8rem; font-weight: 650; }
.badge--demo { background: #fff4d6; color: #4d3a05; border: 1px dashed #b98a12; }
.directory__empty { margin-top: 1.5rem; background: var(--blue); border-radius: var(--r-card); padding: clamp(1.5rem, 4vw, 2.5rem); }
.directory__empty h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.directory__empty p { margin-top: 1rem; }

.bridge { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: clamp(1.5rem, 4vw, 2.75rem); }
.bridge > * + * { margin-top: 1rem; }
.bridge h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.bridge__place { margin-top: 0.3rem; }
.bridge__actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; max-width: none; }
.practice-profile > * + * { margin-top: 1rem; }
.practice-profile dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 1.5rem 0 0; }
.practice-profile dt { font-weight: 650; color: var(--ink); }
.practice-profile dd { margin: 0; }

/* ----------------------------------------------------------------- forms */
.form-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
body .form-layout > * { margin-top: 0; }
.form-layout__aside { background: var(--sage); border-radius: var(--r-card); padding: clamp(1.25rem, 3vw, 2rem); }
.form-layout__aside h2 { font-size: 1.4rem; }
.adsp-form > * + * { margin-top: 1.15rem; }
.adsp-form .notice { margin-top: 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem 1rem; }
.field { max-width: none; }
.field label { display: block; font-weight: 650; color: var(--ink); margin-bottom: 0.35rem; font-size: 0.98rem; }
.field__optional { font-weight: 400; color: var(--ink-soft); }
.field input:not([type="checkbox"]), .field textarea, .field select { width: 100%; min-height: 50px; padding: 0.7rem 0.9rem; border: 1.5px solid #8ea4b1; border-radius: 10px; background: var(--white); color: var(--navy); font: 500 1rem var(--text); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--navy); }
.field__hint { display: block; font-size: 0.88rem; margin-top: 0.35rem; }
.field__error { display: block; color: #a4262c; font-size: 0.9rem; font-weight: 600; margin-top: 0.35rem; }
.field [aria-invalid="true"] { border-color: #a4262c; }
.field--check { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; }
.field--check input { width: 22px; height: 22px; margin: 0.15rem 0 0; accent-color: var(--navy); }
.field--check label { font-weight: 500; margin: 0; }
.field--check .field__error { grid-column: 2; }
.adsp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--sage); margin: var(--section) var(--inset) var(--inset); border-radius: var(--r-panel); color: var(--ink-soft); }
.cta-final + .site-footer, main:has(.cta-final:last-child) + .site-footer { margin-top: 0; }
.site-footer__inner { max-width: 1200px; margin-inline: auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 2.5rem; display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2.5rem; }
.site-footer__brand p { margin: 1.1rem 0 1.4rem; max-width: 22em; }
.site-footer__title { font: 650 0.98rem var(--text); color: var(--ink); margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.55rem; }
.site-footer__col a { color: var(--ink-soft); text-decoration: none; }
.site-footer__col a:hover { color: var(--navy); text-decoration: underline; }
.site-footer__legal { max-width: 1200px; margin-inline: auto; padding: 1.75rem var(--gutter) 2.25rem; border-top: 1px solid #bdd0c8; font-size: 0.88rem; line-height: 1.55; }
.site-footer__legal p { max-width: 90ch; }
.site-footer__legal p + p { margin-top: 0.7rem; }

.adsp-demo-bar { background: #fff4d6; color: #4d3a05; text-align: center; font-size: 0.88rem; font-weight: 600; padding: 0.4rem 1rem; border-bottom: 1px dashed #b98a12; }
.not-found { min-height: 50vh; display: grid; align-items: center; }
.single-practice, .generic-content { padding-block: var(--section); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 860px) {
  .hero__panel, .page-hero--media .page-hero__panel, .split, .split--flip, .cta-final__panel, .form-layout, .aside-layout { grid-template-columns: 1fr; }
  .hero__copy, .page-hero--media .page-hero__copy { padding-bottom: 0; }
  .hero__media { width: min(78%, 320px); margin-top: 1rem; }
  .page-hero--media .arch { width: min(70%, 260px); }
  .split--flip .split__media { order: 0; }
  .split__media { max-width: 300px; justify-self: start; }
  .doors, .honest, .trio, .facts { grid-template-columns: 1fr; }
  .honest__col, .honest__col + .honest__col { padding: 0; border-left: 0; }
  .honest__col + .honest__col { margin-top: 2.25rem; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
  .field-grid { grid-template-columns: 1fr; }
  .steps-section--long .step { grid-template-columns: 3.25rem 1fr; }
  .steps-section--long .step__n { font-size: 2.4rem; }
}
@media (max-width: 480px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  .hero__media img { animation: arch-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes arch-rise { from { transform: translateY(8%); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
@media print { .site-header, .site-footer, .cta-final, .finder { display: none; } }

/* WordPress wraps the header pattern in a template-part element; make that wrapper the sticky one. */
.wp-site-blocks > .wp-block-template-part:has(.site-header) { position: sticky; top: 0; z-index: 50; }

/* Comparison table on phones: each row becomes a labelled pair instead of a sideways scroll. */
@media (max-width: 640px) {
  .compare table { min-width: 0; display: block; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .compare tbody { display: block; border-top: 2px solid var(--navy); }
  .compare tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
  .compare td, .compare td:first-child { padding: 0; border: 0; width: auto; }
  .compare td:first-child { grid-column: 1 / -1; font-family: var(--display); font-weight: 400; font-size: 1.15rem; margin-bottom: 0.6rem; }
  .compare td:nth-child(n + 2)::before { display: block; font-weight: 650; font-size: 0.85rem; color: var(--teal-ink); margin-bottom: 0.2rem; }
  .compare td:nth-child(2)::before { content: "CPAP"; }
  .compare td:nth-child(3)::before { content: "Oral appliance"; }
}
