/* Legal pages — isolated from index.css header rules */
html.legal-root,
body.legal-page {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  background: #f4f7fb;
  color: #0f172a;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body.legal-page *,
body.legal-page *::before,
body.legal-page *::after {
  box-sizing: border-box;
}

.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  max-width: 100vw;
  padding: max(0.7rem, env(safe-area-inset-top, 0px)) 0 0.7rem;
  background: rgba(8, 18, 36, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-topbar-inner {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 48px;
}

.legal-brand {
  color: #e8eef8;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(0.86rem, 3.4vw, 1.05rem);
  line-height: 1.25;
  max-width: calc(100% - 7.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.legal-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 88px;
  padding: 0 16px;
  border-radius: 999px;
  background: #0284c7;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  font-family: inherit;
}

.legal-signin:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}

.legal-main {
  width: min(760px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem) 0 2.25rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.legal-main h1 {
  font-size: clamp(1.45rem, 6vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 0.4rem;
}

.legal-main h2 {
  font-size: clamp(1.02rem, 4vw, 1.28rem);
  line-height: 1.3;
  margin: 1.4rem 0 0.45rem;
}

.legal-main p,
.legal-main li {
  color: #334155;
  line-height: 1.65;
}

.legal-main ul {
  padding-left: 1.1rem;
}

.legal-footer {
  width: 100%;
  max-width: 100vw;
  padding: 1.25rem 0.75rem max(1.25rem, env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: #64748b;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: 0 0 10px;
}

.legal-footer-links a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.88rem;
}

@media (max-width: 420px) {
  .legal-topbar-inner {
    width: min(1120px, calc(100% - 1rem));
  }
  .legal-brand {
    max-width: calc(100% - 6.75rem);
  }
}
