/* Shared layout for the terms and privacy documents. */
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  color: #24212a;
  background: #f5f4f8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

#backButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  margin: 22px max(24px, calc((100% - 820px) / 2)) 12px;
  padding: 8px 0;
  color: #6840a1;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

#backButton:hover,
#backButton:focus-visible {
  color: #41246e;
}

.term-page {
  width: min(100% - 48px, 1800px);
  margin: 0 auto;
  padding: 0 0 64px !important;
}

.term-page #title,
.term-page > h1:first-child {
  margin: 0;
  padding: 34px 44px 28px;
  border: 1px solid #e8e5ee;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: #fff;
}

.term-page #title::before,
.term-page > h1:first-child::before {
  display: block;
  margin-bottom: 10px;
  color: #7951ad;
  content: "LEGAL DOCUMENT";
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.term-page .inner-content,
.term-page > p,
.term-page > h1,
.term-page > h2,
.term-page > ul {
  padding-right: 44px;
  padding-left: 44px;
  background: #fff;
}

.term-page .inner-content {
  padding-top: 2px;
  padding-bottom: 34px;
  border: 1px solid #e8e5ee;
  border-top: 0;
  border-radius: 0 0 16px 16px;
}

.term-page .inner-content section {
  max-width: 68ch;
  margin: 0 auto;
}

.term-page h1 {
  margin: 0;
  color: #17151a;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  overflow-wrap: break-word;
}

.term-page h2 {
  margin: 1.5em 0 0.5em;
  line-height: 1.25;
}

.term-page p {
  margin: 0 0 1.2em;
  color: #45414a;
  text-align: left;
  overflow-wrap: break-word;
  line-height: 1.8;
}

.term-page li {
  padding-left: 0.2em;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  #backButton {
    margin: 14px 16px 10px;
  }
  .term-page {
    width: auto;
    margin: 0 12px;
    padding: 0 0 36px !important;
  }
  .term-page #title,
  .term-page > h1:first-child {
    padding: 26px 22px 22px;
  }
  .term-page .inner-content,
  .term-page > p,
  .term-page > h1,
  .term-page > h2,
  .term-page > ul {
    padding-right: 22px;
    padding-left: 22px;
  }
  .term-page .inner-content {
    padding-bottom: 24px;
  }
}

/* Concise policy template */
.back-link {
  display: inline-flex;
  margin: 20px max(24px, calc((100% - 1800px) / 2));
  color: #6840a1;
  font-weight: 700;
  text-decoration: none;
}

.term-page > .legal-heading {
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid #e8e5ee;
  border-radius: 18px 18px 0 0;
  background: #fff;
}

.legal-eyebrow {
  margin: 0 0 10px !important;
  color: #7951ad !important;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.term-page .legal-heading h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 2.6rem);
}

.legal-summary {
  margin: 0 0 12px !important;
  color: #585360 !important;
  font-size: 1.05rem;
  line-height: 1.55 !important;
}

.legal-updated {
  margin: 0 !important;
  color: #797482 !important;
  font-size: 0.85rem;
  line-height: 1.4 !important;
}

.legal-content {
  padding: 10px clamp(24px, 5vw, 42px) 30px;
  border: 1px solid #e8e5ee;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #fff;
}

.legal-content section {
  padding: 19px 0;
  border-bottom: 1px solid #efedf2;
}

.legal-content h2 {
  margin: 0 0 6px;
  color: #292531;
  font-size: 1.12rem;
}

.legal-content p {
  margin: 0;
  color: #55515c;
  line-height: 1.65;
}

.legal-content a {
  color: #6840a1;
  text-underline-offset: 3px;
}

.policy-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.policy-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #e7e1ef;
  border-radius: 9px;
  background: #faf8fc;
  color: #563481;
  font-weight: 600;
  text-decoration: none;
}

.policy-list {
  overflow: hidden;
  border: 1px solid #e8e5ee;
  border-radius: 0 0 18px 18px;
  background: #fff;
}

.policy-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
  padding: 18px clamp(22px, 5vw, 42px);
  border-bottom: 1px solid #efedf2;
  color: #292531;
  text-decoration: none;
}

.policy-list a:last-child { border-bottom: 0; }
.policy-list a:hover { background: #faf8fc; }
.policy-list strong { display: block; font-size: 1.08rem; }
.policy-list small { display: block; margin-top: 4px; color: #77727e; font-size: 0.92rem; }
.policy-list b { color: #6840a1; font-size: 1.4rem; }

@media (max-width: 600px) {
  .back-link { margin: 14px 18px; }
  .term-page { margin: 0 12px; }
  .term-page > .legal-heading { padding: 24px 22px; }
  .legal-content { padding: 4px 22px 22px; }
  .policy-nav { flex-direction: column; }
  .policy-nav a { width: 100%; }
  .policy-list a { min-height: 82px; padding-inline: 22px; }
}
