/* Ropergate Dental Care · implant options concept
   T07 Decision Guide × V12 architectural calm, Ropergate brand (refine).
   Lato 400/700 only (local OFL files). No external requests. */

@font-face {
  font-family: "Lato";
  src: url("assets/lato-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("assets/lato-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #26143a;
  --ink-2: #5d4c70;
  --purple: #563174;
  --purple-d: #43255c;
  --purple-2: #75588e;
  --cyan: #3fadd0;
  --cyan-soft: #a9ddef;
  --focus: #1f7e9e;
  --lav: #f4f0f8;
  --lav-2: #e4daee;
  --line: rgba(86, 49, 116, 0.16);
  --field: #9c8aaf;
  --error: #b3261e;
  --white: #fff;

  --wrap: 1360px;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --pt-h: 78px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.is-modal { overflow: hidden; }

body {
  margin: 0;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
a { color: var(--purple); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--lav-2); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
main:focus,
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px; top: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

section[id] { scroll-margin-top: 12px; }

/* ---------- Shared type ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6em;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple-2);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--cyan);
  flex: none;
}
.eyebrow__sep { color: var(--cyan); }

.h2 {
  margin-top: 0.3em;
  max-width: 14em;
  font-size: clamp(2.1rem, 1.25rem + 3.1vw, 4.1rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.h2 strong,
.hero__title strong {
  font-weight: 700;
  color: var(--purple);
}

.caption {
  margin-top: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 3px;
  background: var(--purple);
  color: #fff;
  font: 700 1rem/1.2 "Lato", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { background: var(--purple-d); }
.btn__arrow { display: inline-block; transition: transform 0.25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--sm { min-height: 46px; padding: 0 20px; font-size: 0.92rem; }
.btn--block { width: 100%; }
.btn--light { background: #fff; color: var(--purple); }
.btn--light:hover { background: var(--lav); }
.btn[disabled] {
  background: #8b779f;
  color: #fff;
  cursor: default;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  font-weight: 700;
  color: var(--purple);
  text-decoration: underline;
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}
.link-arrow::after { content: "↓"; content: "↓" / ""; font-weight: 400; }

.link-btn {
  margin-top: 12px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--purple);
  font: 700 0.95rem/1.3 "Lato", "Helvetica Neue", Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  cursor: pointer;
}

/* ---------- MATRAFOX concept marker ---------- */

.mx-bar {
  background: #141414;
  color: #e9e9e9;
  font-size: 0.8rem;
  line-height: 1.4;
}
.mx-bar__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 8px var(--pad);
}
.mx-bar__tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}
.mx-bar__link { margin-left: auto; color: #fff; font-weight: 700; }

/* ---------- Header ---------- */

.hd { border-bottom: 1px solid var(--line); background: #fff; }
.hd__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 12px;
}
.hd__logo { display: block; flex: none; }
.hd__logo img { width: clamp(196px, 17vw, 248px); height: auto; }
.hd__nav { display: none; }
.hd__cta { display: none; }

@media (min-width: 720px) {
  .hd__cta { display: inline-flex; }
}
@media (min-width: 1100px) {
  .hd__nav {
    display: flex;
    gap: 30px;
    margin-left: auto;
  }
  .hd__nav a {
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
  }
  .hd__nav a:hover { border-bottom-color: var(--cyan); }
}

/* ---------- 1 · Hero ---------- */

.hero { padding-block: clamp(28px, 4.5vw, 64px) clamp(56px, 7vw, 104px); }
.hero__title {
  margin-top: 0.4em;
  max-width: 13.5em;
  font-size: clamp(2.55rem, 1.15rem + 5vw, 5.4rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.hero__grid {
  display: grid;
  gap: 32px;
  margin-top: clamp(24px, 3.5vw, 48px);
}
.hero__lede {
  max-width: 30em;
  font-size: clamp(1.08rem, 1rem + 0.3vw, 1.22rem);
  color: var(--ink-2);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: 28px;
}
.hero__note {
  max-width: 30em;
  margin-top: 22px;
  padding-left: 14px;
  border-left: 2px solid var(--cyan);
  font-size: 0.9rem;
  color: var(--ink-2);
}
.hero__note strong { color: var(--ink); }

.hero__media { margin: 0; }
.hero__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--lav);
}
.hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% 58%;
}

@media (max-width: 599px) {
  .hero__actions .btn { width: 100%; }
}
@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(32px, 4vw, 72px);
    align-items: start;
    padding-top: clamp(28px, 3vw, 40px);
    border-top: 1px solid var(--line);
  }
  .hero__frame { aspect-ratio: 16 / 10; }
  .hero__frame img { object-position: 62% 55%; }
}

