/* ══════════════════════════════════════
   Legal pages — /privacy/ and /terms/
   Shared by both pages; noindex is set per page and in netlify.toml.
══════════════════════════════════════ */
:root {
  --forest: #1E2A1B;
  --forest-deep: #0b1409;
  --sage-dark: #4A5C40;
  --sage-mid: #6E8060;
  --sage: #b2bda5;
  --cream: #F6F5EF;
  --paper: #FBFAF6;
  --ink: #2C2C26;
  --ink-soft: #55554b;
  --rule: rgba(44, 44, 38, .12);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sage-dark); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--cream); color: var(--forest); padding: .6rem 1rem; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ── Masthead ── */
.masthead {
  background-color: var(--forest);
  background-image:
    radial-gradient(ellipse 70% 90% at 85% 0%, rgba(110,128,96,.22) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(178%2C189%2C165%2C0.07)'/%3E%3C/svg%3E");
  background-size: auto, 28px 28px;
  color: var(--cream);
}
.masthead-bar {
  max-width: 1120px; margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-bottom: 1px solid rgba(178,189,165,.1);
}
.masthead-bar img { height: 30px; width: auto; display: block; }
.home-link { display: inline-flex; border-radius: 6px; transition: opacity .2s; }
.home-link:hover { opacity: .8; }
.home-link:focus-visible { outline-color: var(--sage); }

.doc-switch { display: flex; gap: .35rem; font-size: .8rem; font-weight: 500; }
.doc-switch a {
  text-decoration: none; color: rgba(246,245,239,.6);
  padding: .45rem .85rem; border-radius: 999px; border: 1px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}
.doc-switch a:hover { color: var(--cream); border-color: rgba(178,189,165,.35); }
.doc-switch a:active { background: rgba(74,92,64,.4); }
.doc-switch a:focus-visible { outline-color: var(--sage); }
.doc-switch a[aria-current="page"] { color: var(--forest); background: var(--sage); }

.masthead-title {
  max-width: 1120px; margin: 0 auto;
  padding: clamp(3rem, 9vw, 6.5rem) 1.5rem clamp(2.5rem, 6vw, 4rem);
}
.eyebrow {
  font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--sage);
}
.masthead h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.9rem, 9vw, 6.2rem); line-height: .95; letter-spacing: -.02em;
  margin: .9rem 0 1.5rem;
}
.masthead h1 em { font-style: italic; color: var(--sage); }
.meta { font-size: .9rem; font-weight: 300; color: rgba(246,245,239,.65); line-height: 1.6; max-width: 60ch; }
.meta strong { font-weight: 600; color: var(--cream); }

/* ── Body layout: sticky contents rail + article ── */
.layout {
  max-width: 1120px; margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem clamp(4rem, 8vw, 6rem);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem;
}
@media (min-width: 900px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr); gap: 4.5rem; }
  .toc { position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow-y: auto; }
}

.toc details { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.toc summary {
  list-style: none; cursor: pointer; padding: .9rem 1.1rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sage-dark);
  display: flex; justify-content: space-between; align-items: center;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: '+'; font-size: 1rem; letter-spacing: 0; transition: transform .2s; }
.toc details[open] summary::after { transform: rotate(45deg); }
.toc ol { list-style: none; padding: 0 .6rem .8rem; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: .7rem; padding: .42rem .5rem; border-radius: 8px;
  font-size: .84rem; line-height: 1.35; color: var(--ink-soft); text-decoration: none;
  transition: background .2s, color .2s;
}
.toc a::before { content: counter(toc, decimal-leading-zero); font-size: .7rem; color: var(--sage-mid); padding-top: .12rem; font-variant-numeric: tabular-nums; }
.toc a:hover { background: rgba(178,189,165,.22); color: var(--forest); }
.toc a:active { background: rgba(178,189,165,.4); }
@media (min-width: 900px) {
  .toc details { border: 0; background: none; }
  .toc summary { pointer-events: none; padding: 0 .5rem .9rem; }
  .toc summary::after { display: none; }
  .toc ol { padding: 0; border-left: 1px solid var(--rule); }
  .toc a { border-radius: 0 8px 8px 0; }
}

