/* Aurei legal pages — design tokens mirror lib/theme/aurei_theme.dart
   (Cormorant Garamond for display, DM Sans for body, DM Mono for meta). */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=DM+Sans:wght@400;500;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* Warm charcoal + gold, straight out of AureiColors.light/.dark */
  --ink: #1A1814;
  --ink-deep: #0F0F0D;
  --ink-soft: #26241F;

  --gold: #B8962E;
  --gold-light: #D4AE52;
  --gold-warm: #C9A84C;
  --gold-subtle: #FBF7EC;
  --gold-border: rgba(184, 150, 46, 0.25);

  --bg1: #FFFFFF;
  --bg2: #F8F6F2;
  --bg3: #F2EFE9;

  --text1: #1A1814;
  --text2: #4A4540;
  --text3: #736D66;
  --text4: #A29B93;

  --border: rgba(26, 24, 20, 0.10);
  --border-medium: rgba(26, 24, 20, 0.16);

  --radius: 4px;
  --maxw: 780px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg2);
  color: var(--text1);
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink-deep);
  color: #F0EBE1;
  padding: 52px 24px 76px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.28);
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: #F0EBE1;
}
.brand .tile {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 34px; height: 34px;
  border-radius: var(--radius);
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(201, 168, 76, 0.45);
}
.brand .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(34px, 6vw, 50px);
  letter-spacing: 0.04em;
  line-height: 1.05;
  margin: 34px 0 14px;
  color: #FFFFFF;
}
.hero .rule {
  width: 48px;
  height: 1px;
  background: var(--gold-warm);
  margin: 0 0 18px;
}
.hero .sub {
  margin: 0;
  color: rgba(240, 235, 225, 0.72);
  font-size: 15px;
  max-width: 52ch;
}
.hero .meta {
  margin-top: 22px;
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.85);
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: -48px auto 0;
  padding: 0 24px 64px;
}
.card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 34px 12px;
  box-shadow: 0 18px 48px rgba(26, 24, 20, 0.07);
}

/* ---------- Table of contents ---------- */
.toc {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 0 0 30px;
}
.toc h2 {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 0 0 14px;
}
.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 30px;
}
.toc li { margin: 5px 0; break-inside: avoid; }
.toc a {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
}
.toc a:hover { color: var(--gold); text-decoration: underline; }

/* ---------- Typography ---------- */
h2.section {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 25px;
  letter-spacing: 0.01em;
  color: var(--text1);
  margin: 40px 0 10px;
  padding-top: 4px;
  scroll-margin-top: 24px;
}
h2.section .num {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-right: 12px;
  vertical-align: 3px;
}
h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text1);
  margin: 24px 0 6px;
}
p, li { color: var(--text2); }
p { margin: 11px 0; }
ul, ol.body { padding-left: 22px; margin: 11px 0; }
li { margin: 6px 0; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
strong { color: var(--text1); font-weight: 700; }

.lead {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text2);
  margin: 0 0 8px;
}

code {
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  color: var(--text1);
  background: var(--bg3);
  border-radius: 2px;
  padding: 1px 5px;
}

/* ---------- Callout ---------- */
.callout {
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 22px 0;
}
.callout strong { display: block; margin-bottom: 4px; }
.callout p { margin: 4px 0; color: var(--text2); font-size: 14px; }

/* ---------- Definition / contact block ---------- */
.contact {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 16px 0;
  font-size: 14px;
}
.contact div { margin: 3px 0; }

/* ---------- Tables ---------- */
.tbl-scroll { overflow-x: auto; margin: 16px 0; }
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 420px;
}
table.tbl th, table.tbl td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.tbl thead th {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text3);
  border-bottom: 1px solid var(--border-medium);
}
table.tbl tbody tr:last-child td { border-bottom: none; }

/* ---------- Footer ---------- */
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 24px 60px;
  text-align: center;
  color: var(--text4);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.foot .links { margin-bottom: 12px; }
.foot a {
  color: var(--text3);
  text-decoration: none;
  margin: 0 10px;
}
.foot a:hover { color: var(--gold); }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 30px 0;
}

@media (max-width: 560px) {
  .toc ol { columns: 1; }
  .card { padding: 24px 20px 8px; }
  .hero { padding: 40px 20px 66px; }
  .lead { font-size: 18px; }
}
