html {
  scroll-snap-type: none;
  background: var(--befrou-cream);
}

body.befrou-legal-page {
  min-width: 320px;
  height: auto;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--befrou-cream);
  color: var(--befrou-ink-soft);
  -webkit-overflow-scrolling: touch;
}

/* Keep legal documents scrollable even if a cache or plugin temporarily
 * returns a stale WordPress `home` body class. */
@media (max-width: 767px) {
  body.befrou-legal-page {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
  }
}

.legal-document {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 80px 64px;
}

.legal-header {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto 68px;
  gap: 24px;
  align-items: center;
}

.legal-brand,
.legal-back,
.legal-contents a {
  color: var(--befrou-ink-soft);
  text-decoration: none;
}

.legal-brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 47px;
  letter-spacing: 0.04em;
}

.legal-back {
  min-width: 104px;
  height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(16, 41, 54, 0.2);
  border-radius: 999px;
  background: rgba(16, 41, 54, 0.07);
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.legal-back__arrow {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}

.legal-back:hover,
.legal-back:focus-visible {
  border-color: var(--befrou-ink-soft);
  background: var(--befrou-ink-soft);
  color: var(--befrou-white);
}

.legal-language-switcher {
  justify-self: end;
}

.legal-header .language-trigger {
  width: 68px;
  height: 44px;
  border-color: rgba(16, 41, 54, 0.2);
  background: rgba(16, 41, 54, 0.08);
  color: var(--befrou-ink-soft);
}

.legal-header .language-trigger:hover,
.legal-header .language-trigger:focus-visible {
  border-color: rgba(16, 41, 54, 0.32);
  background: rgba(16, 41, 54, 0.13);
}

.legal-header .language-trigger[aria-expanded="true"],
.legal-header .language-trigger[aria-expanded="true"]:hover,
.legal-header .language-trigger[aria-expanded="true"]:focus-visible,
.legal-header .language-switcher[open] > .language-trigger,
.legal-header .language-switcher[open] > .language-trigger:hover,
.legal-header .language-switcher[open] > .language-trigger:focus-visible {
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
}

.legal-header .language-menu {
  border-color: rgba(16, 41, 54, 0.2);
  background: rgba(244, 235, 221, 0.92);
}

.legal-header .language-menu a,
.legal-header .language-menu a:hover,
.legal-header .language-menu a:focus-visible {
  color: var(--befrou-ink-soft);
}

.legal-header .language-menu a:hover,
.legal-header .language-menu a:focus-visible,
.legal-header .language-menu a[aria-current="true"] {
  background: rgba(16, 41, 54, 0.08);
}

.legal-introduction {
  margin-top: 56px;
}

.legal-introduction h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 50px;
  font-weight: 600;
  line-height: 58px;
  letter-spacing: -0.018em;
}

@media (min-width: 1100px) {
  .legal-introduction h1 {
    font-size: clamp(32px, 3.15vw, 46px);
    line-height: 1.16;
    white-space: nowrap;
  }
}

.legal-introduction__lead {
  max-width: 820px;
  margin: 24px 0 0;
  font-size: 21px;
  line-height: 32px;
}

.legal-introduction__date {
  margin: 24px 0 0;
  font-size: 13px;
  line-height: 20px;
}

.legal-contents {
  margin-top: 56px;
  padding: 28px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  border-block: 1px solid var(--befrou-ink-soft);
}

.legal-contents a {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
}

.legal-contents a:hover,
.legal-contents a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.legal-sections {
  padding-top: 48px;
}

.legal-section {
  scroll-margin-top: 28px;
}

.legal-section + .legal-section {
  margin-top: 48px;
}

.legal-row {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.legal-row + .legal-row {
  margin-top: 48px;
}

.legal-row h2,
.legal-row h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 34px;
  letter-spacing: -0.01em;
}

.legal-row__copy {
  min-width: 0;
}

.legal-row__copy p {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
}

.legal-row__copy p + p {
  margin-top: 14px;
}

.legal-row__copy a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-contact {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--befrou-ink-soft);
}

.legal-contact h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 36px;
  font-weight: 600;
  line-height: 56px;
}

.legal-contact p {
  max-width: 800px;
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 28px;
}

.legal-contact a {
  width: 342px;
  height: 48px;
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #b88a3d;
  color: var(--befrou-white);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.legal-contact a:hover,
.legal-contact a:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 41, 54, 0.16);
}

