:root {
  --legal-paper: #f3f6f2;
  --legal-surface: #fff;
  --legal-ink: #0f1714;
  --legal-muted: #626b66;
  --legal-rule: rgba(15, 23, 20, .14);
  --legal-teal: #0b695e;
  --legal-teal-deep: #083b36;
  --legal-gutter: max(28px, calc((100vw - 1216px) / 2));
}

body.cm-legal-page { background: var(--legal-paper); }
body.cm-legal-page > main#main-content { overflow: hidden; }
html body.cm-marketing-body.cm-marketing-redesign.cm-hub-page.cm-legal-page > main#main-content {
  padding-inline: 0 !important;
}
html body.cm-marketing-body.cm-marketing-redesign.cm-hub-page.cm-legal-page :is(.legal-hero, .terms-hero) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 112px var(--legal-gutter) 64px !important;
}

body.cm-marketing-redesign.cm-legal-page :is(.legal-kicker, .terms-kicker) {
  color: var(--legal-teal);
  font: 700 10px/1.25 Manrope, sans-serif;
  letter-spacing: .14em;
}
body.cm-marketing-redesign.cm-legal-page :is(.legal-kicker, .terms-kicker)::before {
  width: 28px;
  height: 1px;
  margin-right: 0;
  background: currentColor;
}

.cm-legal-page .legal-hero,
.cm-legal-page .terms-hero {
  width: 100%;
  min-height: 660px;
  margin: 0;
  padding: 112px var(--legal-gutter) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .82fr);
  gap: clamp(50px, 7vw, 96px);
  align-items: center;
  background:
    radial-gradient(circle at 84% 22%, rgba(112, 191, 179, .24), transparent 31%),
    linear-gradient(rgba(15, 23, 20, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 20, .04) 1px, transparent 1px),
    linear-gradient(135deg, #f7f8f5, #e3efeb);
  background-size: auto, 48px 48px, 48px 48px, auto;
}

.cm-terms-policy .terms-hero {
  background:
    radial-gradient(circle at 84% 22%, rgba(164, 186, 174, .22), transparent 31%),
    linear-gradient(rgba(15, 23, 20, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 20, .04) 1px, transparent 1px),
    linear-gradient(135deg, #f7f8f5, #eceee7);
  background-size: auto, 48px 48px, 48px 48px, auto;
}

.legal-kicker,
.terms-kicker,
.legal-document-heading > div > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--legal-teal);
  font: 700 10px/1.25 Manrope, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.legal-kicker::before,
.terms-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.cm-legal-page .legal-hero h1,
.cm-legal-page .terms-hero h1 {
  max-width: 720px;
  margin: 19px 0 22px;
  color: var(--legal-ink);
  font: 400 clamp(54px, 5.2vw, 78px)/.96 "DM Serif Display", Georgia, serif;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.cm-legal-page .legal-hero > div > p,
.cm-legal-page .terms-hero > div > p {
  max-width: 680px;
  margin: 0;
  color: var(--legal-ink);
  font-size: 16px;
  line-height: 1.72;
}

.legal-visual,
.terms-visual {
  overflow: hidden;
  border: 1px solid var(--legal-rule);
  border-radius: 14px;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 20px 55px rgba(25, 57, 50, .07);
  backdrop-filter: blur(12px);
}

.legal-lock,
.terms-rule {
  min-height: 118px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--legal-rule);
  display: grid;
  align-content: center;
}

.legal-lock:last-child,
.terms-rule:last-child { border-bottom: 0; }

.legal-lock { grid-template-columns: 30px minmax(0, 1fr); gap: 17px; align-items: start; }
.legal-lock i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(11, 105, 94, .3);
  border-radius: 50%;
  color: var(--legal-teal);
  font: 700 10px/1 Manrope, sans-serif;
  font-style: normal;
}

.legal-lock strong,
.terms-rule strong {
  display: block;
  color: var(--legal-ink);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -.01em;
}

.legal-lock span,
.terms-rule span {
  display: block;
  margin-top: 7px;
  color: var(--legal-muted);
  font-size: 13px;
  line-height: 1.55;
}

