:root {
  --ink: #18221f;
  --ink-soft: #55615d;
  --paper: #f7f7f2;
  --surface: #ffffff;
  --line: #dfe5de;
  --green: #1e6b4e;
  --green-pale: #e9f6e7;
  --night: #102720;
  --lime: #c9f27f;
  --max: 1120px;
}

* { box-sizing: border-box; }

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

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible { outline: 3px solid rgba(30, 107, 78, .34); outline-offset: 4px; }

.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.legal-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid rgba(30, 107, 78, .08);
  background: rgba(251, 251, 247, .88);
  backdrop-filter: blur(16px);
}

.legal-nav { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 24px; }
.legal-logo { width: 168px; clip-path: polygon(0 0, 100% 0, 100% 58%, 34% 58%, 34% 100%, 0 100%); }
.legal-nav-links { display: flex; align-items: center; gap: 22px; color: #52605b; font-size: 14px; font-weight: 680; }
.legal-nav-links a { text-decoration: none; }
.legal-nav-links a:hover { color: var(--green); }

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(74px, 10vw, 124px) 0 clamp(76px, 9vw, 112px);
  background:
    radial-gradient(circle at 79% 18%, rgba(201, 242, 127, .28), transparent 28%),
    radial-gradient(circle at 7% 82%, rgba(213, 228, 207, .54), transparent 26%),
    linear-gradient(180deg, #fbfbf7, #f3f6ee);
}

.legal-hero::after {
  position: absolute;
  right: -240px;
  bottom: -410px;
  width: 720px;
  height: 720px;
  border: 1px solid rgba(30, 107, 78, .1);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 90px rgba(30, 107, 78, .018), 0 0 0 180px rgba(30, 107, 78, .012);
}

.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--green);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.legal-eyebrow::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.legal-hero h1 { max-width: 760px; margin: 0 0 22px; font-size: clamp(48px, 7vw, 78px); letter-spacing: -.055em; line-height: .98; }
.legal-hero p { max-width: 690px; margin: 0; color: var(--ink-soft); font-size: clamp(17px, 2vw, 21px); }
.legal-meta { display: inline-flex; margin-top: 27px; padding: 8px 12px; border: 1px solid rgba(30, 107, 78, .14); border-radius: 999px; color: var(--green); background: rgba(255, 255, 255, .62); font-size: 12px; font-weight: 720; }

.legal-main { padding: clamp(64px, 9vw, 110px) 0; }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(44px, 8vw, 96px); align-items: start; }

.legal-toc { position: sticky; top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255, 255, 255, .7); }
.legal-toc strong { display: block; margin-bottom: 13px; color: var(--green); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.legal-toc nav { display: grid; gap: 8px; }
.legal-toc a { color: #63706b; font-size: 13px; text-decoration: none; }
.legal-toc a:hover { color: var(--green); }

.legal-document { max-width: 760px; }
.legal-intro { margin: 0 0 42px; padding: 23px 25px; border-left: 3px solid var(--green); border-radius: 0 15px 15px 0; color: #45524e; background: var(--green-pale); }
.legal-section { padding: 0 0 38px; margin-bottom: 38px; border-bottom: 1px solid var(--line); }
.legal-section:last-child { margin-bottom: 0; border-bottom: 0; }
.legal-section h2 { margin: 0 0 15px; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; line-height: 1.15; }
.legal-section h3 { margin: 25px 0 8px; font-size: 18px; letter-spacing: -.02em; }
.legal-section p { margin: 0 0 15px; color: #4f5c57; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul { margin: 14px 0 0; padding-left: 21px; color: #4f5c57; }
.legal-section li { margin-bottom: 9px; padding-left: 4px; }
.legal-section a { color: var(--green); font-weight: 700; text-underline-offset: 3px; }

.legal-callout { padding: 22px 24px; border: 1px solid rgba(30, 107, 78, .17); border-radius: 16px; background: #f4f8f1; }

.legal-footer { padding: 50px 0 30px; color: rgba(255, 255, 255, .68); background: var(--night); }
.legal-footer-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 42px; padding-bottom: 35px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.legal-footer-brand img { width: 155px; margin-bottom: 15px; clip-path: polygon(0 0, 100% 0, 100% 58%, 34% 58%, 34% 100%, 0 100%); filter: brightness(0) invert(1); opacity: .92; }
.legal-footer-brand p { max-width: 420px; margin: 0; font-size: 13px; }
.legal-footer-links { display: flex; flex-wrap: wrap; gap: 16px 25px; font-size: 13px; font-weight: 680; }
.legal-footer-links a { color: #fff; text-decoration: none; }
.legal-footer-bottom { display: flex; justify-content: space-between; gap: 24px; padding-top: 25px; font-size: 11px; }
.legal-footer-bottom a { color: inherit; }

@media (max-width: 760px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .legal-nav { min-height: 78px; }
  .legal-logo { width: 140px; }
  .legal-nav-links a:first-child { display: none; }
  .legal-hero { padding-top: 65px; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: relative; top: auto; }
  .legal-toc nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-footer-main, .legal-footer-bottom { flex-direction: column; }
}

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