/* ── Article ── */
.doc { max-width: 70ch; counter-reset: sec; }
.doc section { padding-top: .5rem; margin-bottom: 3rem; counter-increment: sec; }
.doc h2 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.15; color: var(--forest);
  margin-bottom: 1.1rem; display: flex; gap: .8rem; align-items: baseline;
}
.doc h2::before {
  content: counter(sec, decimal-leading-zero);
  font-family: var(--font-body); font-size: .75rem; font-weight: 700; letter-spacing: .1em;
  color: var(--sage-mid); flex-shrink: 0;
}
.doc h3 { font-size: 1rem; font-weight: 700; color: var(--forest); margin: 1.6rem 0 .6rem; }
.doc p, .doc li { font-size: 1rem; line-height: 1.75; color: var(--ink); font-weight: 400; }
.doc p + p { margin-top: 1rem; }
.doc ul { margin: .8rem 0 1rem; padding-left: 1.2rem; }
.doc li { margin-bottom: .45rem; }
.doc li::marker { color: var(--sage-mid); }
.doc strong { font-weight: 600; color: var(--forest); }
.doc a { color: var(--sage-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s; }
.doc a:hover { color: var(--forest); text-decoration-thickness: 2px; }
.doc .caps { text-transform: uppercase; font-size: .92rem; letter-spacing: .01em; }

.callout {
  margin: 1.4rem 0; padding: 1.25rem 1.4rem;
  background: var(--forest); color: var(--cream); border-radius: var(--radius);
  border-left: 4px solid var(--sage);
}
.doc .callout p, .doc .callout li { color: rgba(246,245,239,.88); }
.doc .callout strong { color: var(--cream); }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.4rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: .75rem .9rem; border-bottom: 1px solid var(--rule); }
th { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sage-dark); background: rgba(178,189,165,.15); }
tr:last-child td { border-bottom: 0; }
td code { font-size: .82rem; background: rgba(178,189,165,.25); padding: .1rem .35rem; border-radius: 4px; }

/* Address assembled by legal.js — never present in the HTML source */
.js-mail { font-weight: 600; }
.js-mail[data-pending] { font-weight: 400; font-style: italic; color: var(--ink-soft); text-decoration: none; }

/* ── Footer — mirrors the main site footer in index.html ── */
.site-footer { background: var(--forest-deep); position: relative; overflow: hidden; line-height: 1.5; }
.footer-rule { height: 2px; background: linear-gradient(to right, transparent, var(--sage-dark) 30%, var(--sage) 50%, var(--sage-dark) 70%, transparent); }
.footer-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(74,92,64,.13) 0%, transparent 70%); }
.footer-wm {
  position: absolute; bottom: -2rem; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 900; font-size: clamp(5rem, 14vw, 11rem);
  letter-spacing: -.02em; line-height: 1; color: rgba(255,255,255,.025);
  white-space: nowrap; pointer-events: none; user-select: none;
}
.footer-wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 4rem; padding: 5rem 0 4rem; }
.footer-logo { height: 2rem; width: auto; display: block; margin-bottom: 1.5rem; opacity: .92; }
.footer-tagline {
  font-family: var(--font-display); font-style: italic; color: rgba(255,255,255,.45);
  font-size: 1rem; line-height: 1.65; max-width: 22ch; margin-bottom: 2rem;
}
.footer-social {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.5);
  transition: border-color .2s, color .2s, background .2s;
}
.footer-social:hover { border-color: rgba(178,189,165,.6); color: #fff; background: rgba(74,92,64,.3); }
.footer-social:active { background: rgba(74,92,64,.5); }
.footer-heading { font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sage-dark); margin-bottom: 1.5rem; }
.footer-nav { display: flex; flex-direction: column; gap: .85rem; }
.footer-nav a, .footer-mail { color: rgba(255,255,255,.45); font-size: .9rem; text-decoration: none; transition: color .2s; }
.footer-nav a:hover, .footer-mail:hover { color: #fff; }
.footer-mail { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 2rem; font-weight: 400; }
.footer-cta-note { font-size: .75rem; color: rgba(255,255,255,.25); margin-bottom: .75rem; line-height: 1.5; }
.footer-cta {
  display: inline-block; color: var(--cream); border: 1.5px solid rgba(255,255,255,.25); border-radius: 10px;
  padding: 11px 22px; font-size: .82rem; font-weight: 600; letter-spacing: .01em; text-decoration: none; transition: all .2s;
}
.footer-cta:hover { background: rgba(246,245,239,.08); border-color: rgba(255,255,255,.5); }
.footer-cta:active { background: rgba(246,245,239,.14); }
.site-footer a:focus-visible { outline-color: var(--sage); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07); padding: 1.75rem 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
}
.footer-bottom p { color: rgba(255,255,255,.2); font-size: .78rem; }
.footer-bottom .footer-exclusive { color: rgba(255,255,255,.15); font-size: .72rem; font-style: italic; }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; padding: 3rem 0 2rem; }
  .footer-wm { display: none; }
}

@media (max-width: 560px) {
  .doc-switch a { padding: .4rem .65rem; }
  .masthead-bar img { height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .masthead { background: none; color: #000; }
  .masthead-bar, .toc, .site-footer, .skip { display: none; }
  .layout { display: block; padding: 0; }
  .callout { background: none; color: #000; border: 1px solid #999; }
  .doc .callout p, .doc .callout li, .doc .callout strong { color: #000; }
}
