:root {
  color-scheme: light;
  --navy-950: #080d18;
  --navy-900: #0b1426;
  --navy-800: #14213d;
  --navy-700: #263c65;
  --cream: #fbf8f0;
  --paper: #fffefa;
  --gold: #d3b467;
  --gold-dark: #8b6c2f;
  --text: #1d2942;
  --muted: #5b6475;
  --line: #dfd5bd;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--cream);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--navy-700);
  font-weight: 700;
  text-decoration-color: rgb(139 108 47 / 55%);
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--gold-dark);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: #ffffff;
  color: var(--navy-950);
}

.skip-link:focus {
  transform: translateY(0);
}

.legal-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% -30%, rgb(211 180 103 / 18%), transparent 38rem),
    linear-gradient(155deg, var(--navy-800) 0%, var(--navy-900) 58%, var(--navy-950) 100%);
  color: var(--cream);
}

.legal-hero__inner {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
  padding: 22px 0 48px;
}

.legal-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.legal-brand {
  display: block;
  width: min(180px, 54vw);
  border-radius: 7px;
}

.legal-brand img {
  width: 100%;
  height: auto;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  color: #f7f3e9;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}

.back-link:hover {
  color: var(--gold);
}

.back-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.legal-hero h1 {
  max-width: 780px;
  margin: 38px 0 0;
  color: #ffffff;
  font-size: clamp(2.15rem, 11vw, 3.2rem);
  font-weight: 880;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.legal-hero__summary {
  max-width: 700px;
  margin: 16px 0 0;
  color: #d9dfeb;
  font-size: clamp(0.98rem, 4.2vw, 1.08rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.legal-hero__date {
  margin: 18px 0 0;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.legal-shell {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
  padding: 30px 0 72px;
}

.mobile-toc {
  margin: 0 0 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.mobile-toc summary {
  min-height: 50px;
  padding: 13px 16px;
  color: var(--navy-800);
  font-weight: 850;
  cursor: pointer;
}

.mobile-toc nav {
  padding: 0 16px 16px;
}

.toc-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list a {
  display: block;
  padding: 7px 0;
  color: #43506a;
  font-size: 0.88rem;
  line-height: 1.35;
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}

.desktop-toc {
  display: none;
}

.legal-document {
  width: 100%;
  min-width: 0;
}

.legal-intro {
  padding: 20px;
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: #f3ead5;
}

.legal-intro p {
  margin: 0;
  color: #35415a;
  font-size: 0.97rem;
}

.legal-section {
  padding-top: 34px;
  scroll-margin-top: 22px;
}

.legal-section + .legal-section {
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0;
  color: var(--navy-800);
  font-size: clamp(1.45rem, 6.2vw, 1.9rem);
  font-weight: 880;
  line-height: 1.15;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.legal-section h3 {
  margin: 26px 0 0;
  color: var(--navy-800);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.3;
}

.legal-section p,
.legal-section ul,
.legal-section ol,
.legal-section dl {
  margin-top: 14px;
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  padding-left: 1.35rem;
}

.legal-section li + li {
  margin-top: 9px;
}

.legal-section strong {
  color: var(--navy-800);
}

.identity-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px 12px;
}

.identity-list dt {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.identity-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.legal-note {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgb(211 180 103 / 58%);
  border-radius: 14px;
  background: var(--paper);
}

.legal-note p:first-child,
.legal-note h3:first-child {
  margin-top: 0;
}

.legal-basis-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.legal-basis-item {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.legal-basis-item h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.legal-basis-item p {
  margin: 9px 0 0;
  color: #475467;
  font-size: 0.9rem;
  line-height: 1.5;
}

.privacy-choice {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgb(211 180 103 / 58%);
  border-radius: 16px;
  background: var(--paper);
}

.privacy-choice h3 {
  margin: 0;
}

.privacy-choice p {
  margin-top: 10px;
}

.privacy-choice__status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--navy-800);
  font-size: 0.92rem;
  font-weight: 800;
}

.privacy-choice__status::before {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--gold-dark);
  box-shadow: 0 0 0 1px var(--gold-dark);
  content: "";
}

.privacy-choice[data-state="off"] .privacy-choice__status::before {
  background: #2f7d4a;
  box-shadow: 0 0 0 1px #2f7d4a;
}

.privacy-choice[data-state="error"] .privacy-choice__status::before {
  background: #a43c32;
  box-shadow: 0 0 0 1px #a43c32;
}

.privacy-choice__button {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  padding: 11px 16px;
  border: 1px solid var(--navy-800);
  border-radius: 10px;
  background: var(--navy-800);
  color: #ffffff;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 820;
  line-height: 1.25;
  cursor: pointer;
}

.privacy-choice__button:hover:not(:disabled) {
  border-color: var(--navy-700);
  background: var(--navy-700);
}

.privacy-choice__button:disabled {
  cursor: default;
  opacity: 0.62;
}

.privacy-choice[data-state="checking"] .privacy-choice__button:disabled {
  cursor: wait;
}

.privacy-choice__scope {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.contact-card {
  margin-top: 34px;
  padding: 24px 20px;
  border: 1px solid rgb(211 180 103 / 55%);
  border-radius: 18px;
  background: var(--navy-800);
  color: #eef1f6;
}

.contact-card h2 {
  color: #ffffff;
}

.contact-card p {
  margin: 10px 0 0;
}

.contact-card a {
  color: #efd98f;
  overflow-wrap: anywhere;
}

.official-sources {
  font-size: 0.88rem;
  color: var(--muted);
}

.official-sources a {
  font-weight: 700;
}

.legal-footer {
  background: var(--navy-950);
  color: #c9cfda;
}

.legal-footer__inner {
  display: grid;
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
  padding: 30px 0 max(30px, env(safe-area-inset-bottom));
  gap: 16px;
}

.legal-footer p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.legal-footer a {
  color: #e8dbb0;
  font-size: 0.82rem;
}

@media (min-width: 42rem) {
  .legal-hero__inner,
  .legal-shell,
  .legal-footer__inner {
    width: min(100% - 64px, 1120px);
  }

  .legal-hero__inner {
    padding-top: 30px;
    padding-bottom: 64px;
  }

  .legal-brand {
    width: 220px;
  }

  .legal-hero h1 {
    margin-top: 54px;
  }

  .legal-shell {
    padding-top: 46px;
  }

  .identity-list {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 9px 20px;
  }

  .identity-list dt {
    margin-top: 0;
  }

  .legal-intro,
  .legal-note,
  .privacy-choice,
  .contact-card {
    padding: 24px 26px;
  }

  .legal-basis-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-footer__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (min-width: 64rem) {
  .legal-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 760px);
    justify-content: space-between;
    gap: 72px;
    padding-top: 58px;
    padding-bottom: 96px;
  }

  .mobile-toc {
    display: none;
  }

  .desktop-toc {
    position: sticky;
    top: 24px;
    display: block;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 4px 16px 4px 0;
  }

  .desktop-toc h2 {
    margin: 0 0 12px;
    color: var(--navy-800);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .legal-section {
    padding-top: 38px;
  }
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (forced-colors: active) {
  .legal-intro,
  .legal-note,
  .privacy-choice,
  .contact-card,
  .mobile-toc,
  .legal-basis-item {
    border: 1px solid CanvasText;
  }
}

@media print {
  .skip-link,
  .back-link,
  .mobile-toc,
  .desktop-toc,
  .legal-footer {
    display: none !important;
  }

  .legal-hero {
    background: #ffffff;
    color: #000000;
  }

  .legal-hero__inner,
  .legal-shell {
    width: 100%;
    padding: 0;
  }

  .legal-brand {
    filter: invert(1);
  }

  .legal-hero h1,
  .legal-hero__summary,
  .legal-hero__date {
    color: #000000;
  }

  .legal-shell {
    display: block;
  }

  .legal-section {
    break-inside: avoid;
  }
}
