:root {
  color-scheme: light;
  --tinta: #142b43;
  --marino: #102a40;
  --azul: #234f71;
  --verde: #1d6a62;
  --claro: #eef3f8;
  --papel: #fff;
  --linea: #cddbe6;
  --secundario: #455f74;
  --error: #a02d26;
  font: 16px/1.55 "Instrument Sans", system-ui, sans-serif;
  color: var(--tinta);
  background: var(--claro);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; min-height: 44px; }
button:disabled { cursor: wait; opacity: .62; }
a { color: var(--azul); text-underline-offset: 3px; }
button, a, textarea, input { outline-offset: 4px; }
:focus-visible { outline: 2px solid #238d82; }
.marca { display: flex; align-items: center; gap: .75rem; font-size: 1.1rem; font-weight: 760; }
.marca-icono { display: inline-grid; gap: 3px; width: 28px; padding: 5px; border: 1px solid currentColor; border-radius: 4px; }
.marca-icono i { height: 2px; background: currentColor; }
.marca-icono i:nth-child(2) { width: 75%; }
.marca-icono i:nth-child(3) { width: 50%; }
.cargando { padding: 3rem 1.25rem; text-align: center; }
.acceso { min-height: 100svh; display: grid; place-items: center; padding: 1.25rem; }
.tarjeta-acceso { background: var(--papel); border: 1px solid var(--linea); border-top: 5px solid var(--verde); padding: clamp(1.5rem, 6vw, 3rem); width: min(100%, 460px); }
.tarjeta-acceso h1 { font-size: clamp(1.55rem, 5vw, 2.05rem); margin: 1.6rem 0 1.25rem; line-height: 1.15; }
.aviso-huella { margin: -.4rem 0 1rem; color: var(--secundario); font-size: .9rem; }
label { display: block; font-size: .92rem; font-weight: 700; }
.clave { display: flex; position: relative; margin: .45rem 0; }
.clave input { width: 100%; min-height: 48px; border: 1px solid var(--linea); border-radius: 5px; padding: .6rem 3.3rem .6rem .8rem; color: inherit; }
.ver-clave { position: absolute; right: 3px; top: 2px; width: 44px; border: 0; background: transparent; color: var(--azul); display: grid; place-items: center; }
.ver-clave span { width: 18px; height: 12px; border: 2px solid; border-radius: 70%; display: grid; place-items: center; }
.ver-clave span::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.ver-clave[aria-pressed="true"] span::after { width: 13px; height: 2px; border-radius: 0; transform: rotate(-35deg); }
.recordar { min-height: 44px; display: flex; align-items: center; gap: .65rem; cursor: pointer; font-weight: 500; }
.recordar input { accent-color: var(--verde); width: 1rem; height: 1rem; }
.primario, .secundario { border: 1px solid transparent; border-radius: 5px; padding: .55rem 1rem; font-weight: 690; }
.primario { background: var(--verde); color: var(--papel); }
.primario:hover:not(:disabled) { background: #15554e; }
.secundario { background: transparent; color: var(--azul); border-color: var(--linea); }
.secundario:hover { background: var(--claro); }
.tarjeta-acceso .primario { width: 100%; margin-top: .75rem; }
.estado { margin-top: .5rem; color: var(--secundario); font-size: .9rem; }
.estado:empty { display: none; }
.estado.error { color: var(--error); }
.aplicacion { min-height: 100svh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.panel { position: sticky; top: 0; height: 100svh; padding: 1.7rem 1.35rem; background: var(--marino); color: var(--papel); display: flex; flex-direction: column; }
.panel .marca-icono { color: #a0e2d3; }
.contadores { display: grid; gap: 1rem; margin-top: 3.5rem; }
.contadores div { display: flex; flex-direction: column-reverse; gap: .1rem; border-left: 2px solid #57978f; padding: .1rem 0 .1rem .75rem; }
.contadores dt, .version { color: #d0e1ee; font-size: .83rem; }
.contadores dd { font: 650 1.7rem/1.1 "IBM Plex Mono", ui-monospace, monospace; }
.version { margin-top: 1.5rem; }
.salir { margin-top: auto; background: transparent; color: inherit; border: 1px solid #557286; border-radius: 5px; }
.salir:hover { background: var(--azul); }
.consulta { display: flex; flex-direction: column; min-width: 0; min-height: 100svh; }
.cabecera { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: 1rem clamp(1rem, 4vw, 3.75rem); background: var(--papel); border-bottom: 1px solid var(--linea); }
.cabecera h1 { font-size: clamp(1rem, 3vw, 1.32rem); }
.espacio-chat { flex: 1; width: min(100%, 960px); margin: 0 auto; padding: clamp(1rem, 4vw, 2.75rem); }
.inicio { padding: clamp(1rem, 6vh, 4.5rem) 0; }
.inicio h2 { font-family: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif; font-size: clamp(1.8rem, 5vw, 3.1rem); line-height: 1.08; letter-spacing: -.035em; max-width: 18ch; }
.ejemplos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; margin-top: 1.6rem; }
.ejemplos button { color: var(--tinta); text-align: left; border: 1px solid var(--linea); border-left: 3px solid var(--verde); border-radius: 4px; padding: .75rem; background: var(--papel); }
.ejemplos button:hover { background: #e0eee9; }
.mensajes { display: grid; gap: 1rem; }
.mensaje { min-width: 0; background: var(--papel); padding: .85rem 1.15rem; border: 1px solid var(--linea); border-radius: 5px; overflow-wrap: anywhere; }
.mensaje.usuario { justify-self: end; max-width: 86%; background: #e0eee9; border-color: #b5d2c9; }
.autor { color: var(--secundario); font-size: .79rem; font-weight: 730; margin-bottom: .35rem; }
.cuerpo > * + * { margin-top: .65rem; }
.cuerpo ul, .cuerpo ol { padding-left: 1.45rem; }
.cuerpo code { font-family: ui-monospace, monospace; }
.tabla { overflow: auto; border: 1px solid var(--linea); border-radius: 4px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; text-align: left; }
th, td { padding: .5rem .7rem; border-bottom: 1px solid var(--linea); }
th { background: var(--claro); }
tr:last-child td { border-bottom: 0; }
.cambios { border-left: 3px solid var(--verde); background: #e0eee9; padding: .7rem .85rem; margin-top: .85rem; }
.cambios ul { margin: .3rem 0 0; padding-left: 1.25rem; }
.compositor { position: sticky; bottom: 0; background: var(--papel); padding: .85rem clamp(1rem, 4vw, 3.75rem) max(1rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); }
.entrada { display: flex; gap: .7rem; align-items: end; margin-top: .35rem; }
textarea { resize: vertical; min-height: 50px; max-height: 38vh; flex: 1; min-width: 0; background: var(--papel); color: inherit; border: 1px solid var(--linea); border-radius: 5px; padding: .6rem .75rem; }
dialog { width: min(94vw, 760px); max-height: 88svh; color: var(--tinta); border: 1px solid var(--linea); border-radius: 7px; padding: clamp(.85rem, 4vw, 1.75rem); }
dialog::backdrop { background: #102a40a6; }
.cabecera-ficha { display: flex; align-items: start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--linea); margin-bottom: 1rem; padding-bottom: .7rem; }
#contenido-ficha { overflow-wrap: anywhere; }
.datos-ficha { display: grid; gap: .6rem; }
.datos-ficha dt { font-weight: 700; }
@media (max-width: 760px) {
  .aplicacion { grid-template-columns: 1fr; }
  .panel { position: static; height: auto; padding: .8rem 1rem; display: grid; grid-template-columns: 1fr auto; gap: .7rem; }
  .salir { grid-column: 2; grid-row: 1; margin: 0; padding: .25rem .7rem; }
  .contadores { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; margin: 0; }
  .contadores div { padding-left: .4rem; }
  .contadores dt { font-size: .74rem; }
  .contadores dd { font-size: 1.15rem; }
  .version { margin: 0; grid-column: 1 / -1; }
  .consulta { min-height: calc(100svh - 8rem); }
  .ejemplos { grid-template-columns: 1fr; }
  .cabecera .secundario { font-size: .8rem; padding: .45rem .55rem; }
}
