/* ══════════════════════════════════════════════════════════════════════════
   AUGMENTA · Componentes
   ──────────────────────────────────────────────────────────────────────────
   Todo lo visible que comparten las aplicaciones. Nada aquí sabe de Pong ni
   de conversores: sólo de botones, campos, cabeceras y estados.

   Una regla de oro en toda la hoja: el color de acento nunca está escrito,
   siempre es var(--app-accent). Por eso la misma cabecera se ve verde menta
   en Pong y naranja en Unidades sin una línea de CSS por aplicación.
   ══════════════════════════════════════════════════════════════════════════ */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--a-ground);
  color: var(--a-ink-2);
  font-family: var(--a-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { font-family: var(--a-display); color: var(--a-ink); line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.125rem, 5.5vw, 3rem); font-weight: 600; letter-spacing: -.035em; }
h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.025em; }
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.015em; }
p  { margin: 0; }
a  { color: var(--app-accent-ink); }

:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 2px solid var(--app-accent-ink);
  outline-offset: 2px;
  border-radius: var(--a-r-sm);
}

.a-main { display: block; }

/* ── Cabecera ─────────────────────────────────────────────────────────── */

.a-head {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .625rem clamp(.875rem, 3vw, 1.75rem);
  background: color-mix(in srgb, var(--a-ground) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--a-rule);
}

.a-head__brand {
  display: flex; align-items: center; gap: .5rem;
  color: var(--a-ink); text-decoration: none;
  font-family: var(--a-display); font-weight: 600; letter-spacing: -.02em;
  min-width: 0;
}
/* El logotipo real de Augmenta, en SVG. Ver MARCA en plataforma.ts. */
.a-head__mark { flex: 0 0 auto; color: var(--a-ink); overflow: visible; }
.a-head__brand:hover .a-head__mark { transform: translateY(-1px); }
.a-head__mark { transition: transform .25s var(--a-ease); }
.a-head__wordmark { font-size: .9375rem; }
.a-head__sep { color: var(--a-rule-2); font-weight: 400; }
.a-head__app {
  font-size: .9375rem; color: var(--app-accent-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 480px) { .a-head__wordmark, .a-head__sep { display: none; } }

.a-head__right { display: flex; align-items: center; gap: .5rem; }

.a-icon-btn {
  display: grid; place-items: center;
  width: 2.125rem; height: 2.125rem;
  border: 1px solid transparent; border-radius: .625rem;
  background: none; color: var(--a-ink-3);
  cursor: pointer; list-style: none;
  transition: background .18s, color .18s;
}
.a-icon-btn::-webkit-details-marker { display: none; }
.a-icon-btn:hover { background: var(--a-ground-2); color: var(--a-ink); }

/* ── Selector de aplicaciones ─────────────────────────────────────────────
   La pieza que convierte treinta pestañas en una suite. Lo tuyo va a color;
   lo que no has contratado, en gris y con un más. Se entiende sin leer.    */

.a-switch, .a-acct { position: relative; }
.a-switch[open] .a-icon-btn { background: var(--a-ground-2); color: var(--a-ink); }

.a-switch__panel, .a-acct__panel {
  position: absolute; top: calc(100% + .5rem); right: 0;
  background: var(--a-ground);
  border: 1px solid var(--a-rule);
  border-radius: var(--a-r-lg);
  box-shadow: var(--a-shadow-3);
  padding: .875rem;
  animation: aparece .18s var(--a-ease-out) both;
}
@keyframes aparece { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { @keyframes aparece { from { opacity: 0; } } }

.a-switch__panel { width: min(21rem, calc(100vw - 1.5rem)); }
.a-switch__t {
  font-size: .625rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--a-ink-3); margin: .25rem 0 .5rem .25rem;
}
.a-switch__t + .a-switch__grid { margin-bottom: .875rem; }
.a-switch__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; }

