:root {
  --legal-orange: #f36b21;
  --legal-maroon: #2b171a;
  --legal-ink: #252124;
  --legal-muted: #645d5a;
  --legal-paper: #f8f6f3;
  --legal-line: #e9e2dc;
  --legal-soft: #fff2e8;
}

.legal-page {
  overflow-x: hidden;
  background: var(--legal-paper);
  color: var(--legal-ink);
}

.legal-page main {
  overflow: visible;
}

.legal-page .container {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

/* Match the About page photo banner and dark overlay. */
body.legal-page .inner-page-banner {
  min-height: 500px !important;
  padding: 0 !important;
  isolation: isolate !important;
  background-color: #07122d !important;
  background-image:
    linear-gradient(90deg, rgba(5, 14, 39, .94), rgba(7, 17, 46, .78) 43%, rgba(7, 17, 46, .12)),
    url('images/legal-banner-laptop.png') !important;
  background-size: 100% 100%, cover !important;
  background-position: center, center center !important;
  background-repeat: no-repeat !important;
  border-bottom: 0;
}

body.legal-page .inner-page-banner::before,
body.legal-page .inner-page-banner::after {
  display: none !important;
  content: none !important;
}

body.legal-page .inner-page-banner > .container {
  width: min(1240px, calc(100% - 48px));
  padding: 30px 0 !important;
}

.legal-banner-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 78px 0 60px !important;
}

body.legal-page .inner-page-banner h1 {
  max-width: 900px;
  margin: 0;
  color: #fff !important;
  font-size: 48px !important;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.045em;
}

.legal-intro {
  position: relative;
  padding: 48px 0 32px;
  background: transparent;
  text-align: left;
}

.legal-intro::before {
  display: none !important;
  content: none !important;
}

.legal-intro .container {
  position: relative;
  z-index: 1;
}

.legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--legal-orange);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .16em;
}

.legal-kicker::before {
  width: 26px;
  height: 2px;
  background: currentColor;
  content: "";
}

.legal-intro h2 {
  margin: 12px 0 10px;
  color: var(--legal-ink);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.legal-intro p {
  max-width: 850px;
  margin: 0 0 20px;
  color: var(--legal-muted);
  font-size: 16px;
  line-height: 1.7;
}

.legal-highlights {
  display: flex;
  justify-content: flex-start;
  gap: 9px;
  flex-wrap: wrap;
}

.legal-highlights span {
  padding: 9px 14px;
  border: 1px solid #f0d2bd;
  border-radius: 999px;
  background: #fff;
  color: #51352a;
  font-size: 12px;
  font-weight: 750;
}

.legal-body {
  padding: 20px 0 88px;
  background: transparent;
}

.legal-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.legal-layout aside {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 4px;
  padding: 20px 14px;
  border: 1px solid var(--legal-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(43, 23, 26, .045);
}

.legal-layout aside strong {
  display: block;
  padding: 2px 10px 10px;
  color: var(--legal-orange);
  font-size: 10px;
  letter-spacing: .16em;
}

.legal-layout aside a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: #504946;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  transition: background-color .2s ease, color .2s ease;
}

.legal-layout aside a:hover {
  background: var(--legal-soft);
  color: #a74716;
}

.legal-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.legal-content > section {
  position: relative;
  padding: 28px 32px;
  overflow: hidden;
  border: 1px solid var(--legal-line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(43, 23, 26, .035);
  scroll-margin-top: 110px;
}

.legal-content > section:hover {
  border-color: #edc2a4;
}

.legal-content > section::after {
  display: none !important;
  content: none !important;
}

.legal-content em {
  position: absolute;
  top: 22px;
  right: 24px;
  color: #e8dfd8;
  font-size: 30px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
}

.legal-content h2,
.legal-content h3 {
  position: relative;
  z-index: 1;
  color: var(--legal-ink);
  font-weight: 750;
}

.legal-content h2 {
  margin: 0 58px 12px 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.legal-content h3 {
  margin: 22px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.legal-content p,
.legal-content ul,
.legal-content .legal-grid,
.legal-content .registration-types {
  position: relative;
  z-index: 1;
}

.legal-page main p,
.legal-page main li {
  color: var(--legal-muted);
  font-size: 15px;
  line-height: 1.72;
}

.legal-content p {
  margin: 0 0 12px;
}

.legal-content p:last-child {
  margin-bottom: 0;
}

.legal-content ul {
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
}

.legal-content li {
  position: relative;
  padding: 6px 0 6px 28px;
}

.legal-content li::before {
  position: absolute;
  top: 8px;
  left: 0;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 6px;
  background: var(--legal-soft);
  color: var(--legal-orange);
  content: "✓";
  font-size: 11px;
  font-weight: 900;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.legal-grid > div {
  padding: 20px;
  border: 1px solid #f0e4da;
  border-radius: 13px;
  background: #fbf8f5;
}

.legal-grid h3 {
  margin-top: 0;
}

.legal-note {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding: 18px 20px;
  border-left: 3px solid var(--legal-orange);
  border-radius: 0 10px 10px 0;
  background: #fff7f0;
}

.legal-note strong {
  color: var(--legal-ink);
  font-size: 15px;
}

.legal-note p {
  margin: 6px 0 0;
}

.registration-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.registration-types span {
  padding: 13px 12px;
  border: 1px solid #f0d8c5;
  border-radius: 11px;
  background: #fff8f2;
  color: #553c30;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.terms-page .legal-content > section:nth-child(odd) {
  background: #fffdfb;
}

.legal-content .refund-section {
  border-color: var(--legal-maroon) !important;
  background: var(--legal-maroon) !important;
}

.legal-content .refund-section h2,
.legal-content .refund-section h3 {
  color: #fff !important;
}

.legal-content .refund-section p,
.legal-content .refund-section li {
  color: #e8deda !important;
}

.legal-content .refund-section li::before {
  background: var(--legal-orange);
  color: #fff;
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-layout aside {
    position: relative;
    top: auto;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px;
  }

  .legal-layout aside strong {
    display: none;
  }

  .legal-layout aside a {
    flex: 0 0 auto;
    padding: 9px 11px;
    background: #fbf8f5;
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .legal-page .container,
  body.legal-page .inner-page-banner > .container {
    width: calc(100% - 30px);
  }

  body.legal-page .inner-page-banner {
    min-height: 390px !important;
    padding: 0 !important;
  }

  body.legal-page .inner-page-banner > .container {
    padding: 55px 0 42px !important;
  }

  body.legal-page .inner-page-banner h1 {
    font-size: 40px !important;
  }

  body.legal-page .inner-page-banner { background-position: center, 62% center !important; }

  .legal-intro {
    padding: 34px 0 24px;
  }

  .legal-intro h2 {
    font-size: 29px;
  }

  .legal-intro p,
  .legal-page main p,
  .legal-page main li {
    font-size: 14px;
  }

  .legal-highlights {
    gap: 7px;
  }

  .legal-highlights span {
    padding: 8px 11px;
    font-size: 11px;
  }

  .legal-body {
    padding: 14px 0 56px;
  }

  .legal-layout {
    gap: 14px;
  }

  .legal-content > section {
    padding: 23px 19px;
    border-radius: 14px;
  }

  .legal-content h2 {
    margin-right: 36px;
    font-size: 21px;
  }

  .legal-content h3 {
    font-size: 16px;
  }

  .legal-content em {
    top: 20px;
    right: 16px;
    font-size: 23px;
  }

  .legal-grid,
  .registration-types {
    grid-template-columns: 1fr;
  }
}
