:root {
  --legal-ink: #20342e;
  --legal-ink-deep: #103d32;
  --legal-green: #0f4a3b;
  --legal-green-soft: #eaf1ed;
  --legal-muted: #6e746f;
  --legal-paper: #fbf8f2;
  --legal-card: rgba(255, 255, 255, 0.92);
  --legal-gold: #bd7c1d;
  --legal-gold-light: #e9c98e;
  --legal-line: #e7dac7;
  --legal-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --legal-body: "Manrope", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: #f3eee6;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--legal-ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(189, 124, 29, 0.1), transparent 28rem),
    radial-gradient(circle at 94% 12%, rgba(15, 74, 59, 0.09), transparent 34rem),
    linear-gradient(180deg, #fbf9f5 0%, #f4eee5 100%);
  font-family: var(--legal-body);
  font-size: 16px;
  font-synthesis: none;
  line-height: 1.75;
}

.development-data-warning {
  position: relative;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #bd7b16;
  color: #5b3b0c;
  background: #fff0c7;
  font: 600 0.9rem/1.4 Arial, sans-serif;
  text-align: center;
}

a {
  color: var(--legal-green);
  text-decoration-color: rgba(15, 74, 59, 0.32);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(189, 124, 29, 0.35);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--legal-green);
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.legal-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgba(159, 120, 67, 0.16);
  background: rgba(251, 249, 245, 0.88);
  box-shadow: 0 10px 40px rgba(38, 53, 47, 0.04);
  backdrop-filter: blur(18px);
}

.legal-header__inner,
.legal-main,
.legal-footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.legal-header__inner {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.legal-brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 13px;
  color: var(--legal-ink-deep);
  text-decoration: none;
}

.legal-brand__mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid var(--legal-gold-light);
  border-radius: 50%;
  color: var(--legal-gold);
  font-family: var(--legal-heading);
  font-size: 1.25rem;
}

.legal-brand__copy {
  display: grid;
  line-height: 1.05;
}

.legal-brand__copy strong {
  font-family: var(--legal-heading);
  font-size: 1.24rem;
  font-weight: 600;
}

.legal-brand__copy small {
  margin-top: 5px;
  color: var(--legal-muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-nav a {
  padding: 10px 13px;
  border-radius: 8px;
  color: #46534e;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  color: var(--legal-green);
  background: var(--legal-green-soft);
}

.legal-nav .legal-nav__home {
  margin-left: 6px;
  padding-inline: 17px;
  color: #fff;
  background: var(--legal-green);
}

.legal-nav .legal-nav__home:hover {
  color: #fff;
  background: #0b3d31;
}

.legal-main {
  padding: 34px 0 70px;
}

.legal-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(46px, 6vw, 72px) clamp(28px, 7vw, 92px);
  border: 1px solid rgba(189, 124, 29, 0.24);
  border-radius: 24px;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(9, 52, 42, 0.98), rgba(17, 78, 62, 0.94)),
    var(--legal-green);
  box-shadow: 0 28px 70px rgba(15, 63, 51, 0.18);
}

.legal-hero::before,
.legal-hero::after {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(233, 201, 142, 0.16);
  border-radius: 50%;
  content: "";
}

.legal-hero::before {
  width: 310px;
  height: 310px;
  top: -190px;
  right: 6%;
}

.legal-hero::after {
  width: 190px;
  height: 190px;
  right: -76px;
  bottom: -108px;
}

.legal-hero__glow {
  position: absolute;
  z-index: -1;
  width: 30rem;
  height: 30rem;
  top: -15rem;
  right: -4rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231, 190, 114, 0.19), transparent 66%);
}

.eyebrow {
  margin: 0 0 16px;
  color: #e9c98e;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 25ch;
  margin: 0;
  color: #fff;
  font-family: var(--legal-heading);
  font-size: clamp(2.65rem, 4.7vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.02;
  text-wrap: balance;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.86rem;
}

.legal-meta__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.legal-meta__status span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(233, 201, 142, 0.55);
  border-radius: 50%;
  color: #e9c98e;
  font-size: 0.72rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  margin-top: 28px;
}