.a-switch__app {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: .375rem;
  padding: .75rem .375rem .625rem;
  border-radius: var(--a-r-md);
  text-decoration: none; color: var(--a-ink-2);
  transition: background .16s;
}
.a-switch__app:hover { background: var(--a-ground-2); }
.a-switch__icon {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: .8rem;
  font-size: 1.25rem; line-height: 1;
  background: var(--a-ground-3);
  filter: grayscale(1); opacity: .5;
  transition: filter .2s, opacity .2s, transform .2s var(--a-ease-out), box-shadow .2s;
}
.a-switch__app.is-on .a-switch__icon {
  filter: none; opacity: 1;
  background: color-mix(in srgb, var(--c) 16%, var(--a-ground));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 34%, transparent);
}
.a-switch__app:hover .a-switch__icon { transform: translateY(-2px); }
.a-switch__n {
  font-size: .6875rem; font-weight: 500; text-align: center; line-height: 1.25;
  color: var(--a-ink-3);
}
.a-switch__app.is-on .a-switch__n { color: var(--a-ink); }
.a-switch__lock {
  position: absolute; top: .5rem; right: .5rem;
  width: 1rem; height: 1rem; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .625rem; font-weight: 700; line-height: 1;
  background: var(--a-ground-3); color: var(--a-ink-3);
}
.a-switch__all {
  display: block; margin-top: .25rem; padding: .5rem .25rem 0;
  border-top: 1px solid var(--a-rule);
  font-size: .8125rem; color: var(--a-ink-3); text-decoration: none;
}
.a-switch__all:hover { color: var(--app-accent-ink); }

/* ── Menú de cuenta ───────────────────────────────────────────────────── */

.a-acct__btn {
  display: grid; place-items: center; width: 2.125rem; height: 2.125rem;
  border-radius: 50%; cursor: pointer; list-style: none;
  background: var(--app-accent); color: var(--app-on-accent);
  font-weight: 700; font-size: .8125rem;
  border: 2px solid var(--a-ground);
  box-shadow: 0 0 0 1px var(--a-rule-2);
}
.a-acct__btn::-webkit-details-marker { display: none; }
.a-acct__panel { width: min(15rem, calc(100vw - 1.5rem)); padding: .375rem; }
.a-acct__mail {
  padding: .5rem .625rem .625rem; margin: 0 0 .25rem;
  border-bottom: 1px solid var(--a-rule);
  font-size: .75rem; color: var(--a-ink-3); word-break: break-all;
}
.a-acct__panel a, .a-acct__panel button {
  display: block; width: 100%; text-align: left;
  padding: .5rem .625rem; border: 0; border-radius: .5rem;
  background: none; font: inherit; font-size: .875rem;
  color: var(--a-ink-2); text-decoration: none; cursor: pointer;
}
.a-acct__panel a:hover, .a-acct__panel button:hover { background: var(--a-ground-2); color: var(--a-ink); }

/* ── Botones ──────────────────────────────────────────────────────────── */

.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8125rem 1.375rem;
  border: 0; border-radius: 999px;
  background: var(--app-accent); color: var(--app-on-accent);
  font: inherit; font-size: .9375rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--a-ease-out), box-shadow .18s, filter .18s;
  box-shadow: 0 10px 22px -14px var(--app-accent);
}
.a-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.a-btn:active { transform: translateY(0); }
.a-btn[disabled], .a-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.a-btn--wide { width: 100%; }
.a-btn--sm { padding: .5rem 1rem; font-size: .8125rem; }
.a-btn--quiet {
  background: transparent; color: var(--a-ink);
  border: 1px solid var(--a-rule-2); box-shadow: none;
}
.a-btn--quiet:hover { background: var(--a-ground-2); filter: none; }

.a-link {
  display: inline-block; padding: 0; border: 0; background: none;
  font: inherit; font-size: .875rem; color: var(--a-ink-3);
  cursor: pointer; text-decoration: none;
  transition: color .16s;
}
.a-link:hover { color: var(--app-accent-ink); text-decoration: underline; text-underline-offset: .25em; }

/* ── Campos ───────────────────────────────────────────────────────────── */

.a-field { display: block; }
.a-field + .a-field { margin-top: 1rem; }
.a-field__l {
  display: block; margin-bottom: .375rem;
  font-size: .8125rem; font-weight: 500; color: var(--a-ink-2);
}
.a-field__wrap { position: relative; display: flex; }
.a-field input {
  width: 100%;
  padding: .8125rem .9375rem;
  border: 1px solid var(--a-rule-2); border-radius: var(--a-r-md);
  background: var(--a-ground); color: var(--a-ink);
  font: inherit; font-size: 1rem;
  transition: border-color .16s, box-shadow .16s;
}
.a-field input::placeholder { color: var(--a-ink-3); opacity: .7; }
.a-field input:focus {
  outline: none;
  border-color: var(--app-accent-ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 24%, transparent);
}
.a-field--pw input { padding-right: 3rem; }
.a-eye {
  position: absolute; right: .375rem; top: 50%; transform: translateY(-50%);
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  border: 0; border-radius: .5rem; background: none;
  color: var(--a-ink-3); cursor: pointer;
}
.a-eye:hover { background: var(--a-ground-2); color: var(--a-ink); }

