/* CristalVPN — hoja de estilo
   Idea: "cristal". Fondo de vidrio claro, tinta verde botella y paneles como hojas de
   vidrio vistas de frente: blancas, con el canto verde abajo. Sin sombras ni degradados de adorno.
   Tipos: Atkinson Hyperlegible (texto) y B612 Mono (llave y datos): dos familias hechas para
   que ningun caracter se confunda con otro, que es justo lo que necesita una llave. */

@font-face { font-family: "Atkinson"; src: url("/fuentes/Atkinson-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/fuentes/Atkinson-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/fuentes/Atkinson-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "B612 Mono"; src: url("/fuentes/B612Mono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "B612 Mono"; src: url("/fuentes/B612Mono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --vidrio: #e9f1ee;
  --luna: #fbfdfc;
  --tinta: #0b2a29;
  --tinta-suave: #3d5c59;
  --canto: #1e8c78;
  --canto-oscuro: #0f6656;
  --linea: #bcd3cc;
  --ambar: #9a5a06;
  --ambar-fondo: #fbf1dc;
  --rojo: #a23527;
  --texto: "Atkinson", "Segoe UI", system-ui, sans-serif;
  --dato: "B612 Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ancho: 70rem;
  --borde: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--vidrio);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.125rem;
  line-height: 1.55;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--canto-oscuro); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--tinta); }
:focus-visible { outline: 3px solid var(--ambar); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.1; margin: 0; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.03; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; letter-spacing: 0; }
p { margin: 0; max-width: 62ch; }
ul, ol, dl { margin: 0; padding: 0; }
[hidden] { display: none !important; }

.caja { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--borde); }
.oculto-visual { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --- cabecera */
.cabecera { padding-block: 1.25rem; }
.cabecera .caja { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; }
.marca { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--tinta); text-decoration: none; margin-right: auto; }
.marca svg { width: 1.5rem; height: 1.5rem; }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; list-style: none; font-size: 1rem; }
.menu a { color: var(--tinta); text-decoration: none; padding-block: 0.3rem; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: var(--canto); }

