/* Las páginas legales (/privacy, /terms), con el lenguaje de la app: oscuras, planas, grises sólidos (sin bordes
   translúcidos ni desenfoques), la píldora verde de la marca solo en lo que importa. Arriba la barra con el cambio
   Privacidad / Términos (como el de los modos del editor); una portada con los tres pasos; el índice fijo a un lado con
   la sección que se lee encendida (una columna de fichas en el móvil); la barra fina de lo leído. */
:root {
  --green: #3ddc84; --pad: clamp(16px, 4vw, 48px);
  --bg: #0b0b0c; --s1: #131314; --s2: #19191b; --s3: #222225; --s4: #2c2c30;
  --t1: #f2f2f3; --t2: #b9b9bd; --t3: #85858b; --t4: #5c5c62;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--t1); font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--green); color: #06140c; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.sm { width: 14px; height: 14px; }

/* lo leído: una línea verde arriba del todo */
.lprog { position: fixed; z-index: 30; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; }
.lprog i { position: absolute; inset: 0; background: var(--green); transform-origin: 0 50%; transform: scaleX(0); }

/* ── la barra ── */
.lhead { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 72px; padding: 0 var(--pad); background: var(--bg); }
.lhead .brand img { height: 22px; display: block; }
.lswitch { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 99px; background: var(--s2); }
.lswitch .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 99px; background: var(--t1); transition: transform .35s var(--ease); }
.lswitch.terms .thumb { transform: translateX(100%); }
.lswitch a { position: relative; height: 34px; min-width: 92px; padding: 0 18px; display: grid; place-items: center; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--t3); transition: color .2s; }
.lswitch a:hover { color: var(--t1); }
.lswitch a[aria-current] { color: #0b0b0c; }
.lopen { justify-self: end; height: 38px; padding: 0 17px; display: inline-flex; align-items: center; border-radius: 99px; background: var(--s2); color: var(--t1); font-size: 13.5px; font-weight: 600; position: relative; isolation: isolate; }
.lopen::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--s4); opacity: 0; transition: opacity .15s; }
.lopen:hover::before { opacity: 1; }

/* ── la portada ── */
.lhero { max-width: 1120px; margin: 0 auto; padding: 72px var(--pad) 8px; display: grid; gap: 40px; }
.lhero-in { max-width: 760px; animation: rise .6s var(--ease) both; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 650 12px/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--t3); }
.kicker .pill { width: 18px; height: 8px; border-radius: 99px; background: var(--green); }
.lhero h1 { font: 700 clamp(42px, 7.4vw, 80px)/1 "Inter Display", Inter, sans-serif; letter-spacing: -.035em; margin: 20px 0 18px; }
.updated { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px; border-radius: 99px; background: var(--s2); color: var(--t3); font-size: 13px; font-weight: 500; }
.lead { margin-top: 26px; font-size: 19px; line-height: 1.6; color: var(--t2); text-wrap: pretty; }
.lead a.u, .doc a.u { color: var(--t1); text-decoration: underline; text-decoration-color: var(--s4); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.lead a.u:hover, .doc a.u:hover { text-decoration-color: var(--green); }

/* los tres pasos: tres fichas unidas por una línea que se llena de verde al llegar */
.lsteps { display: grid; grid-template-columns: 1fr 48px 1fr 48px 1fr; align-items: center; padding: 18px; border-radius: 28px; background: var(--s1); animation: rise .6s .08s var(--ease) both; }
.lstep { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 3px; align-items: center; padding: 14px; border-radius: 20px; background: var(--s2); }
.lstep-ic { grid-row: 1 / 3; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--s3); color: var(--t1); }
.lstep:first-child .lstep-ic { background: var(--green); color: #06140c; }
.lstep b { font-size: 15px; font-weight: 650; }
.lstep small { font-size: 13px; color: var(--t3); }
.lstep-line { position: relative; height: 2px; margin: 0 6px; border-radius: 2px; background: var(--s3); overflow: hidden; }
.lstep-line::after { content: ''; position: absolute; inset: 0; background: var(--green); transform-origin: 0 50%; animation: fill 1s .5s var(--ease) both; }
.lstep-line + .lstep + .lstep-line::after { animation-delay: 1.1s; }

/* ── el cuerpo: índice a un lado, lectura al otro ── */
.lbody { max-width: 1120px; margin: 0 auto; padding: 48px var(--pad) 24px; display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 56px; }
.ltoc { position: relative; }
.ltoc-in { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; }
.ltoc-t { margin: 0 0 10px 12px; font: 650 11.5px/1 Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--t4); }
.ltoc a { position: relative; display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.35; color: var(--t3); transition: color .15s; isolation: isolate; }
.ltoc a::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--s2); opacity: 0; transition: opacity .15s; }
.ltoc a:hover { color: var(--t1); }
.ltoc a.on { color: var(--t1); }
.ltoc a.on::before { opacity: 1; }
.ltoc a em { font-style: normal; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--t4); min-width: 16px; }
.ltoc a.on em { color: var(--green); }

.doc { max-width: 720px; min-width: 0; }

/* lo esencial, en tarjetas con su icono */
.glance { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px; }
.glance > div { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; row-gap: 6px; padding: 18px; border-radius: 22px; background: var(--s1); }
.glance .g-ic { grid-row: 1 / 3; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--s3); color: var(--t1); }
.glance .g-ic .ic { width: 19px; height: 19px; }
.glance b { align-self: center; font-size: 15px; font-weight: 650; line-height: 1.3; color: var(--t1); }
.glance > div > span:not(.g-ic) { font-size: 13.5px; line-height: 1.55; color: var(--t3); }

