/* Legal links, dialog and the same documents' no-JavaScript fallback page. */
.site-footer .footer-bottom { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: 20px; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.site-footer .footer-legal a { font-size: 11px; line-height: 1.7; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #aaa; }
.footer-legal a:hover { color: var(--red,#ef443b); }
html.legal-open { overflow: hidden; }
.legal-modal { width: min(820px,calc(100% - 32px)); max-width: none; max-height: min(850px,calc(100dvh - 48px)); margin: auto; padding: 0; border: 0; border-radius: 26px; color: #292929; background: #fafafa; box-shadow: 0 30px 100px #0004, inset 0 -6px #e7e7e7; overflow: hidden; }
.legal-modal[open] { display: flex; flex-direction: column; }
.legal-modal::backdrop { background: #2229; backdrop-filter: blur(6px); }
.legal-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; flex: 0 0 auto; padding: 26px 28px 22px; border-bottom: 1px solid #e4e4e4; }
.legal-modal-header h2 { margin: 0; font-size: 26px; line-height: 1.3; letter-spacing: -.035em; }
.legal-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 -3px #e5e5e5,0 4px 10px #00000005; color: #555; }
.legal-close:hover { color: #ef443b; }
.legal-close svg { width: 20px; height: 20px; }
.legal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 22px 28px 34px; }
.legal-body:focus-visible { outline: 2px solid #ef443b; outline-offset: -4px; }
.legal-body, .legal-document { font-size: 14px; line-height: 1.8; color: #626262; }
.legal-body p, .legal-document p { margin: 0 0 14px; }
.legal-body h3, .legal-document h3 { margin: 28px 0 12px; color: #303030; font-size: 18px; line-height: 1.5; letter-spacing: -.02em; }
.legal-body ul, .legal-document ul { padding-left: 22px; margin: 0 0 18px; }
.legal-body li, .legal-document li { margin: 9px 0; }
.legal-body a, .legal-document a { text-decoration: underline; text-underline-offset: 3px; }
.legal-body .legal-version, .legal-document .legal-version { font-size: 11px; color: #858585; }
.legal-template-note { margin: 18px 0 24px; padding: 15px 18px; border-radius: 14px; background: #f0efed; box-shadow: inset 0 -3px #e4e3e1; font-size: 12px; color: #67635f; }
.legal-template-note strong { color: #3f3b37; }
.legal-placeholder { color: #705e55; background: #eee7e2; border-radius: 4px; padding: 1px 3px; overflow-wrap: anywhere; }
.legal-page { background: #f1f0ee; }
.legal-page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; max-width: 1000px; margin: 0 auto; padding: 30px 26px; font-size: 13px; }
.legal-page-header img { width: 194px; height: auto; }
.legal-page-main { max-width: 900px; margin: 30px auto 70px; padding: 0 26px; }
.legal-page-main h1 { font-size: clamp(30px,5vw,46px); letter-spacing: -.04em; }
.legal-page-nav { display: flex; gap: 10px 24px; flex-wrap: wrap; margin: 28px 0 38px; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.legal-document { padding: 30px; border-radius: 26px; background: #fff; box-shadow: inset 0 -6px #e5e5e5; margin-top: 28px; scroll-margin-top: 24px; }
.legal-document h2 { margin-bottom: 18px; color: #292929; font-size: 28px; line-height: 1.35; }
@media (max-width: 800px) {
  .site-footer .footer-bottom { grid-template-columns: 1fr auto; gap: 16px; }
  .footer-legal { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .footer-legal { display: grid; gap: 0; }
  .site-footer .footer-legal a { display: flex; align-items: center; min-height: 40px; font-size: 12px; }
  .legal-modal { width: calc(100% - 20px); max-height: calc(100dvh - 24px); border-radius: 20px; }
  .legal-modal-header { padding: 20px 18px 16px; gap: 10px; }
  .legal-modal-header h2 { font-size: 20px; }
  .legal-body { padding: 18px 20px 28px; font-size: 13px; }
  .legal-body h3 { font-size: 17px; }
  .legal-template-note { padding: 13px 14px; }
  .legal-page-header { padding: 24px 20px; align-items: flex-start; flex-direction: column; gap: 16px; }
  .legal-page-main { padding: 0 16px; }
  .legal-document { padding: 24px 20px; font-size: 13px; }
  .legal-document h2 { font-size: 23px; }
}