/* --- botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
  padding: 0.8rem 1.35rem; border-radius: 4px; border: 2px solid var(--tinta);
  background: var(--tinta); color: var(--luna);
}
.boton:hover { background: var(--canto-oscuro); border-color: var(--canto-oscuro); color: var(--luna); }
.boton.secundario { background: transparent; color: var(--tinta); }
.boton.secundario:hover { background: var(--tinta); color: var(--luna); border-color: var(--tinta); }
.boton.peligro { background: transparent; color: var(--rojo); border-color: var(--rojo); }
.boton.peligro:hover { background: var(--rojo); color: var(--luna); }
.boton.menor { padding: 0.45rem 0.9rem; font-size: 0.95rem; }
.boton[disabled] { opacity: 0.5; cursor: not-allowed; }
.botones { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; }

/* --- hoja de vidrio: panel blanco con el canto verde abajo */
.hoja {
  position: relative; background: var(--luna); border: 1px solid var(--linea); border-bottom: 0;
  border-radius: 4px 4px 0 0; padding: clamp(1.25rem, 3vw, 2rem); padding-bottom: calc(clamp(1.25rem, 3vw, 2rem) + 7px);
}
.hoja::after {
  content: ""; position: absolute; left: -1px; right: -1px; bottom: 0; height: 7px;
  background: linear-gradient(90deg, #2a9d87 0%, #86d3c2 21%, #1e8c78 47%, #63bfab 74%, #1e8c78 100%);
}
.hoja > * + * { margin-top: 1rem; }

/* --- portada */
.portada { padding-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.portada .caja { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 60rem) { .portada .caja { grid-template-columns: 1.05fr 0.95fr; } }
.portada p.entrada { font-size: 1.3rem; line-height: 1.45; margin-top: 1.5rem; max-width: 34ch; }
.portada .botones { margin-top: 2rem; }

/* la ficha: lo que el servidor guarda, tal cual */
.ficha h2 { font-size: 1.2rem; letter-spacing: 0; }
.ficha dl + h2 { margin-top: 1.75rem; }
.ficha dl { display: grid; grid-template-columns: minmax(8.5rem, auto) 1fr; font-size: 1rem; }
.ficha dt, .ficha dd { padding-block: 0.55rem; border-top: 1px solid var(--linea); margin: 0; }
.ficha dt { color: var(--tinta-suave); padding-right: 1.25rem; }
.ficha dd { font-family: var(--dato); font-size: 0.92rem; line-height: 1.75; overflow-wrap: anywhere; }
.ficha .nada dd { font-family: var(--texto); font-style: italic; color: var(--tinta-suave); font-size: 1rem; line-height: 1.55; }
.ficha .nada dt { text-decoration: line-through; text-decoration-color: var(--canto); text-decoration-thickness: 2px; color: var(--tinta); }
.ficha p.nota { font-size: 0.95rem; color: var(--tinta-suave); }
@media (prefers-reduced-motion: no-preference) {
  .ficha .guarda dt, .ficha .guarda dd { animation: aparece 0.5s both; }
  .ficha .guarda > :nth-child(1), .ficha .guarda > :nth-child(2) { animation-delay: 0.25s; }
  .ficha .guarda > :nth-child(3), .ficha .guarda > :nth-child(4) { animation-delay: 0.5s; }
  .ficha .guarda > :nth-child(5), .ficha .guarda > :nth-child(6) { animation-delay: 0.75s; }
  .ficha .guarda > :nth-child(7), .ficha .guarda > :nth-child(8) { animation-delay: 1s; }
  .ficha .guarda > :nth-child(9), .ficha .guarda > :nth-child(10) { animation-delay: 1.25s; }
  @keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
}

/* --- bloques de contenido */
.bloque { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.bloque > .caja > h2 { margin-bottom: 1.75rem; max-width: 22ch; }
.bloque.linea { border-top: 1px solid var(--linea); }
.pasos { list-style: none; counter-reset: paso; display: grid; gap: 2rem; }
@media (min-width: 52rem) { .pasos { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.pasos li { counter-increment: paso; }
.pasos li::before { content: counter(paso); display: block; font-family: var(--dato); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--canto); margin-bottom: 0.75rem; }
.pasos h3 { margin-bottom: 0.4rem; }
.dos { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .dos { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.lista { list-style: none; }
.lista li { padding-block: 0.7rem; border-top: 1px solid var(--linea); max-width: 46ch; }
.lista li:last-child { border-bottom: 1px solid var(--linea); }
.dos h2 { font-size: 1.2rem; letter-spacing: 0; margin-bottom: 1rem; }
.cierre { background: var(--tinta); color: var(--luna); }
.cierre h2 { max-width: 20ch; }
.cierre p { margin-top: 1rem; color: #cfe3dd; }
.cierre .boton { background: var(--luna); color: var(--tinta); border-color: var(--luna); margin-top: 1.75rem; }
.cierre .boton:hover { background: var(--vidrio); border-color: var(--vidrio); color: var(--tinta); }

/* --- paginas interiores */
.titular { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem); }
.titular h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 18ch; }
.titular p { font-size: 1.25rem; margin-top: 1rem; max-width: 52ch; }
.prosa > * + * { margin-top: 1rem; }
.prosa h2 { margin-top: 3rem; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.prosa h2:first-child { margin-top: 0; }
.prosa ul, .prosa ol { padding-left: 1.2rem; max-width: 62ch; }
.prosa li + li { margin-top: 0.4rem; }
.tabla { width: 100%; border-collapse: collapse; font-size: 1rem; max-width: 56rem; }
.tabla th, .tabla td { text-align: left; vertical-align: top; padding: 0.7rem 1rem 0.7rem 0; border-top: 1px solid var(--linea); }
.tabla th { font-weight: 700; }
.tabla thead th { border-top: 0; color: var(--tinta-suave); font-weight: 400; }
.tabla td.dato { font-family: var(--dato); font-size: 0.9rem; overflow-wrap: anywhere; }
@media (max-width: 40rem) { .tabla thead { display: none; } .tabla tr { display: block; padding-block: 0.6rem; border-top: 1px solid var(--linea); } .tabla th, .tabla td { display: block; border: 0; padding: 0.15rem 0; } }

/* --- mi cuenta */
.cuenta { padding-bottom: clamp(3rem, 7vw, 6rem); }
.cuenta .caja > * + * { margin-top: 1.5rem; }
.vista > * + * { margin-top: 1.1rem; }
.vista > .hoja { margin-top: 2.25rem; }
.vista > .hoja:first-child { margin-top: 0; }
.vista > .botones:first-child { align-items: baseline; }
.entrada-doble { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .entrada-doble { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.ayuda { font-size: 0.98rem; color: var(--tinta-suave); }
input[type="text"] {
  width: 100%; font: inherit; color: var(--tinta); background: #fff; border: 2px solid var(--tinta);
  border-radius: 4px; padding: 0.7rem 0.85rem;
}
input.campo-llave { font-family: var(--dato); letter-spacing: 0.04em; text-transform: uppercase; }
input.campo-llave::placeholder { color: #9bb3ad; }
.fila { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: stretch; }
.fila input { flex: 1 1 16rem; }
.llave {
  font-family: var(--dato); font-weight: 700; font-size: clamp(1.15rem, 4.6vw, 2.1rem); letter-spacing: 0.02em;
  line-height: 1.3; overflow-wrap: anywhere; user-select: all; padding: 1rem 0; border-block: 1px solid var(--linea);
}
.aviso { background: var(--ambar-fondo); border-left: 5px solid var(--ambar); padding: 0.9rem 1.1rem; border-radius: 0 4px 4px 0; max-width: 62ch; }
.aviso strong { color: var(--ambar); }
.estado { min-height: 1.6em; font-weight: 700; }
.estado.error { color: var(--rojo); }
.marcar { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }
.marcar input { width: 1.2rem; height: 1.2rem; margin-top: 0.25rem; accent-color: var(--canto-oscuro); flex: none; }
.dispositivos { list-style: none; }
.dispositivos li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; padding-block: 0.9rem; border-top: 1px solid var(--linea); }
.dispositivos li:last-child { border-bottom: 1px solid var(--linea); }
.dispositivos .nombre { font-weight: 700; flex: 1 1 12rem; overflow-wrap: anywhere; }
.dispositivos .dia { color: var(--tinta-suave); font-size: 0.98rem; }
.contador { color: var(--tinta-suave); }
textarea.config {
  width: 100%; min-height: 15.5rem; font-family: var(--dato); font-size: 0.88rem; line-height: 1.5; color: var(--tinta);
  background: var(--vidrio); border: 1px solid var(--linea); border-radius: 4px; padding: 0.9rem; resize: vertical;
}
.barra { height: 6px; background: var(--linea); border-radius: 3px; overflow: hidden; max-width: 24rem; }
.barra span { display: block; height: 100%; width: 30%; background: var(--canto); border-radius: 3px; }
@media (prefers-reduced-motion: no-preference) { .barra span { animation: vaiven 1.1s ease-in-out infinite alternate; } @keyframes vaiven { from { transform: translateX(0); } to { transform: translateX(233%); } } }
.vista > .separa { border: 0; border-top: 1px solid var(--linea); margin-block: 2.75rem; }

/* --- pie */
.pie { border-top: 1px solid var(--linea); padding-block: 2rem 3rem; font-size: 0.98rem; color: var(--tinta-suave); }
.pie .caja { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; align-items: baseline; }
.pie p { margin-right: auto; }
.pie ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.pie a { color: var(--tinta-suave); }

.huella { font-family: var(--dato); font-size: 0.9rem; overflow-wrap: anywhere; max-width: 100%; }
.bloque .boton { margin-block: 0.5rem 1.5rem; }

/* --- selector de idioma */
.idiomas { position: relative; font-size: 1rem; }
.idiomas summary { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; list-style: none; padding: 0.3rem 0.7rem; border: 1px solid var(--linea); border-radius: 4px; color: var(--tinta); }
.idiomas summary::-webkit-details-marker { display: none; }
.idiomas summary::after { content: ""; width: 0.4rem; height: 0.4rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-0.12rem) rotate(45deg); }
.idiomas summary:hover, .idiomas[open] summary { border-color: var(--tinta); background: var(--luna); }
.idiomas svg { width: 1.1rem; height: 1.1rem; }
.idiomas ul { position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 5; min-width: 11rem; list-style: none; padding: 0.35rem; background: var(--luna); border: 1px solid var(--linea); border-bottom: 4px solid var(--canto); border-radius: 4px 4px 2px 2px; box-shadow: 0 10px 24px rgb(11 42 41 / 0.14); }
.idiomas a { display: block; padding: 0.45rem 0.7rem; color: var(--tinta); text-decoration: none; border-radius: 3px; }
.idiomas a:hover { background: var(--vidrio); }
.idiomas a[aria-current="true"] { font-weight: 700; box-shadow: inset 3px 0 0 var(--canto); }
@media (max-width: 40rem) { .cabecera nav { order: 3; width: 100%; } }
