/* === LEGAL PAGES SHARED STYLES === */
:root {
  --bg: #faf7f2;
  --bg-warm: #f3ede2;
  --bg-deep: #ebe3d2;
  --ink: #161616;
  --ink-soft: #3f3f3f;
  --ink-muted: #6b6b6b;
  --line: #d8cfbe;
  --line-soft: #e6dfd0;
  --brand: #0d3b40;
  --brand-soft: #1a5a60;
  --brand-light: #d5e3e2;
  --accent: #c9742a;
  --accent-soft: #e3a366;
  --paper: #ffffff;
  --shadow: 0 1px 0 rgba(13, 59, 64, 0.04), 0 8px 24px rgba(13, 59, 64, 0.06);
  --max: 1280px;
  --content: 760px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "ss01", "ss02", "cv01";
  overflow-x: hidden;
}

.display {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.display em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  font-weight: 400;
  color: var(--brand);
}

.eyebrow {
  font-family: "DM Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.content { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 0; }
.logo {
  display: flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none;
  font-family: "Fraunces", serif; font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: var(--bg);
  display: grid; place-items: center; font-family: "Fraunces", serif; font-weight: 700;
  font-size: 18px; font-style: italic;
}
.logo .meta {
  font-family: "DM Sans", sans-serif; font-size: 0.7rem; font-weight: 500; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.15em; margin-left: 0.1rem;
}
.nav ul.menu { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color 0.2s; }
.nav a:hover { color: var(--brand); }
.nav .cta {
  background: var(--brand); color: var(--bg); padding: 0.6rem 1.1rem; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600; transition: background 0.2s, transform 0.2s;
}
.nav .cta:hover { background: var(--ink); color: var(--bg); transform: translateY(-1px); }
@media (max-width: 800px) { .nav ul.menu { display: none; } }

/* Page Hero */
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); margin: 0.75rem 0 1rem; }
.page-hero .meta { color: var(--ink-muted); font-size: 0.92rem; }
.page-hero .meta strong { color: var(--ink); font-weight: 600; }
.page-hero .lead { max-width: 65ch; color: var(--ink-soft); font-size: 1.05rem; margin-top: 1.25rem; }

/* Article content */
article { padding: clamp(2rem, 5vw, 4rem) 0; }
article h2 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin: 3rem 0 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  scroll-margin-top: 100px;
}
article h2:first-child { margin-top: 0; }
article h3 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}
article p { margin: 0 0 1.1rem; color: var(--ink-soft); }
article p strong { color: var(--ink); font-weight: 600; }
article ul, article ol { padding-left: 1.5rem; margin: 0 0 1.2rem; color: var(--ink-soft); }
article li { margin-bottom: 0.4rem; }
article a { color: var(--brand); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
article a:hover { color: var(--accent); }

/* Callouts */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--paper);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0 2rem;
}
.callout .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout.brand { border-left-color: var(--brand); }
.callout.brand .label { color: var(--brand); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0 2rem; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table th {
  background: var(--bg-warm); padding: 0.85rem 1rem; text-align: left; color: var(--ink);
  font-weight: 600; border-bottom: 1px solid var(--line); font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--ink-soft); }
table tr:last-child td { border-bottom: none; }
table code {
  font-family: "Consolas", monospace; font-size: 0.85em; background: var(--bg-warm);
  padding: 0.1rem 0.35rem; border-radius: 4px; color: var(--brand);
}

/* TOC */
.toc {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 3rem;
}
.toc .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}
.toc ol { padding-left: 1.2rem; margin: 0; font-family: "DM Sans", sans-serif; }
.toc ol li { margin-bottom: 0.35rem; }
.toc ol a { color: var(--ink); text-decoration: none; }
.toc ol a:hover { color: var(--brand); text-decoration: underline; text-decoration-color: var(--accent); }

/* Placeholder warning */
.placeholder {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  background: rgba(201, 116, 42, 0.12);
  color: var(--accent);
  border: 1px dashed var(--accent);
  border-radius: 4px;
  font-family: "Consolas", monospace;
  font-size: 0.85em;
  font-weight: 500;
}

/* Footer */
footer.site { background: var(--bg-deep); padding: 4rem 0 2rem; border-top: 1px solid var(--line); margin-top: 4rem; }
.footer-grid {
  display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2.5rem;
  padding-bottom: 3rem; border-bottom: 1px solid var(--line);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h5 {
  font-family: "DM Sans", sans-serif; text-transform: uppercase; letter-spacing: 0.15em;
  font-size: 0.75rem; color: var(--ink-muted); margin: 0 0 1rem; font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { color: var(--ink-soft); text-decoration: none; font-size: 0.93rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--brand); }
.footer-tagline {
  font-family: "Fraunces", serif; font-style: italic; color: var(--ink-muted);
  font-size: 1.1rem; margin: 1rem 0 0; max-width: 32ch;
}
.footer-bottom {
  padding-top: 2rem; display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem; font-size: 0.83rem; color: var(--ink-muted);
}

::selection { background: var(--accent); color: var(--bg); }
