:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --surface: #fffdf8;
  --surface-2: #ebe5da;
  --ink: #132e35;
  --muted: #5f706e;
  --accent: #c95b3d;
  --accent-dark: #9e402b;
  --line: #d8d1c5;
  --font-display: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --font-body: 'Avenir Next', Avenir, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.66; }
body::before { content: ''; position: fixed; inset: 0; z-index: 10; pointer-events: none; opacity: .34; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E"); }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 20; left: 1rem; top: -5rem; padding: .65rem 1rem; border-radius: .55rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }

.site-header { height: 76px; border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 20%); }
.site-header__inner { width: min(1180px, calc(100% - 40px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; font-weight: 650; text-decoration: none; }
.wordmark__mark { display: grid; place-items: center; width: 40px; height: 30px; border: 1.5px solid var(--ink); border-radius: .25rem; font-family: var(--font-mono); font-size: .65rem; }
.header-note { color: var(--muted); font-size: .9rem; }

.legal-page { width: min(1080px, calc(100% - 40px)); margin: 4.5rem auto 0; }
.legal-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; padding-bottom: 2.5rem; border-bottom: 3px double var(--ink); }
.eyebrow { margin: 0 0 .7rem; color: var(--accent-dark); font-family: var(--font-mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
h1, h2 { font-family: var(--font-display); font-weight: 650; letter-spacing: -.035em; text-wrap: balance; }
h1 { max-width: 760px; margin: 0; font-size: clamp(3.25rem, 8vw, 6rem); line-height: .96; }
.legal-hero__meta { min-width: 210px; padding: 1rem 1.1rem; border: 1px solid var(--line); background: var(--surface-2); font-family: var(--font-mono); font-size: .72rem; line-height: 1.5; }
.legal-hero__meta span { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: clamp(3rem, 8vw, 7rem); align-items: start; padding-top: 3rem; }
.legal-nav { position: sticky; top: 1.5rem; }
.legal-nav p { margin: 0 0 .8rem; font-family: var(--font-mono); color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.legal-nav ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); counter-reset: legal-nav; }
.legal-nav li { counter-increment: legal-nav; border-bottom: 1px solid var(--line); }
.legal-nav a { padding: .55rem 0; display: grid; grid-template-columns: 2ch 1fr; gap: .55rem; color: var(--muted); font-size: .82rem; line-height: 1.35; text-decoration: none; }
.legal-nav a::before { content: counter(legal-nav, decimal-leading-zero); color: var(--accent-dark); font-family: var(--font-mono); font-size: .65rem; }
.legal-nav a:hover { color: var(--ink); }
.legal-document { padding: clamp(2rem, 6vw, 4rem); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 22px 70px rgb(40 46 41 / 10%); }
.legal-document__lede { margin: 0 0 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 1.2rem; }
.legal-document section { scroll-margin-top: 1.5rem; }
.legal-document h2 { margin: 3rem 0 .8rem; font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.1; }
.legal-document section:first-of-type h2 { margin-top: 0; }
.legal-document h3 { margin: 1.5rem 0 .35rem; font-size: 1rem; }
.legal-document p, .legal-document li { color: var(--muted); }
.legal-document ul { padding-left: 1.3rem; }
.legal-document li + li { margin-top: .45rem; }
.legal-document strong { color: var(--ink); }
.legal-callout { margin: 2rem 0; padding: 1.1rem 1.2rem; border-left: 3px solid var(--accent); background: #f8ded3; }
.legal-callout p { margin: 0; color: var(--ink); }
.legal-contact { margin-top: 3rem; padding: 1.4rem; background: var(--surface-2); border-radius: .55rem; }
.legal-contact p:last-child { margin-bottom: 0; }

.site-footer { width: min(1080px, calc(100% - 40px)); margin: 5rem auto 0; padding: 2rem 0 3rem; display: flex; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.site-footer strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem 1rem; }

@media (max-width: 800px) {
  .legal-hero, .legal-layout { grid-template-columns: 1fr; }
  .legal-hero__meta { width: fit-content; }
  .legal-nav { position: static; }
  .legal-nav ol { display: grid; grid-template-columns: 1fr 1fr; }
  .legal-nav li:nth-child(odd) { padding-right: 1rem; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header { height: 66px; }
  .header-note { display: none; }
  .legal-page { width: calc(100% - 24px); margin-top: 2.5rem; }
  .legal-hero { align-items: start; }
  .legal-nav ol { grid-template-columns: 1fr; }
  .legal-nav li:nth-child(odd) { padding-right: 0; }
  .legal-document { padding: 1.6rem 1.25rem; }
  .site-footer { width: calc(100% - 24px); flex-direction: column; }
  .site-footer nav { justify-content: flex-start; }
}

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