/* Patient LP adaptations on top of shared ARBO design system */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 480ms ease,
    transform 480ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Hero panel (from LP_ARBO_Paciente/pacientes) ---------- */
.hero.hero--panel {
  --hero-brand-300: #6da5bc;
  --hero-radius-xl: 34px;
  --hero-radius-pill: 999px;
  overflow: clip;
  background: var(--surface);
  padding: 32px 0 0;
  position: relative;
  text-align: left;
}

.hero.hero--panel::before,
.hero.hero--panel::after {
  content: none;
  display: none;
}

.hero.hero--panel .shell {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, 1616px);
  margin-inline: auto;
  padding: 0;
  max-width: none;
}

.hero-panel {
  position: relative;
  border-radius: var(--hero-radius-xl);
  overflow: clip;
  min-height: clamp(440px, 60vw, 620px);
  display: flex;
  align-items: center;
  box-shadow: 0 24px 60px rgb(51 86 107 / 18%);
  isolation: isolate;
}

.hero-panel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% top;
  z-index: -3;
  display: block;
}

.hero-panel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% top;
  z-index: -2;
  display: block;
  background: #1c2c3d;
}

.hero-panel.is-static .hero-panel__video {
  display: none;
}

.hero-panel__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    rgb(28 44 61 / 94%) 0%,
    rgb(28 44 61 / 88%) 32%,
    rgb(28 44 61 / 62%) 52%,
    rgb(28 44 61 / 22%) 72%,
    rgb(28 44 61 / 8%) 100%
  );
}

.hero-panel__glow {
  position: absolute;
  z-index: -1;
  inset: auto auto -30% -20%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(109 165 188 / 45%), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: clamp(28px, 5vw, 64px) clamp(24px, 5vw, 68px);
  display: grid;
  gap: 22px;
  justify-items: start;
}

.hero-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12px 8px 12px 0;
  border-radius: 28px;
  background: linear-gradient(
    100deg,
    rgb(20 34 48 / 42%) 0%,
    rgb(20 34 48 / 18%) 70%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  align-self: start;
  padding: 7px 15px 7px 12px;
  border-radius: var(--hero-radius-pill);
  background: rgb(255 255 255 / 14%);
  border: 1px solid rgb(255 255 255 / 26%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
}

.hero-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hero-brand-300);
  box-shadow: 0 0 0 4px rgb(109 165 188 / 35%);
}

.hero.hero--panel .hero-copy h1 {
  margin: 0;
  max-width: none;
  color: #fff;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
  text-align: left;
  background: none;
  -webkit-text-fill-color: unset;
}

.hero.hero--panel .hero-copy h1 strong {
  display: block;
  font-weight: 700;
  color: #fff;
  background: none;
  -webkit-text-fill-color: unset;
}

.hero-lead {
  margin: 0;
  max-width: 52ch;
  color: rgb(255 255 255 / 88%);
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  line-height: 1.6;
  text-align: left;
}

.hero-actions {
  position: static;
  display: flex;
  flex-wrap: wrap;
  width: auto;
  max-width: none;
  gap: 14px;
  margin: 4px 0 0;
}

.hero-actions .button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--hero-radius-pill);
  font-size: 1.02rem;
  font-weight: 600;
}

.hero-actions .button--primary {
  background: #35677c;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 22px rgb(53 103 124 / 40%);
}

.hero-actions .button--primary:hover {
  background: #2b586b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgb(43 88 107 / 46%);
}

.hero-trust {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  color: rgb(255 255 255 / 80%);
  font-size: 0.9rem;
}

