/* Long-form legal reading dialogs, isolated from marketing section headings. */
.footer-legal-links button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.footer-legal-links button:hover { color: #3564ff; }
.footer-legal-links button:focus-visible,
.legal-dialog button:focus-visible,
.legal-dialog a:focus-visible,
.legal-body:focus-visible {
  outline: 2px solid #3564ff;
  outline-offset: 4px;
  border-radius: 4px;
}
body.legal-open { overflow: hidden; }
.legal-dialog {
  width: min(800px, calc(100% - 40px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e1e8f4;
  border-radius: 22px;
  color: #17253e;
  background: #fff;
  box-shadow: 0 28px 90px rgba(8, 28, 70, .22);
}
.legal-dialog::backdrop {
  background: rgba(15, 31, 56, .42);
  backdrop-filter: blur(5px);
}
.legal-shell {
  display: flex;
  flex-direction: column;
  max-height: min(860px, calc(100dvh - 48px));
}
.legal-header {
  position: relative;
  flex: 0 0 auto;
  padding: 30px 36px 24px;
  border-bottom: 1px solid #e7edf7;
  background: #f8faff;
}
.legal-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 32px;
  color: #3564ff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .4px;
}
.legal-eyebrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.legal-header h2 {
  margin: 14px 0 10px;
  color: #17253e;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.6px;
}
.legal-header h2:focus { outline: none; }
.legal-meta { margin: 0; color: #7a89a2; font-size: 12px; line-height: 1.8; }
.legal-meta span { padding: 0 7px; }
.legal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c5d3eb transparent;
  padding: 26px 36px 32px;
  color: #596a86;
  font-size: 14px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.legal-body p { margin: 0 0 12px; }
.legal-body .legal-intro { color: #455875; margin-bottom: 20px; }
.legal-notice {
  margin: 0 0 28px;
  padding: 16px 20px;
  border: 1px solid #dfe8fa;
  border-radius: 12px;
  background: #f4f7fd;
}
.legal-notice > strong { color: #315fb7; font-size: 14px; }
.legal-notice p { margin: 5px 0 0; font-size: 13px; }
.legal-body section + section { margin-top: 26px; }
.legal-body h3 {
  margin: 0 0 10px;
  color: #17253e;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 650;
}
.legal-body ul { margin: 0 0 12px; padding-left: 21px; }
.legal-body li { margin-bottom: 8px; padding-left: 2px; }
.legal-body strong { font-weight: 600; color: #344c70; }
.legal-body a { color: #3564ff; text-decoration: underline; text-underline-offset: 3px; }
.legal-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 36px;
  border-top: 1px solid #e7edf7;
  background: #fff;
}
.legal-actions > span { color: #8090a8; font-size: 12px; line-height: 1.6; }
.legal-actions .button { min-width: 96px; padding: 11px 24px; font-size: 14px; }
@media (max-width: 640px) {
  .legal-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 18px; }
  .legal-shell { max-height: calc(100dvh - 24px); }
  .legal-header { padding: 25px 22px 20px; }
  .legal-header h2 { font-size: 26px; }
  .legal-header .dialog-close { top: 16px; right: 14px; width: 34px; height: 34px; }
  .legal-eyebrow { font-size: 12px; }
  .legal-meta { max-width: 270px; }
  .legal-body { padding: 22px; }
  .legal-notice { padding: 14px 16px; }
  .legal-actions { padding: 15px 22px; }
  .legal-actions > span { max-width: 170px; font-size: 11px; }
}