/* Interruptor de «mantener la sesión iniciada». */
.a-toggle {
  display: flex; align-items: center; gap: .625rem;
  font-size: .875rem; color: var(--a-ink-2); cursor: pointer;
  user-select: none;
}
.a-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.a-toggle__track {
  flex: 0 0 auto; position: relative;
  width: 2.375rem; height: 1.375rem; border-radius: 999px;
  background: var(--a-rule-2);
  transition: background .2s var(--a-ease);
}
.a-toggle__track::after {
  content: ""; position: absolute; top: .1875rem; left: .1875rem;
  width: 1rem; height: 1rem; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3);
  transition: transform .22s var(--a-ease-out);
}
.a-toggle input:checked + .a-toggle__track { background: var(--app-accent); }
.a-toggle input:checked + .a-toggle__track::after { transform: translateX(1rem); }
.a-toggle input:focus-visible + .a-toggle__track {
  outline: 2px solid var(--app-accent-ink); outline-offset: 2px;
}

/* ── Avisos ───────────────────────────────────────────────────────────── */

.a-note {
  display: flex; gap: .625rem;
  padding: .75rem .9375rem;
  border-radius: var(--a-r-md);
  font-size: .875rem; line-height: 1.5;
}
.a-note--bad  { background: var(--a-bad-soft);  color: var(--a-bad); }
.a-note--good { background: var(--a-ok-soft);   color: var(--a-ok); }
.a-note--warn { background: var(--a-warn-soft); color: var(--a-warn); }

/* ── Proveedores ──────────────────────────────────────────────────────── */

.a-provs { display: grid; gap: .5rem; }
.a-provs--row { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.a-prov {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6875rem .75rem;
  border: 1px solid var(--a-rule-2); border-radius: var(--a-r-md);
  background: var(--a-ground); color: var(--a-ink);
  font: inherit; font-size: .875rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background .16s, border-color .16s, transform .16s var(--a-ease-out);
}
.a-prov:hover { background: var(--a-ground-2); border-color: var(--a-rule-2); transform: translateY(-1px); }
.a-prov svg { width: 1.125rem; height: 1.125rem; flex: 0 0 auto; }
.a-prov__n { }
/* El nombre del proveedor se ve siempre. Se llego a ocultar en pantallas
   estrechas para que cupieran tres en fila, y el resultado fue un boton con
   una G suelta que parece roto. Si no caben, que bajen de linea: es lo que
   hace auto-fit, y una fila mas no le molesta a nadie. */
.a-provs--row { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }

.a-or {
  display: flex; align-items: center; gap: .875rem;
  font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--a-ink-3);
}
.a-or::before, .a-or::after { content: ""; flex: 1; height: 1px; background: var(--a-rule); }

/* ── Utilidades ───────────────────────────────────────────────────────── */

.a-stack   { display: flex; flex-direction: column; }
.a-stack-1 { gap: .5rem; }  .a-stack-2 { gap: .875rem; }
.a-stack-3 { gap: 1.25rem; } .a-stack-4 { gap: 1.75rem; }
.a-muted   { color: var(--a-ink-3); }
.a-small   { font-size: .8125rem; }
.a-center  { text-align: center; }
.a-mono    { font-family: var(--a-mono); }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; transition-duration: .001ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   LO QUE VIENE DESPUÉS DE ENTRAR
   ──────────────────────────────────────────────────────────────────────────
   Todo lo anterior servía para una pantalla de acceso. Una aplicación de
   verdad vive aquí: listas, tablas, diálogos, y sobre todo el hueco que hay
   que rellenar cuando todavía no hay nada que enseñar.

   Sigue mandando la regla de la casa: ni un color de acento escrito a mano.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Campos, ampliados ────────────────────────────────────────────────── */

.a-field select, .a-field textarea {
  width: 100%;
  padding: .8125rem .9375rem;
  border: 1px solid var(--a-rule-2); border-radius: var(--a-r-md);
  background: var(--a-ground); color: var(--a-ink);
  font: inherit; font-size: 1rem;
  transition: border-color .16s, box-shadow .16s;
}
.a-field select:focus, .a-field textarea:focus {
  outline: none;
  border-color: var(--app-accent-ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 24%, transparent);
}
.a-input--area { resize: vertical; min-height: 5rem; line-height: 1.55; }

