/* ==========================================================================
   AC Academy · Prototipo 02 «Xcode» v2 — la code review
   La página se lee como una revisión: Julio comenta en el margen y corrige
   con la pluma roja. Sintaxis de Xcode (Default Dark), Inter y JetBrains Mono.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark light;   /* oscuro por defecto; claro si el sistema lo pide */
  /* superficie */
  --bg: #1e1f22;
  --s1: #292a30;           /* fondo del editor de Xcode */
  --s2: #32343b;
  --hot: #3a2b30;          /* línea comentada */
  --line: #393b41;
  --line-2: #5b5e66;
  /* tinta */
  --ink: #e8e8ea;
  --ink-2: #b1b3ba;
  --ink-3: #9a9ca5;
  --gut: #74777f;
  /* sintaxis */
  --kw: #ff7ab2;
  --ty: #5dd8ff;
  --pj: #9ef1dd;
  --sy: #d0a8ff;
  --fn: #67b7a4;
  --st: #ff8170;
  --nu: #d9c97c;
  /* la pluma roja */
  --red: #ff4438;
  --red-t: #ff6b60;
  --on-red: #141518;
  --red-h: #ff5d52;
  --orange: #ff8a4c;
  --add: rgb(93 216 255 / .08);
  --del: rgb(255 68 56 / .1);
  /* piezas de la interfaz de Xcode */
  --bar: #25262b;
  --code: #dfdfe0;
  --term: #141518;
  --term-out: #17181c;
  --sb-bg: #26272b;
  --glass: rgb(30 31 34 / .88);
  --shadow: rgb(0 0 0 / .85);
  --divider: rgb(0 0 0 / .18);
  --stripe: rgb(255 255 255 / .025);
  --folder: #6aa9e9;
  --folder-sel: rgb(106 169 233 / .16);
  --prose: #d6d7db;
  --ink-max: #fff;
  /* tipografía */
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --fs-xs: .8125rem;
  --fs-s: .9375rem;
  --fs-m: 1.1875rem;
  --fs-l: clamp(1.1875rem, 1.05rem + .5vw, 1.4375rem);
  --fs-h2: clamp(2rem, 1.35rem + 2.5vw, 3.375rem);
  --fs-h1: clamp(2.75rem, 1.6rem + 3.4vw, 4.5rem);
  /* espacio y forma (radios distintos según el objeto, no uno para todo) */
  --pad: clamp(1rem, .3rem + 3vw, 3rem);
  --max: 78rem;
  --sec: clamp(4rem, 2.6rem + 5vw, 7.25rem);
  --r-1: 4px;
  --r-2: 8px;
  --r-3: 12px;
  --top: 4rem;
  --sb: 0px;
  /* movimiento */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: 400ms;
}

@view-transition { navigation: auto; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 1rem); scroll-padding-bottom: calc(var(--sb) + 1rem); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 600; line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -.052em; line-height: .98; }
h2 { font-size: var(--fs-h2); letter-spacing: -.042em; line-height: 1.04; }
h3 { font-size: 1.25rem; line-height: 1.25; }
p, li, dd, blockquote, figcaption { text-wrap: pretty; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
strong, b { font-weight: 600; }
code { font: 500 .88em var(--mono); color: var(--ty); }
cite { font-style: italic; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 50; padding: .75rem 1rem; border-radius: var(--r-2); background: var(--red); color: var(--on-red); font-weight: 600; text-decoration: none; }
.skip:focus { top: .75rem; }

/* ---------- Utilidades ---------- */
.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
.sec { padding-block: var(--sec); }
.sec--line { border-top: 1px solid var(--line); }
.lede { font-size: var(--fs-l); line-height: 1.5; color: var(--ink-2); max-width: 36rem; }
.note { font-size: var(--fs-s); color: var(--ink-2); }
.kicker, .st, .mini { font: 500 var(--fs-xs)/1.4 var(--mono); letter-spacing: .005em; color: var(--ink-3); }
.st { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink-2); }
.st::before { content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--c, var(--red)); }
.st--live::before { box-shadow: 0 0 0 3px rgb(255 68 56 / .22); }
.st--next { --c: var(--ty); }
.st--app { --c: var(--nu); }
.mini { display: block; margin-block: 2.25rem .875rem; font-weight: 500; letter-spacing: 0; }
.plus { font-size: .5em; font-weight: 500; vertical-align: .5em; margin-right: .06em; }
.head { display: grid; gap: 1rem; margin-bottom: clamp(2.25rem, 1.2rem + 3vw, 4rem); max-width: 46rem; }
.hand { font: 400 clamp(1.4rem, 1.2rem + .8vw, 1.7rem)/1 var(--hand); color: var(--red); rotate: -2deg; }
.sign { display: block; margin-top: 1rem; font: 400 1.9rem/1 var(--hand); color: var(--red); rotate: -3deg; transform-origin: left; }

/* ---------- Botones: un solo CTA principal ---------- */
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .75rem 1.375rem;
  border-radius: var(--r-2); background: var(--red); color: var(--on-red);
  font: 600 1rem/1.2 var(--sans); letter-spacing: -.01em; text-decoration: none;
  transition: background-color .2s var(--ease);
}
.btn:hover { background: var(--red-h); }
.btn--line { min-height: 2.5rem; padding: .5rem 1rem; background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); font-size: var(--fs-s); }
.btn--line:hover { background: var(--s1); }
.tlink { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 500; text-decoration: none; }
.tlink::after { content: "→" / ""; margin-left: .45em; color: var(--red-t); transition: translate .25s var(--ease); }
.tlink:hover { text-decoration: underline; text-decoration-color: var(--line-2); }
.tlink:hover::after { translate: .2em 0; }

/* ---------- Cabecera ---------- */
.top {
  position: sticky; top: 0; z-index: 30; height: var(--top);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 100%; }
.logo { display: inline-flex; align-items: center; gap: .625rem; font-weight: 600; letter-spacing: -.015em; text-decoration: none; white-space: nowrap; }
.logo__mark { display: block; flex: none; }
.logo__mark img { display: block; width: auto; height: 2.5rem; }
.foot__brand .logo__mark img { height: 3.5rem; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav ul { display: flex; gap: 1.75rem; }
.nav ul a { display: block; padding-block: .5rem; font-size: var(--fs-s); color: var(--ink-2); text-decoration: none; transition: color .2s var(--ease); }
.nav ul a:hover, .nav [aria-current="page"] { color: var(--ink); }
.nav [aria-current="page"] { box-shadow: inset 0 -2px var(--red); }
.menu-btn { display: none; min-height: 2.75rem; padding: .5rem .875rem; border: 1px solid var(--line-2); border-radius: var(--r-2); background: none; color: var(--ink); font: 500 var(--fs-xs)/1 var(--mono); cursor: pointer; }

/* ---------- Revisión: comentario de Julio ---------- */
.rv { position: relative; align-self: start; max-width: 34rem; padding: .875rem 1rem 1rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); font-size: var(--fs-s); line-height: 1.5; }
.rv__h { display: flex; align-items: center; gap: .55rem; margin-bottom: .5rem; font-size: var(--fs-xs); color: var(--ink-3); }
.rv__h b { color: var(--ink); }
.rv > p + p, .rv .sug { margin-top: .625rem; }
.av { display: grid; place-items: center; flex: none; width: 1.625rem; height: 1.625rem; border-radius: 50%; background: var(--red); color: var(--on-red); font: 700 .625rem/1 var(--mono); letter-spacing: -.02em; }
.rv code { color: var(--ty); }

/* rejilla de revisión: contenido + margen de comentarios */
.rg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.rg > h2 { margin-bottom: clamp(.25rem, -1rem + 3vw, 1.5rem); }
.rg > .rv { margin-top: -.75rem; }
.rg > .rv::before { content: ""; position: absolute; left: 1.8rem; bottom: 100%; height: 1.25rem; border-left: 1px dashed var(--red); }

/* ---------- La pluma roja ---------- */
.pen { position: absolute; overflow: visible; color: var(--red); pointer-events: none; z-index: 2; }
.pen path { stroke-width: 2.5; }
.pen-t, .pen-u, .pen-s, .pen-c { position: relative; }
.pen-u, .pen-c { white-space: nowrap; }
.pen--circle { left: -.7em; top: -.6em; width: calc(100% + 1.35em); height: calc(100% + 1.2em); }
.pen--u { left: -2%; bottom: -.42em; width: 104%; height: .55em; }
.pen--s { left: -1.5%; top: calc(50% - .3em); width: 103%; height: .6em; }
.pen--check { position: static; flex: none; width: 1.75rem; height: 1.75rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 1rem + 3vw, 4rem) clamp(4rem, 2rem + 6vw, 8rem); }
.hero__grid { display: grid; gap: 3rem; align-items: center; }
.hero__txt { display: grid; gap: 1.5rem; justify-items: start; }
.hero h1 span { display: block; color: var(--ink-2); }
.hero .ctas { margin-top: .5rem; }
.hero__note { margin-top: -.5rem; }

