/* Paginas legales: mismos tokens que la app (ver DESIGN.md), hoja aparte
   para no cargar styles.css entero en un documento de lectura. */
:root {
  --bg: #f5f7f0;
  --surface: #ffffff;
  --surface-2: #edf0e4;
  --text: #13160d;
  --text-dim: #5f6652;
  --accent: #c6ec5c;
  --accent-ink: #1a220c;
  --accent-soft: #e9f6c4;
  --accent-text: #24300c;
  --border: #d8dec9;
  --todo: #fff1c2;
  --todo-ink: #6b4a00;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101208;
    --surface: #191c12;
    --surface-2: #24281a;
    --text: #eef0e6;
    --text-dim: #9aa08a;
    --accent-soft: #2a3418;
    --accent-text: #d6f17a;
    --border: #2b3020;
    --todo: #3d3210;
    --todo-ink: #ffd772;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101208;
  --surface: #191c12;
  --surface-2: #24281a;
  --text: #eef0e6;
  --text-dim: #9aa08a;
  --accent-soft: #2a3418;
  --accent-text: #d6f17a;
  --border: #2b3020;
  --todo: #3d3210;
  --todo-ink: #ffd772;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
}
.legal-back:hover { color: var(--text); }
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 24px;
}
.legal-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.legal-nav a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
h1 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.legal-meta {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-dim);
  margin: 0 0 24px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 36px 0 8px;
}
h3 { font-size: 16px; margin: 24px 0 6px; }
p, li { color: var(--text); }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
a { color: var(--accent-text); text-underline-offset: 2px; }
.legal-summary {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 8px;
}
.legal-summary p { margin: 0; color: var(--accent-text); }
.legal-summary p + p { margin-top: 8px; }
.table-wrap { overflow-x: auto; margin: 12px 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
th { background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num { font-family: 'Geist Mono', ui-monospace, monospace; white-space: nowrap; }
/* Datos pendientes de rellenar antes de publicar. */
mark.todo {
  background: var(--todo);
  color: var(--todo-ink);
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 500;
}
.legal-form {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
}
.legal-foot {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}
td.code { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12.5px; overflow-wrap: anywhere; min-width: 12ch; }
