/* Hoja compartida por info-legal, privacidad, cookies y avisolegal.
   Mismo sistema de diseño que la landing. Va en archivo aparte y no embebida
   porque son cuatro documentos con el mismo aspecto. */

:root {
  --sage: #a7b894; --sage-hover: #7f9174; --sage-deep: #5e7753;
  --sage-pale: #e8eee0; --sage-mist: #eef4e4;
  --ink: #2a2f25; --ink-soft: #4a4f44; --stone: #6a6f64; --stone-soft: #a4a89c;
  --paper: #faf8f2; --white: #ffffff;
  --line: rgba(42,47,37,0.12);
  --serif: 'Spectral', Georgia, "Times New Roman", serif;
  --sans: 'Barlow', Helvetica, Arial, sans-serif;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); background: var(--paper); color: var(--ink);
  font-size: 17px; line-height: 1.65;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); width: 100%; }

.topbar { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; }
/* Logo blanco sobre transparente: brightness(0) lo pasa a tinta. */
.brand-logo { height: 42px; width: auto; filter: brightness(0); opacity: 0.92; }
.brand-accent { font-family: var(--serif); font-size: 1.05rem; font-style: italic; color: var(--sage-deep); white-space: nowrap; }
.topbar-back { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.topbar-back:hover { color: var(--sage-deep); }

.doc-head { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 3vw, 2.2rem); border-bottom: 1px solid var(--line); }
.eyebrow {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--sage-deep);
  display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--sage-deep); }
h1 {
  font-family: var(--serif); font-weight: 500; line-height: 1.15;
  font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.01em; max-width: 22ch;
}
.doc-meta { margin-top: 0.9rem; font-size: 0.85rem; color: var(--stone); }

main { flex: 1; padding-bottom: clamp(3rem, 7vw, 5rem); }
.doc { display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding-top: clamp(2rem, 4vw, 3rem); }
@media (min-width: 940px) { .doc { grid-template-columns: 230px 1fr; gap: 3.5rem; } }

.toc { font-size: 0.9rem; }
@media (min-width: 940px) { .toc { position: sticky; top: 90px; align-self: start; } }
.toc h2 {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--sage-deep); margin-bottom: 0.8rem;
}
.toc ol { list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: 0.45rem; }
.toc li { counter-increment: toc; }
.toc a { color: var(--ink-soft); text-decoration: none; display: block; line-height: 1.4; }
.toc a::before { content: counter(toc) ". "; color: var(--stone-soft); }
.toc a:hover { color: var(--sage-deep); }

.body { max-width: 72ch; }
.body section { scroll-margin-top: 90px; }
.body section + section { margin-top: 2.6rem; }
.body h2 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  line-height: 1.25; margin-bottom: 0.9rem; color: var(--ink);
}
.body h3 {
  font-family: var(--sans); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.02em;
  margin: 1.6rem 0 0.6rem; color: var(--ink);
}
.body p { color: var(--ink-soft); margin-bottom: 0.9rem; }
.body p:last-child { margin-bottom: 0; }
.body strong { color: var(--ink); font-weight: 600; }
.body a { color: var(--sage-deep); text-decoration: underline; text-underline-offset: 2px; }
.body a:hover { color: var(--sage-hover); }
.body ul, .body ol { margin: 0 0 0.9rem 1.3rem; color: var(--ink-soft); }
.body li { margin-bottom: 0.45rem; }
.body li::marker { color: var(--sage-deep); }

/* Datos obligatorios: en tabla y no en prosa, para poder localizarlos. */
.datos { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--white); }
.datos dl { display: grid; grid-template-columns: 1fr; }
@media (min-width: 620px) { .datos dl { grid-template-columns: minmax(160px, 34%) 1fr; } }
.datos dt {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage-deep);
  padding: 0.85rem 1.1rem 0.15rem; background: var(--sage-mist);
}
.datos dd { padding: 0.15rem 1.1rem 0.85rem; color: var(--ink); font-size: 0.97rem; }
@media (min-width: 620px) {
  .datos dt { padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
  .datos dd { padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--white); }
  .datos dl > :nth-last-child(-n+2) { border-bottom: 0; }
}

.tabla-wrap { overflow-x: auto; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; background: var(--white); font-size: 0.9rem; }
thead th {
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage-deep);
  background: var(--sage-mist); text-align: left; padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
tbody td { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody td code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; color: var(--ink); }

.nota {
  background: var(--sage-mist); border: 1px solid var(--line); border-left: 3px solid var(--sage);
  border-radius: 6px; padding: 1.1rem 1.3rem; margin: 1.2rem 0; font-size: 0.95rem;
}
.nota p:last-child { margin-bottom: 0; }

.descarga {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.9rem 1.3rem; margin-top: 0.4rem;
  background: var(--white); border: 1px solid var(--sage); border-radius: 8px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem;
  transition: background 200ms ease, transform 200ms ease;
}
.descarga:hover { background: var(--sage-mist); transform: translateY(-1px); }
.descarga:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; }
.descarga .ext { font-family: var(--sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--sage-deep); }

/* ⚠️ Dato pendiente. Feo a propósito: nadie debe publicar sin verlo.
   Al rellenarlo, borrar el <span> entero. */
.pendiente {
  background: #fbeae8; color: #8a2c20; border: 1px dashed #c0554a;
  border-radius: 4px; padding: 0.05em 0.45em; font-family: var(--sans);
  font-size: 0.85em; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
}

footer { background: var(--ink); color: rgba(250,248,242,0.6); padding: 2.4rem 0 2rem; font-size: 0.82rem; }
footer .row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: flex-start; }
footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
footer a { color: inherit; text-decoration: underline; }
footer a:hover { color: var(--paper); }
footer .registry { font-style: italic; max-width: 62ch; }
footer .cookie-reset {
  background: none; border: 0; color: inherit; text-decoration: underline;
  font-family: inherit; font-size: inherit; cursor: pointer; padding: 0;
}
footer .cookie-reset:hover { color: var(--paper); }

@media (max-width: 700px) {
  .topbar .row { padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .brand-logo { height: 36px; }
  .brand-accent { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .descarga { transition: none; }
}
