/* FirmaUY: hoja de estilos de la versión nueva del sitio. La usan index_nuevo.html y las seis
   páginas internas. Sin build, sin dependencias.

   Reglas del sistema:
   - Nada en mayúsculas espaciadas: el texto se lee como está escrito.
   - Renglones y filetes para ordenar; los paneles quedan para lo que es un objeto: una ventana,
     una terminal, una conversación, una capa del mapa.
   - Verde, ámbar y rojo son solo para veredictos, igual que en FirmaUY Desktop. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("../fonts/atkinson-mono-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Papel crema, tinta azul marino, un azul vivo y un dorado apagado: la paleta del folleto.
   --ink-2 es el texto secundario, con más de 4.5:1 sobre el papel; --oro queda decorativo.
   --ok, --warn y --bad son los colores de veredicto de FirmaUY Desktop. */
:root {
  --paper: #f6f1e6;
  --panel: #fffdf9;
  --panel-2: #efe8d9;
  --ink: #14305f;
  --ink-2: #5b6478;
  --rule: rgba(20, 48, 95, 0.16);
  --azul: #1f5bd6;
  --link: #1f5bd6;
  --cielo: #dce8fa;
  --oro: #d5a33a;
  --tint: rgba(31, 91, 214, 0.1);
  --note: rgba(213, 163, 58, 0.18);
  --btn-bg: #1f5bd6;
  --btn-fg: #ffffff;
  --btn-hover: #14305f;
  --focus: #14305f;
  --halo: #f3eee2;
  --ok: #136c34;
  --warn: #8a5200;
  --bad: #b3261e;
  --term-bg: #0f1f3d;
  --term-bar: rgba(255, 255, 255, 0.06);
  --term-fg: #eef1e9;
  --term-dim: #93a6c6;
  --shadow: 0 28px 48px -32px rgba(20, 48, 95, 0.5), 0 2px 6px rgba(20, 48, 95, 0.06);
  --sky-fg: #14305f;
  --sky-back: #7d93bb;
  --water: #1f5bd6;
  --water-2: #2f6fe0;

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --wire: 56px;
  --measure: 68ch;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1a36;
    --panel: #132849;
    --panel-2: #0a1630;
    --ink: #f3eee2;
    --ink-2: #b3bdd2;
    --rule: rgba(243, 238, 226, 0.18);
    --azul: #86adf2;
    --link: #9bbdf5;
    --cielo: #1d3a6b;
    --oro: #e2b64b;
    --tint: rgba(155, 189, 245, 0.14);
    --note: rgba(226, 182, 75, 0.16);
    --btn-bg: #e2b64b;
    --btn-fg: #14305f;
    --btn-hover: #f2ca66;
    --focus: #e2b64b;
    --ok: #63d18d;
    --warn: #e8b451;
    --bad: #f2867f;
    --term-bg: #06112a;
    --shadow: 0 28px 48px -32px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
    --sky-fg: #061024;
    --sky-back: #1e3560;
    --water: #163f8f;
    --water-2: #1d4ea8;
  }
}

/* Forzado manual: gana a la preferencia del sistema. */
:root[data-theme="light"] {
  --paper: #f6f1e6;
  --panel: #fffdf9;
  --panel-2: #efe8d9;
  --ink: #14305f;
  --ink-2: #5b6478;
  --rule: rgba(20, 48, 95, 0.16);
  --azul: #1f5bd6;
  --link: #1f5bd6;
  --cielo: #dce8fa;
  --oro: #d5a33a;
  --tint: rgba(31, 91, 214, 0.1);
  --note: rgba(213, 163, 58, 0.18);
  --btn-bg: #1f5bd6;
  --btn-fg: #ffffff;
  --btn-hover: #14305f;
  --focus: #14305f;
  --ok: #136c34;
  --warn: #8a5200;
  --bad: #b3261e;
  --term-bg: #0f1f3d;
  --shadow: 0 28px 48px -32px rgba(20, 48, 95, 0.5), 0 2px 6px rgba(20, 48, 95, 0.06);
  --sky-fg: #14305f;
  --sky-back: #7d93bb;
  --water: #1f5bd6;
  --water-2: #2f6fe0;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #0c1a36;
  --panel: #132849;
  --panel-2: #0a1630;
  --ink: #f3eee2;
  --ink-2: #b3bdd2;
  --rule: rgba(243, 238, 226, 0.18);
  --azul: #86adf2;
  --link: #9bbdf5;
  --cielo: #1d3a6b;
  --oro: #e2b64b;
  --tint: rgba(155, 189, 245, 0.14);
  --note: rgba(226, 182, 75, 0.16);
  --btn-bg: #e2b64b;
  --btn-fg: #14305f;
  --btn-hover: #f2ca66;
  --focus: #e2b64b;
  --ok: #63d18d;
  --warn: #e8b451;
  --bad: #f2867f;
  --term-bg: #06112a;
  --shadow: 0 28px 48px -32px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
  --sky-fg: #061024;
  --sky-back: #1e3560;
  --water: #163f8f;
  --water-2: #1d4ea8;
  color-scheme: dark;
}

