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

:root {
  --bg: #f8f7f2;
  --surface: #fffefa;
  --surface-muted: #eeeee8;
  --text: #20231f;
  --muted: #656a63;
  --accent: #55715a;
  --accent-soft: rgba(85, 113, 90, 0.12);
  --line: rgba(32, 35, 31, 0.12);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100%;
  margin: 0;
}

a {
  color: inherit;
}

.legal-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.86), rgba(248, 247, 242, 0) 360px),
    var(--bg);
}

.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 247, 242, 0.92);
  padding: 0 clamp(20px, 5vw, 72px);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.legal-brand {
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.legal-nav a {
  text-decoration: none;
}

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

.legal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  padding: 0 16px;
  text-decoration: none;
}

.legal-page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 72px) 64px;
}

.legal-hero {
  display: grid;
  gap: 18px;
  max-width: 800px;
  margin-bottom: clamp(40px, 7vw, 72px);
}

.legal-kicker {
  width: fit-content;
  margin: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 5.3rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 0.96;
}

.legal-intro {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.75;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.legal-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.62);
  padding: 7px 12px;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 10px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.legal-toc a {
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--accent);
}

.legal-content {
  display: grid;
  gap: 28px;
}

.legal-section {
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.legal-section h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
}

.legal-section h3 {
  margin: 22px 0 8px;
  font-size: 1rem;
  letter-spacing: 0;
}

.legal-section p,
.legal-section li {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.78;
}

.legal-section p {
  margin: 0 0 12px;
}

.legal-section ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.legal-note {
  border: 1px solid rgba(85, 113, 90, 0.22);
  border-radius: 8px;
  background: var(--accent-soft);
  padding: 16px;
}

.legal-note p {
  margin: 0;
  color: var(--text);
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 24px clamp(20px, 5vw, 72px);
  font-size: 0.8rem;
}

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

.legal-footer a {
  text-decoration: none;
}

.legal-footer a:hover {
  color: var(--accent);
}

@media (max-width: 820px) {
  .legal-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .legal-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }
}
