/* Terms and Privacy use the same document-card layout as the coming-soon page. */
#view-terms,#view-privacy { min-height:100vh; }
#view-terms .legal-main,#view-privacy .legal-main { min-height:calc(100vh - 78px); padding:20px 0 36px; }
.legal-document { max-width:960px; margin:0 auto; }
.legal-card { padding:clamp(18px,3vw,30px); border:1px solid rgba(24,65,143,.13); border-radius:18px; background:rgba(255,255,255,.92); box-shadow:0 8px 24px rgba(24,65,143,.05); font-size:.82rem; }
.legal-card h1 { margin:0 0 6px; color:#17418f; font-size:clamp(1.4rem,3vw,1.85rem); line-height:1.2; letter-spacing:-.02em; }
.legal-document .legal-date { margin:0 0 16px; color:#625e65; font-size:.73rem; }
.legal-card h2 { margin:17px 0 5px; color:#17418f; font-size:.92rem; line-height:1.3; letter-spacing:0; }
.legal-card p { margin:0; color:#514d55; font-size:.82rem; line-height:1.5; overflow-wrap:anywhere; }
.legal-card p + p { margin-top:7px; }
.legal-card a { color:#17418f; text-decoration:underline; text-underline-offset:2px; }
.legal-card .legal-contact,.legal-card .legal-provider-links { margin-top:7px; }
.legal-inline-links { display:flex; align-items:center; flex-wrap:wrap; gap:6px 16px; margin:12px 0; }
.legal-inline-link { border:0; border-radius:5px; padding:3px 0; background:transparent; color:#17418f; font:inherit; font-size:.77rem; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.legal-inline-link:is(:hover,:focus-visible) { color:#1260f5; }
.legal-reader-dialog { position:fixed; inset:0; width:min(1000px,calc(100% - 24px)); max-height:calc(100dvh - 24px); margin:auto; padding:0; overflow:auto; border:1px solid rgba(24,65,143,.2); border-radius:18px; background:#fffdf9; color:#28262d; }
.legal-reader-dialog::backdrop { background:rgba(28,29,36,.6); backdrop-filter:blur(6px); }
.legal-reader-dialog .legal-card { max-width:none; padding-top:56px; border:0; border-radius:0; box-shadow:none; background:#fffdf9; }
#legalReader > .legal-reader-toolbar { position:sticky; top:0; z-index:3; display:flex; justify-content:flex-end; height:0; overflow:visible; }
#legalReader .legal-reader-toolbar > .auth-close { position:relative; flex:0 0 34px; top:10px; right:12px; padding:0; display:grid; place-items:center; background:#fffdf9; }
.legal-notice { border:1px solid rgba(18,96,245,.28); border-radius:14px; padding:20px; margin:24px 0; background:rgba(234,242,255,.72); }
.legal-notice strong { color:#17418f; }
.legal-notice p { margin-top:7px; }
.legal-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px 24px; margin-top:34px; }
.legal-back { display:inline-flex; padding:0; border:0; background:transparent; color:#17418f; cursor:pointer; font-family:inherit; font-size:1rem; font-weight:800; line-height:1.4; text-decoration:underline; text-underline-offset:4px; }
.legal-back:hover,.legal-back:focus-visible { color:#1260f5; }
.legal-link { background:none; border:0; color:var(--muted); font:inherit; padding:4px 0; text-align:left; cursor:pointer; text-decoration:underline; text-underline-offset:4px; }
.legal-link:hover,.legal-link:focus-visible { color:var(--blue); }
@media(max-width:820px) {
  #view-terms .legal-main,#view-privacy .legal-main { min-height:calc(100vh - 66px); padding:16px 0 32px; }
  .legal-actions { align-items:flex-start; flex-direction:column; }
}

/* Footer controls fade blue; no automotive red LEDs in this section. */
footer .button-led-core,footer .button-led-halo { display:none; }
footer .footer-link,footer .legal-link {
  display:inline-block;
  color:inherit;
  text-decoration:none;
  border:0;
  border-radius:6px;
  background:transparent;
  padding:4px 0;
  transition:color .3s ease, text-shadow .3s ease, background-color .3s ease;
}
footer .footer-link:hover,footer .legal-link:hover,
footer .footer-link:focus-visible,footer .legal-link:focus-visible {
  color:var(--blue);
  background-color:rgba(105,215,255,.045);
  text-shadow:0 0 12px rgba(105,215,255,.5);
}
footer .footer-link:focus-visible,footer .legal-link:focus-visible { outline:1px solid var(--blue); outline-offset:4px; }
footer .footer-social-pending { cursor:default; }
@media(prefers-reduced-motion:reduce) {
  footer .footer-link,footer .legal-link { transition:none; }
}
