/* poa.css — "oficina de sellos criptográfica".
   Función notarial antigua, materiales cripto-nativos: tinta-índigo (autoridad/firma)
   + latón (el sello, el tiempo en Bitcoin) sobre neutros fríos; hash monoespaciado
   como textura; serif reservada a la voz del acta. Sin fuentes externas (ethos offline).
   Regla dura: el JS engancha estas clases — se restilan, no se renombran. */

/* Tema = DECISIÓN de marca, no espejo del SO. Default dark-first (una bóveda notarial
   cripto-nativa: el índigo y el latón del sello brillan sobre oscuro). El usuario puede
   pasar a claro con el toggle (data-theme, persistido). NO se usa prefers-color-scheme:
   la página no cambia sola con el tema del escritorio. */

:root {
  /* tipografía y forma: independientes del tema */
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --radius: 14px;
  --radius-sm: 8px;

  /* ===== tema por defecto: OSCURO (marca) ===== */
  --bg: #100f15;
  --surface: #17151f;
  --surface-2: #1e1c29;
  --fg: #ecebf4;
  --muted: #9995a9;
  --line: #292736;
  --line-strong: #39364a;
  --accent: #9385f2;        /* tinta-índigo: acciones, enlaces, la firma */
  --accent-ink: #a99df6;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --seal: #e0c173;          /* latón: el sello, el tiempo en Bitcoin */
  --seal-soft: color-mix(in srgb, var(--seal) 15%, transparent);
  --ok: #4fc98a;
  --bad: #f0787e;
  --pend: var(--seal);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -18px rgba(0, 0, 0, .7);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, .5), 0 22px 46px -18px rgba(0, 0, 0, .8);
}

/* toggle de vuelta a oscuro (explícito) — idéntico al default */
:root[data-theme="dark"] {
  --bg: #100f15;
  --surface: #17151f;
  --surface-2: #1e1c29;
  --fg: #ecebf4;
  --muted: #9995a9;
  --line: #292736;
  --line-strong: #39364a;
  --accent: #9385f2;
  --accent-ink: #a99df6;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --seal: #e0c173;
  --seal-soft: color-mix(in srgb, var(--seal) 15%, transparent);
  --ok: #4fc98a;
  --bad: #f0787e;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -18px rgba(0, 0, 0, .7);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, .5), 0 22px 46px -18px rgba(0, 0, 0, .8);
}

/* claro: SOLO si el usuario lo elige */
:root[data-theme="light"] {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #f1f0f7;
  --fg: #17161d;
  --muted: #6a6878;
  --line: #e6e4ef;
  --line-strong: #d6d3e3;
  --accent: #5647d6;
  --accent-ink: #4536c0;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, transparent);
  --seal: #9a7413;
  --seal-soft: color-mix(in srgb, var(--seal) 12%, transparent);
  --ok: #147a48;
  --bad: #c0362c;
  --shadow-card: 0 1px 2px rgba(23, 22, 40, .04), 0 10px 30px -16px rgba(23, 22, 40, .16);
  --shadow-lift: 0 2px 4px rgba(23, 22, 40, .06), 0 18px 40px -18px rgba(23, 22, 40, .28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

/* ---------- masthead / tipografía ---------- */

h1 {
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.08;
  margin: 0 0 .6rem;
}
/* el subtítulo se vuelve una eyebrow: mono, tracking ancho, color sello con punto */
h1 small {
  display: block;
  margin-top: .7rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--seal);
}
h1 small::before {
  content: "";
  display: inline-block;
  width: .5rem; height: .5rem;
  margin-right: .55rem;
  border-radius: 50%;
  background: var(--seal);
  vertical-align: .04em;
}

h2 {
  font-size: 1.18rem;
  font-weight: 650;
  letter-spacing: -.01em;
  margin: 2rem 0 .6rem;
}
h3 {
  font-size: 1rem;
  font-weight: 620;
  margin: 0 0 .4rem;
}
p.lead {
  color: var(--muted);
  margin: 0 0 .5rem;
  font-size: 1.1rem;
  line-height: 1.5;
  max-width: 60ch;
}

/* ---------- migas ---------- */

.crumb { font-size: .85rem; color: var(--muted); margin: 0 0 1.5rem; }
.crumb a { color: var(--accent); text-decoration: none; font-weight: 550; }
.crumb a:hover { text-decoration: underline; }

/* ---------- landing: 3 caminos = 3 ROLES paralelos (no una secuencia → sin numerar) ---------- */

.landing {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 2rem 0;
}
@media (min-width: 720px) { .landing { grid-template-columns: repeat(3, 1fr); } }

.nav-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem 1.5rem;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
/* filo de tinta que crece en hover (sin barra-izquierda del diseño viejo) */
.nav-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--seal));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.nav-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--line-strong);
}
.nav-card:hover::before { transform: scaleX(1); }
.nav-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-title {
  font-size: 1.1rem;
  font-weight: 640;
  letter-spacing: -.01em;
  padding-right: 1.4rem;
}
/* flecha que aparece: los caminos llevan a algún lado */
.nav-title::after {
  content: "→";
  position: absolute;
  top: 1.4rem; right: 1.2rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .16s ease, transform .16s ease;
}
.nav-card:hover .nav-title::after { opacity: 1; transform: translateX(0); }
.nav-sub { font-size: .88rem; color: var(--muted); line-height: 1.45; }

