:root {
  --legal-canvas: #fbfcf9;
  --legal-surface: #ffffff;
  --legal-ink: #091c13;
  --legal-muted: #68716c;
  --legal-yellow: #f2c62f;
  --legal-line: rgba(9, 28, 19, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--legal-canvas);
  color: var(--legal-ink);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 10001;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--legal-ink);
  color: #fff;
  text-decoration: none;
  transform: translateY(-180%);
}

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

.legal-header {
  position: fixed;
  z-index: 10000;
  inset: 0 0 auto;
  height: 76px;
  border-bottom: 1px solid var(--legal-line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 12px rgba(9, 28, 19, 0.05);
  backdrop-filter: blur(16px);
}

.legal-header-inner,
.legal-main,
.legal-footer-inner {
  width: min(calc(100% - 48px), 1000px);
  margin-inline: auto;
}

.legal-header-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--legal-ink);
  text-decoration: none;
}

.legal-brand img {
  width: 21px;
  height: 38px;
  object-fit: contain;
}

.legal-brand span {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.home-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--legal-yellow);
  color: var(--legal-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(109, 81, 0, 0.15);
}

.home-link:hover,
.home-link:focus-visible { background: #ffd33f; }

.legal-main { padding: 124px 0 72px; }

.legal-document {
  padding: 54px 58px;
  border: 1px solid var(--legal-line);
  border-radius: 24px;
  background: var(--legal-surface);
  box-shadow: 0 20px 60px rgba(9, 28, 19, 0.06);
  overflow-wrap: anywhere;
}

.legal-document [id] { scroll-margin-top: 100px; }
.legal-document bdt:empty { display: none; }
.legal-document a:focus-visible { outline: 3px solid rgba(242, 198, 47, 0.7); outline-offset: 2px; }

.legal-footer {
  border-top: 1px solid var(--legal-line);
  background: #fbfbf4;
}

.legal-footer-inner {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--legal-muted);
  font-size: 13px;
}

.legal-footer p { margin: 0; }

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

.legal-footer a { text-decoration: none; }
.legal-footer a:hover,
.legal-footer a:focus-visible { color: var(--legal-ink); text-decoration: underline; }

@media (max-width: 640px) {
  html { scroll-padding-top: 76px; }

  .legal-header { height: 60px; }

  .legal-header-inner,
  .legal-main,
  .legal-footer-inner { width: min(calc(100% - 30px), 1000px); }

  .legal-brand { gap: 5px; }
  .legal-brand img { width: 15px; height: 30px; }
  .legal-brand span { font-size: 27px; }
  .home-link { min-height: 38px; padding-inline: 17px; font-size: 13px; }

  .legal-main { padding: 83px 0 42px; }

  .legal-document {
    padding: 28px 20px;
    border-radius: 18px;
  }

  .legal-document [id] { scroll-margin-top: 76px; }

  .legal-footer-inner {
    min-height: 150px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
}
