/* ============================================================
   WA Mining Index — legal.css  (Fase 3 · tanda 6)
   ------------------------------------------------------------
   Shell de documento legal: hero + TOC sticky + cuerpo con
   secciones numeradas. El cuerpo estiliza TAGS GENÉRICOS
   (h2/p/ul/table) para no tocar el texto legal existente.
   Páginas: terms · privacy · cookies · editorial-policy · opt-out
   Requiere theme.css + listing.css (statusbar). Prefijo .wmi-lg-*
   ============================================================ */

/* ---- hero ---- */
body.wmi .wmi-lg-hero {
  padding: 52px var(--gutter) 32px;
  border-bottom: 1px solid var(--accent-22);
  position: relative;
}
body.wmi .wmi-lg-hero-frame {
  position: absolute;
  inset: 16px;
  border: 1px dashed var(--accent-22);
  pointer-events: none;
}
body.wmi .wmi-lg-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  position: relative;
}
body.wmi .wmi-lg-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
body.wmi .wmi-lg-h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 72px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 16px 0 0;
  color: var(--text);
  position: relative;
}
body.wmi .wmi-lg-summary {
  margin-top: 18px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 760px;
  position: relative;
}
body.wmi .wmi-lg-meta {
  margin-top: 22px;
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  position: relative;
}
body.wmi .wmi-lg-meta strong { color: var(--text); font-weight: 500; }

/* ---- layout: TOC + cuerpo ---- */
body.wmi .wmi-lg-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: start;
}
body.wmi .wmi-lg-toc {
  background: var(--panel);
  border-right: 1px solid var(--accent-22);
  padding: 40px 32px;
  align-self: stretch;
}
body.wmi .wmi-lg-toc-inner { position: sticky; top: 80px; }
body.wmi .wmi-lg-toc-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}
body.wmi .wmi-lg-toc a {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
  transition: color .12s ease;
}
body.wmi .wmi-lg-toc a:hover { color: var(--text); }
body.wmi .wmi-lg-toc a .n {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.16em;
}
body.wmi .wmi-lg-toc-note {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid var(--accent-33);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
body.wmi .wmi-lg-toc-note .k {
  color: var(--accent);
  letter-spacing: 0.18em;
  font-size: 9.5px;
  display: block;
  margin-bottom: 6px;
}

/* ---- cuerpo del documento: estiliza tags genéricos ---- */
body.wmi .wmi-lg-content { padding: 40px 64px 64px; max-width: 880px; }
body.wmi .wmi-lg-body { line-height: 1.7; font-size: 14.5px; color: var(--text-body); }
body.wmi .wmi-lg-body h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 44px 0 14px;
  padding-top: 36px;
  border-top: 1px dashed var(--border);
  scroll-margin-top: 80px;
}
body.wmi .wmi-lg-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
body.wmi .wmi-lg-body p { margin: 0 0 14px; }
body.wmi .wmi-lg-body strong { color: var(--text); font-weight: 600; }
body.wmi .wmi-lg-body a { color: var(--accent); text-decoration: none; }
body.wmi .wmi-lg-body a:hover { text-decoration: underline; }
body.wmi .wmi-lg-body ul {
  margin: 6px 0 16px;
  padding: 0;
  list-style: none;
}
/* marcador por posición absoluta, NUNCA display:grid en el li:
   con grid, cada fragmento inline (<strong> + texto) se vuelve un
   grid item separado y el texto cae en la columna del marcador
   (párrafos de 1 palabra). */
body.wmi .wmi-lg-body ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}
body.wmi .wmi-lg-body ul li::before {
  content: '\203A';   /* › */
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  line-height: 1.7;
}
body.wmi .wmi-lg-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 0 0 16px;
}
body.wmi .wmi-lg-body th {
  background: var(--tint-04);
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--border-3);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
body.wmi .wmi-lg-body td {
  padding: 10px 14px;
  border: 1px solid var(--border-2);
  vertical-align: top;
}
body.wmi .wmi-lg-body tbody tr:nth-child(even) { background: var(--zebra); }

/* callout (intro destacada, ej. editorial-policy) */
body.wmi .wmi-lg-callout {
  background: var(--tint-04);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  margin-bottom: 36px;
}
body.wmi .wmi-lg-callout p { margin: 0; font-size: 15px; }

/* ---- end of document + cross-links ---- */
body.wmi .wmi-lg-endblock {
  margin-top: 40px;
  padding: 20px 22px;
  background: rgba(212, 160, 23, 0.03);
  border-left: 3px solid var(--accent);
}
body.wmi .wmi-lg-endblock .k {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
body.wmi .wmi-lg-endblock .v {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.55;
}
body.wmi .wmi-lg-related {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
body.wmi .wmi-lg-related a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--accent-33);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background .15s ease, border-color .15s ease;
}
body.wmi .wmi-lg-related a:hover {
  background: var(--tint-04);
  border-color: var(--accent);
}

/* ---- formulario opt-out ---- */
body.wmi .wmi-lg-form-card {
  max-width: 560px;
  border: 1px solid var(--accent-33);
  background: var(--panel);
  padding: 28px;
  position: relative;
  margin-top: 8px;
}
body.wmi .wmi-lg-form-card-inner {
  position: absolute;
  inset: 4px;
  border: 1px dashed var(--accent-22);
  pointer-events: none;
}
body.wmi .wmi-lg-form-card form { position: relative; display: flex; flex-direction: column; gap: 18px; }
body.wmi .wmi-lg-field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
body.wmi .wmi-lg-input {
  width: 100%;
  padding: 13px 14px;
  background: rgba(15, 12, 8, 0.9);
  color: var(--text);
  border: 1px solid var(--border-3);
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s ease;
}
body.wmi .wmi-lg-input:focus { border-color: var(--accent); }
body.wmi .wmi-lg-submit {
  background: var(--accent);
  color: #0a0807;
  border: none;
  padding: 15px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s ease, box-shadow .15s ease, transform .15s ease;
}
body.wmi .wmi-lg-submit:hover {
  filter: brightness(1.07);
  box-shadow: 0 10px 26px -10px rgba(212, 160, 23, 0.6);
  transform: translateY(-1px);
}
body.wmi .wmi-lg-msg { padding: 14px 16px; font-size: 13.5px; font-weight: 600; position: relative; margin-bottom: 4px; }
body.wmi .wmi-lg-msg--success { background: rgba(95,184,120,0.08); color: var(--ok); border: 1px solid rgba(95,184,120,0.3); }
body.wmi .wmi-lg-msg--error { background: rgba(232,91,91,0.08); color: var(--danger); border: 1px solid rgba(232,91,91,0.3); }
body.wmi .wmi-lg-form-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.55;
  position: relative;
}

/* ---- mobile ---- */
@media (max-width: 900px) {
  body.wmi .wmi-lg-layout { grid-template-columns: 1fr; }
  body.wmi .wmi-lg-toc { display: none; }
  body.wmi .wmi-lg-content { padding: 28px var(--gutter) 48px; }
  body.wmi .wmi-lg-related { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  body.wmi .wmi-lg-submit:hover { transform: none; }
}
