/* Footer trust links and the Markdown legal-document reader. */
.site-footer { position: relative; overflow: hidden; }
.site-footer::before { position: absolute; inset: 0; content: ""; background: linear-gradient(115deg, rgba(51, 137, 202, .18), transparent 38%); pointer-events: none; }
.footer-inner { position: relative; display: grid; grid-template-columns: minmax(240px, 1fr) auto minmax(260px, 1fr); gap: 26px; min-height: 120px; }
.footer-brand { justify-self: start; }
.footer-trust { display: flex; align-items: center; justify-content: center; gap: 8px; }
.footer-trust-label { margin-right: 5px; color: #7eb5dd; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.footer-legal-link { min-height: 34px; padding: 0 11px; border: 1px solid rgba(174, 214, 241, .25); background: rgba(255, 255, 255, .03); color: #d7eafa; font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease; }
.footer-legal-link:hover, .footer-legal-link:focus-visible { border-color: #78c5f4; background: rgba(85, 165, 218, .2); color: #fff; outline: 0; transform: translateY(-1px); }
.footer-inner > small { justify-self: end; text-align: right; }

.legal-modal-open { overflow: hidden; }
.legal-shell { position: fixed; z-index: 2147483003; inset: 0; display: grid; place-items: center; padding: 24px; }
.legal-shell[hidden] { display: none; }
.legal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(4, 19, 35, .78); backdrop-filter: blur(10px); }
.legal-dialog { position: relative; display: grid; grid-template-rows: auto 4px minmax(0, 1fr); width: min(100%, 1210px); height: min(880px, calc(100vh - 48px)); overflow: hidden; border: 1px solid rgba(185, 220, 241, .38); background: #f4f8fb; box-shadow: 0 34px 100px rgba(0, 0, 0, .46); animation: legal-dialog-in .38s cubic-bezier(.2, .8, .2, 1); }
@keyframes legal-dialog-in { from { opacity: 0; transform: translateY(20px) scale(.985); } to { opacity: 1; transform: none; } }
.legal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; min-height: 130px; padding: clamp(25px, 4vw, 42px) clamp(28px, 5vw, 62px); color: #eaf7ff; background: linear-gradient(118deg, #0b3159, #155c98 64%, #1c76b5); }
.legal-header-copy { max-width: 700px; }
.legal-eyebrow { margin: 0 0 9px; color: #8ed5ff; font-size: .68rem; font-weight: 800; letter-spacing: .17em; }
.legal-header h2 { margin: 0; color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.65rem); letter-spacing: -.035em; }
.legal-description { margin: 10px 0 0; color: #c4e3f7; line-height: 1.6; }
.legal-header-meta { display: flex; align-items: flex-start; gap: 15px; }
.legal-document-status { padding: 7px 10px; border: 1px solid rgba(193, 230, 249, .34); background: rgba(6, 37, 68, .19); color: #d9efff; font-size: .7rem; font-weight: 700; letter-spacing: .05em; white-space: nowrap; }
.legal-close { width: 36px; height: 36px; border: 1px solid rgba(218, 241, 255, .34); background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.55rem; line-height: 1; cursor: pointer; transition: background .2s ease; }
.legal-close:hover, .legal-close:focus-visible { background: rgba(255, 255, 255, .19); outline: 0; }
.legal-progress { position: relative; background: rgba(161, 204, 235, .27); }
.legal-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #55b9ef, #d0f1ff); transition: width .15s linear; }
.legal-layout { display: grid; grid-template-columns: minmax(250px, 290px) minmax(0, 1fr); min-width: 0; min-height: 0; }
.legal-toc-wrap { display: flex; flex-direction: column; min-height: 0; padding: 26px 19px 22px; border-right: 1px solid #d3e2ec; background: linear-gradient(180deg, #edf5fa, #f8fbfd); }
.legal-toc-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 9px 14px; border-bottom: 1px solid #d6e4ed; }
.legal-toc-label { color: #1a629a; font-size: .73rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.legal-progress-label { color: #6d88a0; font-size: .65rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.legal-toc { display: grid; gap: 3px; min-height: 0; margin-top: 14px; overflow: auto; overscroll-behavior: contain; }
.legal-toc button { display: grid; grid-template-columns: 28px 1fr; gap: 8px; width: 100%; padding: 10px 9px; border: 0; border-left: 2px solid transparent; background: transparent; color: #52718d; font: inherit; font-size: .77rem; line-height: 1.42; text-align: left; cursor: pointer; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.legal-toc button span { color: #80a4bd; font-size: .65rem; font-weight: 800; letter-spacing: .04em; }
.legal-toc button b { font-weight: 700; }
.legal-toc button:hover, .legal-toc button:focus-visible, .legal-toc button.is-active { border-left-color: #2184c4; background: #fff; color: #164b7b; outline: 0; }
.legal-toc button.is-active span { color: #2184c4; }
.legal-toc-note { margin: 16px 9px 0; color: #7893a8; font-size: .68rem; line-height: 1.6; }
.legal-reader { min-width: 0; overflow: auto; overscroll-behavior: contain; scroll-behavior: smooth; background: #fff; }
.legal-content { width: min(100%, 850px); box-sizing: border-box; margin: 0 auto; padding: clamp(34px, 5vw, 66px) clamp(25px, 6vw, 86px) 90px; color: #3f596f; font-size: .97rem; line-height: 1.9; }
.legal-content h1 { margin: 0 0 12px; color: #123f6d; font-size: clamp(1.85rem, 3vw, 2.55rem); line-height: 1.25; letter-spacing: -.04em; }
.legal-content h1 + p { margin-top: 0; padding-bottom: 28px; border-bottom: 1px solid #d9e7f0; color: #638299; font-size: .82rem; font-weight: 700; letter-spacing: .02em; }
.legal-content h2 { margin: 50px 0 15px; padding-top: 11px; color: #174f83; font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.4; scroll-margin-top: 24px; }
.legal-content h2::before { display: block; width: 37px; height: 3px; margin-bottom: 13px; content: ""; background: linear-gradient(90deg, #2b8dc9, #9ed9f8); }
.legal-content p { margin: 0 0 17px; }
.legal-content strong { color: #174f83; }
.legal-content ul { display: grid; gap: 9px; margin: 0 0 19px; padding: 17px 20px 17px 42px; border-left: 3px solid #67b9e7; background: #f2f8fc; }
.legal-content li { padding-left: 3px; }
.legal-loading { display: grid; min-height: 300px; place-content: center; justify-items: center; gap: 15px; color: #66829a; text-align: center; }
.legal-loading span { width: 34px; height: 34px; border: 3px solid #c5deee; border-top-color: #237fbd; border-radius: 50%; animation: legal-spinner .8s linear infinite; }
.legal-loading-error { color: #a45458; }
@keyframes legal-spinner { to { transform: rotate(1turn); } }

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr auto; }
  .footer-trust { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; padding-bottom: 22px; }
  .footer-inner > small { justify-self: end; }
  .legal-dialog { width: min(100%, 920px); }
  .legal-layout { grid-template-columns: 230px minmax(0, 1fr); }
  .legal-toc-wrap { padding-inline: 12px; }
}
@media (max-width: 680px) {
  .footer-inner { display: flex; align-items: flex-start; justify-content: center; gap: 16px; min-height: 0; padding: 29px 0; }
  .footer-trust { flex-wrap: wrap; padding: 4px 0; }
  .footer-trust-label { width: 100%; }
  .footer-inner > small { text-align: left; }
  .legal-shell { padding: 0; }
  .legal-dialog { width: 100%; height: 100vh; border: 0; }
  .legal-header { min-height: 0; padding: 26px 21px 22px; }
  .legal-header h2 { font-size: 1.7rem; }
  .legal-description { font-size: .83rem; }
  .legal-header-meta { gap: 9px; }
  .legal-document-status { display: none; }
  .legal-layout { grid-template-columns: 1fr; grid-template-rows: minmax(128px, auto) minmax(0, 1fr); }
  .legal-toc-wrap { min-width: 0; width: 100%; box-sizing: border-box; padding: 14px 13px 12px; border-right: 0; border-bottom: 1px solid #d3e2ec; }
  .legal-toc-heading { padding: 0 5px 9px; }
  .legal-toc { display: flex; min-width: 0; width: 100%; gap: 7px; margin-top: 10px; overflow-x: auto; overflow-y: hidden; }
  .legal-toc button { flex: 0 0 210px; min-height: 50px; padding: 8px; border-left: 0; border-bottom: 2px solid transparent; }
  .legal-toc button:hover, .legal-toc button:focus-visible, .legal-toc button.is-active { border-left-color: transparent; border-bottom-color: #2184c4; }
  .legal-toc-note { display: none; }
  .legal-reader { min-width: 0; width: 100%; }
  .legal-content { min-width: 0; width: 100%; padding: 32px 22px 68px; font-size: .92rem; line-height: 1.83; }
  .legal-content h2 { margin-top: 39px; font-size: 1.23rem; }
}
@media (max-width: 380px) {
  .footer-legal-link { width: 100%; }
  .legal-header { padding-inline: 17px; }
  .legal-content { padding-inline: 17px; }
}
