/* Shared reading layout for legal documents; scoped to these pages. */
.legal-page { min-width: 0; }
.legal-document {
  padding: calc(var(--header-height) + 5rem) var(--page-gutter) clamp(6rem, 10vw, 10rem);
  max-width: 100rem;
  margin: auto;
  scroll-margin-top: calc(var(--header-height) + 2rem);
}
.legal-hero {
  padding-bottom: clamp(4rem, 8vw, 7rem);
  border-bottom: 1px solid var(--line);
}
.legal-eyebrow {
  margin: 0 0 3rem;
  color: var(--white-muted);
  font-size: .65rem;
}
.legal-hero h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(3.8rem, 10vw, 10rem);
  font-weight: 500;
  line-height: .92;
  letter-spacing: -.065em;
  text-transform: uppercase;
}
/* The longer French title keeps whole words on narrow screens. */
html[lang="fr"] .legal-hero h1 {
  max-width: 100%;
  font-size: clamp(1.65rem, 7vw, 7rem);
}
.legal-hero h1, .legal-intro, .legal-section h2, .legal-section h3 {
  overflow-wrap: anywhere;
}
.legal-updated {
  margin: 2.5rem 0 0;
  font-family: var(--font-ui);
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--white-muted);
}
.legal-updated strong { font-weight: 500; }
.legal-intro {
  max-width: 48rem;
  margin: 2.5rem 0 0;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.65;
}
.legal-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 2.5fr);
  gap: clamp(3rem, 7vw, 8rem);
  align-items: start;
  padding-top: clamp(3rem, 6vw, 5rem);
}
.legal-contents {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  max-height: calc(100svh - var(--header-height) - 4rem);
  overflow-y: auto;
  scrollbar-width: thin;
}
.legal-contents summary {
  padding: .75rem 0;
  font-size: .65rem;
  cursor: pointer;
}
.legal-contents ol { padding: 0; margin: 1rem 0 0; list-style: none; }
.legal-contents a {
  display: block;
  padding: .55rem .25rem;
  font-family: var(--font-ui);
  font-size: .82rem;
  line-height: 1.5;
  color: var(--white-muted);
}
.legal-contents a:hover { color: var(--white); }
.legal-copy { max-width: 47rem; min-width: 0; }
.legal-section { margin-bottom: 3rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.legal-section h2 {
  margin: 0 0 1.75rem;
  font-size: clamp(1.7rem, 2.7vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -.035em;
  font-weight: 500;
  scroll-margin-top: calc(var(--header-height) + 2rem);
}
.legal-section h3 {
  margin: 2rem 0 1rem;
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 500;
}
.legal-section p, .legal-section li {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(243, 240, 235, .78);
  overflow-wrap: anywhere;
}
.legal-section p { margin: 1rem 0; }
.legal-section ul, .legal-section ol { padding-left: 1.35rem; }
.legal-section li { padding-left: .3rem; margin: .35rem 0; }
.legal-section strong { color: var(--white); }
.legal-section a { text-decoration: underline; text-underline-offset: .2em; }
.legal-top { display: inline-block; padding: 1rem 0; font-size: .65rem; }
.legal-page a:focus-visible, .legal-contents summary:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 4px;
}
.legal-skip {
  position: fixed; top: -8rem; left: 1rem; z-index: 1100;
  padding: 1rem; background: var(--white); color: var(--black);
}
.legal-skip:focus { top: 1rem; }
@media (max-width: 800px) {
  .legal-document { padding-top: calc(var(--header-height) + 3rem); }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .legal-contents { position: static; max-height: none; overflow: visible; }
  .legal-contents a { padding: .8rem .25rem; }
  .legal-page .language-switcher button { min-width: 2rem; min-height: 2.75rem; }
  .legal-contents summary { min-height: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.legal-page) { scroll-behavior: auto; }
}

.legal-related {
  max-width: 48rem;
  font-family: var(--font-ui);
  font-size: .95rem;
  line-height: 1.7;
  color: var(--white-muted);
}
.legal-related a { text-decoration: underline; text-underline-offset: .2em; }
.legal-settings {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  background: transparent;
  font-size: .7rem;
  cursor: pointer;
}
.legal-settings:hover { border-color: var(--white); }
.legal-settings:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 4px; }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 1.5rem 0;
  font-family: var(--font-ui);
  font-size: .85rem;
  line-height: 1.65;
  color: rgba(243, 240, 235, .78);
}
.legal-table th, .legal-table td {
  padding: 1rem .65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.legal-table th { color: var(--white); font-weight: 500; }
.legal-table code { font-size: .9em; }
@media (max-width: 600px) {
  .legal-table, .legal-table tbody { display: block; }
  .legal-table thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%);
  }
  .legal-table tr { display: block; border-top: 1px solid var(--line); padding: .75rem 0; }
  .legal-table td { display: block; padding: .5rem 0; border: 0; }
  .legal-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--white-muted);
    font-size: .7rem;
    margin-bottom: .2rem;
  }
}

/* A longer document title, with the same typography and hierarchy. */
.booking-terms-page .legal-hero h1 {
  max-width: 18ch;
  font-size: clamp(2.6rem, 7.5vw, 7.5rem);
}
html[lang="fr"] .booking-terms-page .legal-hero h1 {
  max-width: 23ch;
  font-size: clamp(2rem, 6vw, 6rem);
}