/* editor */
.ed { min-width: 0; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: 0 40px 80px -40px var(--shadow); }
.ed__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .625rem 1rem; border-bottom: 1px solid var(--line); border-radius: var(--r-3) var(--r-3) 0 0; background: var(--bar); font: 500 .75rem/1.3 var(--mono); color: var(--ink-3); }
.ed__file { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); }
.ed__file::before { content: ""; width: .625rem; height: .75rem; border-radius: 2px; background: linear-gradient(135deg, var(--orange), var(--red)); }
.ed__file--cfg::before { background: var(--line-2); }
.code { padding-block: .875rem; overflow-x: auto; font: 400 .8125rem/1.62 var(--mono); tab-size: 4; counter-reset: ln; }
.code:focus-visible { outline-offset: -2px; }
.code > code { display: block; width: max-content; min-width: 100%; font: inherit; color: var(--code); }
.l { position: relative; display: block; padding: 0 1.5rem 0 3.25rem; white-space: pre; counter-increment: ln; }
.l::before { content: counter(ln) / ""; position: absolute; left: 0; width: 2.25rem; text-align: right; color: var(--gut); }
.l--hot { background: var(--hot); box-shadow: inset 2px 0 var(--red); }
.l--hot::before { color: var(--red-t); }
.k { color: var(--kw); font-weight: 600; }
.t { color: var(--pj); }
.o { color: var(--sy); }
.f { color: var(--fn); }
.ed .rv { margin: .25rem 1rem 1rem; background: var(--s2); max-width: none; }
.sug { overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--s1); }
.sug__h { padding: .375rem .75rem; border-bottom: 1px solid var(--line); font: 500 .75rem/1.4 var(--mono); color: var(--ink-3); }
.sug pre { padding-block: .375rem; font: 400 .8125rem/1.65 var(--mono); white-space: pre-wrap; color: var(--code); }
.sug del, .sug ins { display: block; text-decoration: none; }
.dl { position: relative; display: block; padding: 0 .75rem 0 2rem; }
.sug del .dl { background: var(--del); }
.sug ins .dl { background: var(--add); }
.dl::before { position: absolute; left: .75rem; }
.sug del .dl::before { content: "−" / ""; color: var(--red-t); }
.sug ins .dl::before { content: "+" / ""; color: var(--ty); }
.dl.gap { color: var(--gut); padding-block: .125rem; }

/* ---------- Clientes en una frase ---------- */
.clients { padding-block: clamp(3.5rem, 2rem + 5vw, 7rem); border-block: 1px solid var(--line); }
.clients p { max-width: 60rem; font-size: clamp(1.5rem, 1rem + 2.2vw, 2.75rem); font-weight: 500; line-height: 1.22; letter-spacing: -.03em; color: var(--ink-3); text-wrap: balance; }
.clients b { color: var(--ink); font-weight: 600; }

/* ---------- Programas ---------- */
.prog { position: relative; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); transition: border-color .3s var(--ease); }
.prog:hover, .prog:focus-within { border-color: var(--red); }
.prog--main { display: grid; gap: 2rem; padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); }
.prog--main h3 { margin-block: 1.125rem .625rem; font-size: clamp(1.875rem, 1.3rem + 1.8vw, 2.75rem); letter-spacing: -.04em; }
.prog__txt > p:not(.st) { max-width: 26rem; font-size: var(--fs-m); color: var(--ink-2); }
.more { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: 1.25rem; font-weight: 600; color: var(--red-t); text-decoration: none; }
.more::after { content: "→" / ""; margin-left: .45em; transition: translate .25s var(--ease); }
.more::before { content: ""; position: absolute; inset: 0; border-radius: var(--r-3); }
.more:focus-visible { outline: none; }
.more:focus-visible::before { outline: 2px solid var(--red); outline-offset: 3px; }
.prog:hover .more::after { translate: .25em 0; }
.insp { align-self: end; border-top: 1px solid var(--line); font-size: var(--fs-s); }
.insp div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .7rem; border-bottom: 1px solid var(--line); }
.insp dt { font: 500 .75rem/1.9 var(--mono); color: var(--ink-3); }
.insp dd { font-weight: 500; text-align: right; }
.prog-list { display: grid; gap: .75rem; }
.prog--row { display: grid; gap: .5rem 2rem; padding: 1.25rem 1.5rem; }
.prog--row h3 { font-size: 1.1875rem; margin-top: .375rem; }
.prog--row p:not(.st) { color: var(--ink-2); font-size: var(--fs-s); }
.prog--row .more { margin-top: 0; justify-self: start; }
.meta { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: .375rem; font: 400 .75rem/1.6 var(--mono); color: var(--ink-3); }
.meta dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- Motion 3D como lienzo de Preview ---------- */
.pv {
  --r3d-bg: #1e1f22; --r3d-ink: #e8e8ea; --r3d-muted: #5b5e66; --r3d-accent: #ff4438; --r3d-accent-2: #ff7ab2;
  --r3d-shift-x: .2; --r3d-shift-y: .02; --r3d-shift-x-sm: 0; --r3d-shift-y-sm: .24;
  --pv-t: calc(var(--top) + .75rem); --pv-x: max(var(--pad), (100% - var(--max)) / 2); --pv-b: calc(var(--sb) + .75rem); --pv-bar: 2.25rem;
  border-top: 1px solid var(--line);
}
.pv[data-r3d="camino"] { --r3d-shift-x: .14; }
.pv__bar {
  display: flex; align-items: center; gap: .5rem; position: relative; height: var(--pv-bar); padding-inline: 1rem;
  background: var(--bar); border-bottom: 1px solid var(--line); font: 500 .75rem/1 var(--mono); color: var(--ink-2);
}
.pv__bar::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--red); }
.pv__bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--red); transform-origin: left; transform: scaleX(var(--r3d-p, 0)); }
.pv h2 { font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.625rem); letter-spacing: -.04em; }
.pv__intro { margin-top: 1rem; color: var(--ink-2); font-size: var(--fs-s); }
.r3d__steps { gap: .125rem; margin-top: 1.75rem; }
.r3d__steps li { position: relative; padding: .5rem .625rem .5rem 2.75rem; border-radius: var(--r-2); font-size: var(--fs-s); line-height: 1.45; color: var(--ink-2); }
.r3d__steps li::before {
  content: counter(r3d, decimal-leading-zero) / ""; position: absolute; left: .5rem; top: .6rem; width: 1.625rem; height: 1.125rem;
  display: grid; place-items: center; padding-right: .25rem; font: 600 .6875rem/1 var(--mono); color: var(--ink-3);
  clip-path: polygon(0 0, 72% 0, 100% 50%, 72% 100%, 0 100%); transition: background-color .3s, color .3s;
}
.r3d__steps strong { color: var(--ink); font-weight: 600; }
.r3d__steps li[aria-current] { background: rgb(255 68 56 / .1); color: var(--ink); }
.r3d__steps li[aria-current]::before { background: var(--red); color: var(--on-red); }
.r3d--scrub .r3d__steps li:not([aria-current]):not(.is-past) { opacity: .6; }
.r3d--scrub .r3d__steps li.is-past:not([aria-current]) { opacity: .75; }
.r3d__tag { padding: .3rem .5rem; border: 1px solid var(--line-2); border-radius: var(--r-1); background: var(--glass); font: 500 .75rem/1 var(--mono); color: var(--ink); }
.r3d__tag b { margin-right: .3rem; color: var(--red-t); font-weight: 600; }
.r3d__pause {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-2);
  background: var(--s1); color: var(--ink); font: 500 .75rem/1 var(--mono);
}
.r3d__pause::before { content: ""; width: .5rem; height: .625rem; border-inline: 2px solid currentColor; }
.r3d__pause[aria-pressed="true"]::before { width: 0; height: 0; border: solid transparent; border-width: .3125rem 0 .3125rem .5rem; border-left-color: currentColor; }
.r3d__pause[hidden] { display: none; }
.r3d__pause:hover { border-color: var(--ink-3); }
.r3d__pause:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* sin scroll guiado: una ventana de Preview fija dentro de la página */
.pv:not(.r3d--scrub) { padding-block: var(--sec); }
.pv:not(.r3d--scrub) .r3d__sticky { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--r3d-bg); }
.pv:not(.r3d--scrub) .pv__bar { grid-column: 1 / -1; order: -1; }
.pv:not(.r3d--scrub) .r3d__copy { padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); }
.pv.r3d--fallback .pv__bar::after { display: none; }
.pv:not(.r3d--scrub) .r3d__stage { order: 1; border-top: 1px solid var(--line); }

/* scroll guiado: el marco de Preview ocupa la pantalla */
.r3d--scrub .r3d__sticky::before { content: ""; position: absolute; inset: var(--pv-t) var(--pv-x) var(--pv-b); border: 1px solid var(--line); border-radius: var(--r-3); background: var(--r3d-bg); }
.r3d--scrub .pv__bar { position: absolute; z-index: 2; top: calc(var(--pv-t) + 1px); left: calc(var(--pv-x) + 1px); right: calc(var(--pv-x) + 1px); border-radius: 11px 11px 0 0; }
.r3d--scrub .r3d__stage { inset: calc(var(--pv-t) + var(--pv-bar) + 1px) calc(var(--pv-x) + 1px) calc(var(--pv-b) + 1px); border-radius: 0 0 11px 11px; }
.r3d--scrub .r3d__copy {
  position: absolute; top: calc(var(--pv-t) + var(--pv-bar) + 1px); bottom: calc(var(--pv-b) + 1px); left: calc(var(--pv-x) + 1px);
  width: min(40%, 33rem); padding: 2.5rem 4rem 2.5rem clamp(1.5rem, 1rem + 1.5vw, 2.75rem);
  display: flex; flex-direction: column; justify-content: center; border-radius: 0 0 0 11px;
  background: linear-gradient(90deg, var(--r3d-bg) 66%, color-mix(in srgb, var(--r3d-bg) 80%, transparent) 82%, transparent);
}
.r3d--scrub .r3d__pause { right: calc(var(--pv-x) + 1rem); bottom: calc(var(--pv-b) + 1rem); }