.a-field__h { display: block; margin-top: .375rem; font-size: .8125rem; color: var(--a-ink-3); }

/* El símbolo de moneda pegado al campo: se entiende sin leer la etiqueta. */
.a-field__wrap--pre .a-field__pre {
  position: absolute; left: .9375rem; top: 50%; transform: translateY(-50%);
  color: var(--a-ink-3); font-size: 1rem; pointer-events: none;
}
.a-field__wrap--pre input { padding-left: 2.125rem; }

/* Un botón que borra cosas no puede parecerse a uno que las guarda. Y aun
   así no es rojo relleno: el rojo relleno invita a pulsarlo. */
.a-btn--danger {
  background: transparent; color: var(--a-bad);
  border: 1px solid color-mix(in srgb, var(--a-bad) 40%, transparent); box-shadow: none;
}
.a-btn--danger:hover { background: var(--a-bad-soft); filter: none; }

.a-btn--plain {
  background: transparent; color: var(--a-ink-2);
  border: 0; box-shadow: none; padding: .5rem .75rem;
}
.a-btn--plain:hover { background: var(--a-ground-2); filter: none; transform: none; }

/* ── Avatar ───────────────────────────────────────────────────────────── */

.a-av {
  display: inline-grid; place-items: center;
  width: var(--av, 32px); height: var(--av, 32px);
  border-radius: 999px; overflow: hidden; flex: none;
  background: var(--app-accent-soft);
}
.a-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.a-av--letra {
  color: var(--app-accent-ink);
  font-family: var(--a-display); font-weight: 600;
  font-size: calc(var(--av, 32px) * .42);
}

/* ── Medidor de plan ──────────────────────────────────────────────────── */

/* Se pone ámbar al 80 % y rojo al llegar. Avisar sólo cuando ya no cabe es
   avisar tarde: la persona ya ha escrito lo suyo y lo pierde. */
.a-medidor { display: grid; gap: .375rem; }
.a-medidor__t { font-size: .8125rem; color: var(--a-ink-3); }
.a-medidor--lleno .a-medidor__t { color: var(--a-bad); font-weight: 500; }

/* ── Cuando no hay nada ───────────────────────────────────────────────── */

.a-vacio {
  display: grid; justify-items: center; gap: .75rem;
  padding: clamp(2.5rem, 8vw, 4.5rem) 1.5rem;
  text-align: center;
}
.a-vacio__i {
  font-size: 2.5rem; line-height: 1;
  width: 4.5rem; height: 4.5rem; display: grid; place-items: center;
  border-radius: 999px; background: var(--app-accent-soft);
  margin-bottom: .25rem;
}
.a-vacio__t { font-size: 1.25rem; }
.a-vacio__p { color: var(--a-ink-3); max-width: 34ch; text-wrap: pretty; }
.a-vacio .a-btn { margin-top: .5rem; }

/* ── Tablas ───────────────────────────────────────────────────────────── */

/* La caja se desplaza, la página no. Que la página entera se mueva de lado
   en el móvil es el defecto más común y el más molesto de todos. */
.a-tabla__caja { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.a-tabla { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.a-tabla th {
  text-align: left; font-weight: 500; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--a-ink-3);
  padding: 0 .75rem .5rem; white-space: nowrap;
}
.a-tabla td {
  padding: .8125rem .75rem;
  border-top: 1px solid var(--a-rule);
  color: var(--a-ink-2); vertical-align: middle;
}
.a-tabla tbody tr:hover td { background: var(--a-ground-2); }
.a-tabla th:first-child, .a-tabla td:first-child { padding-left: 0; }
.a-tabla th:last-child,  .a-tabla td:last-child  { padding-right: 0; }
.a-t--der { text-align: right; }
.a-tabla .a-mono { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .a-t--sec { display: none; }
  .a-tabla { font-size: .875rem; }
}

/* ── Fichas ───────────────────────────────────────────────────────────── */

.a-ficha {
  display: block;
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--a-rule); border-radius: var(--a-r-lg);
  background: var(--a-ground);
}
.a-ficha--link { text-decoration: none; color: inherit; transition: border-color .16s, transform .16s var(--a-ease-out); }
.a-ficha--link:hover { border-color: var(--app-accent); transform: translateY(-1px); }
.a-ficha__t { margin-bottom: .375rem; }
.a-ficha__c { color: var(--a-ink-3); font-size: .9375rem; }
.a-ficha__p {
  margin-top: .875rem; padding-top: .75rem;
  border-top: 1px solid var(--a-rule);
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
}
.a-rejilla { display: grid; gap: .875rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }

