/* Legal documents: a card that opens as a popup over the site, or stands alone at /legal/<doc>/. */
dialog.lg { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 48px 16px; border: 0; color: #001A6E; background: rgba(6, 22, 66, .44); -webkit-backdrop-filter: blur(18px) saturate(.85); backdrop-filter: blur(18px) saturate(.85); overflow-y: auto; overscroll-behavior: contain; opacity: 0; transition: opacity .22s ease; }
dialog.lg::backdrop { background: transparent; }
dialog.lg.show { opacity: 1; }
html.lg-lock { overflow: hidden; }
body.lg-page { margin: 0; min-height: 100vh; padding: 48px 16px; box-sizing: border-box; color: #001A6E; background: linear-gradient(to bottom, #bcd7ff 0, #EAF4FF 42%) fixed; }

.lg-card { --pad: clamp(40px, 6vw, 72px); position: relative; box-sizing: border-box; max-width: 1040px; margin: 0 auto; padding: 0 var(--pad) 44px; border-radius: 36px; box-shadow: 0 30px 90px rgba(6, 22, 66, .3); background: #fff; font: 400 16px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.011em; transform: translateY(14px); transition: transform .28s cubic-bezier(.2, .7, .3, 1); }
dialog.lg.show .lg-card, .lg-page .lg-card { transform: none; }
.lg-top { position: sticky; top: -48px; z-index: 2; margin: 0 calc(var(--pad) * -1); padding: 30px var(--pad) 14px; border-radius: 36px 36px 0 0; background: #fff; }
.lg-bar { display: block; height: 4px; border-radius: 4px; overflow: hidden; background: #e7e9ec; }
.lg-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: #0070FF; }
.lg-x { position: absolute; z-index: 3; top: 20px; right: 12px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; color: #5c6168; background: transparent; cursor: pointer; }
.lg-x:hover { color: #001A6E; background: #eff0f2; }
.lg-x svg { width: 16px; height: 16px; }
.lg-wait { min-height: 60vh; }
.lg-sks { display: grid; gap: 14px; padding-top: 18px; }
.lg-sks i { display: block; height: 12px; border-radius: 7px; background: linear-gradient(100deg, #eef0f3 30%, #f8f9fa 50%, #eef0f3 70%); background-size: 220% 100%; animation: lg-sk 1.4s linear infinite; }
.lg-sks i:nth-child(1) { width: 110px; height: 26px; }
.lg-sks i:nth-child(2) { width: 52%; height: 34px; margin: 22px 0 10px; }
.lg-sks i:nth-child(3) { width: 74%; height: 18px; margin-bottom: 14px; }
.lg-sks i:nth-child(5) { width: 94%; } .lg-sks i:nth-child(6) { width: 88%; } .lg-sks i:nth-child(7) { width: 60%; }
@keyframes lg-sk { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.lg-head { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 16px; padding: 18px 0 30px; border-bottom: 1px solid #e7e9ec; }
.lg-seal { width: auto; height: 26px; }
.lg-tag { justify-self: end; padding: 3px 9px; border-radius: 7px; font-size: 12px; font-weight: 600; background: #e7e9ec; }
.lg-doc h1 { margin: 26px 0 0; padding-bottom: 22px; border-bottom: 1px solid #e7e9ec; font-size: clamp(30px, 5vw, 40px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.lg-lead { margin: 20px 0 0; padding-bottom: 20px; border-bottom: 1px solid #e7e9ec; font-size: clamp(20px, 3.4vw, 25px); line-height: 1.25; font-weight: 400; }
.lg-meta { margin: 12px 0 0; padding-bottom: 12px; border-bottom: 1px solid #e7e9ec; font-size: 12.5px; color: #5c6168; }
.lg-draft { margin: 20px 0 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; background: #f1f2f4; }
.lg-doc h2 { margin: 28px 0 8px; font-size: 17px; font-weight: 600; }
.lg-doc p { margin: 8px 0; }
.lg-doc ul { margin: 8px 0; padding-left: 20px; }
.lg-doc li { margin: 4px 0; }
.lg-doc a { color: #005BD1; text-decoration: underline; text-underline-offset: 2px; }
.lg-doc a[aria-current] { text-decoration: none; }
.lg-gpc { padding: 12px 14px; border-radius: 10px; background: #f1f2f4; }
.lg-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 32px; padding-top: 18px; border-top: 1px solid #e7e9ec; font-size: 14px; font-weight: 500; }

@media (max-width: 600px) {
  dialog.lg, body.lg-page { padding: 12px; }
  .lg-card { padding: 0 22px 32px; border-radius: 22px; }
  .lg-top { top: -12px; margin: 0 -22px; padding: 24px 54px 12px 22px; border-radius: 22px 22px 0 0; }
  .lg-x { top: 11px; right: 8px; }
  .lg-head { padding: 12px 0 22px; }
}
@media (prefers-reduced-motion: reduce) { dialog.lg, .lg-card { transition: none; transform: none; } .lg-sks i { animation: none; } }
