/* WolfStack · legal.css · v2.0 — 2026-09-28
   Estilos de /terms-of-service, /privacy-policy y /cookie-policy.
   Independiente de styles.css: tema claro/oscuro + bilingüe por html[lang]. */


:root, [data-theme="light"] {
  --bg: #ffffff;
  --surface: #f4f7fa;
  --ink: #0f172a;
  --soft: #475569;
  --faint: #5b6b80;
  --rule: #e2e8f0;
  --accent: #0369a1;
  --brand: #0ea5e9;
  --focus: #0284c7;
}
[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #16213a;
  --ink: #e5edf5;
  --soft: #a9b8cb;
  --faint: #8596ab;
  --rule: #26344d;
  --accent: #7dd3fc;
  --brand: #38bdf8;
  --focus: #7dd3fc;
  color-scheme: dark;
}

/* El idioma lo decide html[lang]; así no hay parpadeo antes del JS. */
html[lang="en"] [data-lang="es"],
html[lang="es"] [data-lang="en"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

/* ── Barra superior ── */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.bar-in {
  max-width: 1160px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 16px;
}
.logo { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.logo .txt span { color: var(--brand); }
.logo { display: flex; align-items: center; gap: 9px; }
.logo img { width: 28px; height: 28px; }
[data-theme="dark"] .logo img { background: #e6edf5; border-radius: 7px; padding: 2px; }
.bar-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.home { color: var(--soft); text-decoration: none; font-size: 14.5px; font-weight: 500; margin-right: 6px; }
.home:hover { color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; }
.seg button {
  font: 600 12.5px/1 inherit; font-family: inherit; color: var(--soft);
  background: none; border: 0; border-radius: 999px; padding: 7px 11px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 999px; background: none; color: var(--soft); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
[data-theme="light"] .i-sun, [data-theme="dark"] .i-moon { display: none; }

/* ── Estructura ── */
.wrap {
  max-width: 1160px; margin: 0 auto; padding: 48px 24px 96px;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 64px;
}
.doc { max-width: 70ch; }

.toc { position: sticky; top: 96px; align-self: start; font-size: 14px; }
.toc summary { font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; margin-bottom: 10px; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); max-height: calc(100vh - 170px); overflow: auto; }
.toc li a {
  display: block; padding: 5px 0 5px 14px; margin-left: -1px;
  color: var(--faint); text-decoration: none; border-left: 2px solid transparent; line-height: 1.4;
}
.toc li a:hover { color: var(--ink); }
.toc li a[aria-current="true"] { color: var(--ink); border-left-color: var(--brand); font-weight: 500; }

/* ── Tipografía del documento ── */
h1 { font-size: clamp(30px, 4.2vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; font-weight: 700; }
.meta { color: var(--faint); font-size: 14.5px; margin: 0 0 32px; }
h2 {
  font-size: 21px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 650;
  margin: 52px 0 12px; padding-top: 22px; border-top: 1px solid var(--rule);
}
h3 { font-size: 16.5px; font-weight: 650; margin: 28px 0 6px; }
p, ul, ol { margin: 0 0 16px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--faint); }
strong { font-weight: 600; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: var(--surface); padding: 1px 5px; border-radius: 4px; }

/* Lo esencial: el resumen en lenguaje llano arriba de cada documento. */
.gist {
  background: var(--surface); border-radius: 14px; padding: 22px 26px 8px;
  border-left: 4px solid var(--brand); margin: 0 0 12px;
}
.gist h2 { border: 0; padding: 0; margin: 0 0 10px; font-size: 17px; }
.gist ul { padding-left: 20px; }
.gist .note { font-size: 13.5px; color: var(--faint); }

.table-scroll { overflow-x: auto; margin: 0 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; color: var(--ink); background: var(--surface); }
td:first-child { font-weight: 500; min-width: 150px; }

.contact { background: var(--surface); border-radius: 12px; padding: 18px 22px; }
.contact p { margin: 0 0 6px; }

.foot { border-top: 1px solid var(--rule); color: var(--faint); font-size: 13.5px; }
.foot-in { max-width: 1160px; margin: 0 auto; padding: 22px 24px; display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--soft); }

/* ── Móvil ── */
@media (max-width: 980px) {
  .wrap { grid-template-columns: 1fr; gap: 0; padding-top: 32px; }
  .toc { position: static; background: var(--surface); border-radius: 12px; padding: 14px 18px; margin-bottom: 32px; }
  .toc summary { margin: 0; }
  .toc[open] summary { margin-bottom: 10px; }
  .toc summary { display: flex; justify-content: space-between; align-items: center; }
  .toc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
  .toc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
  .toc ol { max-height: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .bar-in { padding: 12px 16px; gap: 10px; }
  .home { display: none; }
  .wrap { padding: 24px 16px 72px; }
  .gist { padding: 18px 18px 6px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media print {
  .bar, .toc, .foot { display: none; }
  .wrap { display: block; padding: 0; }
  body { font-size: 11.5pt; }
}