/* ---------- pasos: acá SÍ hay secuencia (crear/firmar) ---------- */

.step { border-top: 1px solid var(--line); padding-top: .75rem; margin-top: 1.75rem; }
.step:first-of-type { border-top: 0; }
.step h2 { margin-top: .3rem; }

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin: 1.1rem 0;
  padding: 1.1rem;
  background: var(--surface);
}
legend { padding: 0 .5rem; color: var(--muted); font-size: .88rem; font-weight: 550; }
input[type="file"] { display: block; margin: .4rem 0; max-width: 100%; font-size: .9rem; }

/* ---------- botones ---------- */

button, .btn-link {
  font-family: inherit;
  font-size: .94rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: .58rem 1.35rem;
  cursor: pointer;
  transition: transform .1s ease, filter .12s ease, box-shadow .12s ease;
}
button {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 1px 2px rgba(23, 22, 40, .12);
}
button:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0); }
button:focus-visible, .btn-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .4; cursor: default; }
button.secondary { background: transparent; color: var(--accent); border-color: var(--line-strong); box-shadow: none; }
button.secondary:hover:not(:disabled) { border-color: var(--accent); }
button.mini {
  padding: .2rem .6rem; font-size: .82rem; font-weight: 550;
  background: transparent; color: var(--muted); border-color: var(--line); box-shadow: none;
}
button.mini:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); filter: none; transform: none; }

/* enlaces con forma de botón (navegación entre vistas) */
.btn-link {
  display: inline-block;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-link:hover { filter: brightness(1.07); }
.btn-link.secondary { background: transparent; color: var(--accent); border-color: var(--line-strong); }

hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }

/* ---------- EL SELLO: veredicto como medallón lacrado (elemento firma) ---------- */

.verdict {
  --vc: var(--accent);
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  margin: 1.5rem 0 .5rem;
  font-size: 1.4rem;
  font-weight: 680;
  letter-spacing: -.015em;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.verdict.valid { --vc: var(--ok); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); color: var(--ok); }
.verdict.invalid { --vc: var(--bad); background: color-mix(in srgb, var(--bad) 7%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); color: var(--bad); }

.verdict-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.9rem;
  width: 2.9rem; height: 2.9rem;
  border-radius: 50%;
  background: var(--vc);
  color: var(--surface);
  font-size: 1.3rem;
  font-weight: 700;
}
/* anillo interior (relieve) + dientes del sello (anillo punteado exterior) */
.verdict-mark::before {
  content: "";
  position: absolute; inset: 3px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--surface) 60%, transparent);
}
.verdict-mark::after {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--vc) 45%, transparent);
}
.verdict-sub { margin: 0 0 1.75rem; color: var(--muted); font-size: .92rem; }

/* ---------- pasos del verificador (ol.steps) ---------- */

ol.steps { list-style: none; padding: 0; margin: .5rem 0; }
ol.steps li { padding: .55rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .7rem; align-items: flex-start; }
ol.steps li:last-child { border-bottom: 0; }
ol.steps .mark {
  flex: 0 0 1.5rem; height: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: .8rem; font-weight: 700;
  background: var(--surface-2); color: var(--muted);
}
ol.steps .ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
ol.steps .bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
ol.steps .pend { background: var(--seal-soft); color: var(--seal); }
ol.steps .detail { display: block; color: var(--muted); font-size: .85rem; word-break: break-word; margin-top: .1rem; }

/* ---------- tabla de firmantes (estado de turnos) ---------- */