/* ---------- Empresas ---------- */
.emp { display: grid; gap: 3rem; }
.emp .head { margin-bottom: 0; }
.emp .head .ctas { margin-top: 1rem; }
.pts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; border-top: 1px solid var(--line); }
.pts li { padding: 1rem 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { padding: .375rem .625rem; border: 1px solid var(--line-2); border-radius: var(--r-1); font: 400 var(--fs-xs)/1.3 var(--mono); }

/* ---------- Director ---------- */
.dir { display: grid; gap: 2.5rem 4rem; align-items: start; }
.mono { display: grid; place-items: center; width: clamp(6rem, 4rem + 8vw, 12rem); aspect-ratio: 1; border-radius: 50%; background: var(--red); color: var(--on-red); font: 700 clamp(2rem, 1.2rem + 3vw, 4rem)/1 var(--mono); letter-spacing: -.06em; }
.bio { display: grid; gap: 1rem; }
.bio .role { font: 500 var(--fs-xs)/1.4 var(--mono); color: var(--ty); }
.bio > p:not(.role, .kicker) { color: var(--ink-2); font-size: var(--fs-m); max-width: 34rem; }
.quote { padding-left: 1.25rem; border-left: 2px solid var(--line-2); font-size: var(--fs-l); line-height: 1.4; letter-spacing: -.015em; }
.letter { padding: 1.5rem 1.75rem 1.25rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); }
.letter blockquote { font-size: clamp(1.1875rem, 1.05rem + .45vw, 1.375rem); line-height: 1.5; letter-spacing: -.012em; }

