/* Legal pages (/privacidad, /terminos, /privacy, /terms). Same palette as /styles.css (light + dark); no JS. */
:root {
  --bg: #faf7f2; --panel: #ffffff; --panel-2: #f3eee6; --line: #e6ddd0;
  --text: #1f1a16; --muted: #6a6058; --accent: #0b6560; --radius: 14px; --focus: #0f766e;
  --font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14110f; --panel: #1d1916; --panel-2: #27221d; --line: #352e27;
    --text: #f3ede6; --muted: #b3a89c; --accent: #6fd6c7; --focus: #6fd6c7; }
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.legal {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); overflow-wrap: anywhere; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 1;
}
.brand { font: 700 18px/1 var(--font-display); letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tabs a, .lang { color: var(--muted); text-decoration: none; padding: 0 12px; min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; white-space: nowrap; font-weight: 500; }
.tabs a[aria-current="page"] { color: var(--text); background: var(--panel-2); font-weight: 600; }
.lang { border: 1px solid var(--line); font-size: 14px; min-height: 36px; }
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px 32px; }
.doc h1, .doc h2 { font-family: var(--font-display); letter-spacing: -.01em; }
.doc h1 { font-size: 28px; line-height: 1.25; margin: 16px 0 8px; }
.doc h2 { font-size: 20px; line-height: 1.3; margin: 32px 0 8px; padding-top: 8px; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.doc p, .doc li { overflow-wrap: break-word; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li > p { margin: 6px 0; }
.doc code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; font-size: .9em; overflow-wrap: anywhere; }
.doc blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 8px 8px 0; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.doc table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--panel); }
.doc tr:last-child td { border-bottom: 0; }
.legal-footer {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted);
}
.small { font-size: 14px; }
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .tabs { order: 3; flex-basis: 100%; }
  .lang { margin-left: auto; }
  main { padding: 12px 14px 28px; }
  .doc h1 { font-size: 24px; }
  .doc h2 { font-size: 18px; }
}
@media print {
  body.legal { background: #fff; color: #000; }
  .topbar, .legal-footer { display: none; }
  a { color: #000; }
}
