.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 22px;
  margin-top: 30px;
}

.footer-legal a,
.footer-legal button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-cobalt-muted);
  font: inherit;
  font-size: .9rem;
  text-decoration: none;
}

.footer-legal button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.footer-legal button:hover,
.footer-legal button:focus-visible {
  color: var(--white);
}

.footer-legal button:focus-visible {
  outline-color: var(--amber);
}

.footer-legal .footer-contact { margin-inline-start: auto; }

.cookie-notice {
  position: fixed;
  z-index: 15;
  inset-inline: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  max-width: 780px;
  padding: 10px 12px 10px 16px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 3px 8px #20243a12, 0 12px 30px #20243a12;
}

.cookie-notice p {
  flex: 1 1 290px;
  margin: 0;
  color: var(--ink);
  font-size: .9rem;
  text-wrap: pretty;
}

.cookie-notice p a { white-space: nowrap; }

.cookie-actions { display: flex; gap: 8px; }

.cookie-actions button {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: 500 .9rem/1.2 var(--body);
  cursor: pointer;
}

.cookie-actions button:hover { background: var(--lavender); }

.cookie-actions [data-cookie-choice="history"] {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: var(--white);
}

.cookie-actions [data-cookie-choice="history"]:hover { background: var(--cobalt-hover); }

[data-cookie-settings][hidden], .cookie-notice[hidden] { display: none; }
body:has(.cookie-notice:not([hidden])) .site-footer { padding-bottom: calc(142px + env(safe-area-inset-bottom, 0px)); }

.legal-page { max-width: 730px; margin: 42px auto 0; }
.legal-page header { margin-bottom: 36px; }
.legal-page h1 { font-size: clamp(1.85rem, 4.5vw, 3rem); line-height: 1.13; text-wrap: balance; }
.legal-page h2 { margin: 0 0 12px; font-size: 1.4rem; line-height: 1.3; }
.legal-page p { margin: 0 0 13px; line-height: 1.65; }
.legal-page section { margin: 0 0 30px; }
.legal-page .legal-date { color: var(--muted); font-size: .9rem; }

@media (max-width: 599px) {
  .footer-legal { gap: 0 18px; margin-top: 22px; }
  .footer-legal .footer-contact { margin-inline-start: 0; }
  .cookie-notice { inset-inline: 12px; padding: 10px 12px; }
  .cookie-actions { width: 100%; }
  .cookie-actions button { flex: 1; }
  .legal-page { margin-top: 28px; }
}

@media print { .cookie-notice { display: none !important; } }