/* ---------- Historia: git log ---------- */
.hist { display: grid; gap: 3.5rem; }
.glog li:not(:last-child)::after { content: ""; position: absolute; left: .4375rem; top: 1.55rem; bottom: -1.05rem; width: 2px; background: var(--line-2); transform-origin: top; }
.glog li { position: relative; display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); gap: .125rem 1rem; padding: .8rem 0 .8rem 2.25rem; }
.glog li::before { content: ""; position: absolute; z-index: 1; left: 0; top: 1.05rem; width: 1rem; height: 1rem; border: 2px solid var(--ink-3); border-radius: 50%; background: var(--bg); }
.glog time { font: 500 1rem/1.5 var(--mono); color: var(--nu); }
.glog li > span:not(.tag) { font-size: var(--fs-m); line-height: 1.4; }
.glog .is-head::before { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px rgb(255 68 56 / .2); }
.tag { grid-column: 2; justify-self: start; margin-top: .375rem; padding: .25rem .45rem; border: 1px solid var(--red); border-radius: var(--r-1); font: 500 .6875rem/1 var(--mono); color: var(--red-t); }
.stats { display: grid; gap: 1.75rem; align-content: start; }
.stats li { display: grid; gap: .25rem; color: var(--ink-2); }
.stats strong { font: 600 clamp(2.25rem, 1.6rem + 2.2vw, 3.5rem)/1 var(--sans); letter-spacing: -.045em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats li:first-child strong { font-size: clamp(4rem, 2.6rem + 5vw, 7.5rem); }

/* ---------- Testimonios ---------- */
.tq--main { max-width: 58rem; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.tq--main blockquote { font-size: clamp(1.75rem, 1.15rem + 2.3vw, 3rem); font-weight: 500; line-height: 1.14; letter-spacing: -.035em; }
.tq figcaption { margin-top: 1.25rem; font-size: var(--fs-s); color: var(--ink-2); }
.tq figcaption strong { color: var(--ink); }
.tq-pair { display: grid; gap: 2.5rem 4rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.tq-pair blockquote { font-size: var(--fs-l); line-height: 1.42; letter-spacing: -.012em; }

/* ---------- Diario ---------- */
.split { display: grid; gap: 2.5rem 5rem; }
.posts { border-top: 1px solid var(--line); }
.posts article { position: relative; display: grid; gap: .375rem; padding: 1.5rem 3rem 1.5rem 0; border-bottom: 1px solid var(--line); }
.posts h3 { max-width: 38ch; font-size: clamp(1.25rem, 1rem + .9vw, 1.625rem); letter-spacing: -.028em; }
.posts a { text-decoration: none; }
.posts a::before { content: ""; position: absolute; inset: 0; }
.posts a::after { content: "→" / ""; position: absolute; right: .25rem; top: 50%; translate: 0 -50%; color: var(--ink-3); transition: translate .25s var(--ease), color .25s; }
.posts article:hover a::after { translate: .35rem -50%; color: var(--red-t); }
.posts article:hover h3 { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .18em; }
.posts p { color: var(--ink-2); }

/* ---------- Cierre: la revisión aprobada ---------- */
.merge { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-3); }
.merge__st { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .875rem clamp(1.25rem, .8rem + 2vw, 2.5rem); background: var(--s1); border-bottom: 1px solid var(--line); font-size: var(--fs-s); color: var(--ink-2); }
.merge__st b { color: var(--ink); }
.merge__body { display: grid; gap: 1.5rem; justify-items: start; padding: clamp(2.25rem, 1rem + 4.5vw, 5rem) clamp(1.25rem, .8rem + 2vw, 2.5rem); }
.merge h2 { max-width: 15ch; font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.75rem); letter-spacing: -.05em; line-height: 1; }
.merge h2 span { color: var(--ink-2); }
.merge .hand { margin-left: .25rem; }
.phone { font: 400 var(--fs-xs)/1.5 var(--mono); color: var(--ink-2); }
.phone a { color: var(--ink); }

/* ---------- Pie + barra de estado ---------- */
.foot { padding-block: 3.5rem calc(1.5rem + var(--sb)); border-top: 1px solid var(--line); font-size: var(--fs-s); color: var(--ink-2); }
.foot__grid { display: grid; gap: 2.25rem 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.foot__brand { grid-column: 1 / -1; display: grid; gap: .875rem; align-content: start; }
.foot__brand .logo { color: var(--ink); }
.foot__h { margin-bottom: .75rem; font: 500 .75rem/1.4 var(--mono); letter-spacing: 0; color: var(--ink-3); }
.foot ul { display: grid; gap: .375rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot address { font-style: normal; line-height: 1.85; }
.colo { grid-column: 1 / -1; display: grid; gap: .5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.colo p:first-child { max-width: 38rem; color: var(--ink); }
.colo__a { display: flex; align-items: center; gap: .4rem; font: 500 var(--fs-xs)/1.4 var(--mono); color: var(--ty); }
.colo__a svg { width: 1rem; height: 1rem; flex: none; }
.colo__v { font: 400 .75rem/1.6 var(--mono); color: var(--ink-3); }
.sb { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .875rem; width: min(100% - 2 * var(--pad), var(--max)); margin: 2rem auto 0; padding-top: 1rem; border-top: 1px solid var(--line); font: 500 .75rem/1.5 var(--mono); color: var(--ink-2); }
.sb > span { display: inline-flex; align-items: center; gap: .375rem; white-space: nowrap; }
.sb svg { width: .875rem; height: .875rem; flex: none; }
.sb .sep { color: var(--line-2); }
.sb__ok svg { color: var(--ink-3); }
.sb__sec { display: none !important; }
@media (max-width: 63.99em) { .sb { column-gap: 1.25rem; } .sb .sep { display: none; } }

/* ---------- Ficha ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; font: 400 var(--fs-xs)/1.5 var(--mono); color: var(--ink-3); }
.crumbs li + li::before { content: "›" / ""; margin-right: .5rem; color: var(--line-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-2); }
.cfg { padding-block: .875rem; font: 400 var(--fs-xs)/1.55 var(--mono); counter-reset: ln; }
.cfg div { position: relative; display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); gap: 1rem; padding: .45rem 1.25rem .45rem 3.25rem; counter-increment: ln; }
.cfg div::before { content: counter(ln) / ""; position: absolute; left: 0; top: .45rem; width: 2.25rem; text-align: right; color: var(--gut); }
.cfg dt { color: var(--kw); }
.cfg dd { color: var(--code); }
.cfg .n { color: var(--nu); }

.diff { display: grid; gap: 1rem; }
.diff__col { overflow: hidden; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-2); }
.diff h3 { display: flex; gap: .625rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: var(--bar); font-size: 1.0625rem; }
.diff h3::before { font-family: var(--mono); font-weight: 500; }
.diff__col--add h3::before { content: "+" / ""; color: var(--ty); }
.diff__col--del h3::before { content: "−" / ""; color: var(--red-t); }
.diff ul { padding-block: .375rem; }
.diff li { position: relative; padding: .55rem 1rem .55rem 2.5rem; line-height: 1.5; }
.diff li::before { position: absolute; left: 1rem; font-family: var(--mono); }
.diff__col--add li { background: var(--add); }
.diff__col--add li::before { content: "+" / ""; color: var(--ty); }
.diff__col--del li { background: var(--del); }
.diff__col--del li::before { content: "−" / ""; color: var(--red-t); }
.diff li + li { border-top: 1px solid var(--divider); }

.tests { display: grid; column-gap: 3.5rem; }
.tests li { position: relative; padding: 1rem 0 1rem 2.25rem; border-bottom: 1px solid var(--line); font-size: var(--fs-m); line-height: 1.4; }
.tests li::before { content: ""; position: absolute; left: .2rem; top: 1.4rem; width: .7rem; height: .7rem; rotate: 45deg; border: 1.5px solid var(--ty); border-radius: 2px; }
.cert { margin-top: 2.25rem; max-width: 40rem; font-size: var(--fs-l); line-height: 1.5; color: var(--ink-2); }
.cert strong { color: var(--ink); font-weight: 500; }

.navi { overflow: hidden; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-2); padding: .375rem; }
.navi__root { display: flex; align-items: center; gap: .5rem; padding: .5rem .625rem; font-weight: 600; font-size: var(--fs-s); }
.fd { position: relative; flex: none; width: 1rem; height: .75rem; margin-top: .125rem; border-radius: 1px 2px 2px 2px; background: var(--folder); }
.fd::before { content: ""; position: absolute; left: 0; top: -.1875rem; width: .4375rem; height: .25rem; border-radius: 1px 1px 0 0; background: inherit; }
.navi details { margin-left: 1.125rem; }
.navi summary { display: flex; align-items: center; gap: .625rem; min-height: 2.75rem; padding: .375rem .625rem; border-radius: 6px; cursor: pointer; list-style: none; font-weight: 500; line-height: 1.35; transition: background-color .2s; }
.navi summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.navi summary::before { content: ""; flex: none; width: .4rem; height: .4rem; margin-right: .1rem; border: solid var(--ink-3); border-width: 0 1.5px 1.5px 0; rotate: -45deg; transition: rotate .2s var(--ease); }
.navi details[open] > summary::before { rotate: 45deg; }
.navi summary:hover { background: var(--s2); }
.navi details[open] > summary { background: var(--folder-sel); }
.navi details[open] > summary .navi__id { color: var(--ink-2); }
.navi__id { flex: none; min-width: 4.25rem; font: 400 .75rem/1 var(--mono); color: var(--ink-3); }
.navi details p { padding: .5rem .75rem 1rem 4.1rem; color: var(--ink-2); font-size: var(--fs-s); }

.parts { display: grid; border-block: 1px solid var(--line); }
.parts li { display: grid; gap: .5rem; align-content: start; padding: 1.5rem 1.5rem 1.5rem 0; font-size: var(--fs-m); line-height: 1.4; }
.parts__f { font: 500 .75rem/1.4 var(--mono); color: var(--st); }

.acomp div { display: grid; gap: .375rem 3rem; padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.acomp div:first-child { border-top: 1px solid var(--line); }
.acomp dt { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.acomp dd { color: var(--ink-2); }
.pull { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); max-width: 30ch; font-size: clamp(1.625rem, 1.1rem + 2vw, 2.5rem); font-weight: 500; line-height: 1.18; letter-spacing: -.035em; }
.pull span { color: var(--ink-3); }

.price { display: grid; gap: 2.5rem 4rem; }
.price__n { display: inline-block; font: 700 clamp(3.5rem, 2rem + 6vw, 6.5rem)/1 var(--sans); letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.price__a { position: relative; display: grid; gap: 1.25rem; justify-items: start; align-content: start; }
.price__a > p:not([class]) { color: var(--ink-2); max-width: 22rem; }
.price__a .pen--circle { left: -.42em; top: -.32em; width: calc(100% + .9em); height: calc(100% + .62em); }
.plist li { padding-block: .875rem; border-bottom: 1px solid var(--line); }
.plist li:first-child { border-top: 1px solid var(--line); }
.price__b .ctas { margin-top: 2rem; }
.price__b .note { margin-top: 1rem; }

.orig li { padding-block: 1.75rem; border-bottom: 1px solid var(--line); }
.orig figure { display: grid; gap: .75rem 3rem; }
.orig li:first-child { border-top: 1px solid var(--line); }
.orig__from { display: inline-flex; align-items: center; gap: .5rem; justify-self: start; align-self: start; padding: .3rem .55rem; border: 1px solid var(--line-2); border-radius: var(--r-1); font: 500 .75rem/1.3 var(--mono); color: var(--ink); }
.orig__from svg { width: .8125rem; height: .8125rem; color: var(--st); }
.orig blockquote { font-size: var(--fs-l); line-height: 1.42; letter-spacing: -.012em; }
.orig figcaption { font-size: var(--fs-s); color: var(--ink-2); }
.orig figcaption strong { display: block; color: var(--ink); }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; min-height: 2.75rem; padding-block: 1.125rem; cursor: pointer; list-style: none; font-size: var(--fs-m); font-weight: 500; letter-spacing: -.015em; line-height: 1.35; }
.faq summary::after { content: "+" / ""; flex: none; font: 400 1.25rem/1 var(--mono); color: var(--ink-3); transition: rotate .2s var(--ease); }
.faq details[open] > summary::after { rotate: 45deg; color: var(--red-t); }
.faq summary:hover { color: var(--ink-max); }
.faq details p { max-width: 42rem; padding: 0 2.5rem 1.5rem 0; color: var(--ink-2); }
.final { display: grid; gap: 1.5rem; justify-items: start; }
.final h2 { font-size: clamp(2.75rem, 1.6rem + 4.5vw, 5.5rem); letter-spacing: -.055em; }

/* ---------- ≥ 48em ---------- */
@media (min-width: 48em) {
  .prog--main { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem; }
  .prog--row { grid-template-columns: 17rem minmax(0, 1fr) auto; align-items: center; }
  .hist { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 4rem; }
  .tq-pair, .diff, .tests { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .parts li + li { padding-left: 1.5rem; border-left: 1px solid var(--line); }
  .parts li:nth-child(3n+1) { padding-left: 0; border-left: 0; }
  .parts li:nth-child(n+4) { border-top: 1px solid var(--line); }
  .acomp div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: baseline; }
  .orig figure { grid-template-columns: 13rem minmax(0, 1fr); }
  .orig figcaption { grid-column: 2; }
  .foot__grid { grid-template-columns: 1.6fr 1.3fr 1fr 1fr; }
  .foot__brand { grid-column: auto; }
  .colo { grid-template-columns: 1fr auto; align-items: end; }
  .colo__a { grid-column: 1; grid-row: 2; }
  .colo__v { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- ≥ 64em: el margen de la revisión ---------- */
@media (min-width: 64em) {
  :root { --sb: 2rem; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
  .rg { grid-template-columns: minmax(0, 1fr) 16.5rem; column-gap: 4rem; }
  .rg > * { grid-column: 1; }
  .rg > .rv { grid-column: 2; margin-top: 0; }
  .rg > .rv::before { left: auto; right: 100%; bottom: auto; top: 1.3rem; width: 4rem; height: 0; border-left: 0; border-top: 1px dashed var(--red); }
  .rg > .rv::after { content: ""; position: absolute; top: calc(1.3rem - 3px); right: calc(100% + 4rem - 4px); width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
  .emp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5rem; }
  .dir { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .split > .head { position: sticky; top: calc(var(--top) + 2rem); align-self: start; }
  .price { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .pv:not(.r3d--scrub) .r3d__copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 4rem; align-items: start; }
  .pv:not(.r3d--scrub) .r3d__steps { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .pv.r3d--ready:not(.r3d--scrub) .r3d__stage { aspect-ratio: 21 / 9; }
  .orig figure { grid-template-columns: 15rem minmax(0, 1fr) 14rem; }
  .orig figcaption { grid-column: 3; }
  .sb { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; width: auto; height: var(--sb); margin: 0; padding: 0 var(--pad); flex-wrap: nowrap; background: var(--sb-bg); border-top: 1px solid var(--line); }
  .sb__sec { display: inline-flex !important; margin-left: auto; color: var(--ink); }
  .sb__sec::before { content: ""; width: .375rem; height: .375rem; border-radius: 50%; background: var(--red); }
}

/* ---------- < 48em ---------- */
@media (max-width: 47.99em) {
  .js .menu-btn { display: inline-flex; align-items: center; }
  .nav { flex-wrap: wrap; gap: 1rem; }
  .js .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 1rem; padding: .5rem var(--pad) 1.5rem; background: var(--bg); border-bottom: 1px solid var(--line); }
  .js .nav.open { display: flex; }
  .js .nav ul { flex-direction: column; gap: 0; }
  .js .nav ul a { padding: .875rem 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .js .nav [aria-current="page"] { box-shadow: inset 3px 0 var(--red); padding-left: .75rem; }
  .code { font-size: .6875rem; }
  .l { padding: 0 1rem 0 2.5rem; }
  .l::before { width: 1.75rem; }
  .ed .rv { margin-inline: .625rem; }
  .cfg div { grid-template-columns: minmax(0, 1fr); gap: 0; padding-left: 2.75rem; }
  .cfg div::before { width: 1.875rem; }
  .pts { grid-template-columns: minmax(0, 1fr); }
  .pv { --pv-t: calc(var(--top) + .5rem); --pv-x: .5rem; --pv-b: .5rem; }
  .r3d--scrub .r3d__copy { right: calc(var(--pv-x) + 1px); bottom: auto; width: auto; padding: 1.25rem 1.25rem 3.5rem; border-radius: 0; background: linear-gradient(180deg, var(--r3d-bg) 72%, transparent); }
  .r3d--scrub .pv h2 { font-size: 1.375rem; }
  .r3d--scrub .pv__intro { margin-top: .5rem; font-size: var(--fs-xs); }
  .r3d--scrub .r3d__steps { margin-top: .875rem; }
  .r3d--scrub .r3d__steps li { padding-block: .3rem; font-size: var(--fs-xs); }
  .r3d--scrub .r3d__steps li::before { top: .4rem; }
  .r3d__tag { padding: .25rem .375rem; font-size: .625rem; }
  .r3d--scrub .r3d__tag:not(.is-on) { opacity: 0; }
  .r3d--scrub .r3d__steps li:not([aria-current]) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .posts article { padding-right: 2rem; }
  .hide-s { display: none; }
  .pv.r3d--ready:not(.r3d--scrub) .r3d__stage { aspect-ratio: 4 / 5; }
}
@media (max-width: 22.5em) {
  .logo__txt { font-size: .8125rem; }
}

/* ---------- Movimiento: un gesto propio por sección ---------- */
@keyframes rise { from { opacity: 0; translate: 0 1rem; } }
@keyframes slide { from { opacity: 0; translate: 1.5rem 0; } }
@keyframes typ { to { translate: calc(var(--n) * 1ch) 0; visibility: hidden; } }
@keyframes grow { from { scale: 1 0; } }
@keyframes lit { from { color: var(--ink-3); } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* hero: el texto entra; el código se escribe; la pluma corrige; Julio comenta */
  .hero__txt > * { animation: rise .6s var(--ease) both; }
  .hero__txt > :nth-child(2) { animation-delay: 70ms; }
  .hero__txt > :nth-child(3) { animation-delay: 140ms; }
  .hero__txt > :nth-child(n+4) { animation-delay: 210ms; }
  .go .l::after { content: ""; position: absolute; inset: 0 0 0 3.25rem; background: var(--s1); border-left: 2px solid var(--red); animation: typ var(--t) steps(var(--n), jump-start) var(--d) both; }
  .go .l--hot::after { background: var(--hot); }
  .go .rv { animation: rise .5s var(--ease) calc(var(--typed, 0ms) + 700ms) both; }
  .hero .pen path { transition-delay: var(--typed, 0ms); }
  /* pluma: se dibuja al aparecer (el JS mide la escala del trazo en --k) */
  .js .pen path { stroke-dasharray: var(--k, 1); stroke-dashoffset: var(--k, 1); transition: stroke-dashoffset .85s cubic-bezier(.6, .05, .3, 1); }
  .js .pen.in path { stroke-dashoffset: 0; }
  .js .pen.done path { stroke-dasharray: none; }
  @supports (animation-timeline: view()) {
    .clients b { animation: lit linear both; animation-timeline: view(); animation-range: entry 30% cover 45%; }
    .rg > .rv { animation: slide linear both; animation-timeline: view(); animation-range: entry 10% entry 70%; }
    .glog li { view-timeline: --seg; }
    .glog li::after { animation: grow linear both; animation-timeline: --seg; animation-range: entry 60% cover 50%; }
  }
  .prog:hover { translate: 0 -2px; }
  .prog { transition: border-color .3s var(--ease), translate .3s var(--ease); }
}
@media (max-width: 47.99em) and (prefers-reduced-motion: no-preference) {
  .go .l::after { left: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Contraste reforzado ---------- */
@media (prefers-contrast: more) {
  :root { --line: #8a8c94; --line-2: #a4a6ad; --ink-2: #d2d3d8; --ink-3: #c2c4ca; }
  .top { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .diff li, .l--hot { background: none; }
  .r3d--scrub .r3d__steps li:not([aria-current]) { opacity: 1 !important; }
}

/* ==========================================================================
   Web completa · componentes añadidos sobre el prototipo 02 «Xcode»
   ========================================================================== */
:root { --st-off: #8e9aa6; }
.st--off { --c: var(--st-off); }
.hero--page { padding-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.hero--page .hero__txt { max-width: 52rem; }
.more-all { margin-top: .5rem; }
.clients__more { margin-top: 1.25rem; font-size: var(--fs-s) !important; letter-spacing: 0 !important; }
.lang { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .25rem .5rem; border-radius: var(--r-1); font: 600 var(--fs-xs)/1 var(--mono); color: var(--ink-2); text-decoration: none; }
.lang:hover { color: var(--ink); background: var(--s1); }
.foot__soc { display: flex !important; gap: 1rem !important; margin-top: .75rem; }
.pen--arrow { position: static; display: inline-block; width: 3rem; height: 2rem; vertical-align: middle; }

/* ---------- Autodiagnóstico: terminal ---------- */
.dx { padding-block: clamp(3rem, 2rem + 4vw, 6rem); border-top: 1px solid var(--line); }
.dx__grid { display: grid; gap: 2rem 5rem; align-items: start; }
.term { overflow: hidden; background: var(--term); border: 1px solid var(--line); border-radius: var(--r-3); font: 400 var(--fs-s)/1.55 var(--mono); box-shadow: 0 40px 80px -40px var(--shadow); }
.term__bar { display: flex; align-items: center; gap: .4rem; padding: .625rem 1rem; background: var(--bar); border-bottom: 1px solid var(--line); font-size: .75rem; color: var(--ink-3); }
.term__bar span { width: .625rem; height: .625rem; border-radius: 50%; background: var(--line-2); }
.term__bar span:last-of-type { margin-right: .5rem; }
.term fieldset { margin: 0; padding: 1rem 1rem .5rem; border: 0; }
.term__cmd { padding: 0; margin-bottom: .75rem; color: var(--ink); }
.term__cmd span { color: var(--ty); }
.term__opt { display: flex; align-items: flex-start; gap: .75rem; min-height: 2.75rem; padding: .55rem .75rem; border-radius: var(--r-2); cursor: pointer; color: var(--ink-2); transition: background-color .2s var(--ease), color .2s; }
.term__opt:hover { background: var(--s1); color: var(--ink); }
.term__opt input { appearance: none; flex: none; width: 1.1rem; height: 1.1rem; margin-top: .2rem; border: 1.5px solid var(--ink-3); border-radius: 50%; display: grid; place-items: center; }
.term__opt input::after { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--red); scale: 0; transition: scale .2s var(--ease); }
.term__opt input:checked { border-color: var(--red); }
.term__opt input:checked::after { scale: 1; }
.term__opt input:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.term__opt:has(input:checked) { background: rgb(255 68 56 / .1); color: var(--ink); }
.term__out { min-height: 7.5rem; padding: 1rem 1.25rem 1.25rem; border-top: 1px dashed var(--line); background: var(--term-out); }
.term__res { display: none; gap: .5rem; font-family: var(--sans); font-size: var(--fs-m); color: var(--ink); }
.term__res .tlink { color: var(--red-t); }
.term__links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.term__ok { font-family: var(--mono); color: var(--ty); }
.term__idle { display: flex; align-items: center; gap: .5rem; color: var(--ink-3); }
.cursor { display: inline-block; width: .55rem; height: 1.1rem; background: var(--red); }
/* Respuestas por posición (d0…d9): el contenido puede cambiar sin tocar el CSS */
.term:has(input[value="d0"]:checked) [data-dx="d0"],
.term:has(input[value="d1"]:checked) [data-dx="d1"],
.term:has(input[value="d2"]:checked) [data-dx="d2"],
.term:has(input[value="d3"]:checked) [data-dx="d3"],
.term:has(input[value="d4"]:checked) [data-dx="d4"],
.term:has(input[value="d5"]:checked) [data-dx="d5"],
.term:has(input[value="d6"]:checked) [data-dx="d6"],
.term:has(input[value="d7"]:checked) [data-dx="d7"],
.term:has(input[value="d8"]:checked) [data-dx="d8"],
.term:has(input[value="d9"]:checked) [data-dx="d9"] { display: grid; }
.term:has(input:checked) .term__idle { display: none; }
@supports not selector(:has(*)) { .term__res { display: grid; padding-bottom: 1rem; } .term__idle { display: none; } }
.dx__none { grid-column: 1 / -1; }

/* ---------- Warnings (¿te suena?) ---------- */
.issues-nav { overflow: hidden; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-2); }
.issues-nav__h { display: flex; align-items: center; gap: .5rem; padding: .625rem 1rem; background: var(--bar); border-bottom: 1px solid var(--line); font: 500 .75rem/1.3 var(--mono); color: var(--nu); }
.issues-nav__h svg { width: .875rem; height: .875rem; }
.warns li { position: relative; padding: .875rem 1rem .875rem 2.75rem; font-size: var(--fs-m); line-height: 1.45; }
.warns li + li { border-top: 1px solid var(--line); }
.warns li::before { content: "" / ""; position: absolute; left: 1rem; top: 1.15rem; width: 0; height: 0; border: solid transparent; border-width: 0 .45rem .8rem; border-bottom-color: var(--nu); }
.warns__pie { padding: .875rem 1rem 1rem; border-top: 1px dashed var(--line); }

/* ---------- Tests en verde ---------- */
.suite__h { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; font: 500 .75rem/1.4 var(--mono); color: var(--ty); }
.suite__ok { display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: rgb(93 216 255 / .15); }

/* ---------- Criterios de evaluación ---------- */
.crit div { display: grid; gap: .25rem 2rem; padding-block: .875rem; border-bottom: 1px solid var(--line); }
.crit div:first-child { border-top: 1px solid var(--line); }
.crit dt { font: 500 var(--fs-xs)/1.5 var(--mono); color: var(--kw); }
.crit dd { color: var(--ink-2); }

/* ---------- Release notes ---------- */
.rel { overflow: hidden; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-2); }
.rel__v { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .75rem 1rem; background: var(--bar); border-bottom: 1px solid var(--line); font: 500 .75rem/1.3 var(--mono); color: var(--ink-3); }
.rel__tag { padding: .2rem .45rem; border: 1px solid var(--red); border-radius: var(--r-1); color: var(--red-t); }
.rel__list li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; padding: .875rem 1rem; line-height: 1.5; }
.rel__list li + li { border-top: 1px solid var(--line); }
.rel__k { font: 500 .75rem/1.9 var(--mono); }
.rel__add .rel__k { color: var(--ty); }
.rel__chg .rel__k { color: var(--nu); }
.rel__fix .rel__k { color: var(--kw); }

/* ---------- FAQ como issues ---------- */
.faq--issues summary { justify-content: flex-start; }
.faq--issues summary::after { margin-left: auto; }
.iss { flex: none; min-width: 2.25rem; font: 500 .75rem/1 var(--mono); color: var(--ink-3); }
.iss__st { display: flex; align-items: center; gap: .5rem; margin-top: -.75rem; padding-bottom: 1.25rem; font: 500 .6875rem/1.4 var(--mono); color: var(--sy) !important; }
.iss__st::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--sy); }

/* ---------- Pipeline ---------- */
.pipe { display: grid; gap: 1rem; counter-reset: pp; }
.pipe li { position: relative; display: grid; gap: .5rem; align-content: start; padding: 1.25rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-2); }
.pipe__n { display: flex; align-items: center; gap: .5rem; font: 500 .75rem/1.3 var(--mono); color: var(--ink-3); }
.pipe__dot { width: .75rem; height: .75rem; border-radius: 50%; border: 2px solid var(--ty); }
.pipe h3 { font-size: 1.125rem; }
.pipe li > p:not([class]) { color: var(--ink-2); font-size: var(--fs-s); }
.pipe__t { margin-top: auto; padding-top: .5rem; font: 400 .75rem/1.3 var(--mono); color: var(--nu); }

/* ---------- Reviews (opiniones) ---------- */
.rvws { display: grid; gap: 1rem; margin-bottom: 2.5rem; }
.rvw { display: grid; gap: .75rem; height: 100%; padding: 1.25rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); }
.rvw__h { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: var(--fs-xs); color: var(--ink-3); }
.rvw__h b { color: var(--ink); }
.rvw__ok { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: rgb(93 216 255 / .15); color: var(--ty); font-size: .75rem; }
.rvw__ctx { padding: .15rem .4rem; border: 1px solid var(--line-2); border-radius: var(--r-1); font: 400 .6875rem/1.3 var(--mono); }
.rvw blockquote { font-size: var(--fs-m); line-height: 1.5; }
.rvw figcaption { font-size: var(--fs-xs); color: var(--ink-2); }
.rvws--all > li { display: grid; gap: .25rem; align-content: start; }
.rvw__more summary { display: inline-flex; align-items: center; min-height: 2.75rem; cursor: pointer; font-size: var(--fs-s); color: var(--red-t); }
.rvw__more p { padding: .25rem 0 1rem; color: var(--ink-2); font-size: var(--fs-s); }

/* ---------- Placeholder de imagen con prompt ---------- */
.ph { min-width: 0; margin: 0; }
.ph__box { position: relative; display: grid; place-content: center; justify-items: center; gap: .5rem; aspect-ratio: var(--ar, 16/9); padding: 1rem; overflow: hidden; border: 1px dashed var(--line-2); border-radius: var(--r-3); background:
  repeating-linear-gradient(135deg, var(--stripe) 0 12px, transparent 12px 24px), var(--s1); color: var(--ink-3); text-align: center; }
.ph__ic svg { width: 2rem; height: 2rem; }
.ph__id { font: 600 .75rem/1.3 var(--mono); color: var(--ink-2); }
.ph__ratio { font: 400 .6875rem/1.3 var(--mono); }
.ph__prompt { margin-top: .5rem; font-size: var(--fs-xs); }
.ph__prompt summary { display: inline-flex; align-items: center; min-height: 2.75rem; cursor: pointer; font: 500 .75rem/1.3 var(--mono); color: var(--ink-3); }
.ph__prompt summary:hover { color: var(--ink); }
.ph__prompt p { padding: .75rem 1rem; background: var(--s1); border-left: 2px solid var(--red); border-radius: 0 var(--r-1) var(--r-1) 0; color: var(--ink-2); line-height: 1.55; }
.ph__neg { margin-top: .25rem; }
.ph figcaption { margin-top: .5rem; font-size: var(--fs-xs); color: var(--ink-3); }
.ph--portrait { width: min(100%, 18rem); max-width: 18rem; }
.ph--phone { width: min(100%, 13rem); }
.ph--phone .ph__box { border-radius: 2rem; }
.acomp + .ph, .rvws + .ph { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.phones { display: flex; gap: 1rem; justify-content: center; align-items: flex-start; }
.phones .ph:nth-child(2) { margin-top: 3rem; }

/* ---------- El siguiente paso: la PR de tu caso ---------- */
.nxt__grid { display: grid; gap: 2.5rem 5rem; align-items: start; }
.nxt__txt { display: grid; gap: 1.25rem; justify-items: start; }
.nxt h2 { max-width: 16ch; font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.25rem); letter-spacing: -.05em; line-height: 1.02; }
.pr { overflow: hidden; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); }
.pr__bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .75rem 1rem; background: var(--bar); border-bottom: 1px solid var(--line); font: 500 .75rem/1.3 var(--mono); color: var(--ink); }
.pr__st { display: inline-flex; align-items: center; gap: .375rem; padding: .2rem .5rem; border-radius: 999px; background: rgb(93 216 255 / .14); color: var(--ty); }
.pr__st::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.pr__body { display: grid; gap: .75rem; padding: 1.25rem; }
.pr__body h3 { font: 500 .75rem/1.4 var(--mono); color: var(--ink-3); letter-spacing: 0; }
.pr__body h3:not(:first-child) { margin-top: .75rem; }
.pr__list li { position: relative; padding: .3rem 0 .3rem 1.75rem; }
.pr__list li::before { content: "" / ""; position: absolute; left: .15rem; top: .55rem; width: .8rem; height: .8rem; border: 1.5px solid var(--ink-3); border-radius: 3px; }
.pr__list--check li::before { border-color: var(--ty); }
.pr__body > p:not([class]) { color: var(--ink-2); }
.pr__who { display: flex; align-items: center; gap: .625rem; margin-top: .5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: var(--fs-s); color: var(--ink-2); }
.pr__who b { color: var(--ink); }
.pr__who .av { width: 2rem; height: 2rem; font-size: .6875rem; }

/* ---------- Catálogo (empresas) con filtro ---------- */
.filt { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; padding: 0; border: 0; }
.filt label { position: relative; }
.filt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.filt span { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .375rem .875rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: var(--fs-xs); color: var(--ink-2); transition: background-color .2s, color .2s, border-color .2s; }
.filt input:checked + span { background: var(--s2); border-color: var(--red); color: var(--ink-max); font-weight: 600; }
.filt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 3px; }
.filt label:hover span { color: var(--ink); background: var(--s1); border-color: var(--ink-3); }
.filt label:hover input:checked + span { border-color: var(--red); background: var(--s2); }
.cat { display: grid; gap: .75rem; }
.cat__card { position: relative; display: grid; gap: .5rem; height: 100%; padding: 1.25rem 1.25rem 1.5rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); text-decoration: none; transition: border-color .25s var(--ease), translate .25s var(--ease); }
.cat__card:hover { border-color: var(--red); }
.cat__area { font: 500 .6875rem/1.3 var(--mono); color: var(--ty); }
.cat__n { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.cat__d { color: var(--ink-2); font-size: var(--fs-s); }
.cat__m { margin-top: auto; padding-top: .5rem; font: 400 .75rem/1.4 var(--mono); color: var(--ink-3); }
.cat--mini { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.cat-wrap:has(input[value="a0"]:checked) .cat > li:not([data-area="a0"]),
.cat-wrap:has(input[value="a1"]:checked) .cat > li:not([data-area="a1"]),
.cat-wrap:has(input[value="a2"]:checked) .cat > li:not([data-area="a2"]),
.cat-wrap:has(input[value="a3"]:checked) .cat > li:not([data-area="a3"]),
.cat-wrap:has(input[value="a4"]:checked) .cat > li:not([data-area="a4"]),
.cat-wrap:has(input[value="a5"]:checked) .cat > li:not([data-area="a5"]),
.cat-wrap:has(input[value="a6"]:checked) .cat > li:not([data-area="a6"]) { display: none; }

/* ---------- Comparativa ---------- */
.cmp { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--s1); }
.cmp:focus-visible { outline-offset: 2px; }
.cmp table { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: var(--fs-s); }
.cmp th, .cmp td { padding: .9rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cmp thead th { position: sticky; top: 0; background: var(--bar); font-size: 1rem; }
.cmp thead th a { display: block; margin-bottom: .375rem; text-decoration: none; }
.cmp thead th a:hover { text-decoration: underline; }
.cmp tbody th { width: 11rem; font: 500 .75rem/1.6 var(--mono); color: var(--kw); }
.cmp td { color: var(--ink-2); }
.cmp tr:last-child > * { border-bottom: 0; }

/* ---------- Be Native ---------- */
.lvls { display: grid; gap: .75rem; }
.lvls li { display: grid; gap: .375rem; padding: 1.25rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-2); }
.lvls__n { font: 500 .75rem/1.3 var(--mono); color: var(--ink-3); }
.lvls__bar { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--red) calc(var(--i) * 20%), var(--line) 0); }
.lvls h3 { font-size: 1.125rem; }
.lvls p { color: var(--ink-2); font-size: var(--fs-s); }
.plans { display: grid; gap: 1rem; }
.plans__i { display: grid; gap: 1rem; align-content: start; padding: 1.5rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); }
.plans__i--on { border-color: var(--red); }
.plans__p { font: 500 var(--fs-xs)/1.4 var(--mono); color: var(--nu); }

/* ---------- Diario: git log ---------- */
.gl li article { position: relative; display: grid; gap: .5rem; padding: 1.5rem 3rem 1.5rem 0; border-bottom: 1px solid var(--line); }
.gl li:first-child article { border-top: 1px solid var(--line); }
.gl h3 { max-width: 40ch; font-size: clamp(1.25rem, 1rem + .9vw, 1.625rem); letter-spacing: -.028em; }
.gl h3 a { text-decoration: none; }
.gl h3 a::before { content: ""; position: absolute; inset: 0; }
.gl h3 a::after { content: "→" / ""; position: absolute; right: .25rem; top: 50%; translate: 0 -50%; color: var(--ink-3); transition: translate .25s var(--ease), color .25s; }
.gl article:hover h3 a::after { translate: .35rem -50%; color: var(--red-t); }
.gl article:hover h3 { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .18em; }
.gl li > article > p:not(.gl__meta) { color: var(--ink-2); max-width: 60ch; }
.gl__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; font: 400 .75rem/1.5 var(--mono); color: var(--ink-3); }
.gl__hash { color: var(--nu); }
.gl__br { padding: .1rem .45rem; border: 1px solid var(--line-2); border-radius: var(--r-1); color: var(--ty); }
.cat-wrap .filt, .gl { margin-top: 0; }
.sec:has(> .wrap > .filt) .gl { margin-top: 0; }
.wrap:has(input[name="rama"][value="c0"]:checked) .gl > li:not([data-area="c0"]),
.wrap:has(input[name="rama"][value="c1"]:checked) .gl > li:not([data-area="c1"]),
.wrap:has(input[name="rama"][value="c2"]:checked) .gl > li:not([data-area="c2"]),
.wrap:has(input[name="rama"][value="c3"]:checked) .gl > li:not([data-area="c3"]),
.wrap:has(input[name="rama"][value="c4"]:checked) .gl > li:not([data-area="c4"]),
.wrap:has(input[name="rama"][value="c5"]:checked) .gl > li:not([data-area="c5"]) { display: none; }