/* ── Pestañas y migas ─────────────────────────────────────────────────── */

.a-tabs {
  display: flex; gap: .25rem; overflow-x: auto;
  border-bottom: 1px solid var(--a-rule); margin-bottom: 1.5rem;
}
.a-tabs__i {
  padding: .6875rem .875rem; white-space: nowrap;
  color: var(--a-ink-3); text-decoration: none; font-size: .9375rem; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .16s, border-color .16s;
}
.a-tabs__i:hover { color: var(--a-ink); }
.a-tabs__i.is-on { color: var(--app-accent-ink); border-bottom-color: var(--app-accent); }
.a-tabs__n {
  display: inline-block; margin-left: .4375rem; padding: 0 .375rem;
  border-radius: 999px; background: var(--a-ground-3);
  font-size: .75rem; font-variant-numeric: tabular-nums;
}

.a-migas { display: flex; gap: .4375rem; align-items: center; font-size: .8125rem; color: var(--a-ink-3); margin-bottom: .75rem; }
.a-migas a { color: var(--a-ink-3); text-decoration: none; }
.a-migas a:hover { color: var(--app-accent-ink); text-decoration: underline; text-underline-offset: .2em; }
.a-migas__s { opacity: .5; }

/* ── Diálogos ─────────────────────────────────────────────────────────── */

/* <dialog> de verdad: Escape cierra, el tabulador se queda dentro y el foco
   vuelve solo al salir. Un div con position:fixed no hace nada de eso. */
.a-dlg {
  width: min(28rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 1px solid var(--a-rule-2); border-radius: var(--a-r-xl);
  background: var(--a-ground); color: var(--a-ink-2);
  box-shadow: var(--a-shadow-3);
}
.a-dlg::backdrop { background: rgb(8 12 20 / .5); backdrop-filter: blur(2px); }
.a-dlg__x { position: absolute; top: .75rem; right: .75rem; }
.a-dlg__x button {
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border: 0; border-radius: .5rem; background: none;
  color: var(--a-ink-3); cursor: pointer; font-size: .875rem;
}
.a-dlg__x button:hover { background: var(--a-ground-2); color: var(--a-ink); }
.a-dlg__t { font-size: 1.1875rem; padding-right: 2rem; }
.a-dlg__c { margin-top: .75rem; color: var(--a-ink-3); font-size: .9375rem; }
.a-dlg__c .a-field { margin-top: 1rem; }
.a-dlg__a { margin-top: 1.5rem; display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.a-dlg--peligro .a-dlg__t { color: var(--a-bad); }

/* ── El brindis ───────────────────────────────────────────────────────── */

.a-brindis {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  z-index: 50; max-width: calc(100vw - 2rem);
  padding: .75rem 1.125rem;
  border-radius: 999px;
  background: var(--a-ink); color: var(--a-ground);
  font-size: .875rem; font-weight: 500;
  box-shadow: var(--a-shadow-2);
  animation: a-sube .3s var(--a-ease-out);
  transition: opacity .4s, transform .4s;
}
.a-brindis--mal { background: var(--a-bad); color: #fff; }
.a-brindis.se-va { opacity: 0; transform: translate(-50%, .5rem); }
@keyframes a-sube { from { opacity: 0; transform: translate(-50%, .75rem); } }

/* ── Mientras carga ───────────────────────────────────────────────────── */

.a-esq { display: grid; gap: .625rem; padding: .5rem 0; }
.a-esq span {
  height: .875rem; border-radius: 999px;
  background: linear-gradient(90deg, var(--a-ground-2), var(--a-ground-3), var(--a-ground-2));
  background-size: 200% 100%;
  animation: a-brilla 1.4s linear infinite;
}
@keyframes a-brilla { to { background-position: -200% 0; } }

/* ── Ficheros ─────────────────────────────────────────────────────────── */

.a-fich__img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: var(--a-r-sm); background: var(--a-ground-2);
}
.a-fich__icono {
  display: grid; place-items: center; width: 100%; height: 100%;
  border-radius: var(--a-r-sm); background: var(--a-ground-2); font-size: 1.25rem;
}
.a-fich__caja { width: 3rem; height: 3rem; flex: none; }

/* Un adjunto pesa, y una foto cuadrada lo dice mejor que un nombre de fichero. */
.a-adjuntos { display: grid; gap: .625rem; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); }
.a-adjunto {
  position: relative; aspect-ratio: 1; border-radius: var(--a-r-md); overflow: hidden;
  border: 1px solid var(--a-rule);
}
.a-adjunto__x {
  position: absolute; top: .25rem; right: .25rem;
  width: 1.75rem; height: 1.75rem; display: grid; place-items: center;
  border: 0; border-radius: 999px; background: rgb(8 12 20 / .62); color: #fff;
  cursor: pointer; font-size: .75rem; line-height: 1;
}

/* ── Filas de personas ────────────────────────────────────────────────── */

.a-persona { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--a-rule); }
.a-persona:first-child { border-top: 0; }
.a-persona__n { font-weight: 500; color: var(--a-ink); }
.a-persona__d { font-size: .8125rem; color: var(--a-ink-3); }
.a-persona__r { margin-left: auto; display: flex; gap: .5rem; align-items: center; }

