/* Shared styling for Hudi's public legal pages (/termos, /privacidade,
   /aviso-criancas). Plain CSS, no build step — these pages are served as
   static files by Firebase Hosting and must render before Flutter boots. */

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --border: #e2e5ea;
  --text: #1b1f24;
  --text-muted: #5a626d;
  --accent: #2f6f4f;
  --accent-soft: #eaf3ee;
  --warn-bg: #fdf4e7;
  --warn-border: #e8c58a;
  --warn-text: #6b4a12;
  --max: 78ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1c2024;
    --border: #2c3238;
    --text: #e8eaed;
    --text-muted: #a3abb5;
    --accent: #7fc0a0;
    --accent-soft: #1e2a24;
    --warn-bg: #2a2115;
    --warn-border: #6b5a32;
    --warn-text: #e5c894;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 20px 96px;
}

header.doc-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 6px;
}

h1 {
  font-size: 1.85rem;
  line-height: 1.25;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.meta {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

h2 {
  font-size: 1.22rem;
  margin: 40px 0 12px;
  padding-top: 8px;
  letter-spacing: -0.005em;
}

h3 {
  font-size: 1.02rem;
  margin: 26px 0 8px;
  color: var(--text);
}

p, li { color: var(--text); }

a { color: var(--accent); }

ul, ol { padding-left: 22px; }

li { margin-bottom: 6px; }

.callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  margin: 22px 0;
  border-radius: 0 6px 6px 0;
}

.callout.warn {
  background: var(--warn-bg);
  border-left-color: var(--warn-border);
  color: var(--warn-text);
}

.callout.warn p, .callout.warn li, .callout.warn strong {
  color: var(--warn-text);
}

.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.table-scroll {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 0.94rem;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

tbody tr:last-child td { border-bottom: none; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 28px 0;
}

.toc p { margin: 0 0 8px; font-weight: 600; font-size: 0.9rem; }
.toc ol { margin: 0; columns: 2; column-gap: 28px; }
.toc li { break-inside: avoid; font-size: 0.92rem; }

footer.doc-foot {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.5rem; }
  .toc ol { columns: 1; }
  .wrap { padding: 24px 16px 72px; }
}

@media print {
  :root { --bg: #fff; --text: #000; --text-muted: #333; }
  .toc { display: none; }
  h2 { break-after: avoid; }
  table { break-inside: auto; }
}