/* Transición suave al cambiar de tema. */
@media (prefers-reduced-motion: no-preference) {
  html.theme-transition,
  html.theme-transition *,
  html.theme-transition *::before,
  html.theme-transition *::after {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease !important;
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

a:where(:not([class])):hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

p {
  margin: 0 0 1em;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
}

h1 {
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(2.125rem, 1.5rem + 2.4vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 0.3em;
  text-wrap: balance;
}

h2 {
  font-weight: 800;
  font-stretch: 108%;
  font-size: clamp(1.75rem, 1.35rem + 1.4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 0.55em;
  text-wrap: balance;
}

h3 {
  font-weight: 700;
  font-stretch: 104%;
  font-size: 1.3125rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.45em;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--tint);
  padding: 0.08em 0.32em;
  border-radius: 4px;
  white-space: nowrap;
}

ul,
ol {
  padding-left: 1.2em;
}

li + li {
  margin-top: 0.45em;
}

.wrap {
  max-width: calc(1180px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -200px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

/* Fijo al recibir foco: se ve aunque la página haya vuelto a abrirse a mitad de camino. */
.skip:focus {
  position: fixed;
  top: 16px;
}

/* Las etiquetas chicas: la tipografía de los títulos, en minúsculas y sin espaciar. */
.label,
thead th,
.timeline time,
.timeline .when,
.w-label,
.access-title,
.msg .who,
.chat figcaption {
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 100%;
  font-size: 1rem;
  line-height: 1.35;
}

/* Botones */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 24px;
  border: 2px solid transparent;
  border-radius: 8px;
  font: 700 1rem/1.2 var(--font-body);
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-fg);
}

.btn-primary:hover {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
  color: var(--btn-fg);
}

.btn-quiet {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-quiet:hover {
  background: var(--ink);
  color: var(--paper);
}

/* El encabezado reúne la marca, las páginas del sitio y las dos acciones.
   En la vista compacta, los enlaces se pueden desplegar con el botón Menú.
   Sin JavaScript quedan siempre visibles. */

.site-header {
  padding-block: 16px;
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand nav actions";
  align-items: center;
  gap: 10px 28px;
}

.brand {
  grid-area: brand;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.brand .uy {
  color: var(--azul);
}

.site-nav {
  grid-area: nav;
  justify-self: end;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  display: block;
  padding: 8px 0 6px;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  border-bottom-color: var(--oro);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--azul);
}

.site-nav .nav-code {
  display: none;
}

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-code,
.nav-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1.5px solid var(--btn-bg);
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 700 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}

.header-code {
  padding: 7px 14px;
}

.header-code:hover,
.theme-toggle:hover {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
  color: var(--btn-fg);
}

.theme-toggle {
  width: 40px;
  padding: 0;
}

.theme-toggle .icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
  html:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

html:not(.js) .theme-toggle {
  display: none;
}

/* El botón Menú se habilita con JavaScript en la vista compacta. */
.nav-toggle {
  grid-area: toggle;
  display: none;
  gap: 8px;
  padding: 7px 14px;
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.nav-toggle svg {
  flex: none;
}

/* Portada */

.hero {
  padding-block: clamp(36px, 5.5vw, 80px) clamp(48px, 7vw, 96px);
  /* Mientras carga Archivo, la tipografía de reemplazo puede ser más ancha: se recorta en el
     borde en vez de sumar un desplazamiento horizontal. */
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

/* El lema va siempre en dos renglones: cada mitad es un bloque que no se parte, y el tamaño
   sale del ancho de su columna, así que nunca desborda ni deja una palabra suelta. La segunda
   mitad va en azul, como el UY de la marca. */
.hero-copy {
  container-type: inline-size;
}

.lema {
  font-stretch: 116%;
  font-size: clamp(1.625rem, 4.2vw, 4.5rem);
  line-height: 1.02;
  margin-bottom: 0.45em;
}

/* «Tu cédula es una» mide 9,14 em en Archivo: a 10,4 cqi ocupa el 95 % de la columna. */
@supports (font-size: 1cqi) {
  .lema {
    font-size: clamp(1.5rem, 10.4cqi, 4.75rem);
  }
}

.lema span {
  display: block;
  white-space: nowrap;
}

.lema .accent {
  color: var(--azul);
}

.lead {
  max-width: 42ch;
  margin-bottom: 30px;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.5;
}

.fineprint {
  max-width: 50ch;
  margin: 26px 0 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.hero-art svg {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin-inline: auto;
  overflow: visible;
}

/* Los objetos de la ilustración son de papel: no cambian con el tema.
   Paleta y geometría calcadas de brand/firmauy_desktop_logo.png. */
.hero-art .b-sky { fill: #4b78af; }
.hero-art .b-gold { fill: #f0b315; }
.hero-art .b-deep { fill: #2e496a; }
.hero-art .paper { fill: #fafaee; }
.hero-art .outline { fill: none; stroke: #2e496a; stroke-width: 4.5; stroke-linejoin: round; }
.hero-art .doc .outline { fill: #fafaee; }
.hero-art .fill-sky { fill: #4b78af; }
.hero-art .fill-gold { fill: #f0b315; }
.hero-art .fill-ink { fill: #2e496a; }
.hero-art .chip { fill: #f0b315; stroke: #2e496a; stroke-width: 3; }
.hero-art .chip-lines { fill: none; stroke: #2e496a; stroke-width: 2.5; }
.hero-art .fold { fill: #4b78af; stroke: #2e496a; stroke-width: 3.5; stroke-linejoin: round; }
.hero-art .shackle { fill: none; stroke: #2e496a; stroke-width: 5; }
.hero-art .lock { fill: #4b78af; stroke: #2e496a; stroke-width: 4; }
.hero-art .ground { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.hero-art .halo-color { flood-color: var(--halo); }

/* La firma se escribe una vez al cargar: es el único movimiento de la página. */
.hero-art .signature {
  fill: none;
  stroke: #2e496a;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-art .signature {
    stroke-dashoffset: 1.02;
    animation: firma 1.6s cubic-bezier(0.55, 0.05, 0.35, 1) 0.6s forwards;
  }
}

@keyframes firma {
  to {
    stroke-dashoffset: 0;
  }
}

/* Secciones */

.section {
  padding-block: clamp(52px, 7vw, 96px);
  border-top: 1px solid var(--rule);
}

.section-lead {
  max-width: 62ch;
  font-size: 1.1875rem;
  line-height: 1.55;
}

.prose {
  max-width: var(--measure);
}

.prose > :last-child {
  margin-bottom: 0;
}

.small {
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.block {
  margin-top: 40px;
}

.block-tight {
  margin-top: 24px;
}

/* Dos columnas que se apilan en pantallas medianas. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px 56px;
  align-items: start;
}

.split-media {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
}

.split > * > :last-child {
  margin-bottom: 0;
}

/* Donde una columna lleva comandos, esa es la ancha: que entren sin desplazarse. */
.split-code {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr);
}

.split-code-left {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr);
}

.stack-code {
  max-width: 960px;
}

.wrap > :last-child {
  margin-bottom: 0;
}

.more-link {
  font-weight: 700;
}

/* Las tres puertas: tres columnas con un filete grueso arriba, no tres tarjetas. */

.doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 3.5vw, 48px);
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.door {
  margin: 0;
  padding-top: 20px;
  border-top: 4px solid var(--ink);
}

.door h3 {
  font-weight: 800;
  font-stretch: 108%;
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 0.55em;
  text-wrap: balance;
}

.door p {
  margin: 0 0 0.7em;
}

.door-needs {
  color: var(--ink-2);
}

.link-list {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}

.link-list li {
  margin: 0;
}

/* Renglones: a la izquierda de qué se trata, a la derecha la respuesta. Es el patrón que más
   se repite en el sitio. */

.rows {
  max-width: 1020px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.rows > li {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
  gap: 8px 48px;
  margin: 0;
  padding: 22px 0 26px;
  border-top: 1px solid var(--rule);
}

.rows > li:last-child {
  border-bottom: 1px solid var(--rule);
}

.rows h3,
.rows p {
  margin: 0;
}

.rows p + p {
  margin-top: 0.6em;
}

/* Las tres respuestas. La palabra es la que da FirmaUY, con su ícono: el color no va solo. */

.verdicts {
  max-width: 1020px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.verdicts > li {
  display: grid;
  grid-template-columns: minmax(0, 23rem) minmax(0, 1fr);
  gap: 8px 40px;
  align-items: center;
  margin: 0;
  padding: 22px 0 24px;
  border-top: 1px solid var(--rule);
}

.verdicts > li:last-child {
  border-bottom: 1px solid var(--rule);
}

.verdict-word {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.verdict-word svg {
  flex: none;
  width: 1.05em;
  height: 1.05em;
}

.verdict-ok { color: var(--ok); }
.verdict-warn { color: var(--warn); }
.verdict-bad { color: var(--bad); }

.verdicts p {
  margin: 0;
}

.verdict-says {
  font-size: 1.1875rem;
  line-height: 1.5;
}

.verdicts-compact > li {
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 14px 0 16px;
}

.verdicts-compact .verdict-word {
  font-size: 1.3125rem;
}

.verdicts-compact .verdict-says {
  font-size: 1.0625rem;
}

/* El mapa: paneles flotantes, unidos por hilos finos con puntos dorados. */

.stack {
  max-width: 980px;
  margin-top: 44px;
}

.stack-apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.layer {
  display: block;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.layer-name {
  display: block;
  padding: 11px 20px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 104%;
  font-size: 1.0625rem;
  line-height: 1.3;
  transition: background-color 0.15s;
}

a.layer:hover .layer-name {
  background: var(--azul);
}

.layer-text {
  display: block;
  padding: 16px 20px 18px;
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.45;
}

/* El motor es la terminal: panel oscuro en los dos temas. */
.layer-core {
  border-color: transparent;
  background: var(--term-bg);
  color: var(--term-fg);
}

.layer-core .layer-name {
  background: var(--term-bar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fffdf9;
}

.layer-core .layer-text {
  color: #c9d4e8;
}

a.layer-core:hover .layer-name {
  background: #1f5bd6;
}

.wire {
  position: relative;
  display: flex;
  height: var(--wire);
}

.w {
  position: relative;
  flex: 1;
}

.w::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  border-left: 2px solid var(--azul);
}

.w-dashed::before {
  border-left-style: dashed;
}

.w::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--oro);
  box-shadow: 0 calc(var(--wire) - 8px) 0 var(--oro);
}

.wire-apps {
  gap: 28px;
}

.w-label {
  position: absolute;
  top: 50%;
  left: calc(50% + 14px);
  transform: translateY(-50%);
  color: var(--ink-2);
  white-space: nowrap;
}

.layer-access {
  padding: 16px 0 0;
}

.access-title {
  margin: 0 20px 12px;
  color: var(--ink-2);
}

.access-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.access-row li {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.access-row li + li {
  border-left: 1px solid var(--rule);
}

.access {
  display: block;
  flex: 1 1 auto;
  padding: 14px 20px 16px;
  color: var(--ink);
  text-decoration: none;
}

.access:hover {
  background: var(--tint);
  color: var(--ink);
}

.access-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 104%;
  font-size: 1.0625rem;
}

.access-text {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.4;
}

/* cedulauy-mrz-scan cuelga de OpenSC: no es un camino a la tarjeta, es la llave del NFC. */
.access-side {
  flex: 0 0 auto;
  border-top: 1px dashed var(--rule);
}

.access-side .access-name {
  font-size: 1rem;
}

.layer-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 10px 22px 10px 12px;
  border-color: transparent;
  border-radius: 999px;
  background: var(--cielo);
  box-shadow: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
}

.layer-card img {
  display: block;
  flex: none;
}

/* El estado de cada pieza, con fecha: el único lugar del sitio que nombra versiones. */

.state {
  max-width: 980px;
  margin-top: 52px;
}

.state-title {
  margin: 0 0 6px;
  color: var(--ink-2);
}

.state ul {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.state li {
  margin: 0;
  padding: 12px 0 16px;
  border-top: 1px solid var(--rule);
}

.state-name {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 104%;
  font-size: 1.0625rem;
  text-decoration: none;
}

.state-name:hover {
  color: var(--azul);
}

.state-text {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.4;
}

/* Páginas internas: el título, para quién es y qué hay en la página. */

.page-head {
  padding-block: clamp(36px, 5vw, 68px) clamp(36px, 4.5vw, 60px);
}

.tool-for {
  margin: 0 0 0.7em;
  color: var(--azul);
  font-family: var(--font-display);
  font-weight: 650;
  font-stretch: 100%;
  font-size: clamp(1.1875rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.35;
  text-wrap: balance;
}

.page-lead {
  max-width: 62ch;
  margin-bottom: 0;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
}

.page-head .status,
.page-head .actions {
  margin-top: 24px;
}

.page-head .after {
  margin-top: 14px;
}

.status {
  display: inline-block;
  margin: 0;
  padding: 10px 16px;
  border-left: 4px solid var(--oro);
  border-radius: 0 8px 8px 0;
  background: var(--note);
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.status strong {
  font-weight: 700;
}

.toc {
  border-top: 1px solid var(--rule);
}

.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 26px;
  margin: 0;
  padding: 12px 0;
  list-style: none;
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 6px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* Pasos: números solo donde el orden importa. */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
}

.steps > li {
  position: relative;
  margin: 0;
  padding: 0 0 22px 3.1rem;
  counter-increment: paso;
}

.steps > li:last-child {
  padding-bottom: 0;
}

.steps > li::before {
  content: counter(paso);
  position: absolute;
  top: -0.1rem;
  left: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font: 700 1.0625rem/2.1rem var(--font-display);
  text-align: center;
}

.steps p {
  margin: 0;
}

.plain-list {
  margin: 0;
}

.spaced-list > li + li {
  margin-top: 0.75em;
}

/* Capturas: dentro de una ventana flotante, como la app del folleto. */

.shot {
  margin: 0;
}

.window {
  position: relative;
  padding-top: 36px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.window::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-2);
  box-shadow: 16px 0 0 var(--ink-2), 32px 0 0 var(--ink-2);
  opacity: 0.45;
}

.window img {
  display: block;
  width: 100%;
  height: auto;
  border-top: 1px solid var(--rule);
  border-radius: 0 0 13px 13px;
  background: #ffffff;
}

.window picture {
  display: contents;
}

.shot figcaption {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Bloques de terminal: panel azul marino con barra de título. */

.term {
  position: relative;
  padding-top: 40px;
  border-radius: 14px;
  background: var(--term-bg);
  color: var(--term-fg);
  box-shadow: var(--shadow);
}

.term::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px 14px 0 0;
  background: var(--term-bar);
}

.term::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(238, 241, 233, 0.28);
  box-shadow: 16px 0 0 rgba(238, 241, 233, 0.28), 32px 0 0 rgba(238, 241, 233, 0.28);
}

.term pre {
  margin: 0;
  padding: 18px 22px 20px;
  overflow-x: auto;
  scrollbar-color: #3a4c70 transparent;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.75;
}

.term pre:focus-visible {
  outline-color: #e2b64b;
  outline-offset: -3px;
}

.term code {
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  white-space: inherit;
}

.term .cmd::before {
  content: "$ ";
  color: #e2b64b;
  user-select: none;
}

/* Los comentarios se envuelven; los comandos siguen en una línea y el bloque se desplaza. */
.term .c {
  color: var(--term-dim);
  white-space: pre-wrap;
}

.term .k {
  color: #8db6f5;
}

.term .s {
  color: #e2b64b;
}

.copy {
  position: absolute;
  top: 7px;
  right: 10px;
  z-index: 1;
  padding: 3px 12px;
  border: 1.5px solid rgba(238, 241, 233, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--term-fg);
  font: 600 0.8125rem/1.5 var(--font-body);
  cursor: pointer;
}

.copy:hover {
  border-color: var(--term-fg);
}

.copy:focus-visible {
  outline-color: #e2b64b;
}

html:not(.js) .copy {
  display: none;
}

.after {
  margin-top: 16px;
}

.term + .term,
.term + h3,
.after + .term {
  margin-top: 28px;
}

/* Tablas */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.45;
}

caption {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  text-align: left;
}

th,
td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

thead th {
  border-bottom: 2px solid var(--ink);
  color: var(--ink-2);
}

tbody th {
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
}

/* Los números de las pruebas: grandes, alineados, con su explicación al lado. */
.figures td:first-child {
  width: 1%;
  padding-right: 28px;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 108%;
  font-size: 1.75rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* Las huellas de los certificados: se tienen que poder leer y comparar enteras. */
.pins {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--panel);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
}

.pins code {
  padding: 0;
  background: none;
  font: inherit;
  white-space: inherit;
}

/* MCP: la conversación de ejemplo */

.chat {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0 22px 22px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.chat figcaption {
  order: -1;
  margin: 0 -22px 8px;
  padding: 12px 20px;
  border-radius: 13px 13px 0 0;
  background: var(--ink);
  color: var(--paper);
}

.msg {
  max-width: 44ch;
  padding: 14px 16px;
  border-radius: 14px;
}

.msg p {
  margin: 0 0 0.6em;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.msg p:last-child {
  margin-bottom: 0;
}

.msg .who {
  margin-bottom: 6px;
}

.msg-you {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background: #1f5bd6;
  color: #ffffff;
}

/* Sobre la burbuja azul el código va en un tono más oscuro que el fondo, no más claro:
   así el blanco conserva el contraste. */
.msg-you code {
  background: rgba(8, 24, 60, 0.38);
}

.msg-ai {
  justify-self: start;
  border-bottom-left-radius: 4px;
  background: var(--panel-2);
}

/* OpenSC: la línea de tiempo */

.timeline {
  position: relative;
  margin: 8px 0 0;
  padding: 0 0 0 36px;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 12px;
  left: 7px;
  border-left: 2px solid var(--azul);
}

.timeline li {
  position: relative;
  margin: 0;
  padding-bottom: 28px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: -36px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--oro);
  border-radius: 50%;
  background: var(--oro);
}

.timeline li.pending::before {
  background: var(--paper);
}

.timeline time,
.timeline .when {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-2);
}

.timeline li > a {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 104%;
  font-size: 1.1875rem;
  line-height: 1.35;
  text-decoration: none;
}

.timeline li > a:hover,
.timeline li > a:focus-visible {
  text-decoration: underline;
}

.timeline li > span:last-child {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 1rem;
}

/* Créditos */

.credits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 56px;
  margin-top: 36px;
}

.credits article {
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

/* El autor abre los créditos a lo ancho; el registro no es una persona y los cierra igual. */
.credits .author,
.credits .registry {
  grid-column: 1 / -1;
}

.credits .author p,
.credits .registry p {
  max-width: 75ch;
}

.credits p {
  margin: 0;
}

/* Montevideo al pie, como en el folleto: el sol dorado, la silueta y el agua. El dibujo guarda
   su proporción y se centra; en pantallas muy anchas el horizonte sigue con una línea, y nunca
   se recorta la punta del Palacio Salvo. */

.skyline {
  display: flex;
  justify-content: center;
  height: clamp(120px, 16.667vw, 240px);
  margin-top: clamp(24px, 4vw, 48px);
  border-bottom: 4px solid var(--sky-fg);
  line-height: 0;
  overflow: hidden;
}

/* El dibujo mide siempre seis veces su alto. En teléfonos sobra por los costados y se recortan
   las palmeras; en pantallas anchas queda centrado y la línea del borde sigue el horizonte. */
.skyline svg {
  flex: none;
  width: auto;
  max-width: none;
  height: 100%;
  aspect-ratio: 6 / 1;
  color: var(--sky-fg);
}

.skyline .sun { fill: var(--oro); }
.skyline .back { fill: var(--sky-back); }
.skyline .front { fill: var(--sky-fg); }
.skyline .col { fill: none; stroke: var(--paper); stroke-width: 2; }

.water {
  position: relative;
  height: 16px;
  background: linear-gradient(var(--water), var(--water-2));
}

.water::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
}

/* Pie */

.site-footer {
  padding-block: 44px 56px;
  background: var(--paper);
  color: var(--ink);
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-about p {
  max-width: 62ch;
  margin-bottom: 0.6em;
  font-size: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.375rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin: 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.footer-nav li {
  margin: 0;
}

.footer-nav li + li {
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid var(--rule);
}

.footer-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* El encabezado pasa a dos filas cuando las páginas ya no entran al lado de la marca. */

@media (max-width: 1239px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
  }

  .site-nav {
    justify-self: start;
  }
}

/* Pantallas medianas */

@media (max-width: 1000px) {
  .hero-grid,
  .split,
  .split-code,
  .split-code-left {
    grid-template-columns: minmax(0, 1fr);
  }

  .lema {
    font-size: clamp(1.5rem, 8.4vw, 4.5rem);
  }

  @supports (font-size: 1cqi) {
    .lema {
      font-size: clamp(1.5rem, 10.4cqi, 4.5rem);
    }
  }

  .hero-art svg {
    max-width: 420px;
    margin-inline: 0;
  }

  .doors {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .door {
    max-width: 62ch;
  }

  .credits,
  .state ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .verdicts > li {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    gap: 8px 28px;
  }
}

/* Navegación compacta */

@media (max-width: 60em) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand toggle actions"
      "nav nav nav";
    gap: 10px 10px;
  }

  .header-code {
    display: none;
  }

  .site-nav {
    justify-self: stretch;
  }

  .site-nav ul {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding-top: 4px;
  }

  .site-nav a {
    padding: 11px 0;
    border-bottom: 1px solid var(--rule);
    white-space: normal;
  }

  .site-nav a[aria-current="page"] {
    border-bottom-color: var(--rule);
    color: var(--azul);
  }

  .site-nav .nav-code {
    display: block;
  }

  .site-nav li:last-child a {
    border-bottom: 0;
  }

  html.js .nav-toggle {
    display: inline-flex;
  }

  html.js .nav-toggle[aria-expanded="false"] ~ .site-nav {
    display: none;
  }
}

/* Teléfonos */

@media (max-width: 720px) {
  .term pre {
    font-size: 0.8125rem;
  }

  .stack-apps,
  .access-row,
  .state ul,
  .rows > li,
  .verdicts > li,
  .credits {
    grid-template-columns: minmax(0, 1fr);
  }

  .stack-apps {
    gap: 16px;
  }

  .wire-apps .w-dashed,
  .w-label {
    display: none;
  }

  .access-row li + li {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }

  .credits {
    gap: 36px;
  }

  .hero-art svg {
    max-width: 320px;
  }

  .figures td:first-child {
    padding-right: 16px;
    font-size: 1.375rem;
  }

  .footer-nav ul {
    display: grid;
    gap: 10px;
  }

  .footer-nav li + li {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}

/* Teléfonos angostos: la marca cede lugar para que el botón Menú y el del tema entren a su lado. */

@media (max-width: 360px) {
  .brand {
    font-size: 1.5rem;
  }

  .nav-toggle {
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .layer-name {
    transition: none;
  }
}

/* Impresión: el texto y los comandos, sin el marco del sitio. */

@media print {
  :root {
    --paper: #ffffff;
    --panel: #ffffff;
    --panel-2: #f2f2f2;
    --ink: #000000;
    --ink-2: #333333;
    --link: #000000;
    --azul: #000000;
    --rule: #999999;
    --ok: #000000;
    --warn: #000000;
    --bad: #000000;
    --shadow: none;
  }

  .site-nav,
  .header-actions,
  .nav-toggle,
  .toc,
  .copy,
  .hero-art,
  .skyline,
  .water,
  .footer-nav {
    display: none !important;
  }

  body {
    font-size: 11pt;
  }

  .section {
    padding-block: 18pt;
  }

  .term {
    border: 1px solid #999999;
    background: #ffffff;
    color: #000000;
  }

  .term::before,
  .term::after {
    display: none;
  }

  .term .c,
  .term .k,
  .term .s,
  .term .cmd::before {
    color: #000000;
  }

  .term pre {
    white-space: pre-wrap;
  }
}