.hero-trust__label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-trust__seals {
  color: rgb(255 255 255 / 70%);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

@media (max-width: 760px) {
  .hero-panel {
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-panel__img,
  .hero-panel__video {
    position: relative;
    height: auto;
    aspect-ratio: 1024 / 571;
    object-position: center top;
    z-index: 0;
  }

  .hero-panel__video {
    position: absolute;
    inset: 0;
    height: 100%;
    z-index: 1;
  }

  .hero-panel__scrim {
    z-index: 2;
    background: linear-gradient(
      180deg,
      rgb(28 44 61 / 28%) 0%,
      rgb(28 44 61 / 58%) 38%,
      rgb(28 44 61 / 96%) 62%
    );
  }

  .hero-copy {
    max-width: none;
    z-index: 3;
  }

  .hero-copy::before {
    inset: 0;
    border-radius: 0;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgb(20 34 48 / 55%) 18%,
      rgb(20 34 48 / 88%) 100%
    );
  }

  .hero-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-actions .button {
    transition: none;
  }

  .hero-panel__video {
    display: none;
  }
}

.journey {
  display: grid;
  gap: 16px;
}

@media (min-width: 768px) {
  .journey {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

.journey__step {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid rgb(44 63 77 / 8%);
  box-shadow: var(--shadow-xs);
}

.journey__step .eyebrow {
  margin-bottom: 8px;
}

.journey__step h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.journey__step p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.disclaimer,
.note-muted {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.faq__answer,
.faq__content {
  padding: 0 16px 16px;
  color: var(--text);
}

.faq__answer p,
.faq__content p {
  margin: 0;
}

.site-footer--simple .site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
}

.footer-link-button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.pricing-final-cta {
  text-align: center;
  padding-block: clamp(48px, 7vw, 88px);
}

.pricing-final-cta .shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 40rem;
}

.pricing-final-cta h2 {
  margin: 0;
  max-width: 22ch;
  line-height: 1.2;
  text-wrap: balance;
}

.pricing-final-cta .shell > p:not(.disclaimer) {
  margin: 16px 0 0;
  max-width: 38ch;
  line-height: 1.55;
  text-wrap: pretty;
}

.pricing-final-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.pricing-final-cta .disclaimer {
  margin-top: 28px;
  max-width: 40ch;
  line-height: 1.55;
}

@media (min-width: 768px) {
  .pricing-final-cta .shell {
    max-width: 46rem;
  }

  .pricing-final-cta h2 {
    max-width: none;
  }

  .pricing-final-cta .shell > p:not(.disclaimer) {
    margin-top: 20px;
    max-width: 70ch;
  }

  .pricing-final-cta .disclaimer {
    max-width: 56ch;
  }
}

.pricing-billing {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

/* Feature section: keep product art readable */
.feature__visual--wide {
  aspect-ratio: 16 / 10;
}

.feature__visual--wide img {
  object-fit: cover;
  object-position: center;
}

/* Jornada: product visual only — copy uses shared .feature__copy */
#health-history.feature-section {
  padding-block: clamp(28px, 4vw, 56px);
}

#health-history .feature__visual--wide {
  aspect-ratio: 16 / 10;
  min-width: 0;
  max-width: 100%;
  background: transparent;
}

#health-history .feature__visual--wide img {
  max-width: 100%;
  object-fit: contain;
  object-position: center right;
}

@media (min-width: 1024px) {
  #health-history .feature {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 36px;
    align-items: center;
  }

  #health-history .feature__copy {
    min-width: 0;
    padding-inline-end: 4px;
  }

  #health-history .feature__visual--wide {
    justify-self: stretch;
  }
}

@media (max-width: 767px) {
  #health-history .feature__visual--wide img {
    object-position: center;
  }
}

/* Tom AI + Prompts: shorter copy, discrete notes, product-first visuals */
#tom-ai.feature-section {
  padding-block: clamp(28px, 4vw, 56px);
}

#tom-ai > .feature {
  min-width: 0;
  margin-bottom: clamp(28px, 4vw, 48px);
}

#tom-ai .feature__note {
  margin: 0;
  max-width: 46ch;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgb(44 63 77 / 62%);
}

#tom-ai .feature__visual--wide {
  min-width: 0;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  background: transparent;
}

#tom-ai .feature__visual--wide img {
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

#prompts.prompts-panel {
  gap: 20px;
  padding-bottom: 0;
}