/* ---------- Artículo ---------- */
.art__h { display: grid; gap: 1.25rem; padding-block: clamp(2.5rem, 1rem + 3vw, 4rem) clamp(2rem, 1rem + 2vw, 3rem); }
.art__h h1 { max-width: 22ch; font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem); letter-spacing: -.045em; line-height: 1.04; }
.art__h .lede { max-width: 44rem; }
.art__grid { display: grid; gap: 2rem 4rem; padding-bottom: var(--sec); }
.toc { font-size: var(--fs-s); }
.toc__h { margin-bottom: .75rem; font: 500 .75rem/1.4 var(--mono); letter-spacing: 0; color: var(--ink-3); }
.toc ol { display: grid; gap: .125rem; border-left: 1px solid var(--line); }
.toc a { display: block; padding: .375rem 0 .375rem 1rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--ink); border-left-color: var(--red); }
.prose { max-width: 42rem; font-size: 1.125rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -.03em; line-height: 1.15; scroll-margin-top: calc(var(--top) + 1.5rem); }
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; }
.prose p, .prose li { color: var(--prose); }
.prose a { color: var(--ink); text-decoration-color: var(--red); }
.prose strong { color: var(--ink); }
.md-list { display: grid; gap: .5rem; padding-left: 1.25rem; }
ul.md-list { list-style: none; padding-left: 0; }
ul.md-list li { position: relative; padding-left: 1.5rem; }
ul.md-list li::before { content: "" / ""; position: absolute; left: .25rem; top: .75em; width: .45rem; height: .45rem; rotate: 45deg; border: 1.5px solid var(--ty); border-radius: 1px; }
ol.md-list { list-style: decimal; }
.prose blockquote { padding: .25rem 0 .25rem 1.25rem; border-left: 2px solid var(--red); font-size: 1.25rem; line-height: 1.5; }
.code-block { overflow-x: auto; padding: 1rem 1.25rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-2); font: 400 .875rem/1.6 var(--mono); }
.code-block .c { color: var(--gut); }
.code-block .s { color: var(--st); }
.code-block .n { color: var(--nu); }
.art__f { margin-top: 3rem !important; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pn__in { display: grid; gap: 1rem; }
.pn__a { display: grid; gap: .375rem; padding: 1.25rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); font-weight: 600; line-height: 1.35; text-decoration: none; }
.pn__a:hover { border-color: var(--red); }
.pn__a--n { text-align: right; }