.doc h2 { display: flex; align-items: baseline; gap: 14px; font: 700 clamp(24px, 3vw, 30px)/1.2 "Inter Display", Inter, sans-serif; letter-spacing: -.02em; margin: 64px 0 16px; scroll-margin-top: 96px; }
.doc h2 em { flex: none; display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 8px; border-radius: 10px; background: var(--s2); color: var(--t3); font: 650 13px/1 Inter, sans-serif; font-style: normal; font-variant-numeric: tabular-nums; letter-spacing: 0; transform: translateY(-4px); }
.doc h3 { font-size: 16px; font-weight: 650; margin: 28px 0 8px; color: var(--t1); }
.doc p, .doc li { font-size: 16px; line-height: 1.75; color: var(--t2); }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 0; list-style: none; margin: 14px 0; }
.doc li { position: relative; padding-left: 26px; margin: 8px 0; }
.doc li::before { content: ""; position: absolute; left: 2px; top: .78em; width: 12px; height: 5px; border-radius: 99px; background: var(--s4); }
.doc strong { color: var(--t1); font-weight: 650; }
.doc .todo { background: #2a2410; color: #ffd43b; border-radius: 6px; padding: 1px 6px; }

/* las tablas de qué datos y para qué: filas como fichas */
.tbl { margin: 18px 0; display: flex; flex-direction: column; gap: 6px; }
.tbl .r { display: grid; grid-template-columns: 30% 1fr; gap: 18px; padding: 15px 18px; border-radius: 18px; background: var(--s1); }
.tbl .r > * { font-size: 14.5px; line-height: 1.6; }
.tbl .r > :first-child { color: var(--t1); font-weight: 650; }
.tbl .r > :last-child { color: var(--t2); }

/* al final, la otra página */
.lnext { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 4px; margin-top: 72px; padding: 22px 24px; border-radius: 24px; background: var(--s1); }
.lnext::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--s2); opacity: 0; transition: opacity .15s; }
.lnext:hover::before { opacity: 1; }
.lnext small { grid-column: 1; font-size: 12.5px; color: var(--t3); }
.lnext b { grid-column: 1; font: 700 22px/1.2 "Inter Display", Inter, sans-serif; letter-spacing: -.015em; }
.lnext .arr { grid-column: 2; grid-row: 1 / 3; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--t1); color: #0b0b0c; font-size: 18px; font-weight: 600; transition: transform .3s var(--ease); }
.lnext:hover .arr { transform: translateX(4px); }

/* ── el pie ── */
.lfoot { margin-top: 64px; background: var(--s1); }
.lfoot-in { max-width: 1120px; margin: 0 auto; padding: 40px var(--pad) 44px; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "brand links copy" "text links copy"; column-gap: 32px; row-gap: 12px; align-items: start; }
.lfoot .brand { grid-area: brand; }
.lfoot .brand img { height: 22px; display: block; }
.lfoot p { grid-area: text; max-width: 320px; font-size: 13.5px; line-height: 1.55; color: var(--t3); }
.lfoot .links { grid-area: links; justify-self: center; display: flex; flex-wrap: wrap; gap: 6px 22px; padding-top: 2px; }
.lfoot .links a { font-size: 13.5px; font-weight: 500; color: var(--t3); transition: color .15s; }
.lfoot .links a:hover { color: var(--t1); }
.lfoot .copy { grid-area: copy; font-size: 12.5px; color: var(--t4); padding-top: 3px; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fill { from { transform: scaleX(0); } }

/* ── tableta: el índice pasa arriba, en fichas que se deslizan ── */
@media (max-width: 920px) {
  .lbody { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; }
  .lhero { grid-template-columns: minmax(0, 1fr); }
  .ltoc { position: sticky; top: 72px; z-index: 10; min-width: 0; margin: 0 calc(var(--pad) * -1) 28px; padding: 10px var(--pad); background: var(--bg); }
  .ltoc-in { position: static; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .ltoc-in::-webkit-scrollbar { display: none; }
  .ltoc-t { display: none; }
  .ltoc a { flex: none; padding: 8px 14px; border-radius: 99px; background: var(--s1); white-space: nowrap; scroll-snap-align: start; }
  .doc { max-width: none; }
  .doc h2 { scroll-margin-top: 140px; }
  .lsteps { grid-template-columns: 1fr; gap: 0; padding: 12px; }
  .lstep-line { width: 2px; height: 18px; margin: 0 0 0 37px; }
  .lstep-line::after { transform-origin: 50% 0; animation-name: fillV; }
}
@keyframes fillV { from { transform: scaleY(0); } }

/* ── móvil ── */
@media (max-width: 640px) {
  .lhead { grid-template-columns: auto 1fr; height: 64px; gap: 10px; }
  .lhead .brand img { height: 19px; }
  .lswitch { justify-self: end; }
  .lswitch a { min-width: 0; padding: 0 14px; height: 32px; font-size: 13px; }
  .lopen { display: none; }
  .ltoc { top: 64px; }
  .doc h2 { scroll-margin-top: 130px; }
  .lhero { padding-top: 40px; gap: 28px; }
  .lead { font-size: 17px; }
  .glance { grid-template-columns: 1fr; }
  .tbl .r { grid-template-columns: 1fr; gap: 4px; }
  .doc p, .doc li { font-size: 15.5px; }
  .lfoot-in { grid-template-columns: 1fr; grid-template-areas: "brand" "text" "links" "copy"; }
  .lfoot .links { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lhero-in, .lsteps, .lstep-line::after { animation: none; }
}