#prompts .prompts-panel__copy {
  min-width: 0;
}

#prompts .prompts-panel__copy .note-muted {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: rgb(44 63 77 / 58%);
}

#prompts .prompts-panel__visual {
  min-width: 0;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  background: transparent;
}

#prompts .prompts-panel__visual img {
  max-width: 100%;
  object-fit: contain;
  object-position: top center;
}

@media (min-width: 1024px) {
  #tom-ai > .feature {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 36px;
    align-items: center;
  }

  #tom-ai .feature__copy {
    min-width: 0;
  }

  #tom-ai .feature--media-first .feature__visual {
    order: -1;
  }

  #prompts.prompts-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 32px;
    align-items: center;
  }
}

/* Deep Research: shorter benefit-first copy, discrete limits note */
#deep-research.feature-section {
  padding-block: clamp(28px, 4vw, 56px);
  background: #eeeff4;
}

#deep-research .feature {
  min-width: 0;
}

#deep-research .feature__note {
  margin: 0;
  max-width: 46ch;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgb(44 63 77 / 62%);
}

#deep-research .feature__visual {
  min-width: 0;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  background: #eeeff4;
}

#deep-research .feature__visual img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

@media (min-width: 1024px) {
  #deep-research .feature {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 36px;
    align-items: center;
  }

  #deep-research .feature__copy {
    min-width: 0;
  }
}

.feature__copy .disclaimer {
  margin-top: 4px;
}

.hero-lead--tight {
  max-width: 46ch;
  font-size: clamp(0.95rem, 1.3vw, 1.08rem);
  color: rgb(255 255 255 / 78%);
}

.problem-section {
  padding: clamp(40px, 5.5vw, 72px) 0 var(--section-space);
  background:
    linear-gradient(180deg, var(--surface) 0%, var(--surface-alt) 56px, var(--surface-alt) 100%);
}

#understand-with-ai.feature-section {
  background: #fafafa;
}

#understand-with-ai .feature__visual--wide {
  min-width: 0;
  max-width: 100%;
  background: #fafafa;
}

#understand-with-ai .feature__visual--wide img {
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.problem {
  display: grid;
  gap: 16px;
  max-width: 920px;
  margin-inline: auto;
  justify-items: start;
}

.problem .eyebrow {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  white-space: normal;
  text-align: left;
  padding: 6px 14px;
  line-height: 1.35;
}

.problem h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 3.2vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.problem > p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.6;
}

.problem__close {
  color: var(--ink) !important;
  font-weight: 600;
}

.problem__visual {
  margin: 8px 0 0;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: clip;
  background: #f8f8f8;
  box-shadow: var(--shadow-xs);
}

.problem__visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 681;
  object-fit: cover;
  object-position: center;
}

.prompts-panel {
  display: grid;
  gap: 24px;
  padding-bottom: var(--section-space);
}

.prompts-panel__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

@media (min-width: 480px) {
  .prompts-panel__copy {
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .prompts-panel__copy {
    gap: 24px;
  }
}

.prompts-panel__copy .eyebrow {
  width: fit-content;
  max-width: 100%;
}

.prompts-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.prompts-panel p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.6;
}

.prompts-panel__visual {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #fff;
  aspect-ratio: 16 / 10;
}

.prompts-panel__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

#scheduling.feature-section {
  background: #fff;
}

#scheduling .feature__visual--wide {
  min-width: 0;
  max-width: 100%;
  background: #fff;
}

#scheduling .feature__visual--wide img {
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.agenda-visual {
  display: grid;
  gap: 16px;
}

.agenda-visual__chat {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid rgb(44 63 77 / 8%);
}