/* ---------- Formulario ---------- */
.form { display: grid; gap: 1.25rem; max-width: 40rem; }
.form__row { display: grid; gap: .5rem; margin: 0; padding: 0; border: 0; }
.form label:not(.chk), .form legend { font-weight: 500; font-size: var(--fs-s); }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form textarea {
  width: 100%; min-height: 3rem; padding: .75rem .875rem; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--s1); color: var(--ink); font: inherit; }
.form textarea { resize: vertical; }
.form input:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.chk { display: flex; align-items: flex-start; gap: .625rem; min-height: 2.25rem; font-size: var(--fs-s); color: var(--ink-2); }
.chk input { flex: none; width: 1.125rem; height: 1.125rem; margin-top: .2rem; accent-color: var(--red); }
fieldset.form__row { gap: .25rem; }
.form__legal { font-size: var(--fs-xs); }

/* ---------- Invitados ---------- */
.guests { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.guests__list { display: grid; gap: 1rem; }
.guests__list li { display: grid; gap: .375rem; padding: 1.25rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-2); }
.guests__n { font-weight: 600; }
.guests__t { font-size: var(--fs-m); }
.navi__pts { padding: 0 .75rem 1rem 4.1rem; display: grid; gap: .25rem; font-size: var(--fs-s); color: var(--ink-2); }
.navi__pts li::before { content: "– " / ""; color: var(--ink-3); }
.dir--solo { grid-template-columns: minmax(0, 46rem) !important; }