.legal-contact a.legal-contact__withdrawal {
  margin-left: 10px;
  border: 1px solid var(--befrou-ink-soft);
  background: transparent;
  color: var(--befrou-ink-soft);
}

.legal-contact a.legal-contact__withdrawal:hover,
.legal-contact a.legal-contact__withdrawal:focus-visible {
  background: var(--befrou-ink-soft);
  color: var(--befrou-white);
}

@media (max-width: 920px) {
  .legal-document {
    padding: 24px 32px 56px;
  }

  .legal-header {
    grid-template-columns: 1fr auto 68px;
  }

  .legal-back {
    justify-self: end;
  }

  .legal-introduction {
    margin-top: 44px;
  }

  .legal-introduction h1 {
    font-size: clamp(42px, 7vw, 58px);
    line-height: 1.04;
  }

  .legal-row {
    grid-template-columns: minmax(210px, 30%) minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .legal-document {
    padding: 20px 24px 48px;
  }

  .legal-header {
    grid-template-columns: minmax(0, 1fr) auto 68px;
    gap: 10px;
  }

  .legal-brand {
    font-size: 24px;
    line-height: 36px;
  }

  .legal-back {
    grid-column: 2;
    grid-row: 1;
    min-width: 92px;
    height: 42px;
    padding-inline: 14px;
    justify-self: end;
    font-size: 12px;
  }

  .legal-language-switcher {
    grid-column: 3;
    grid-row: 1;
  }

  .legal-introduction {
    margin-top: 38px;
  }

  .legal-introduction h1 {
    font-size: clamp(34px, 10.5vw, 44px);
    line-height: 1.02;
  }

  .legal-introduction__lead {
    margin-top: 20px;
    font-size: 17px;
    line-height: 26px;
  }

  .legal-introduction__date {
    margin-top: 16px;
    font-size: 12px;
  }

  .legal-contents {
    margin-top: 36px;
    padding: 18px 0;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .legal-contents a {
    min-height: 42px;
    font-size: 13px;
  }

  .legal-sections {
    padding-top: 36px;
  }

  .legal-section + .legal-section {
    margin-top: 40px;
  }

  .legal-row {
    display: block;
  }

  .legal-row + .legal-row {
    margin-top: 36px;
  }

  .legal-row h2,
  .legal-row h3 {
    font-size: 24px;
    line-height: 29px;
  }

  .legal-row__copy {
    margin-top: 16px;
  }

  .legal-row__copy p {
    font-size: 16px;
    line-height: 25px;
  }

  .legal-row__copy p + p {
    margin-top: 12px;
  }

  .legal-contact {
    margin-top: 44px;
    padding-top: 36px;
  }

  .legal-contact h2 {
    font-size: 32px;
    line-height: 40px;
  }

  .legal-contact p {
    margin-top: 12px;
    font-size: 16px;
    line-height: 25px;
  }

  .legal-contact a {
    width: 100%;
  }

  .legal-contact a.legal-contact__withdrawal {
    margin-left: 0;
  }
}

@media (max-width: 390px) {
  .legal-document {
    padding-inline: 18px;
  }

  .legal-header {
    grid-template-columns: minmax(0, 1fr) auto 68px;
  }

  .legal-introduction h1 {
    font-size: 24px;
    line-height: 1;
  }

}

/* Online withdrawal flow */
.withdrawal-shell {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 28px 48px 72px;
}

.withdrawal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.withdrawal-hero {
  max-width: 790px;
  margin: 72px 0 34px;
}

.withdrawal-eyebrow {
  margin: 0 0 15px;
  color: #b75b2b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.withdrawal-hero h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(48px, 7vw, 76px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.withdrawal-hero > p:last-child {
  max-width: 680px;
  margin: 22px 0 0;
  font-size: 19px;
  line-height: 1.55;
}

.withdrawal-notice {
  margin-bottom: 18px;
  padding: 18px 22px;
  border-left: 3px solid #b88a3d;
  background: rgba(255, 250, 242, 0.6);
  font-size: 15px;
  line-height: 1.55;
}

.withdrawal-card {
  padding: 40px;
  border: 1px solid rgba(16, 45, 59, 0.12);
  border-radius: 32px;
  background: rgba(255, 250, 242, 0.88);
  box-shadow: 0 20px 50px rgba(16, 45, 59, 0.06);
}

.withdrawal-card h2,
.withdrawal-card h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
}

.withdrawal-card h2 {
  font-size: 34px;
  line-height: 1.15;
}

.withdrawal-progress {
  width: 124px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
}

.withdrawal-progress span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(16, 45, 59, 0.26);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.withdrawal-progress span.is-active,
.withdrawal-progress span.is-complete {
  border-color: #102d3b;
  background: #102d3b;
  color: #fff;
}

.withdrawal-progress i {
  height: 1px;
  flex: 1;
  background: rgba(16, 45, 59, 0.26);
}

.withdrawal-form {
  margin-top: 30px;
  display: grid;
  gap: 20px;
}

.withdrawal-form__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.withdrawal-field {
  display: grid;
  gap: 8px;
}

.withdrawal-field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.withdrawal-field input,
.withdrawal-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid #cdbfae;
  border-radius: 15px;
  outline: none;
  background: #fffdf8;
  color: #102d3b;
  font: inherit;
  font-size: 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.withdrawal-field textarea {
  min-height: 96px;
  resize: vertical;
}

.withdrawal-field input:focus,
.withdrawal-field textarea:focus {
  border-color: #102d3b;
  box-shadow: 0 0 0 3px rgba(16, 45, 59, 0.1);
}

.withdrawal-field.has-error input,
.withdrawal-field.has-error textarea {
  border-color: #b4232c;
}

.withdrawal-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
}