/* Signature opening: the frame opens like an arch into the full image. */
@media (prefers-reduced-motion: no-preference) {
  .hero__frame {
    animation: portal 1.25s var(--ease) 0.1s both;
  }
  .hero__frame img {
    animation: settle 1.6s var(--ease) 0.1s both;
  }
}
@keyframes portal {
  from { clip-path: inset(9% 33% 0 33% round 50vw 50vw 0 0); }
  to { clip-path: inset(0 0 0 0 round 0 0 0 0); }
}
@keyframes settle {
  from { transform: scale(1.08); }
  to { transform: none; }
}

/* ---------- Chapters (shared editorial frame) ---------- */

.chapter {
  padding-block: clamp(56px, 8vw, 128px);
  border-top: 1px solid var(--line);
}
.chapter--lav { background: var(--lav); border-top: 0; }

.chapter__head {
  display: grid;
  gap: 4px 32px;
  margin-bottom: clamp(32px, 5vw, 72px);
}
.chapter__num {
  font-size: clamp(2.6rem, 1.6rem + 4vw, 7rem);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--lav-2);
}
@supports (-webkit-text-stroke: 1px black) {
  .chapter__num {
    color: transparent;
    -webkit-text-stroke: 1.2px var(--purple-2);
  }
}
.chapter__titles { min-width: 0; }
.chapter__head--stack { margin-bottom: 0; }
.chapter__lede {
  max-width: 36em;
  margin-top: 18px;
  font-size: clamp(1.05rem, 1rem + 0.22vw, 1.18rem);
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .chapter__head {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 0 clamp(32px, 4vw, 72px);
    align-items: start;
  }
  .chapter__head--stack { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 0; }
}

/* ---------- 2 · Options ---------- */

.options { display: grid; gap: 32px; }
.options__main { min-width: 0; }