.legal-summary {
  width: min(calc(100% - (2 * var(--legal-gutter))), 1216px);
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--legal-rule);
  border-radius: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: transparent;
}

.legal-summary-card {
  min-height: 156px;
  padding: 28px 26px;
  border-right: 1px solid var(--legal-rule);
  border-radius: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: transparent !important;
  box-shadow: none !important;
}

.legal-summary-card:first-child { border-left: 0; }
.legal-summary-card:last-child { border-right: 0; }
.legal-summary-card strong { color: var(--legal-ink); font-size: 16px; font-weight: 500; line-height: 1.35; }
.legal-summary-card span { margin-top: 12px; color: var(--legal-muted); font-size: 13px; line-height: 1.6; }

html body.cm-marketing-body.cm-marketing-redesign.cm-hub-page.cm-legal-page .legal-summary-card {
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.legal-body,
.terms-body {
  width: 100%;
  padding: 96px var(--legal-gutter) 108px;
  background: var(--legal-surface);
}

.legal-document-heading {
  width: min(100%, 1216px);
  margin: 0 auto 54px;
  padding: 0 0 34px;
  border-bottom: 1px solid var(--legal-rule);
}

.legal-document-heading > div { max-width: 820px; }
.legal-document-heading h2 {
  max-width: 820px;
  margin: 16px 0 12px;
  color: var(--legal-ink);
  font: 400 clamp(40px, 4.5vw, 60px)/1 "DM Serif Display", Georgia, serif;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.legal-document-heading p { max-width: 680px; margin: 0; color: var(--legal-muted); font-size: 15px; line-height: 1.7; }

.legal-body-inner,
.terms-body-inner {
  width: min(100%, 1216px);
  margin: 0 auto;
  border-top: 1px solid var(--legal-rule);
}

.legal-section,
.terms-section {
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--legal-rule);
  border-radius: 0 !important;
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.58fr);
  column-gap: clamp(44px, 7vw, 104px);
  align-items: start;
  background: transparent !important;
  box-shadow: none !important;
}

