/* PEC — South Grove Trading · sitio público
   Dirección: editorial de estudio. Ver docs/DESIGN.md — todo valor sale de ahí.

   Una sola hoja para el sitio, el portal y el back-office. Antes el portal tenía la
   suya (app.css) y el cliente entraba desde el sitio sintiendo que había cambiado de
   empresa: otra letra, otro ritmo, otro registro.

   Sin fotografía, sin sombras, sin degradados, sin color de acento. El ornamento es
   el filete y el numeral. */

/* ---------------------------------------------------------------- FUENTE ---- */
/* Autoalojada. Cero peticiones a un host externo: ni tracking de terceros ni un
   punto de falla ajeno. Dos instancias estáticas sacadas del eje de tamaño óptico
   del archivo variable — 28 KB en total. */
@font-face {
  font-family: 'Newsreader Display';
  src: url('/assets/fonts/newsreader-display-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader Text';
  src: url('/assets/fonts/newsreader-text-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- TOKENS ---- */
:root {
  /* Tinta: negro cálido, no neutro. El negro puro sobre hueso vibra. */
  --ink:      #14110E;
  --ink-2:    #4A4238;
  --ink-3:    #7C7263;
  /* ink-4 NO es para texto: da 2.47:1 contra el papel. Queda solo para elementos
     decorativos sin información. Toda etiqueta legible usa ink-3 o más oscuro. */
  --ink-4:    #A9A093;

  /* Papel: hueso, no blanco. El blanco puro endurece la serif. */
  --paper:    #FBFAF7;
  --paper-2:  #F4F2EC;

  --rule:     #E3DED2;
  --rule-2:   #CFC8B8;

  /* Pilas. La de sistema como fallback métricamente cercana, para que el swap de
     fuente no mueva el layout. */
  --serif-display: 'Newsreader Display', 'Iowan Old Style', 'Palatino Linotype',
                   Palatino, Georgia, serif;
  --serif-text:    'Newsreader Text', 'Iowan Old Style', 'Palatino Linotype',
                   Palatino, Georgia, serif;
  --sans:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                   'Helvetica Neue', Arial, sans-serif;

  /* Escala */
  --t-display: clamp(40px, 6.2vw, 76px);
  --t-title:   clamp(27px, 3.4vw, 40px);
  --t-sub:     clamp(20px, 2.1vw, 25px);
  --t-lede:    clamp(19px, 1.5vw, 22px);
  --t-body:    18px;
  --t-small:   15px;
  --t-micro:   12.5px;

  /* Ritmo. Base 8. El aire es el material principal de esta dirección. */
  --gutter:  clamp(24px, 5vw, 56px);
  --section: clamp(72px, 9vw, 124px);
  --stack:   24px;

  --shell:   1180px;
  --measure: 60ch;

  --ease:      cubic-bezier(0.2, 0, 0, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* El papel se pinta en html y NO en body a propósito. Si el fondo estuviera en body
   se propagaría al lienzo raíz y taparía el campo de partículas, que va detrás del
   contenido en z-index -1. Con el fondo acá, body queda transparente y el campo se
   ve por las bandas sin tinte; las bandas con tinte lo cubren, y ese ir y venir es
   parte del ritmo, no un descuido. */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif-text);
  font-size: var(--t-body);
  line-height: 1.62;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif-display);
  font-weight: 600;
  text-wrap: balance;
}

h1 { font-size: var(--t-display); line-height: 1.02; letter-spacing: -.022em; max-width: 26ch; }
h2 { font-size: var(--t-title);   line-height: 1.1;  letter-spacing: -.016em; max-width: 30ch; }
h3 { font-size: var(--t-sub);     line-height: 1.25; letter-spacing: -.008em; }

p { margin: 0 0 var(--stack); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

/* Enlaces en tinta, nunca en color. El subrayado es el afford. */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color .12s var(--ease-out);
}
a:hover { text-decoration-color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}

/* -------------------------------------------------------------- ESTRUCTURA -- */
.shell { max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }

.band { padding-block: var(--section); }
.band + .band { border-top: 1px solid var(--rule); }
.band--tint { background: var(--paper-2); }

/* Numeración de sección: el ornamento tipográfico que reemplaza al icono. */
.marker {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 40px;
  font-family: var(--sans);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.marker::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
  transform: translateY(-3px);
}

.lede {
  font-size: var(--t-lede);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 54ch;
}

.note  { font-size: var(--t-small); color: var(--ink-3); max-width: 66ch; }
.micro {
  font-family: var(--sans);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.num { font-variant-numeric: tabular-nums lining-nums; }

/* ------------------------------------------------------------- ENCABEZADO -- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px) saturate(1.4);
  border-bottom: 1px solid var(--rule);
}
.masthead .shell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; min-height: 72px;
}
.wordmark {
  display: flex; align-items: baseline; gap: 12px;
  text-decoration: none;
}
.wordmark strong {
  font-family: var(--serif-display);
  font-size: 19px; font-weight: 600; letter-spacing: -.012em;
  white-space: nowrap;
}
.wordmark span {
  font-family: var(--sans);
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3);
}
.mastnav { display: flex; align-items: center; gap: 30px; font-family: var(--sans); font-size: 14px; }
.mastnav a { text-decoration: none; color: var(--ink-2); transition: color .12s var(--ease-out); }
.mastnav a:hover { color: var(--ink); }
@media (max-width: 900px) { .mastnav a:not(.button) { display: none; } }

/* En pantallas angostas el nombre se partía en tres líneas y el botón en dos: la
   barra entera se rompía. Se suelta el descriptor, que es lo prescindible, y el
   nombre queda entero. */
@media (max-width: 560px) {
  .masthead .shell { gap: 12px; min-height: 62px; }
  .wordmark span { display: none; }
  .wordmark strong { font-size: 17px; }
  .button--small { padding: 8px 13px; font-size: 13px; }
}

/* ---------------------------------------------------------------- BOTONES -- */
/* Sin color: el primario es inversión tinta/papel, el secundario es filete. */
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 14.5px; font-weight: 550; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .14s var(--ease-out), color .14s var(--ease-out),
              border-color .14s var(--ease-out);
}
.button--solid  { background: var(--ink); color: var(--paper); }
.button--solid:hover  { background: var(--ink-2); border-color: var(--ink-2); }
.button--hollow { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.button--hollow:hover { border-color: var(--ink); }
.button--small  { padding: 9px 16px; font-size: 13.5px; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.arrow { width: 15px; height: 9px; flex: none; }
.arrow path { stroke: currentColor; stroke-width: 1.25; fill: none; }

/* ------------------------------------------------------------------ HERO -- */
.hero { padding-block: clamp(72px, 11vw, 152px) var(--section); }
.hero h1 { max-width: 22ch; }
.hero .lede { margin-top: 32px; }

/* Cinta de datos: numerales tabulares separados por filete vertical. */
.ribbon {
  display: flex; flex-wrap: wrap;
  margin-top: 56px; border-top: 1px solid var(--rule);
}
.ribbon > div {
  padding: 22px 32px 0 0;
  margin-right: 32px;
  border-right: 1px solid var(--rule);
  flex: 0 1 auto;
}
.ribbon > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.ribbon dt {
  font-family: var(--sans);
  font-size: var(--t-micro); font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 8px;
}
.ribbon dd {
  margin: 0;
  font-family: var(--serif-display);
  font-size: 27px; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums lining-nums;
}
@media (max-width: 640px) {
  .ribbon > div { border-right: 0; margin-right: 0; padding-right: 0; flex-basis: 100%; }
}

/* ----------------------------------------------------------------- LISTAS -- */
/* Consecuencias y método: numeral romano al margen, filete separador. */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger > li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0 32px;
  padding: 34px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger > li:first-child { border-top: 1px solid var(--rule); }
.ledger .idx {
  font-family: var(--sans);
  font-size: 13px; font-weight: 600; letter-spacing: .1em;
  color: var(--ink-3);
  padding-top: 6px;
  font-variant-numeric: tabular-nums;
}
.ledger h3 { margin-bottom: 12px; }
.ledger p  { color: var(--ink-2); max-width: 58ch; margin: 0; }
@media (max-width: 620px) {
  .ledger > li { grid-template-columns: 1fr; gap: 10px; }
  .ledger .idx { padding-top: 0; }
}

/* ----------------------------------------------------------------- COLUMNAS */
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: clamp(32px, 5vw, 72px); }
.pair--wide { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
@media (max-width: 860px) { .pair--wide { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ TERMS -- */
.terms { border-top: 1px solid var(--rule); margin-top: 8px; }
.terms > div {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 40px; align-items: baseline;
  padding: 30px 0; border-bottom: 1px solid var(--rule);
}
.terms h3 { font-size: var(--t-sub); margin-bottom: 8px; }
.terms .fee {
  font-family: var(--serif-display);
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -.015em; white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
}
.terms .unit { display: block; margin-top: 6px; font-family: var(--sans); font-size: 13px; color: var(--ink-3); letter-spacing: 0; text-transform: none; font-weight: 400; }
@media (max-width: 560px) { .terms > div { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------- FORM -- */
.field { margin-bottom: 22px; }
.field label {
  display: block; margin-bottom: 8px;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
.field input, .field textarea {
  width: 100%; padding: 13px 0;
  font-family: var(--serif-text); font-size: 17px; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--rule-2);
  border-radius: 0;
  transition: border-color .14s var(--ease-out);
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--ink);
}
.field .hint { margin-top: 8px; font-family: var(--sans); font-size: 13px; color: var(--ink-3); }

/* Trampa para bots: invisible para personas, irresistible para scripts. */
.decoy { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.flash {
  padding: 18px 20px; margin-bottom: 26px;
  border: 1px solid var(--rule-2); border-left-width: 3px;
  font-size: var(--t-small);
}
.flash--ok  { border-left-color: var(--ink); }
.flash--bad { border-left-color: #8C2A2A; color: #8C2A2A; }

/* -------------------------------------------------------------------- PIE -- */
.colophon {
  padding-block: 64px 48px;
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
}
.colophon .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; }
.colophon h4 {
  margin: 0 0 14px;
  font-family: var(--sans); font-size: var(--t-micro); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.colophon p { font-size: var(--t-small); color: var(--ink-2); margin: 0; max-width: 34ch; }
.colophon .fine {
  margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--ink-3); max-width: 78ch;
}

/* ------------------------------------------------------------- ORNAMENTO --- */
/* Trazado técnico en SVG, no imagen: hereda currentColor, es nítido en 2x y pesa
   dos órdenes de magnitud menos que el mismo trazo en raster. */
.plate { width: 100%; height: auto; display: block; color: var(--rule-2); }
.plate .hair   { stroke: currentColor; stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.plate .ink    { stroke: var(--ink);   stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.plate .sound  { fill: var(--ink-3); font-family: var(--sans); font-size: 9.5px; letter-spacing: .02em;
                 font-variant-numeric: tabular-nums; }
.plate .label  { fill: var(--ink-3); font-family: var(--sans); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }

/* --------------------------------------------------------------- MOVIMIENTO */
/* El contenido es visible POR DEFECTO. Solo se oculta si hay JavaScript, marcado
   por un script en línea antes de pintar. Ya se rompió una vez: la página arrancaba
   invisible y dependía del JS para poder leerse. */
.js .rise { opacity: 0; transform: translateY(10px); }
.js .rise.seen {
  opacity: 1; transform: none;
  transition: opacity .42s var(--ease), transform .42s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* La marca en la barra superior. align-self porque el resto del wordmark alinea por
   línea de base y un icono no tiene línea de base. */
.wordmark img { align-self: center; display: block; }

/* =========================================================================
   PORTAL Y BACK-OFFICE
   Mismo sistema que el sitio: el cliente no debe sentir que cambió de empresa
   al entrar. Antes el portal usaba una hoja aparte con otro lenguaje visual.
   ========================================================================= */

/* Regla de sección con la acción a la derecha. Disposición tomada de la
   exploración en Stitch: el filete separa, la etiqueta ancla y el botón queda
   donde la vista ya terminó de leer. */
.secrule {
  display: flex; align-items: center; gap: 20px;
  margin: 56px 0 24px;
}
.secrule .label {
  font-family: var(--sans); font-size: var(--t-micro); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  white-space: nowrap;
}
.secrule .fill { flex: 1; height: 1px; background: var(--rule); }

/* --- Legajo: un capitán y sus certificados --- */

.file { border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; margin-bottom: 22px; }
.file-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding: 18px 22px; background: var(--paper-2); border-bottom: 1px solid var(--rule);
}
.file-head h2 { font-size: 21px; max-width: none; }
.file-head .sub {
  font-family: var(--sans); font-size: var(--t-micro); font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  margin-top: 5px;
}
.file-head .count { font-family: var(--sans); font-size: 13px; color: var(--ink-3); flex: none; }

/* Fila de certificado. El progreso es un filete largo alineado en columna, no
   una barrita: en un libro de registro las columnas tienen que alinearse. */
.leg {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px auto 16px;
  align-items: center; gap: 24px;
  padding: 17px 22px; border-bottom: 1px solid var(--rule);
  text-decoration: none; color: inherit;
  transition: background .12s var(--ease-out);
}
.leg:last-child { border-bottom: 0; }
.leg:hover { background: var(--paper-2); }
.leg .name { font-family: var(--serif-display); font-size: 17px; }
.leg .meta {
  font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.leg .track { position: relative; height: 1px; background: var(--rule); }
.leg .track span { position: absolute; inset: -1px auto -1px 0; background: var(--ink); }
.leg .ratio {
  font-family: var(--sans); font-size: 12.5px; color: var(--ink-3);
  font-variant-numeric: tabular-nums; margin-top: 9px; display: block;
}
.leg .chev { width: 8px; height: 13px; color: var(--ink-3); }
.leg .chev path { stroke: currentColor; stroke-width: 1.25; fill: none; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 760px) {
  .leg { grid-template-columns: 1fr; gap: 12px; }
  .pills { justify-content: flex-start; }
  .leg .chev { display: none; }
}

/* --- Pastillas: filete, nunca relleno de color --- */
.pill {
  display: inline-block; padding: 4px 10px; border-radius: 3px;
  border: 1px solid var(--rule-2);
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
  white-space: nowrap;
}
.pill--ink  { border-color: var(--ink); color: var(--ink); }
.pill--warn { border-color: var(--ink-2); color: var(--ink-2); }
.pill--done { border-color: var(--ink); color: var(--paper); background: var(--ink); }

/* --- Checklist de requisitos --- */
.items { border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.item {
  display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 18px;
  padding: 20px 22px; border-bottom: 1px solid var(--rule);
}
.item:last-child { border-bottom: 0; }
.item.is-done { background: var(--paper-2); }
.item .tick {
  width: 16px; height: 16px; margin-top: 4px; border-radius: 50%;
  border: 1px solid var(--rule-2);
  display: grid; place-items: center;
  font-family: var(--sans); font-size: 10px; font-weight: 700; color: var(--ink-3);
}
.item.is-done .tick { border-color: var(--ink); color: var(--ink); }
.item .title { font-family: var(--serif-display); font-size: 16.5px; }
.item .hint { font-size: 15px; color: var(--ink-2); margin-top: 6px; max-width: 62ch; }
.item .cite { font-family: var(--sans); font-size: 11.5px; letter-spacing: .06em; color: var(--ink-3); margin-top: 6px; }
.item .obs {
  margin-top: 12px; padding: 12px 14px;
  border: 1px solid var(--rule-2); border-left-width: 3px; border-left-color: var(--ink);
  font-size: 14.5px; color: var(--ink-2);
}

/* --- Lista de descargas de la ficha --- */
.downloads { border-top: 1px solid var(--rule); }
.download {
  display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 20px;
  align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--rule);
}
.download .what { font-size: 16px; }
.download .digest {
  font-family: var(--sans); font-size: 11px; color: var(--ink-3);
  word-break: break-all; max-width: 30ch;
}
.download .size { font-family: var(--sans); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 620px) { .download { grid-template-columns: 1fr; gap: 6px; } }

/* --- Línea de tiempo --- */
.trail { list-style: none; margin: 22px 0 0; padding-left: 20px; border-left: 1px solid var(--rule); }
.trail li { position: relative; padding: 0 0 20px 18px; }
.trail li::before {
  content: ''; position: absolute; left: -25px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--ink-3);
}
.trail b { font-size: 15.5px; }
.trail time {
  display: block; margin-top: 3px;
  font-family: var(--sans); font-size: 11.5px; letter-spacing: .06em; color: var(--ink-3);
}

/* --- Reglas de elegibilidad --- */
.checks { border-top: 1px solid var(--rule); margin-top: 22px; }
.check {
  display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 14px;
  align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--rule);
  font-size: 15.5px;
}
.check .mk { font-family: var(--sans); font-weight: 700; font-size: 13px; }
.check.no .mk, .check.no { color: var(--ink-2); }
.check .val { font-family: var(--sans); font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* --- Estado vacío --- */
.blank {
  margin-top: 28px; padding: 48px 32px; text-align: center;
  border: 1px dashed var(--rule-2); border-radius: 3px; background: var(--paper-2);
}
.blank h3 { margin-bottom: 10px; }
.blank p { max-width: 46ch; margin-inline: auto; color: var(--ink-2); font-size: 16px; }

/* --- Selector --- */
select {
  font-family: var(--serif-text); font-size: 16px; color: var(--ink);
  background: transparent; padding: 12px 0;
  border: 0; border-bottom: 1px solid var(--rule-2); border-radius: 0;
  width: 100%;
}
select:focus { outline: none; border-bottom-color: var(--ink); }

/* --- Carga de archivos --- */
/* El input de archivo nativo no se puede estilar de verdad; en vez de esconderlo tras un
   botón falso (que rompe el foco de teclado) se lo enmarca y se le baja el registro. */
.uploader {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule);
}
.uploader input[type=file] {
  font-family: var(--sans); font-size: 12.5px; color: var(--ink-2);
  max-width: 100%; min-width: 0; flex: 1 1 240px;
}
.uploader input[type=file]::file-selector-button {
  font-family: var(--sans); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink); background: transparent; cursor: pointer;
  padding: 8px 14px; margin-right: 12px;
  border: 1px solid var(--rule-2); border-radius: 2px;
}
.uploader input[type=file]::file-selector-button:hover { border-color: var(--ink); }
.uploader input[type=file]:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* --- Zonas declaradas --- */
/* Definiciones, no tarjetas: la zona y su delimitación son término y acepción, y el
   filete alcanza para separarlas. Una grilla de cajas convertiría la norma en catálogo. */
.zones { margin-top: 6px; border-top: 1px solid var(--rule); }
.zones > div {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 4px 40px;
  padding: 20px 0; border-bottom: 1px solid var(--rule);
}
.zones dt {
  font-family: var(--serif-display); font-size: 19px; line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.zones dd { margin: 0; font-size: 15.5px; line-height: 1.62; color: var(--ink-2); max-width: 62ch; }

@media (max-width: 640px) {
  .zones > div { grid-template-columns: 1fr; gap: 7px; padding: 17px 0; }
}

/* --- Visor de adjuntos --- */
/* Marco de filete y nada más: el contenido es un pasaporte o un certificado, y
   cualquier ornamento alrededor compite con lo que hay que leer. Alto en vh porque
   un PDF de una página y uno de treinta tienen que ocupar lo mismo en pantalla. */
.visor {
  margin-top: 26px;
  border: 1px solid var(--rule-2);
  background: var(--paper-2);
  min-height: 60vh;
}
.visor iframe { display: block; width: 100%; height: 78vh; border: 0; }
.visor img { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; margin-inline: auto; }

@media (max-width: 640px) {
  .visor iframe { height: 68vh; }
}

/* --- Decisión de revisión --- */
/* Aprobar y denegar a la misma altura. Antes denegar vivía escondido en un plegable
   mientras aprobar era un botón: la interfaz empujaba a aprobar, que es exactamente lo
   que una pantalla de control no debe hacer. */
.decidir { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.decidir--compacta { margin-top: 14px; padding-top: 12px; }
.decidir-botones { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.decidir-botones form { margin: 0; }

/* El plegable del motivo. summary con apariencia de botón, sin el triángulo nativo:
   el marcador por defecto lo delata como plegable y acá se lee como acción. */
.denegar { min-width: 0; }
.denegar > summary { list-style: none; cursor: pointer; }
.denegar > summary::-webkit-details-marker { display: none; }
.denegar > summary::marker { content: ''; }
.denegar[open] > summary { border-color: var(--ink); }
.denegar-form {
  margin-top: 14px; padding: 18px 20px;
  border: 1px solid var(--rule-2); background: var(--paper-2);
  max-width: 520px;
}
.denegar-form .field:first-child { margin-top: 0; }
.denegar-form textarea { min-height: 92px; }

/* --- Panel del back-office --- */
.panel {
  padding: 24px 26px; border: 1px solid var(--rule);
  background: var(--paper-2); margin-top: 22px;
}
.panel h2, .panel h3 { margin-top: 0; }