.a-etiq {
  display: inline-block; padding: .125rem .5rem;
  border-radius: 999px; background: var(--a-ground-3);
  font-size: .75rem; font-weight: 500; color: var(--a-ink-3);
}
.a-etiq--mia { background: var(--app-accent-soft); color: var(--app-accent-ink); }

/* ── Estructura de página ─────────────────────────────────────────────── */

.a-pag { max-width: 60rem; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.5rem) 1.25rem 5rem; }
.a-pag--ancha { max-width: 72rem; }
.a-pag__cab { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.a-pag__cab h1 { font-size: clamp(1.625rem, 4vw, 2.125rem); }
.a-pag__cab p { color: var(--a-ink-3); margin-top: .375rem; }
.a-pag__acc { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

@media (max-width: 560px) {
  .a-pag__acc { margin-left: 0; width: 100%; }
  .a-pag__acc .a-btn { flex: 1; }
}

.a-sep { height: 1px; background: var(--a-rule); border: 0; margin: 2rem 0; }

/* Quien pide menos movimiento, menos movimiento. */
@media (prefers-reduced-motion: reduce) {
  .a-esq span { animation: none; }
  .a-brindis { animation: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   LO QUE ANTES IBA EN UN ATRIBUTO style=
   ──────────────────────────────────────────────────────────────────────────
   La política de seguridad de esta suite no acepta atributos de estilo: sólo
   hojas con su nonce. Los atributos no admiten nonce —el navegador sólo los
   deja pasar con 'unsafe-inline', que desarmaría la directiva entera— así que
   todo lo que era style="…" vive aquí.

   No es una restricción molesta que haya que sortear: es la que impide que un
   escape olvidado se convierta en código ejecutándose. Y obliga a que los
   tamaños sean una lista corta en lugar de un número libre, que además es
   mejor diseño.
   ══════════════════════════════════════════════════════════════════════════ */

.a-av--24 { --av: 24px; }
.a-av--32 { --av: 32px; }
.a-av--40 { --av: 40px; }
.a-av--56 { --av: 56px; }
.a-av--72 { --av: 72px; }

.a-esq--1 { width: 90%; }
.a-esq--2 { width: 76%; }
.a-esq--3 { width: 62%; }

/* ── El medidor, con <progress> de verdad ─────────────────────────────────
   Antes era un div con el ancho puesto a mano, y el navegador tiraba ese
   ancho: la barra salía siempre llena. El elemento nativo no necesita estilo
   en línea, y además los lectores de pantalla lo anuncian solos. */
progress.a-medidor__barra {
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--a-ground-3);
  appearance: none;
  -webkit-appearance: none;
}
progress.a-medidor__barra::-webkit-progress-bar {
  background: var(--a-ground-3);
  border-radius: 999px;
}
progress.a-medidor__barra::-webkit-progress-value {
  background: var(--app-accent);
  border-radius: 999px;
  transition: width .4s var(--a-ease-out);
}
progress.a-medidor__barra::-moz-progress-bar {
  background: var(--app-accent);
  border-radius: 999px;
}
.a-medidor--casi  progress.a-medidor__barra::-webkit-progress-value { background: var(--a-warn); }
.a-medidor--casi  progress.a-medidor__barra::-moz-progress-bar      { background: var(--a-warn); }
.a-medidor--lleno progress.a-medidor__barra::-webkit-progress-value { background: var(--a-bad); }
.a-medidor--lleno progress.a-medidor__barra::-moz-progress-bar      { background: var(--a-bad); }

@media (prefers-reduced-motion: reduce) {
  progress.a-medidor__barra::-webkit-progress-value { transition: none; }
}