.legal-toc {
  position: sticky;
  top: 112px;
  padding: 25px 22px;
  border: 1px solid var(--legal-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 46px rgba(64, 47, 28, 0.05);
  backdrop-filter: blur(12px);
}

.legal-toc > p {
  margin: 0 0 14px;
  color: var(--legal-gold);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal-toc nav {
  display: grid;
  gap: 2px;
}

.legal-toc nav a {
  position: relative;
  padding: 7px 0 7px 15px;
  color: #57635e;
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.legal-toc nav a::before {
  position: absolute;
  width: 5px;
  height: 5px;
  top: 14px;
  left: 0;
  border-radius: 50%;
  background: var(--legal-gold-light);
  content: "";
}

.legal-toc nav a:hover {
  color: var(--legal-green);
}

.legal-toc__back {
  display: inline-block;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--legal-line);
  color: var(--legal-green);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-document {
  min-width: 0;
  padding: clamp(34px, 6vw, 70px);
  border: 1px solid rgba(159, 120, 67, 0.2);
  border-radius: 20px;
  background: var(--legal-card);
  box-shadow: 0 24px 70px rgba(64, 47, 28, 0.08);
}

.legal-document h2 {
  position: relative;
  margin: 2.2em 0 0.72em;
  padding: 0 0 15px;
  border-bottom: 1px solid var(--legal-line);
  color: var(--legal-green);
  font-family: var(--legal-heading);
  font-size: clamp(1.75rem, 3.1vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.12;
  text-wrap: balance;
}

.legal-document h2:first-child {
  margin-top: 0;
}

.legal-document h2::after {
  position: absolute;
  width: 44px;
  height: 2px;
  bottom: -1px;
  left: 0;
  background: var(--legal-gold);
  content: "";
}

.legal-document p {
  margin: 0 0 1.15em;
  color: #46544f;
  font-size: 0.96rem;
  line-height: 1.84;
}

.legal-document strong {
  color: #203d34;
  font-weight: 700;
}

.legal-document code {
  padding: 0.16em 0.42em;
  border: 1px solid #e3d8c7;
  border-radius: 5px;
  color: #305046;
  background: #f7f2e9;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.legal-document ul,
.legal-document ol {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.45rem;
  padding-left: 1.25rem;
  color: #46544f;
}

.legal-document li {
  padding-left: 0.28rem;
  font-size: 0.94rem;
  line-height: 1.68;
}

.legal-document li::marker {
  color: var(--legal-gold);
  font-weight: 800;
}

.legal-document blockquote {
  margin: 1.5rem 0;
  padding: 18px 22px;
  border-left: 3px solid var(--legal-gold);
  border-radius: 0 10px 10px 0;
  background: #fbf4e8;
}

.legal-document blockquote > :last-child {
  margin-bottom: 0;
}

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 0 46px;
  border-top: 1px solid rgba(159, 120, 67, 0.18);
  color: var(--legal-muted);
  font-size: 0.82rem;
}

.legal-footer > div:first-child {
  display: grid;
  gap: 2px;
}

.legal-footer strong {
  color: var(--legal-green);
  font-family: var(--legal-heading);
  font-size: 1.12rem;
  font-weight: 600;
}

.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
}

.legal-footer__links a {
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }

  .legal-toc nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
  }

  .legal-toc__back {
    display: none;
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 86px;
  }

  .legal-header__inner,
  .legal-main,
  .legal-footer {
    width: min(100% - 24px, 1180px);
  }

  .legal-header__inner {
    min-height: 72px;
    gap: 12px;
  }

  .legal-brand__mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 1.08rem;
  }

  .legal-brand__copy {
    display: none;
  }

  .legal-nav {
    gap: 2px;
  }

  .legal-nav a {
    padding: 8px 9px;
    font-size: 0.76rem;
  }

  .legal-nav .legal-nav__home {
    margin-left: 2px;
    padding-inline: 11px;
  }

  .legal-main {
    padding: 16px 0 46px;
  }

  .legal-hero {
    padding: 40px 24px;
    border-radius: 18px;
  }

  .legal-hero h1 {
    max-width: 100%;
    font-size: clamp(2.3rem, 12vw, 3.25rem);
  }

  .legal-meta {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 24px;
  }

  .legal-layout {
    gap: 14px;
    margin-top: 14px;
  }

  .legal-toc {
    padding: 21px 18px;
    border-radius: 14px;
  }

  .legal-toc nav {
    grid-template-columns: 1fr;
  }

  .legal-document {
    padding: 30px 22px;
    border-radius: 14px;
  }

  .legal-document h2 {
    overflow-wrap: break-word;
  }

  .legal-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 32px;
  }
}

@media print {
  body {
    color: #000;
    background: #fff;
  }

  .skip-link,
  .legal-header,
  .legal-toc,
  .legal-footer,
  .legal-hero__glow {
    display: none;
  }

  .legal-main {
    width: 100%;
    padding: 0;
  }

  .legal-hero {
    padding: 0 0 26px;
    border: 0;
    color: #000;
    background: #fff;
    box-shadow: none;
  }

  .legal-hero h1,
  .eyebrow,
  .legal-meta,
  .legal-meta__status {
    color: #000;
  }

  .legal-layout {
    display: block;
    margin: 0;
  }

  .legal-document {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .legal-document h2 {
    break-after: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
