:root {
  --brand-lime: #cce779;
  --brand-olive: #a3bf61;
  --brand-ink: #373b44;
  --brand-sky: #dcecff;
  --brand-sand: #e7b85a;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.7);
  --border: rgba(55, 59, 68, 0.12);
  --border-strong: rgba(55, 59, 68, 0.18);
  --muted: #66727f;
  --shadow-soft: 0 18px 38px rgba(55, 59, 68, 0.08);
  --shadow-strong: 0 28px 60px rgba(55, 59, 68, 0.14);
  --shadow-focus: 0 18px 30px rgba(163, 191, 97, 0.16);
  --max-width: 1160px;
  --header-height: 5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f5fae4 0%, #fffdf8 42%, #edf6ff 100%);
  color: var(--brand-ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
    "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.legal-page {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.legal-page::before,
.legal-page::after {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.legal-page::before {
  background: radial-gradient(
    circle,
    rgba(204, 231, 121, 0.48) 0%,
    rgba(204, 231, 121, 0) 68%
  );
  height: 42rem;
  left: -12rem;
  top: -10rem;
  width: 42rem;
}

.legal-page::after {
  background: radial-gradient(
    circle,
    rgba(220, 236, 255, 0.62) 0%,
    rgba(220, 236, 255, 0) 72%
  );
  height: 38rem;
  right: -10rem;
  top: 9rem;
  width: 38rem;
}

.legal-page.is-terms::after {
  background: radial-gradient(
    circle,
    rgba(231, 184, 90, 0.28) 0%,
    rgba(231, 184, 90, 0) 72%
  );
}

.legal-shell {
  margin: 0 auto;
  position: relative;
  width: min(var(--max-width), calc(100% - 2rem));
  z-index: 1;
}

.legal-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: var(--header-height);
  padding: 1.25rem 0 0;
}

.brand-lockup {
  align-items: center;
  color: var(--brand-ink);
  display: inline-flex;
  gap: 0.9rem;
}

.brand-icon {
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  height: 3.35rem;
  width: 3.35rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.88rem;
}

.header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.switch-group {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(55, 59, 68, 0.08);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.25rem;
}

.switch-group a,
.switch-group span {
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  min-width: 3rem;
  padding: 0.58rem 0.95rem;
  text-align: center;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.switch-group a:hover {
  color: var(--brand-ink);
}

.switch-group .is-active {
  background: linear-gradient(135deg, var(--brand-ink), #4f5562);
  color: #fff;
}

.hero-card,
.toc-card,
.section-card,
.footer-card,
.spotlight-card {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  border-radius: 2rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.8fr);
  margin-top: 2rem;
  overflow: hidden;
  padding: 2rem;
}

.hero-copy {
  max-width: 44rem;
}

.eyebrow {
  color: var(--brand-olive);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 0.95rem;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0;
  max-width: 11ch;
}

.hero-text,
.hero-meta,
.section-copy p,
.section-copy li,
.spotlight-card p,
.footer-card p,
.toc-card p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-text {
  font-size: 1.06rem;
  margin: 1.35rem 0 0;
}

.hero-meta {
  margin: 1.2rem 0 0;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.badge {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(55, 59, 68, 0.08);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  color: var(--brand-ink);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.72rem 0.95rem;
}

.spotlight-card {
  align-self: stretch;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.78)
  );
  border-radius: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.4rem;
}

.is-terms .spotlight-card {
  background: linear-gradient(
    180deg,
    rgba(255, 249, 236, 0.96),
    rgba(255, 255, 255, 0.78)
  );
}

.spotlight-title {
  color: var(--brand-ink);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
}

.spotlight-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
}

.spotlight-item {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
}

.spotlight-mark {
  background: linear-gradient(135deg, var(--brand-lime), var(--brand-sky));
  border-radius: 999px;
  box-shadow: var(--shadow-focus);
  flex: 0 0 0.75rem;
  height: 0.75rem;
  margin-top: 0.45rem;
  width: 0.75rem;
}

.spotlight-label {
  color: var(--brand-ink);
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.14rem;
}

.spotlight-note {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(55, 59, 68, 0.08);
  border-radius: 1.1rem;
  padding: 0.9rem 1rem;
}

.content-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  margin: 1.5rem 0 4rem;
}

.toc-card {
  border-radius: 1.5rem;
  padding: 1.25rem;
  position: sticky;
  top: 1.25rem;
}

.toc-title {
  color: var(--brand-ink);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.toc-card p {
  font-size: 0.92rem;
  margin: 0.55rem 0 0;
}

.toc-list {
  display: grid;
  gap: 0.4rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.toc-list a {
  border-radius: 0.95rem;
  color: var(--muted);
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.72rem 0.82rem;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.toc-list a:hover,
.toc-list a:focus-visible {
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-ink);
  outline: none;
  transform: translateX(0.18rem);
}

.legal-article {
  display: grid;
  gap: 1.1rem;
}

.section-card {
  animation: rise-in 0.5s ease both;
  border-radius: 1.75rem;
  padding: 1.45rem 1.5rem 1.5rem;
}

.section-card:nth-child(2n) {
  animation-delay: 0.05s;
}

.section-card:nth-child(3n) {
  animation-delay: 0.1s;
}

.section-header {
  align-items: center;
  display: flex;
  gap: 0.9rem;
  margin-bottom: 0.85rem;
}

.section-number {
  align-items: center;
  background: linear-gradient(135deg, var(--brand-lime), var(--brand-olive));
  border-radius: 999px;
  box-shadow: var(--shadow-focus);
  color: var(--brand-ink);
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 800;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.is-terms .section-number {
  background: linear-gradient(135deg, #f3d28e, var(--brand-sand));
}

.section-title {
  color: var(--brand-ink);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.section-copy p,
.section-copy ul {
  margin: 0.78rem 0 0;
}

.section-copy ul {
  padding-left: 1.2rem;
}

.section-copy li + li {
  margin-top: 0.5rem;
}

.callout {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(55, 59, 68, 0.08);
  border-radius: 1.1rem;
  margin-top: 1rem;
  padding: 0.95rem 1rem;
}

.callout strong {
  color: var(--brand-ink);
}

.footer-card {
  border-radius: 1.8rem;
  display: grid;
  gap: 0.8rem;
  margin: 1.6rem 0 4rem;
  padding: 1.4rem 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.footer-link {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(55, 59, 68, 0.08);
  border-radius: 999px;
  color: var(--brand-ink);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 0.95rem;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  box-shadow: var(--shadow-soft);
  outline: none;
  transform: translateY(-1px);
}

.muted-link {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(102, 114, 127, 0.38);
  text-underline-offset: 0.18rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-card,
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .legal-shell {
    width: min(var(--max-width), calc(100% - 1rem));
  }

  .legal-header {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 1rem;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .hero-card,
  .section-card,
  .footer-card,
  .toc-card {
    border-radius: 1.35rem;
  }

  .hero-card {
    padding: 1.35rem;
  }

  .section-card,
  .footer-card,
  .toc-card {
    padding: 1.1rem;
  }

  .hero-title {
    max-width: none;
  }
}