.withdrawal-required,
.withdrawal-privacy {
  margin: 0;
  color: #60727a;
  font-size: 12px;
  line-height: 1.5;
}

.withdrawal-privacy a {
  color: inherit;
  text-underline-offset: 3px;
}

.withdrawal-button {
  min-height: 54px;
  padding: 14px 26px;
  border: 1px solid #102d3b;
  border-radius: 999px;
  background: #102d3b;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}

.withdrawal-button:hover,
.withdrawal-button:focus-visible {
  transform: translateY(-1px);
  background: #173f50;
}

.withdrawal-button--secondary {
  background: transparent;
  color: #102d3b;
}

.withdrawal-button--secondary:hover,
.withdrawal-button--secondary:focus-visible {
  background: rgba(16, 45, 59, 0.06);
}

.withdrawal-error {
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 3px solid #b4232c;
  background: rgba(180, 35, 44, 0.06);
  color: #8d1c23;
  font-size: 14px;
}

.withdrawal-summary {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-block: 1px solid rgba(16, 45, 59, 0.18);
}

.withdrawal-summary > div {
  padding: 22px 20px 22px 0;
}

.withdrawal-summary > div + div:not(.withdrawal-summary__statement) {
  padding-left: 20px;
  border-left: 1px solid rgba(16, 45, 59, 0.18);
}

.withdrawal-summary span,
.withdrawal-summary small {
  display: block;
}

.withdrawal-summary span {
  margin-bottom: 9px;
  color: #60727a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.withdrawal-summary strong {
  display: block;
  font-size: 15px;
  line-height: 1.45;
}

.withdrawal-summary small {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.withdrawal-summary__statement {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(16, 45, 59, 0.18);
}

.withdrawal-summary__statement p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.withdrawal-actions {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(130px, 0.4fr) minmax(240px, 1fr);
  gap: 12px;
}

.withdrawal-success {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 24px;
}

.withdrawal-success__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #287a62;
  color: #fff;
  font-size: 26px;
}

.withdrawal-success h3 {
  margin-top: 28px;
  font-size: 25px;
}

.withdrawal-success p {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.65;
}

@media (max-width: 700px) {
  .withdrawal-shell { padding: 20px 20px 52px; }
  .withdrawal-header .legal-back { width: auto; min-width: 0; }
  .withdrawal-hero { margin-top: 54px; }
  .withdrawal-hero h1 { font-size: clamp(42px, 13vw, 58px); }
  .withdrawal-card { padding: 28px 20px; border-radius: 24px; }
  .withdrawal-form__pair,
  .withdrawal-summary,
  .withdrawal-actions { grid-template-columns: 1fr; }
  .withdrawal-summary > div + div:not(.withdrawal-summary__statement) { padding-left: 0; border-left: 0; border-top: 1px solid rgba(16, 45, 59, 0.18); }
  .withdrawal-summary__statement { grid-column: auto; }
  .withdrawal-success { grid-template-columns: 1fr; }
}