.colonnade { display: none; margin: 0; }
.colonnade__frame {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--lav);
}
.colonnade__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%;
}
.colonnade__aperture {
  display: none;
  position: absolute;
  border-radius: 999px 999px 0 0;
  box-shadow: 0 0 0 200vmax rgba(246, 242, 250, 0.64);
  transition: left 0.65s var(--ease), top 0.65s var(--ease), width 0.65s var(--ease), height 0.65s var(--ease);
}
.colonnade__frame[data-active="1"] .colonnade__aperture { left: 0.5%; top: 7%; width: 50.5%; height: 70%; }
.colonnade__frame[data-active="2"] .colonnade__aperture { left: 46.5%; top: 18%; width: 30%; height: 51%; }
.colonnade__frame[data-active="3"] .colonnade__aperture { left: 73%; top: 25%; width: 25.5%; height: 40%; }
.colonnade__label {
  display: none;
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 9px 12px;
  background: #fff;
  color: var(--purple);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
html.js .colonnade__aperture,
html.js .colonnade__label { display: block; }

.opts {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.opt {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0 16px;
  padding-block: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}
.opt::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 100%;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}
.opt.is-active::before { transform: scaleX(1); }
.opt__num {
  font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.3rem);
  font-weight: 400;
  line-height: 1;
  color: var(--purple-2);
  transition: color 0.3s ease;
}
.opt.is-active .opt__num { color: var(--purple); }
.opt__title {
  margin-bottom: 10px;
  font-size: clamp(1.32rem, 1.12rem + 0.75vw, 1.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.opt__body > p { max-width: 36em; margin-bottom: 14px; }
.opt__body > p:last-child { margin-bottom: 0; }

.ask { font-size: 0.98rem; color: var(--ink-2); }
.ask__label {
  display: inline-block;
  margin-right: 8px;
  padding: 3px 8px;
  border-left: 2px solid var(--cyan);
  background: var(--lav);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  vertical-align: 0.12em;
}

.split {
  display: grid;
  gap: 12px;
  margin: 4px 0 16px;
}
.split > div { padding-left: 14px; border-left: 2px solid var(--lav-2); }
.split dt {
  margin-bottom: 2px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
}
.split dd { margin: 0; }

.options__alt {
  max-width: 46em;
  margin-top: clamp(28px, 4vw, 44px);
  padding: 20px 24px;
  border-left: 3px solid var(--purple);
  background: var(--lav);
}

@media (min-width: 600px) {
  .opt { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0 20px; }
  .split { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (min-width: 900px) {
  .options {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(32px, 4vw, 72px);
    align-items: start;
  }
  .colonnade { display: block; position: sticky; top: 28px; }
}

/* ---------- 3 · Questions checklist ---------- */

.qs { display: grid; gap: 28px; }
.qs__list {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.q {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 22px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.q:hover { background: rgba(255, 255, 255, 0.6); }
.q:has(input:checked) { background: #fff; }
.q input {
  position: absolute;
  top: 26px;
  left: 14px;
  width: 28px;
  height: 28px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.q__box {
  position: relative;
  width: 28px;
  height: 28px;
  margin-top: 4px;
  border: 1.5px solid var(--purple-2);
  border-radius: 3px;
  background: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.q__box::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 8px;
  height: 15px;
  border: solid var(--cyan-soft);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) scale(0.4);
  opacity: 0;
  transition: transform 0.2s var(--ease), opacity 0.15s ease;
}
.q input:checked + .q__box { background: var(--purple); border-color: var(--purple); }
.q input:checked + .q__box::after { opacity: 1; transform: rotate(45deg) scale(1); }
.q input:focus-visible + .q__box { outline: 3px solid var(--focus); outline-offset: 3px; }
.q__title {
  display: block;
  font-size: clamp(1.22rem, 1.08rem + 0.65vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.q__hint { display: block; margin-top: 6px; font-size: 1rem; color: var(--ink-2); }

.note-card {
  align-self: start;
  padding: clamp(24px, 3vw, 36px);
  background: var(--purple);
  color: #fff;
}
.note-card :focus-visible { outline-color: #fff; }
.note-card__kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-soft);
}
.note-card__count { margin-top: 14px; font-size: 1.05rem; color: rgba(255, 255, 255, 0.86); }
.note-card__count span {
  display: block;
  margin-bottom: 6px;
  font-size: 3.4rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.note-card__list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: q;
}
.note-card__list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  line-height: 1.35;
  counter-increment: q;
}
.note-card__list li::before {
  content: counter(q, decimal-leading-zero);
  font-weight: 400;
  color: var(--cyan-soft);
}
.note-card__empty {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.86);
}
.note-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 26px;
}
.note-card__actions .btn { width: 100%; }
.note-card__clear {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: 700 0.92rem/1.2 "Lato", "Helvetica Neue", Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  cursor: pointer;
}

@media (min-width: 900px) {
  .qs {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(32px, 4vw, 72px);
  }
  .qs__list { grid-column: 2; grid-row: 1; }
  .note-card { grid-column: 1; grid-row: 1; position: sticky; top: 28px; }
}

/* ---------- 4 · Steps ---------- */

.steps {
  --off: scaleY(0);
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  position: relative;
  padding: 0 0 32px 28px;
  border-left: 2px solid var(--lav-2);
}
.step:last-child { padding-bottom: 4px; }
.step::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--cyan);
  transform-origin: top;
  transition: transform 0.9s var(--ease);
}
.step::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 4px #fff;
}
html.steps-on .step:not(.is-reached)::before { transform: var(--off); }
.step__num {
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--purple-2);
}
.step__title {
  margin-bottom: 8px;
  font-size: clamp(1.25rem, 1.12rem + 0.5vw, 1.55rem);
  font-weight: 700;
  line-height: 1.2;
}
.step p:last-child { max-width: 30em; color: var(--ink-2); }

.provider {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-block: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.provider__who strong { color: var(--purple); }
.provider__src { font-weight: 700; }

@media (min-width: 900px) {
  .steps {
    --off: scaleX(0);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .step {
    padding: 34px 28px 0 0;
    border-left: 0;
    border-top: 2px solid var(--lav-2);
  }
  .step:last-child { padding-bottom: 0; }
  .step::before {
    left: 0;
    top: -2px;
    width: 100%;
    height: 2px;
    transform-origin: left;
  }
  .step::after { left: 0; top: -7px; }
  .step:nth-child(2)::before { transition-delay: 0.15s; }
  .step:nth-child(3)::before { transition-delay: 0.3s; }
  .step:nth-child(4)::before { transition-delay: 0.45s; }
}

/* ---------- 5 · FAQs ---------- */

.faqs { display: grid; gap: 28px; }
.faqs__list { border-top: 1px solid var(--line); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: clamp(1.15rem, 1.04rem + 0.45vw, 1.42rem);
  font-weight: 700;
  line-height: 1.25;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--purple), var(--purple)) center / 100% 2px no-repeat,
    linear-gradient(var(--purple), var(--purple)) center / 2px 100% no-repeat;
  transition: transform 0.25s var(--ease);
}
.faq[open] summary::after {
  background:
    linear-gradient(var(--purple), var(--purple)) center / 100% 2px no-repeat;
  transform: rotate(180deg);
}
.faq summary:hover { color: var(--purple); }
.faq p { max-width: 40em; padding-bottom: 24px; color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .faq[open] p { animation: fadeUp 0.25s var(--ease); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 900px) {
  .faqs {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(32px, 4vw, 72px);
    align-items: start;
  }
}

/* ---------- 6 · Request + shared form ---------- */

.request {
  padding-block: clamp(56px, 8vw, 120px);
  background: var(--lav);
}
.request__grid { display: grid; gap: 32px; }
.request__title { max-width: 11em; }
.request__lede {
  max-width: 30em;
  margin-top: 20px;
  font-size: clamp(1.05rem, 1rem + 0.22vw, 1.18rem);
  color: var(--ink-2);
}
.request__panel {
  width: 100%;
  padding: clamp(22px, 3.5vw, 44px);
  border-top: 3px solid var(--purple);
  background: #fff;
}
.request__panel-title {
  margin-bottom: 16px;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
}

@media (min-width: 900px) {
  .request__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(32px, 5vw, 96px);
    align-items: start;
  }
  .request__panel { max-width: 600px; justify-self: end; }
}

.rq__demo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.rq__badge {
  flex: none;
  padding: 3px 7px;
  border: 1px solid var(--purple-2);
  border-radius: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
  font-weight: 700;
}
.field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--field);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font: 400 1.0625rem/1.3 "Lato", "Helvetica Neue", Arial, sans-serif;
  transition: border-color 0.2s ease;
}
.field input:hover { border-color: var(--purple-2); }
.field input:focus-visible { outline-offset: 1px; border-color: var(--purple); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field__err {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--error);
}
.field__err::before { content: "! "; }