.agenda-visual__bubble {
  max-width: 92%;
  margin: 0;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  background: var(--blue-50);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.agenda-visual__bubble--user {
  justify-self: end;
  border-radius: 16px 16px 4px 16px;
  background: var(--brand-300);
  color: var(--white);
}

.agenda-visual__card {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid rgb(44 63 77 / 10%);
  box-shadow: var(--shadow-xs);
}

.agenda-visual__card strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.agenda-visual__card span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.trust {
  display: grid;
  gap: 32px;
}

.trust__intro {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.trust__intro h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.trust__intro h2 strong {
  font-weight: 700;
}

.trust__intro p {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.6;
}

.trust-grid {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-grid li {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1px solid rgb(44 63 77 / 6%);
}

.trust-grid strong {
  color: var(--ink);
}

.trust-grid span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

#privacy-security .feature__visual--wide {
  min-width: 0;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  background: #f4f6f8;
}

#privacy-security .feature__visual--wide img {
  max-width: 100%;
  object-fit: cover;
  object-position: top center;
}

.plans-teaser {
  padding-block: 18px;
  background: var(--surface-alt);
}

.plans-teaser__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.plans-teaser h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.plans-teaser p {
  margin: 0;
  flex: 1 1 16rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.plans-teaser .button {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.9375rem;
}

@media (max-width: 767px) {
  .plans-teaser {
    padding-block: 14px;
  }

  .plans-teaser__bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .plans-teaser .button {
    width: 100%;
  }
}

.faq .eyebrow {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  justify-content: center;
  margin-bottom: 8px;
  margin-inline: auto;
}

.faq h2 {
  margin-bottom: 8px;
}

.close-cta {
  padding-block: clamp(40px, 5vw, 72px) clamp(32px, 4vw, 56px);
  background: #fefefe;
  color: var(--ink);
  text-align: center;
}

.close-cta__inner {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.close-cta .eyebrow {
  background: var(--blue-50);
  color: var(--blue-700);
}

.close-cta h2 {
  margin: 0;
  max-width: none;
  color: var(--ink);
  font-size: clamp(1.65rem, 3.4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.close-cta__actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.close-cta__visual {
  margin: 12px 0 0;
  width: min(100%, 920px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fefefe;
}

.close-cta__visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 698;
  object-fit: contain;
  object-position: center;
}

.close-cta .disclaimer {
  max-width: 48ch;
  margin: 0;
  color: rgb(44 63 77 / 58%);
  font-size: 0.875rem;
  line-height: 1.45;
}

@media (min-width: 768px) {
  .close-cta h2 {
    white-space: nowrap;
  }

  .agenda-visual {
    align-content: center;
  }
}

@media (min-width: 1024px) {
  .prompts-panel {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }
}

.legal-shell {
  max-width: 860px;
}

.legal-hero {
  border-bottom: 1px solid rgb(44 63 77 / 10%);
}

.legal-eyebrow {
  margin-bottom: 8px !important;
  color: var(--brand-700) !important;
  font-size: 0.8125rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-page {
  padding-top: clamp(32px, 5vw, 64px);
}

.legal-document {
  color: var(--text);
  line-height: 1.75;
}

.legal-document > p:first-of-type {
  color: var(--ink);
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
}

.legal-document section {
  scroll-margin-top: 112px;
}

.legal-document section + section {
  margin-top: 40px;
}

.legal-document h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.3;
}

.legal-document h3 {
  margin: 24px 0 10px;
  color: var(--ink);
  font-size: 1.0625rem;
}

.legal-document p,
.legal-document ul {
  margin-top: 0;
}

.legal-document p:last-child,
.legal-document ul:last-child {
  margin-bottom: 0;
}

.legal-document li + li {
  margin-top: 8px;
}

.legal-document a {
  color: var(--brand-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-document address {
  margin: 0 0 1em;
  font-style: normal;
  line-height: 1.6;
}

.legal-document address a {
  color: var(--brand-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-summary {
  margin: 36px 0 44px;
  padding: 24px;
  border: 1px solid rgb(44 63 77 / 12%);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.legal-summary h2 {
  margin-bottom: 16px;
}

.legal-summary ol {
  display: grid;
  gap: 8px 28px;
  margin: 0;
  padding-left: 20px;
}

@media (min-width: 768px) {
  .legal-summary ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.legal-inventory {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.legal-inventory section,
.legal-inventory section + section {
  margin-top: 0;
  padding: 20px;
  border: 1px solid rgb(44 63 77 / 12%);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.legal-inventory h3 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}

.legal-inventory code {
  font-size: 0.9375em;
}

.legal-inventory dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.legal-inventory dl div {
  display: grid;
  gap: 2px;
}

.legal-inventory dt {
  color: var(--ink);
  font-weight: 700;
}

.legal-inventory dd {
  margin: 0;
}

@media (min-width: 640px) {
  .legal-inventory dl div {
    grid-template-columns: minmax(100px, 0.3fr) minmax(0, 1fr);
    gap: 16px;
  }
}

.cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 80;
  padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1px solid rgb(44 63 77 / 12%);
  box-shadow: 0 -8px 32px rgb(44 63 77 / 10%);
}

.cookie-banner[hidden],
.cookie-prefs[hidden] {
  display: none !important;
}

.cookie-banner__inner {
  display: grid;
  gap: 16px;
  align-items: center;
}

.cookie-banner__title {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
}

.cookie-banner__copy p {
  margin: 0;
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.cookie-banner__copy a {
  color: var(--brand-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-banner__actions .button {
  min-height: 44px;
}

body.cookie-prefs-open {
  overflow: hidden;
}

.cookie-prefs {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: end center;
}

.cookie-prefs__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(44 63 77 / 45%);
}

.cookie-prefs__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  margin: 0;
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--white);
  color: var(--text);
  box-shadow: 0 -12px 40px rgb(44 63 77 / 18%);
}

.cookie-prefs__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cookie-prefs__header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.3;
}

.cookie-prefs__close {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -8px -8px 0 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-prefs__close:hover {
  background: var(--surface);
}

.cookie-prefs__intro {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.cookie-prefs__intro a {
  color: var(--brand-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-prefs__list {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.cookie-prefs__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgb(44 63 77 / 12%);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.cookie-prefs__item-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-weight: 700;
}

.cookie-prefs__item-copy p:last-child {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.cookie-prefs__status {
  color: var(--brand-700);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.cookie-prefs__switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.cookie-prefs__switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.cookie-prefs__switch-ui {
  display: block;
  width: 44px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: #c5ced4;
  transition: background 160ms ease;
}

.cookie-prefs__switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-xs);
  transition: transform 160ms ease;
}

.cookie-prefs__switch input:checked + .cookie-prefs__switch-ui {
  background: var(--brand-700);
}

.cookie-prefs__switch input:checked + .cookie-prefs__switch-ui::after {
  transform: translateX(18px);
}

.cookie-prefs__switch input:focus-visible + .cookie-prefs__switch-ui {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.cookie-prefs__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (min-width: 768px) {
  .cookie-banner__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
  }

  .cookie-prefs {
    place-items: center;
  }

  .cookie-prefs__panel {
    border-radius: var(--radius-lg);
    padding: 28px;
  }
}


/* Accessible availability message until the patient account endpoints are configured. */
.patient-auth-dialog {
  width: min(520px, calc(100% - 32px));
  margin: auto;
  padding: 36px 28px 28px;
  border: 1px solid rgb(44 63 77 / 16%);
  border-radius: 20px;
  background: var(--surface, #f6f6f6);
  color: var(--ink, #2c3f4d);
  box-shadow: 0 24px 80px rgb(0 0 0 / 22%);
}
.patient-auth-dialog::backdrop { background: rgb(15 30 42 / 55%); }
.patient-auth-dialog h2 { margin: 0 32px 16px 0; font-size: 1.5rem; }
.patient-auth-dialog p { margin: 0 0 20px; line-height: 1.6; }
.patient-auth-dialog__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.75rem;
  cursor: pointer;
}
.patient-auth-dialog__close:focus-visible { outline: 3px solid var(--focus, #2c3f4d); }

.patient-auth-dialog [hidden] { display: none; }