/* ---------- 404 ---------- */
.nf { padding-block: clamp(3rem, 2rem + 5vw, 7rem); }
.nf .wrap { display: grid; gap: 1.5rem; justify-items: start; max-width: 52rem; }
.nf__ed { width: 100%; }
.l--err { background: var(--del); box-shadow: inset 2px 0 var(--red); }
.nf__err { color: var(--red-t); font-weight: 600; }
.nf h1 { font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.fix { display: grid; gap: .5rem; width: 100%; }
.fix a { display: flex; align-items: center; gap: .75rem; min-height: 3rem; padding: .5rem 1rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-2); text-decoration: none; }
.fix a:hover { border-color: var(--red); }
.fix__k { padding: .15rem .4rem; border-radius: var(--r-1); background: rgb(93 216 255 / .14); font: 600 .6875rem/1.3 var(--mono); color: var(--ty); }

@media (min-width: 48em) {
  .rvws { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
  .pipe { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
  .pipe li:not(:last-child)::after { content: "" / ""; position: absolute; top: 1.6rem; right: -1rem; width: 1rem; height: 2px; background: var(--line-2); }
  .cat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lvls { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guests__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pn__in { grid-template-columns: 1fr 1fr; }
  .crit div { grid-template-columns: 10rem minmax(0, 1fr); }
}
@media (min-width: 64em) {
  .dx__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .dx__grid > .head { position: sticky; top: calc(var(--top) + 2rem); }
  .nxt__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .cat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .art__grid { grid-template-columns: 15rem minmax(0, 1fr); }
  .toc { position: sticky; top: calc(var(--top) + 2rem); align-self: start; }
  .rg > .ph { grid-column: 1; }
}
@media (max-width: 47.99em) {
  .nav .lang { align-self: flex-start; }
  .rel__list li { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .gl li article { padding-right: 2rem; }
  .phones .ph:nth-child(2) { margin-top: 2rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .cat__card:hover { translate: 0 -2px; }
  .term__res { animation: rise .35s var(--ease) both; }
  .cursor { animation: blink 1.1s steps(2, start) 6; }
}
@keyframes blink { to { visibility: hidden; } }
@media (prefers-contrast: more) {
  .ph__box { background: var(--s1); }
}
.crumbs a { display: inline-flex; align-items: center; min-height: 1.5rem; }
.ph__src { padding: .15rem .45rem; border: 1px solid var(--line-2); border-radius: var(--r-1); font: 500 .6875rem/1.3 var(--mono); color: var(--nu); }

/* ---------- Resúmenes, nota legal, equipo docente y apps del alumnado ---------- */
.pull--sum { max-width: 34ch; font-size: clamp(1.375rem, 1rem + 1.4vw, 1.875rem); }
small.legal { display: block; margin-top: .25rem; font: 400 .75rem/1.4 var(--mono); color: var(--ink-3); }
.team { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.team__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; }
.team__p { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.25rem; padding: 1.25rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); }
.team__p > div { display: grid; gap: .375rem; align-content: start; }
.team__av { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--s2); border: 1px solid var(--line-2); font: 700 1.125rem var(--mono); color: var(--ink); }
.team__n { font-size: var(--fs-m); font-weight: 600; }
.team__q { margin: .5rem 0 0; padding-left: .875rem; border-left: 2px solid var(--red); font-family: var(--hand); font-size: 1.375rem; line-height: 1.2; color: var(--ink); }
.apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.appc { position: relative; display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; overflow: hidden; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); }
.appc > :not(.appc__shot) { margin-inline: 1.125rem; }
.appc__shot { aspect-ratio: 4 / 3; overflow: hidden; background: var(--s2); border-bottom: 1px solid var(--line); display: grid; place-items: center; }
.appc__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.appc__ph svg { width: 2.5rem; height: 2.5rem; color: var(--gut); }
.appc__top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; align-items: start; padding-top: 1rem; }
.appc__icon { width: 3.5rem; height: 3.5rem; border-radius: 22%; border: 1px solid var(--line); }
.appc__icon--ph { display: block; background: var(--s2); }
.appc h3 { font-size: var(--fs-m); line-height: 1.2; }
.appc__dev, .appc__cat { font: 400 var(--fs-xs)/1.4 var(--mono); color: var(--ink-3); margin-top: .2rem; }
.appc__cat { margin-top: 0; }
.appc__d { padding-top: .75rem; font-size: var(--fs-s); color: var(--ink-2); }
.appc__r { padding-top: .5rem; font: 500 var(--fs-xs) var(--mono); color: var(--nu); }
.appc__n { color: var(--ink-3); font-weight: 400; }
.appc__a { align-self: end; padding-block: .75rem 1.25rem; }
.price__n--txt { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); line-height: 1.1; letter-spacing: -.03em; }