table.signers { border-collapse: collapse; width: 100%; margin: .85rem 0; font-size: .9rem; }
table.signers th, table.signers td { text-align: left; padding: .5rem .65rem; border-bottom: 1px solid var(--line); }
table.signers th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
table.signers td.id { font-family: var(--mono); font-size: .8rem; word-break: break-all; color: var(--muted); }
table.signers tr.turn { background: var(--accent-soft); }
table.signers tr.turn td { font-weight: 600; }
table.signers tr.signed td, table.signers tr.waiting td { color: var(--muted); }

/* ---------- callouts ---------- */

.note {
  border-left: 3px solid var(--seal);
  padding: .35rem .85rem;
  margin: .7rem 0;
  color: var(--muted);
  font-size: .9rem;
}
code, .mono { font-family: var(--mono); font-size: .85em; }
/* hex/ids sueltos como chip de dato */
:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .06em .38em;
  color: var(--fg);
}

footer {
  margin-top: 3.5rem;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

/* ---------- firmantes en Iniciar: badge de orden = sello-token ---------- */

.signer-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .55rem 0; }
.order-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.9rem; height: 1.7rem; padding: 0 .45rem;
  border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: .8rem; font-weight: 600;
}
/* reorden: número + UNA flecha bidireccional ↕ (clic arriba sube · clic abajo baja) */
.order-ctl { display: inline-flex; align-items: center; gap: .3rem; }
.mini.reorder {
  min-width: 1.6rem;
  padding: .15rem .35rem;
  font-size: 1.05rem;
  line-height: 1.1;
}

/* contador del resumen: bajo el textarea, a la derecha, solo números */
.char-count {
  text-align: right;
  color: var(--muted);
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
  margin: .3rem 0 0;
}

/* "?" de ayuda: despliega una explicación breve del campo */
.help-q {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.3rem; height: 1.3rem; padding: 0;
  border-radius: 50%;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line-strong); box-shadow: none;
  font-size: .74rem; font-weight: 700; line-height: 1;
  vertical-align: middle;
}
.help-q:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); transform: none; filter: none; }

/* ---------- dos vías de entrada de primera clase ---------- */

.entry-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.25rem 0; }
@media (min-width: 640px) { .entry-grid { grid-template-columns: 1fr 1fr; } }
.entry-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.entry-card h3 { letter-spacing: -.01em; }

/* ---------- panel de éxito tras crear/cargar ---------- */

.ok-panel {
  border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--line));
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 1.1rem 0;
  background: color-mix(in srgb, var(--ok) 6%, var(--surface));
}
.ok-panel .note { border-left-color: var(--ok); color: var(--fg); }

/* ---------- el código del acta: la credencial que el usuario se lleva (objeto sellado) ---------- */

.code-panel {
  position: relative;
  border: 1px solid var(--seal);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  margin: 1.1rem 0;
  background: linear-gradient(180deg, var(--seal-soft), transparent 60%), var(--surface);
  box-shadow: var(--shadow-card);
}
.code-label { margin: 0 0 .55rem; font-size: .82rem; font-weight: 550; letter-spacing: .02em; color: var(--seal); text-transform: uppercase; }
.actcode {
  display: block;
  font-family: var(--mono);
  font-size: .95rem;
  word-break: break-all;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8rem .9rem;
  margin-bottom: .6rem;
  user-select: all;
}

/* ---------- campos condicionales ---------- */

.sub-field { border-left: 2px solid var(--line-strong); padding-left: 1rem; margin: .35rem 0 .7rem; }
.sub-field p { margin: .35rem 0; }

/* ---------- disclosure secundario (bonus) ---------- */

details.bonus {
  margin-top: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .7rem 1.1rem;
  background: var(--surface);
}
details.bonus summary { cursor: pointer; color: var(--muted); font-size: .9rem; }

/* ---------- resultado del verificador: bloques primarios ---------- */

.result-block { margin: 1.6rem 0; }
.result-block h2 {
  font-size: .76rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 0 0 .65rem;
}

/* ---------- el acta dice — el CONTENIDO como héroe, en la voz serif del acta ---------- */

.act-summary {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.45;
  margin: 0;
  padding: .2rem 0 .2rem 1.15rem;
  border-left: 3px solid var(--accent);
}
.doc-inline {
  white-space: pre-wrap;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8rem .9rem;
  overflow-x: auto;
  font-size: .92rem;
}