html body.cm-marketing-body.cm-marketing-redesign.cm-hub-page.cm-legal-page .legal-section,
html body.cm-marketing-body.cm-marketing-redesign.cm-hub-page.cm-legal-page .terms-section {
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.legal-section h2,
.terms-section h2 {
  grid-column: 1;
  grid-row: 1 / span 20;
  margin: 0;
  color: var(--legal-ink);
  font: 400 22px/1.25 "DM Sans", sans-serif;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.legal-section > :not(h2),
.terms-section > :not(h2) { grid-column: 2; }
.legal-section h3 { margin: 18px 0 7px; color: var(--legal-ink); font-size: 15px; font-weight: 600; }
.legal-section h3:first-of-type { margin-top: 0; }
.legal-section p,
.legal-section li,
.terms-section p,
.terms-section li { color: #3e4742; font-size: 15px; line-height: 1.76; }
.legal-section p,
.terms-section p { margin: 0 0 14px; }
.legal-section p:last-child,
.terms-section p:last-child { margin-bottom: 0; }
.legal-section ul,
.terms-section ul { margin: 0; padding-left: 20px; }
.legal-section li + li,
.terms-section li + li { margin-top: 7px; }
.legal-section a,
.terms-section a { color: var(--legal-teal); text-underline-offset: 3px; }
.legal-section .dt-button { margin-top: 16px; min-height: 42px; border-radius: 9px; }

.terms-callout {
  width: min(100%, 1216px);
  margin: 0 auto 42px;
  padding: 24px 28px;
  border: 1px solid rgba(11, 105, 94, .26);
  border-radius: 12px;
  background: #edf5f2;
  color: #30423d;
  font-size: 14px;
  line-height: 1.7;
}
.terms-callout strong { color: var(--legal-teal-deep); font-weight: 600; }

.legal-cta,
.terms-cta {
  width: min(100%, 1216px);
  margin: 64px auto 0;
  padding: 40px clamp(28px, 5vw, 64px);
  border-radius: 16px;
  background: var(--legal-teal-deep);
  color: #fff;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title action"
    "copy action";
  column-gap: clamp(40px, 7vw, 96px);
  align-items: center;
}
.legal-cta h2,
.terms-cta h2 {
  grid-area: title;
  max-width: 760px;
  margin: 0 0 10px;
  color: #fff;
  font: 400 clamp(32px, 3.2vw, 44px)/1.04 "DM Serif Display", Georgia, serif;
  letter-spacing: -.035em;
}
.legal-cta p,
.terms-cta p { grid-area: copy; max-width: 680px; margin: 0; color: rgba(255, 255, 255, .74); font-size: 15px; line-height: 1.65; }
.legal-cta .dt-button,
.terms-cta .dt-button {
  grid-area: action;
  min-width: 190px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid #fff;
  border-radius: 9px;
  background: #fff;
  color: var(--legal-teal-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.legal-cta .dt-button::after,
.terms-cta .dt-button::after { content: "\2192"; font-size: 17px; line-height: 1; }
.legal-cta .dt-button:hover,
.terms-cta .dt-button:hover { border-color: #dcebe6; background: #dcebe6; color: var(--legal-teal-deep); }

@media (max-width: 980px) {
  .cm-legal-page .legal-hero,
  .cm-legal-page .terms-hero { min-height: 0; grid-template-columns: 1fr; gap: 38px; }
  .legal-visual,
  .terms-visual { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-lock,
  .terms-rule { border-right: 1px solid var(--legal-rule); }
  .legal-lock:nth-child(2n),
  .terms-rule:nth-child(2n) { border-right: 0; }
  .legal-lock:nth-last-child(-n + 2),
  .terms-rule:nth-last-child(-n + 2) { border-bottom: 0; }
  .legal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-summary-card { border-bottom: 1px solid var(--legal-rule); }
  .legal-summary-card:nth-child(2n) { border-right: 0; }
  .legal-summary-card:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 720px) {
  :root { --legal-gutter: 20px; }
  html body.cm-marketing-body.cm-marketing-redesign.cm-hub-page.cm-legal-page :is(.legal-hero, .terms-hero) {
    padding: 104px var(--legal-gutter) 54px !important;
  }
  .cm-legal-page .legal-hero h1,
  .cm-legal-page .terms-hero h1 { font-size: clamp(44px, 13vw, 60px); }
  .legal-visual,
  .terms-visual {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 82vw);
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    box-shadow: none;
  }
  .legal-lock,
  .terms-rule { min-height: 150px; border-right: 1px solid var(--legal-rule); border-bottom: 0; scroll-snap-align: start; }
  .legal-lock:nth-child(2n),
  .terms-rule:nth-child(2n) { border-right: 1px solid var(--legal-rule); }
  .legal-lock:last-child,
  .terms-rule:last-child { border-right: 0; }
  .legal-summary { grid-template-columns: 1fr; }
  .legal-summary-card,
  .legal-summary-card:nth-child(2n),
  .legal-summary-card:nth-last-child(-n + 2) { min-height: 0; padding: 26px 22px; border-right: 0; border-bottom: 1px solid var(--legal-rule); }
  .legal-summary-card:first-child { border-left: 0; }
  .legal-summary-card:last-child { border-bottom: 0; }
  .legal-body,
  .terms-body { padding-top: 70px; padding-bottom: 82px; }
  .legal-document-heading { margin-bottom: 36px; }
  .legal-section,
  .terms-section { grid-template-columns: 1fr; row-gap: 18px; padding: 30px 0 34px; }
  .legal-section h2,
  .terms-section h2 { grid-column: 1; grid-row: auto; font-size: 21px; }
  .legal-section > :not(h2),
  .terms-section > :not(h2) { grid-column: 1; }
  .terms-callout { margin-bottom: 28px; padding: 20px; }
  .legal-cta,
  .terms-cta {
    margin-top: 48px;
    padding: 34px 24px;
    grid-template-columns: 1fr;
    grid-template-areas: "title" "copy" "action";
    row-gap: 0;
  }
  .legal-cta p,
  .terms-cta p { margin-bottom: 24px; }
  .legal-cta .dt-button,
  .terms-cta .dt-button { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .legal-visual,
  .terms-visual { scroll-behavior: auto; }
}
