/* legal.css — Aviso legal, Privacidad, Cookies. Needs site.css + mantenimiento.css */

.cw-legal{ padding:clamp(2.4rem,5vw,4rem) 0 clamp(3rem,6vw,5rem); }
.cw-legal__inner{ display:grid; grid-template-columns:minmax(0,1fr); gap:clamp(1.6rem,4vw,3rem); }
@container (min-width: 920px){
  .cw-legal__inner{ grid-template-columns:240px minmax(0,1fr); align-items:start; }
}

/* hero */
.cw-legal__hero{ border-bottom:1px solid var(--gray-200); padding-bottom:1.6rem; margin-bottom:.4rem; }
.cw-legal__hero h1{ margin:.5rem 0 .4rem; font-size:clamp(1.9rem,4.4vw,2.9rem); letter-spacing:-.02em; }
.cw-legal__updated{ color:var(--fg-subtle); font-size:.92rem; }

/* table of contents (sticky on desktop) */
.cw-legal__toc{ position:relative; }
@container (min-width: 920px){
  .cw-legal__toc{ position:sticky; top:96px; }
}
.cw-legal__toc h2{ font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; color:var(--fg-subtle); margin:0 0 .7rem; }
.cw-legal__toc ol{ list-style:none; margin:0; padding:0; counter-reset:toc; display:flex; flex-direction:column; gap:.1rem; }
.cw-legal__toc a{ display:block; padding:.42rem .6rem; border-radius:var(--radius-sm); color:var(--fg-muted);
  font-size:.9rem; line-height:1.3; text-decoration:none; counter-increment:toc; transition:background var(--dur),color var(--dur); }
.cw-legal__toc a::before{ content:counter(toc) ". "; color:var(--brand-orange); font-weight:600; }
.cw-legal__toc a:hover{ background:var(--gray-100); color:var(--fg); }

/* prose */
.cw-legal__doc{ max-width:none; }
.cw-legal__doc section{ scroll-margin-top:90px; padding:1.4rem 0; border-top:1px solid var(--gray-200); }
.cw-legal__doc section:first-child{ border-top:none; padding-top:0; }
.cw-legal__doc h2{ font-size:clamp(1.2rem,2.4vw,1.5rem); letter-spacing:-.01em; margin:0 0 .8rem;
  display:flex; gap:.6rem; align-items:baseline; }
.cw-legal__doc h2 .cw-legal__num{ color:var(--brand-orange); font-variant-numeric:tabular-nums; font-size:.85em; }
.cw-legal__doc h3{ font-size:1.02rem; margin:1.3rem 0 .5rem; }
.cw-legal__doc p{ margin:0 0 .9rem; color:var(--fg-muted); line-height:1.72; }
.cw-legal__doc a{ color:var(--brand-orange); text-decoration:underline; text-underline-offset:2px; }
.cw-legal__doc ul, .cw-legal__doc ol{ margin:0 0 1rem; padding-left:1.3rem; color:var(--fg-muted); line-height:1.7; }
.cw-legal__doc li{ margin:.3rem 0; }
.cw-legal__doc li::marker{ color:var(--brand-orange); }
.cw-legal__doc strong{ color:var(--fg); font-weight:600; }

/* placeholder token — data the client must fill in */
.cw-todo{ background:color-mix(in srgb,var(--brand-orange) 16%, white);
  color:var(--coral-600); border:1px dashed color-mix(in srgb,var(--brand-orange) 55%, white);
  border-radius:6px; padding:.04em .42em; font-weight:600; font-size:.93em; white-space:nowrap; }

/* callout note */
.cw-legal__note{ background:var(--gray-100); border:1px solid var(--gray-200); border-left:3px solid var(--brand-orange);
  border-radius:var(--radius-md); padding:1rem 1.2rem; margin:0 0 1rem; color:var(--fg-muted); font-size:.95rem; line-height:1.65; }
.cw-legal__note strong{ color:var(--fg); }

/* data table */
.cw-legal__table{ width:100%; border-collapse:collapse; margin:0 0 1.2rem; font-size:.92rem; }
.cw-legal__table th, .cw-legal__table td{ text-align:left; padding:.7rem .8rem; border:1px solid var(--gray-200); vertical-align:top; line-height:1.5; }
.cw-legal__table th{ background:var(--gray-100); font-weight:600; color:var(--fg); }
.cw-legal__table td{ color:var(--fg-muted); }

/* contact block at the foot of a doc */
.cw-legal__contact{ background:var(--ink-900); color:#fff; border-radius:var(--radius-lg); padding:1.6rem 1.8rem; margin-top:1.4rem; }
.cw-legal__contact h3{ margin:0 0 .5rem; color:#fff; }
.cw-legal__contact p{ color:var(--gray-300); margin:0 0 .8rem; }
.cw-legal__contact a{ color:#fff; font-weight:600; }