/* ---------- firmantes: lista escaneable con estado + mini-sello ---------- */

.signer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.signer-item {
  display: flex; gap: .8rem; align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .7rem .9rem;
  background: var(--surface);
}
.signer-item.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.chip-mark {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 1.6rem; width: 1.6rem; height: 1.6rem;
  border-radius: 50%; font-size: .82rem; font-weight: 700;
  margin-top: .1rem; color: var(--surface);
}
.chip-mark.ok { background: var(--ok); }
.chip-mark.bad { background: var(--bad); }
.chip-mark::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, currentColor 40%, transparent); }
.chip-mark.ok::after { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.chip-mark.bad::after { border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.signer-body { min-width: 0; flex: 1; }
.signer-head { display: flex; gap: .55rem; align-items: baseline; flex-wrap: wrap; }
.signer-name { font-weight: 640; }
.signer-scheme {
  font-family: var(--mono);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: .05rem .4rem;
}
.signer-id { font-family: var(--mono); font-size: .76rem; color: var(--muted); word-break: break-all; margin-top: .15rem; }
.signer-err { color: var(--bad); font-size: .82rem; margin-top: .25rem; }

/* ---------- la advertencia honesta del sistema ---------- */

.caveat {
  border: 1px solid color-mix(in srgb, var(--seal) 30%, var(--line));
  border-left: 3px solid var(--seal);
  background: var(--seal-soft);
  padding: .65rem .9rem;
  margin: 1.4rem 0;
  font-size: .85rem;
  color: var(--fg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- disclosure técnico: lo no-primario, a un click ---------- */

details.tech { margin: 1.1rem 0; }
details.tech > summary {
  cursor: pointer; color: var(--accent); font-size: .88rem; font-weight: 550;
  padding: .4rem 0; list-style: none;
}
details.tech > summary::-webkit-details-marker { display: none; }
details.tech > summary::before { content: "▸"; display: inline-block; margin-right: .4rem; transition: transform .15s ease; }
details.tech[open] > summary::before { transform: rotate(90deg); }
details.tech > summary:hover { text-decoration: underline; }

.sub-note { color: var(--muted); font-size: .84rem; margin: .55rem 0; word-break: break-word; }

/* ---------- entrada del verificador ---------- */

.verify-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  margin: 1.25rem 0;
}
.field { display: block; margin: .35rem 0 .9rem; }
.field > span { display: block; font-size: .88rem; font-weight: 550; color: var(--muted); margin-bottom: .35rem; }

/* ---------- anclaje temporal ---------- */

.anchor, .anchor-fields { display: flex; flex-direction: column; gap: .75rem; margin: .7rem 0; }
.anchor-fields label { display: block; }
.anchor-fields label > span { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .3rem; }

/* ---------- entrada alternativa (buscar por id) ---------- */

.alt-entry { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.25rem; }
.alt-entry h2 { font-size: 1rem; margin: 0 0 .35rem; }
.field-inline { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------- advertencias de permanencia (§7.4) ---------- */

.warnings {
  border: 1px solid color-mix(in srgb, var(--seal) 30%, var(--line));
  background: var(--seal-soft);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  margin: 1.1rem 0;
}
.warnings p { margin: .4rem 0; font-size: .85rem; color: var(--fg); padding-left: 1.4rem; position: relative; }
.warnings p::before { content: "⚠"; position: absolute; left: 0; color: var(--seal); }

.radio-row label { white-space: nowrap; }

/* ---------- "qué significa esta acta": puente a lenguaje humano ---------- */

.meaning-panel {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.2rem 1.35rem;
  margin: 1.1rem 0;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.meaning-panel h2 { margin-top: .2rem; }
.meaning-panel .act-summary { margin: .8rem 0; }
.meaning-line { margin: .65rem 0; word-break: break-word; }

/* ---------- inputs ---------- */

input[type="text"], input[type="number"], textarea, select {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: .5rem .6rem;
  font: inherit;
  font-size: .92rem;
  max-width: 100%;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- toggle de tema: control de marca, no del SO (flotante, discreto) ---------- */

.theme-toggle {
  position: fixed;
  top: 1rem; right: 1rem;
  z-index: 50;
  width: 2.4rem; height: 2.4rem;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-size: 1.15rem; line-height: 1;
  cursor: pointer;
}
.theme-toggle:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
  transform: none;
  filter: none;
}
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .nav-card:hover { transform: none; }
}
