:root {
  color-scheme: light;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: #111318;
  background: #f7f6f2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f7f6f2;
  line-height: 1.65;
}

a { color: #a40b1d; }
a:hover { color: #c8102e; }

.legal-header,
.legal-footer {
  background: #111318;
  color: #f7f6f2;
  padding: 1rem max(1.25rem, calc((100% - 900px) / 2));
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 4px solid #f20d28;
}

.legal-header a,
.legal-footer a { color: #f7f6f2; }

.legal-brand { font-weight: 800; text-decoration: none; }

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  font-size: .9rem;
}

.legal-main {
  width: min(100% - 2rem, 900px);
  margin: 3rem auto;
  padding: clamp(1.25rem, 4vw, 3rem);
  background: #fff;
  border: 1px solid #e9e9e5;
  border-radius: 1.5rem;
  box-shadow: 0 16px 50px rgba(17, 19, 24, .06);
}

.legal-main h1 { line-height: 1.15; font-size: clamp(2rem, 5vw, 3rem); }
.legal-main h2 { margin-top: 2rem; font-size: 1.3rem; }
.legal-main h3 { margin-top: 1.4rem; font-size: 1.05rem; }
.legal-main li { margin: .4rem 0; }
.legal-updated { color: #62646b; font-size: .92rem; }
.legal-callout { padding: 1rem 1.2rem; background: #edfae9; border-left: 4px solid #187a08; border-radius: .75rem; }

.legal-footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  font-size: .85rem;
}

.cookie-consent {
  position: fixed;
  z-index: 1000;
  inset: auto 1rem 1rem;
  width: min(100% - 2rem, 760px);
  margin-inline: auto;
  padding: 1.25rem;
  background: #fff;
  color: #111318;
  border: 1px solid #d8d8d3;
  border-top: 4px solid #f20d28;
  border-radius: 1rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .22);
}

.cookie-consent[hidden] { display: none; }
.cookie-consent h2 { margin: 0 0 .35rem; font-size: 1.1rem; }
.cookie-consent p { margin: .35rem 0 .8rem; font-size: .9rem; }
.cookie-consent a { color: #a40b1d; }
.cookie-consent-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.cookie-consent button {
  min-height: 44px;
  padding: .65rem 1rem;
  border: 1px solid #111318;
  border-radius: .7rem;
  background: #fff;
  color: #111318;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.cookie-consent button[data-cookie-action="allow"] {
  background: #111318;
  color: #fff;
}
.cookie-consent button:focus-visible,
.legal-main a:focus-visible,
.legal-header a:focus-visible,
.legal-footer a:focus-visible {
  outline: 3px solid #187a08;
  outline-offset: 3px;
}
#cookieConsentError { color: #8c1020; }

@media (max-width: 640px) {
  .legal-header { align-items: flex-start; flex-direction: column; }
  .legal-main { margin: 1.25rem auto; }
  .cookie-consent-actions { flex-direction: column-reverse; }
  .cookie-consent button { width: 100%; }
}
