/* Legal pages */
.legal-page {
  padding: 48px 0 72px;
  background: #fafaf8;
}
.legal-article {
  background: #fff;
  border: 0.5px solid #e5e3dc;
  border-radius: 12px;
  padding: 36px 40px;
  max-width: 820px;
  margin: 0 auto;
}
.legal-article h2 {
  font-size: 20px;
  margin: 28px 0 12px;
  color: #1a3a6b;
}
.legal-article h2:first-of-type {
  margin-top: 8px;
}
.legal-article p,
.legal-article li {
  font-size: 15px;
  color: #2a2a2a;
  line-height: 1.65;
}
.legal-article ul,
.legal-article ol {
  margin: 10px 0 16px 1.25rem;
}
.legal-article a {
  color: #1a3a6b;
  text-decoration: underline;
}
.legal-meta {
  font-size: 13px;
  color: #6b6b6b;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 0.5px solid #e5e3dc;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 14px;
}
.legal-table th,
.legal-table td {
  border: 0.5px solid #e5e3dc;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.legal-table th {
  background: #f3f1ea;
  font-weight: 600;
  color: #1a1a1a;
  width: 40%;
}
.legal-table code {
  font-size: 12px;
  background: #f3f1ea;
  padding: 2px 6px;
  border-radius: 4px;
}
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: center;
  margin: 28px auto 0;
  max-width: 820px;
  font-size: 13px;
}
.legal-nav a {
  color: #1a3a6b;
  text-decoration: underline;
}
.legal-form {
  max-width: 480px;
  margin-top: 20px;
}
.legal-form label.required::after {
  content: " *";
  color: #dc2626;
}
.legal-alert {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 14px;
}
.legal-alert--success {
  background: #dcfce7;
  color: #166534;
  border: 0.5px solid #86efac;
}
.legal-alert--error {
  background: #fee2e2;
  color: #991b1b;
  border: 0.5px solid #fca5a5;
}
.legal-alert--error ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* Cookie consent preferences */
.cookie-banner[hidden],
.cookie-prefs[hidden] {
  display: none !important;
}
.cookie-prefs {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 34, 64, 0.45);
}
.cookie-prefs__panel {
  background: #fff;
  border-radius: 14px;
  border: 0.5px solid #e5e3dc;
  box-shadow: 0 20px 60px rgba(13, 34, 64, 0.2);
  max-width: 520px;
  width: 100%;
  padding: 24px;
}
.cookie-prefs__panel h3 {
  margin-bottom: 8px;
  color: #1a3a6b;
}
.cookie-prefs__panel > p {
  font-size: 13px;
  color: #5f5e5a;
  margin-bottom: 16px;
}
.cookie-prefs__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 0.5px solid #e5e3dc;
}
.cookie-prefs__row:last-of-type {
  border-bottom: 0.5px solid #e5e3dc;
  margin-bottom: 16px;
}
.cookie-prefs__row strong {
  display: block;
  font-size: 14px;
  color: #1a1a1a;
}
.cookie-prefs__row span {
  font-size: 12px;
  color: #6b6b6b;
  line-height: 1.45;
}
.cookie-prefs__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* Minimal switch for cookie prefs (pages without signup.css) */
.cookie-prefs .switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: none;
}
.cookie-prefs .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-prefs .switch .slider {
  position: absolute;
  inset: 0;
  background: #cfcec4;
  border-radius: 24px;
  transition: background 0.15s ease;
}
.cookie-prefs .switch .slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}
.cookie-prefs .switch input:checked + .slider {
  background: #1a3a6b;
}
.cookie-prefs .switch input:checked + .slider::before {
  transform: translateX(18px);
}
.cookie-prefs .switch input:disabled + .slider {
  opacity: 0.85;
}

@media (max-width: 720px) {
  .legal-article {
    padding: 24px 18px;
  }
}
