body.legal-page {
  --navy: #0b2b5c;
  --text: #34425f;
  --muted: #667085;
  --cream: #fffaf3;
  --paper: #fffdf8;
  --border: #eadcc9;
  --orange: #ff6f5f;
  --orange-dark: #e95e43;
  --shadow: 0 24px 70px rgba(96, 61, 28, 0.12);
  margin: 0;
  background: #f6ecdc;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.legal-page a {
  color: inherit;
}

.legal-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 24px auto;
  border: 1px solid var(--border);
  border-radius: 32px;
  background: var(--cream);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.legal-policy-page .legal-page-frame {
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px;
}

.legal-policy-page .legal-shell {
  width: auto;
  margin: 0;
  border-radius: 30px;
  background: rgba(255, 253, 248, 0.76);
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(234, 220, 201, 0.75);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 900;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.legal-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(96, 61, 28, 0.08);
}

.legal-brand-mark img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: block;
}

.legal-write-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ff735f, #ff4f2f);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 26px rgba(255, 89, 60, 0.22);
}

.legal-main {
  padding: 44px 32px 34px;
}

.legal-document {
  max-width: 820px;
  margin: 0 auto;
  padding: 42px 48px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 12px 32px rgba(96, 61, 28, 0.07);
}

.legal-policy-page .legal-document {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.legal-document h1 {
  margin: 0 0 18px;
  color: var(--navy);
  font-size: clamp(2.15rem, 5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.legal-document h2 {
  margin: 34px 0 12px;
  color: var(--navy);
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.legal-document h3 {
  margin: 28px 0 10px;
  color: var(--navy);
  font-size: 1.08rem;
  line-height: 1.25;
}

.legal-document p {
  margin: 0 0 16px;
  font-size: 1rem;
  line-height: 1.7;
}

.legal-document ul {
  margin: 0 0 18px;
  padding-left: 1.25rem;
}

.legal-document li {
  margin: 8px 0;
  line-height: 1.65;
}

.legal-document hr {
  height: 1px;
  border: 0;
  margin: 30px 0;
  background: var(--border);
}

.legal-document strong {
  color: #1f2b3d;
}

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 32px;
  border-top: 1px solid rgba(234, 220, 201, 0.75);
  color: var(--muted);
  font-size: 0.95rem;
}

.legal-policy-page .legal-footer {
  margin: -6px 0 24px;
  padding: 18px 22px 6px;
  border-top: 0;
}

.legal-footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.legal-footer a {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.legal-brand:hover,
.legal-write-link:hover {
  text-decoration: underline;
}

.legal-footer a:hover {
  text-decoration: none;
}

@media (max-width: 760px) {
  .legal-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .legal-policy-page .legal-page-frame {
    padding: 12px;
  }

  .legal-policy-page .legal-shell {
    width: auto;
    min-height: 0;
    border-radius: 24px;
  }

  .legal-nav,
  .legal-footer {
    padding: 18px;
  }

  .legal-main {
    padding: 24px 16px;
  }

  .legal-document {
    padding: 28px 22px;
    border-radius: 18px;
  }

  .legal-policy-page .legal-document {
    padding: 0;
    border-radius: 0;
  }

  .legal-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-policy-page .legal-footer {
    margin: 0;
    padding: 18px 22px 24px;
  }

  .legal-footer-links {
    gap: 14px 18px;
  }
}

@media (max-width: 420px) {
  .legal-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-write-link {
    width: 100%;
  }
}
