:root {
  --legal-emerald: #0b6048;
  --legal-emerald-dark: #073e31;
  --legal-forest: #062b22;
  --legal-cream: #f7f3ea;
  --legal-paper: #fffefb;
  --legal-sage: #e7efe9;
  --legal-text: #25332d;
  --legal-muted: #5c6962;
  --legal-line: #ded8ca;
  --legal-gold: #bd8b32;
  --legal-shadow: 0 18px 55px rgba(24, 50, 41, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  overflow-wrap: anywhere;
  background: var(--legal-cream);
  color: var(--legal-text);
  line-height: 1.72;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--legal-paper);
  color: var(--legal-forest);
  font-weight: 800;
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(222, 216, 202, 0.74);
  background: rgba(247, 243, 234, 0.9);
  backdrop-filter: blur(18px);
}

.nav,
.legal-hero-inner,
.footer-row {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  min-height: 72px;
  padding: 0;
}

.brand {
  gap: 11px;
  color: var(--legal-forest);
  font-weight: 850;
  letter-spacing: -0.02em;
}

.brand img {
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(11, 96, 72, 0.2);
}

.nav-links {
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  font-size: 0.9rem;
  font-weight: 750;
}

.nav-links a {
  position: relative;
  color: var(--legal-muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--legal-emerald);
}

.nav-links a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--legal-emerald);
  content: "";
}

.nav-links a[href="index.html#download"] {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--legal-emerald);
  color: #fff;
  box-shadow: 0 10px 24px rgba(11, 96, 72, 0.18);
}

main {
  width: 100%;
  padding: 0;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(68px, 9vw, 112px) 0 clamp(62px, 8vw, 94px);
  border-bottom: 1px solid rgba(222, 216, 202, 0.78);
  background:
    radial-gradient(circle at 88% 18%, rgba(189, 139, 50, 0.17), transparent 25%),
    radial-gradient(circle at 8% 88%, rgba(201, 120, 139, 0.1), transparent 27%),
    linear-gradient(125deg, rgba(11, 96, 72, 0.13), transparent 50%),
    var(--legal-cream);
}

.legal-hero::after {
  position: absolute;
  top: -180px;
  right: -120px;
  width: 420px;
  aspect-ratio: 1;
  border: 1px solid rgba(11, 96, 72, 0.12);
  border-radius: 50%;
  content: "";
}

.legal-hero-inner {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin-bottom: 15px;
  color: var(--legal-emerald);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.15em;
}

h1 {
  max-width: 900px;
  margin-bottom: 22px;
  color: var(--legal-forest);
  font-size: clamp(3.15rem, 7.3vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.updated {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid rgba(11, 96, 72, 0.14);
  border-radius: 999px;
  background: rgba(255, 254, 251, 0.74);
  color: var(--legal-muted);
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(24, 50, 41, 0.06);
}

.updated::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--legal-gold);
  content: "";
}

.policy-card,
.legal-content {
  width: min(850px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(62px, 8vw, 96px) 0 clamp(82px, 10vw, 124px);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.legal-content > p:first-child {
  color: var(--legal-forest);
  font-size: clamp(1.2rem, 2vw, 1.42rem);
  font-weight: 760;
}

.legal-content p,
.legal-content li {
  color: var(--legal-muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.legal-content p {
  margin: 0 0 16px;
}

.legal-content h2 {
  margin: clamp(50px, 7vw, 70px) 0 18px;
  padding-top: 26px;
  border-top: 1px solid var(--legal-line);
  color: var(--legal-forest);
  font-size: clamp(1.42rem, 2.5vw, 1.8rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.legal-content ul {
  margin: 22px 0 26px;
  padding: 22px 26px 22px 48px;
  border: 1px solid rgba(11, 96, 72, 0.12);
  border-radius: 20px;
  background: rgba(255, 254, 251, 0.74);
  box-shadow: 0 14px 38px rgba(24, 50, 41, 0.055);
}

.legal-content li + li {
  margin-top: 7px;
}

.legal-content a {
  color: var(--legal-emerald);
  text-underline-offset: 4px;
}

.contact-box {
  margin-top: 22px;
  padding: 24px 26px;
  border: 1px solid rgba(189, 139, 50, 0.24);
  border-left: 4px solid var(--legal-gold);
  border-radius: 18px;
  background: #fff7e5;
  box-shadow: 0 14px 36px rgba(94, 80, 53, 0.06);
}

.contact-box p:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 40px 0;
  background: #041d17;
}

.footer-row {
  gap: 28px;
  color: #d2e0da;
  font-size: 0.9rem;
}

.footer-brand {
  color: #fff;
  font-weight: 850;
}

.footer-links {
  gap: 12px 21px;
}

.footer-links a {
  color: #d2e0da;
  font-weight: 650;
  text-underline-offset: 4px;
}

.footer-contact {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.footer-contact-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: #d2e0da;
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.footer-contact-toggle:hover {
  color: #fff;
}

.footer-contact-toggle:focus-visible,
.contact-action:focus-visible {
  outline: 3px solid var(--legal-gold);
  outline-offset: 4px;
  border-radius: 8px;
}

.contact-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  z-index: 5;
  width: 270px;
  padding: 17px;
  border: 1px solid rgba(6, 43, 34, 0.12);
  border-radius: 18px;
  background: var(--legal-paper);
  color: var(--legal-forest);
  box-shadow: var(--legal-shadow-deep);
}

.contact-popover[hidden] {
  display: none;
}

.contact-popover::after {
  position: absolute;
  right: 20px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border-right: 1px solid rgba(6, 43, 34, 0.12);
  border-bottom: 1px solid rgba(6, 43, 34, 0.12);
  background: var(--legal-paper);
  content: "";
  transform: rotate(45deg);
}

.contact-email {
  display: block;
  margin-bottom: 12px;
  color: var(--legal-muted);
  font-size: 0.88rem;
  overflow-wrap: normal;
}

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

.contact-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid rgba(6, 43, 34, 0.16);
  border-radius: 10px;
  background: #fff;
  color: var(--legal-forest);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.contact-action.primary {
  border-color: var(--legal-emerald);
  background: var(--legal-emerald);
  color: #fff;
}

@media (max-width: 680px) {
  .nav {
    min-height: auto;
    flex-flow: row wrap;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--legal-line);
    font-size: 0.82rem;
  }

  .nav-links a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
  }

  .nav-links a[aria-current="page"]::after {
    bottom: 0;
  }

  .nav-links a[href="index.html#download"] {
    min-height: 38px;
    padding: 0 13px;
  }

  .footer-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-contact[data-open] {
    flex: 1 1 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-popover {
    position: static;
    width: min(100%, 290px);
    margin-top: 12px;
  }

  .contact-popover::after {
    display: none;
  }
}

@media (max-width: 360px) {
  .nav,
  .legal-hero-inner,
  .footer-row,
  .policy-card,
  .legal-content {
    width: calc(100% - 24px);
  }

  h1 {
    font-size: clamp(2.7rem, 15vw, 3.4rem);
  }

  .legal-content p,
  .legal-content li {
    font-size: 0.98rem;
  }

  .legal-content ul {
    padding: 19px 18px 19px 38px;
    border-radius: 16px;
  }
}

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