/* ---------- Empresas: lo que frena a un equipo (warning → fix-it) ---------- */
.pains { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: pain; }
.pain { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; padding: 1.25rem 1.375rem 1.375rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); }
.pain__w { display: flex; gap: .625rem; align-items: flex-start; font-size: var(--fs-s); color: var(--ink-2); }
.pain__w svg { flex: none; width: 1.125rem; height: 1.125rem; margin-top: .15rem; color: var(--nu); }
.pain__q { font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); font-weight: 600; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); max-width: 36ch; }
.pain__f { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; align-items: baseline; padding-top: .75rem; border-top: 1px dashed var(--line-2); font-size: var(--fs-s); color: var(--ink-2); }
.pain__k { font: 500 var(--fs-xs) var(--mono); color: var(--ty); padding: .1rem .45rem; border: 1px solid currentColor; border-radius: 4px; }
@media (min-width: 900px) {
  .pain { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 2.5rem; align-items: start; }
  .pain__w { grid-column: 1 / -1; }
  .pain__f { border-top: 0; padding-top: 0; border-left: 1px dashed var(--line-2); padding-left: 1.5rem; }
}

/* Formulario de contacto: honeypot fuera de la vista, estado y alternativa sin JS */
.form[hidden] { display: none; }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form { position: relative; }
.form__status:empty { display: none; }
.form__status { margin: 0; padding: .75rem 1rem; border-radius: var(--r-2); border: 1px solid var(--line); font-size: var(--fs-s); }
.form__status[data-tono="ok"] { border-color: var(--ty); }
.form__status[data-tono="error"] { border-color: var(--red); }
.cf-turnstile { min-height: 65px; }
.js .form__nojs { display: none; }

/* Fotos reales en el lugar de su placeholder */
.ph--real img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar, 16/9); object-fit: cover; border-radius: var(--r-3); background: var(--line); }
.ph--avatar { width: 4rem; }
.ph--avatar.ph--real img { border-radius: 50%; }
.ph--round img { border-radius: 50%; }

/* ---------- Modo claro (Xcode «Default Light») ----------
   Solo si el sistema lo pide. Sin preferencia o sin soporte, se queda el modo oscuro de siempre. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f7; --s1: #ffffff; --s2: #ececf0; --hot: #fbe9e8;
    --line: #d9dadf; --line-2: #a9abb3;
    --ink: #1d1d1f; --ink-2: #45464d; --ink-3: #575960; --gut: #6e7079;
    --kw: #ad3da4; --ty: #0b4f79; --pj: #1c464a; --sy: #3900a0; --fn: #326d74; --st: #c41a16; --nu: #6b5900;
    --red: #d70015; --red-t: #c4000f; --red-h: #b8000f; --on-red: #ffffff; --orange: #ff7a2f;
    --add: rgb(11 79 121 / .07); --del: rgb(215 0 21 / .07);
    --bar: #f0f0f3; --code: #1d1d1f; --term: #ffffff; --term-out: #f7f7f9; --sb-bg: #ececf0;
    --glass: rgb(255 255 255 / .9); --shadow: rgb(29 29 31 / .18); --divider: rgb(0 0 0 / .07); --stripe: rgb(0 0 0 / .03);
    --folder: #1a73e8; --folder-sel: rgb(26 115 232 / .1); --prose: #2c2d31; --ink-max: #000; --st-off: #66717d;
  }
  .r3d { --r3d-bg: #ffffff; --r3d-ink: #1d1d1f; --r3d-muted: #b4b6bd; --r3d-accent: #d70015; --r3d-accent-2: #ad3da4; }
}
@media (prefers-color-scheme: light) and (prefers-contrast: more) {
  :root { --line: #6e7079; --line-2: #55575e; --ink-2: #26272b; --ink-3: #303136; }
}

/* Be Native: imagen del hero y capturas por plataforma en tiras desplazables */
.bn-hero .ph { width: 100%; }
.shots + .shots { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.shots__h { display: flex; align-items: center; gap: .625rem; font-size: 1.25rem; }
.shots__new { padding: .15rem .45rem; border-radius: var(--r-1); background: var(--red); color: var(--on-red); font: 600 .6875rem/1.3 var(--mono); letter-spacing: .02em; }
.shots__t { max-width: 44rem; margin-top: .5rem; color: var(--ink-2); }
.shots__row { --h: clamp(15rem, 52vw, 26rem); margin-top: 1.25rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: .75rem; border-radius: var(--r-2); }
.shots__row:focus-visible { outline-offset: 4px; }
.shots__row ul { display: flex; gap: 1rem; width: max-content; }
.shots__row li { flex: none; scroll-snap-align: start; }
.shots__row .ph { width: auto; }
.shots__row .ph--real img { width: auto; height: var(--h); aspect-ratio: auto; }
.shots--iphone .shots__row { --h: clamp(18rem, 70vw, 30rem); }
.shots--ipad .shots__row, .shots--mac .shots__row { --h: clamp(12rem, 40vw, 24rem); }
.plans--2 { max-width: 52rem; }
.stats--row { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 2rem 1.5rem; }
.stats--row li:first-child strong { font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.5rem); }

/* Diario: imagen destacada en los listados */
.gl__img, .posts__img { display: block; overflow: hidden; border-radius: var(--r-2); background: var(--line); }
.gl__img img, .posts__img img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; transition: scale .5s var(--ease); }
.gl article:hover .gl__img img, .posts article:hover .posts__img img { scale: 1.03; }
@media (min-width: 46em) {
  .gl .gl--img { grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr); column-gap: clamp(1.25rem, .5rem + 2vw, 2rem); align-items: start; }
  .gl .gl--img > :not(.gl__img) { grid-column: 2; }
  .gl .gl--img > .gl__img { grid-row: 1 / span 3; }
  .posts .posts--img { grid-template-columns: 9rem minmax(0, 1fr); column-gap: 1.25rem; align-items: start; }
  .posts .posts--img > :not(.posts__img) { grid-column: 2; }
  .posts .posts--img > .posts__img { grid-row: 1 / span 2; }
}
@media (max-width: 45.99em) {
  .gl .gl--img h3 a::after, .posts .posts--img h3 a::after { top: auto; bottom: 1.5rem; translate: 0 0; }
  .gl article.gl--img:hover h3 a::after, .posts article.posts--img:hover h3 a::after { translate: .35rem 0; }
}

/* ---------- ACoding Hackathon 2026 ---------- */
.vid { margin: 0; display: grid; gap: .625rem; justify-items: center; }
.vid__play { position: relative; display: block; width: min(100%, 22rem); aspect-ratio: var(--ar); padding: 0; overflow: hidden; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); cursor: pointer; }
.vid__play img { width: 100%; height: 100%; object-fit: cover; transition: scale .4s var(--ease); }
.vid__play:hover img { scale: 1.02; }
.vid__play:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.vid__ic { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--red); color: var(--on-red, #fff); box-shadow: 0 .5rem 1.5rem var(--shadow, rgb(0 0 0 / .35)); }
.vid__ic svg { width: 1.75rem; height: 1.75rem; translate: .1rem 0; }
.vid iframe { width: min(100%, 22rem); aspect-ratio: var(--ar); border: 0; border-radius: var(--r-3); background: #000; }
.vid .note { max-width: 22rem; text-align: center; }
.hk-pend { padding: 1.25rem 1.5rem; background: var(--s1); border: 1px dashed var(--line-2); border-radius: var(--r-3); color: var(--ink-2); max-width: 52rem; }
.hk-masc { margin: 0; }
.hk-masc img { width: 100%; height: auto; border-radius: var(--r-3); background: #fff; }
.hk-bn { display: grid; gap: 1.25rem; align-content: start; }
.hk-bn__logo { width: 4.5rem; height: 4.5rem; border-radius: 1.1rem; }
.jury { display: grid; gap: 1rem; }
.jury li { display: grid; gap: .5rem; align-content: start; padding: 1.5rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-3); }
.jury__f { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; margin-bottom: .5rem; }
.jury h3 { font-size: var(--fs-m); }
.jury h3 a { color: inherit; text-decoration-color: var(--line-2); }
.jury__r { font: 500 var(--fs-xs)/1.4 var(--mono); color: var(--nu); }
.jury li > p:last-child { color: var(--ink-2); }
@media (min-width: 48rem) { .jury { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hk-crit { margin-top: 3rem; }
@media (min-width: 48rem) { #premios .plans--2, #ganadores .plans--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Analítica opcional: elecciones equivalentes, región no modal y enlace permanente. */
.analytics-consent[hidden] { display: none; }
.analytics-consent { position: fixed; inset: auto 1rem 1rem auto; z-index: 1000; width: min(36rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 1.5rem; border: 1px solid var(--line-2); border-radius: var(--r-3); background: var(--s1); color: var(--ink); box-shadow: 0 .5rem 2rem var(--shadow); }
.analytics-consent h2 { font-size: var(--fs-m); margin-bottom: .75rem; }
.analytics-consent p { margin-block: .75rem; }
.analytics-consent__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.analytics-consent__actions .btn { width: 100%; min-height: 2.75rem; white-space: normal; text-align: center; }
.analytics-consent__status { color: var(--ink-2); }
.analytics-consent__status:empty { display: none; }
@media (max-width: 26rem) { .analytics-consent__actions { grid-template-columns: 1fr; } }