.rq__privacy { font-size: 0.85rem; line-height: 1.45; color: var(--ink-2); }
.rq__done {
  padding: 22px;
  border-left: 3px solid var(--cyan);
  background: var(--lav);
}
.rq__done-title { font-size: 1.12rem; font-weight: 700; line-height: 1.4; }
.rq__nojs {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--lav);
  font-size: 0.9rem;
}

.rq__foot { margin-top: 22px; }
.rq__status {
  min-height: 1.4em;
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink-2);
}
.rq__status:empty { margin-top: 0; min-height: 0; }

/* ---------- Footers ---------- */

.ft {
  padding-block: clamp(40px, 5vw, 64px);
  background: var(--purple);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}
.ft a { color: #fff; font-weight: 700; }
.ft :focus-visible { outline-color: #fff; }
.ft__in { display: grid; gap: 28px; }
.ft__brand img { width: 220px; height: auto; margin-bottom: 18px; }
.ft__brand p { margin-bottom: 10px; }
.ft__notes p + p { margin-top: 10px; }
.ft__notes { max-width: 44em; }
@media (min-width: 900px) {
  .ft__in {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(32px, 4vw, 72px);
  }
}

.mx {
  padding-block: clamp(44px, 5vw, 72px) calc(clamp(44px, 5vw, 72px) + 72px);
  background: #ececec;
  color: #141414;
  font-size: 0.98rem;
}
.mx a { color: #141414; }
.mx__in { display: grid; gap: 28px; }
.mx__mark { display: inline-block; }
.mx__mark img { width: min(250px, 68vw); height: auto; }
.mx__kicker {
  margin-top: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4a4a4a;
}
.mx__body { max-width: 46em; }
.mx__title { margin-bottom: 12px; font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem); font-weight: 700; line-height: 1.2; }
.mx__body p + p { margin-top: 10px; }
.mx__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 24px;
}
.mx__btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 3px;
  background: #141414;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.mx__btn:hover { background: #333; }
.mx__link { font-weight: 700; }
.mx__attr { margin-top: 22px; font-size: 0.85rem; color: #4a4a4a; }
@media (min-width: 900px) {
  .mx__in {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(32px, 4vw, 72px);
  }
}

/* ---------- Floating docks (owner route + patient action, separate) ---------- */

.docks {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: 0;
}

.pt-dock,
.mx-dock {
  transition: opacity 0.2s ease, transform 0.25s var(--ease), visibility 0s linear 0s, bottom 0.25s var(--ease);
}

.pt-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}
.pt-dock__btn { width: 100%; }
html:not(.js) .pt-dock { display: none; }
html.js .pt-dock:not([data-show="true"]),
.mx-dock[data-show="false"] {
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s var(--ease), visibility 0s linear 0.25s, bottom 0.25s var(--ease);
}

.mx-dock {
  position: absolute;
  left: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 24px);
  padding: 4px 4px 4px 14px;
  border-radius: 4px;
  background: #141414;
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.docks.pt-on .mx-dock { bottom: calc(var(--pt-h) + 8px + env(safe-area-inset-bottom)); }
.mx-dock__tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #bdbdbd;
}
.mx-dock__link { padding: 10px 0; color: #fff; font-weight: 700; }
.mx-dock :focus-visible { outline-color: #fff; }
.mx-dock__x {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.mx-dock__x:hover { background: #333; }
.mx-dock__x[hidden] { display: none; }

@media (max-width: 379px) {
  .mx-dock__tag { display: none; }
}
@media (min-width: 900px) {
  .pt-dock {
    left: auto;
    right: 24px;
    bottom: 24px;
    padding: 0;
    border: 0;
    background: none;
  }
  .pt-dock__btn { width: auto; box-shadow: 0 10px 30px rgba(38, 20, 58, 0.25); }
  .mx-dock,
  .docks.pt-on .mx-dock { left: 24px; bottom: 24px; }
}

/* ---------- Full-screen request dialog ---------- */

.dlg {
  --dpad: clamp(20px, 4vw, 56px);
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  max-width: none;
  height: var(--vvh, 100dvh);
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  transform: translateY(var(--vvt, 0px));
}
.dlg:not([open]) { display: none; }
.dlg[open] { display: grid; grid-template-columns: minmax(0, 1fr); }
.dlg::backdrop { background: rgba(38, 20, 58, 0.35); }

.dlg__art { display: none; }
.dlg__panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  background: #fff;
}
.dlg__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(10px, env(safe-area-inset-top)) var(--dpad) 10px;
  border-bottom: 1px solid var(--line);
}
.dlg__logo { width: clamp(140px, 30vw, 180px); height: auto; }
.dlg__x {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.dlg__x:hover { background: var(--lav); }
.dlg__scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: clamp(22px, 5vh, 64px) var(--dpad) 20px;
}
.dlg__intro,
.dlg__body-slot,
.dlg__foot-slot > * {
  max-width: 520px;
  margin-inline: auto;
}
.dlg__title {
  margin: 0.35em 0 0.35em;
  font-size: clamp(1.8rem, 1.35rem + 1.8vw, 2.9rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.dlg__desc { margin-bottom: 22px; color: var(--ink-2); }
.dlg__foot-slot {
  padding: 12px var(--dpad) max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
}
.dlg__foot-slot .rq__foot { margin-top: 0; }

/* Short, subtle entrance; JS adds .is-in after showModal(). */
.dlg[open] .dlg__panel,
.dlg[open] .dlg__art { opacity: 0; transform: translateY(14px); }
.dlg.is-in .dlg__panel,
.dlg.is-in .dlg__art { opacity: 1; transform: none; }
.dlg__panel,
.dlg__art { transition: opacity 0.2s ease, transform 0.22s var(--ease); }

@media (min-width: 1024px) {
  .dlg[open] { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .dlg__art {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--lav);
  }
  .dlg__art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 45%;
  }
  .dlg__art-cap {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 7px 10px;
    background: #fff;
    color: var(--purple);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
}

/* ---------- Scroll reveals (enhancement only) ---------- */

html.rv-on .rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.rv-on .rv.is-in { opacity: 1; transform: none; }
html.rv-on .opt:nth-child(2),
html.rv-on .q:nth-child(3),
html.rv-on .step:nth-child(2),
html.rv-on .faq:nth-child(2) { transition-delay: 0.06s; }
html.rv-on .opt:nth-child(3),
html.rv-on .q:nth-child(4),
html.rv-on .step:nth-child(3),
html.rv-on .faq:nth-child(3) { transition-delay: 0.12s; }
html.rv-on .q:nth-child(5),
html.rv-on .step:nth-child(4),
html.rv-on .faq:nth-child(4) { transition-delay: 0.18s; }

/* ---------- Reduced motion: complete static alternative ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  html.rv-on .rv { opacity: 1; transform: none; }
  html.steps-on .step:not(.is-reached)::before { transform: none; }
}

/* Codex rendered-QA corrections: owner route uses its reserved concept bar. */
.mx-bar { position: sticky; top: 0; z-index: 90; }
.mx-bar__in { position: relative; padding-right: 44px; }
.mx-bar__x { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 1px solid #666; border-radius: 2px; background: #141414; color: #fff; font: 24px/1 Lato, sans-serif; cursor: pointer; }
.mx-bar[data-show="false"] { visibility: hidden; opacity: 0; pointer-events: none; }
.dlg { width: 100vw; }
.mx__btn { background: #f08240; color: #141414; border-color: #f08240; }
@media (max-width: 899px) { html { scrollbar-gutter: auto; } }
.mx .mx__btn { color: #141414; }

.mx .mx__btn:hover { background: #ef9b66; color: #141414; }
