/* Brand-matched styles for the /legal/* pages.
   Variables mirror public/index.html so the typography, palette, and
   rhythm stay consistent between the landing page and the documents. */

:root {
  --bg: #f4efe6;
  --ink: #1c1a16;
  --accent: #8b6f47;
  --rule: #d8d0c2;
  --muted: #6b6258;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(139, 111, 71, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(139, 111, 71, 0.04) 0%, transparent 40%);
}

.container {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 1.75rem 2.5rem;
  flex: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  font-family: 'Fraunces', serif;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent);
}

.topbar a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.topbar a:hover { border-color: var(--accent); }

.banner {
  border: 1px solid var(--rule);
  background: rgba(139, 111, 71, 0.06);
  padding: 1rem 1.25rem;
  margin-bottom: 3rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-radius: 2px;
}

.banner strong { color: var(--ink); font-weight: 500; }

article {
  font-size: 1rem;
}

article h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
  font-variation-settings: 'opsz' 144;
}

article h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

article h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

article p,
article ul,
article ol,
article blockquote,
article table {
  margin-bottom: 1.25rem;
  max-width: none;
}

article ul, article ol { padding-left: 1.5rem; }
article li { margin-bottom: 0.4rem; }
article li > ul, article li > ol { margin-top: 0.4rem; margin-bottom: 0.4rem; }

article a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

article a:hover {
  color: var(--accent);
  border-color: var(--ink);
}

article strong { font-weight: 500; }

article code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.92em;
  background: rgba(139, 111, 71, 0.1);
  padding: 1px 5px;
  border-radius: 2px;
}

article pre {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.88rem;
  background: rgba(28, 26, 22, 0.04);
  border: 1px solid var(--rule);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  border-radius: 3px;
  line-height: 1.5;
}

article pre code {
  background: transparent;
  padding: 0;
}

article blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.4rem 0 0.4rem 1.1rem;
  color: var(--muted);
  font-style: italic;
}

article hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

article th, article td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

article th {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: rgba(139, 111, 71, 0.04);
}

article ol li::marker, article ul li::marker {
  color: var(--accent);
}

footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: 'Fraunces', serif;
  font-weight: 400;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 0.5rem;
  border-bottom: 1px solid transparent;
}

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

.loading {
  color: var(--muted);
  font-style: italic;
  font-family: 'Fraunces', serif;
}

@media (max-width: 540px) {
  .container { padding: 2.5rem 1.25rem 2rem; }
  .topbar { margin-bottom: 2rem; }
  article h1 { font-size: 2rem; }
  article h2 { font-size: 1.3rem; margin-top: 2.25rem; }
  article table { font-size: 0.85rem; }
  article th, article td { padding: 0.45rem 0.5rem; }
}
