/* =====================================================================
   CheshireKat Apps — estética "ambiente Linux"
   Panel superior tipo GNOME/KDE, ventanas con barra de título,
   terminales, log de systemd y línea de estado estilo vim.
   ===================================================================== */

@font-face {
  /* Windows no trae glifos de bandera: subset de Twemoji SOLO para .flag-ball
     (mismo arreglo que Schedu-Lex, commit a2e806a). */
  font-family: 'FlagEmoji';
  src: url('/fonts/twemoji-country-flags.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bg: #0c0a12;            /* noche violeta */
  --bg-2: #120f1b;
  --surface: #17131f;
  --surface-2: #1e1928;
  --border: #2b2438;
  --text: #e8e3f0;
  --muted: #9b91ad;
  --green: #4ade80;         /* ojos de Cheshie / terminal */
  --green-dim: #22c55e;
  --magenta: #e0408a;       /* la sonrisa */
  --orchid: #b455e0;
  --amber: #f5b342;
  --red: #f87171;
  --accent: var(--green);

  --font-ui: 'Inter', system-ui, sans-serif;
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;   /* logotipo y títulos */
  --font-mono: 'JetBrains Mono', ui-monospace, 'DejaVu Sans Mono', monospace;
  --radius: 10px;
  --topbar-h: 44px;          /* la langbar fija usa este mismo valor como top */
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(180, 85, 224, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(74, 222, 128, .07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* textura de scanlines muy sutil, guiño a los monitores CRT */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.012) 0 1px, transparent 1px 3px);
  z-index: 0;
}
main, .footer { position: relative; z-index: 1; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.h3 { font-size: 1.1rem; margin-top: 2rem; }
p { margin: 0 0 1rem; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: #cfc7dd; }
.prompt { color: var(--green); font-family: var(--font-mono); }
/* Títulos "de terminal" con texto traducido: el prompt va en monoespaciada y el texto en la
   tipografía de títulos, que se completa bien con CJK, árabe o devanagari sin mezclar pesos. */
.cmd { font-family: var(--font-display); }
.cmd .prompt { margin-inline-end: .15em; }
.trials-title { margin-top: 3rem; }
.ok { color: var(--green); }
.warn { color: var(--amber); }
.err { color: var(--red); }

/* Comandos y rutas se leen siempre de izquierda a derecha, también en árabe y hebreo. */
.eyebrow, .section__title.mono, h1.mono, .crumbs, .hero__note, .app-card__meta, .window__title {
  direction: ltr; unicode-bidi: isolate;
}
[dir="rtl"] .eyebrow, [dir="rtl"] .section__title.mono, [dir="rtl"] h1.mono,
[dir="rtl"] .crumbs, [dir="rtl"] .hero__note, [dir="rtl"] .app-card__meta { text-align: right; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 860px; }
.section { padding: 4.5rem 0; }
.section__title { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
.section__lead { color: var(--muted); max-width: 60ch; margin-bottom: 2rem; }
.page-head { padding-top: 3rem; }

/* ── Botones ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .95rem/1 var(--font-ui);
  padding: .8rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--green); color: #07130b; box-shadow: 0 0 0 0 rgba(74,222,128,.0); }
.btn--primary:hover { box-shadow: 0 6px 24px rgba(74, 222, 128, .28); }
.btn--ghost { border-color: var(--border); color: var(--text); background: rgba(255,255,255,.03); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--sm { padding: .5rem .85rem; font-size: .85rem; }

/* ── Panel superior (GNOME/KDE) ──────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 200;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0 1rem;
  background: rgba(8, 7, 12, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.topbar__brand {
  display: flex; align-items: center; gap: .5rem;
  color: var(--text);
  padding: .25rem .6rem; border-radius: 999px;
}
.topbar__brand:hover { background: var(--surface-2); text-decoration: none; }
.topbar__brand img { border-radius: 50%; }
/* Logotipo de texto */
.wordmark { font: 800 1.05rem var(--font-display); letter-spacing: -.02em; color: #fff; direction: ltr; unicode-bidi: isolate; }
.wordmark__suffix { font-weight: 500; color: var(--green); margin-inline-start: .08em; }
.footer__wordmark .wordmark { font-size: 1.35rem; }
.topbar__nav { display: flex; gap: .15rem; }
.topbar__nav a {
  color: #cfc7dd; padding: .35rem .7rem; border-radius: 6px;
}
.topbar__nav a:hover, .topbar__nav a.is-active { background: var(--surface-2); color: #fff; text-decoration: none; }
.topbar__clock {
  position: absolute; left: 50%; transform: translateX(-50%);
  font: 600 .85rem var(--font-mono); color: #fff; white-space: nowrap;
}
.topbar__session { margin-inline-start: auto; display: flex; align-items: center; gap: .75rem; }
.topbar__login { color: #cfc7dd; }
/* Menú del usuario (desplegable con <details>; cheshie.js lo cierra al hacer clic afuera). */
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .35rem; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary::after { content: '▾'; font-size: .7em; opacity: .7; }
.usermenu__panel { position: absolute; inset-inline-end: 0; top: calc(100% + .6rem); min-width: 13rem; z-index: 60;
  display: grid; padding: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.usermenu__panel a, .usermenu__panel button { display: block; width: 100%; text-align: start; padding: .5rem .7rem; border-radius: 6px;
  color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.usermenu__panel a:hover, .usermenu__panel button:hover { background: var(--surface-2); }
.usermenu__panel form { margin: .25rem 0 0; padding-top: .25rem; border-top: 1px solid var(--border); }
.topbar__nav-user { display: none; }
.topbar__admin { border-color: var(--green); color: var(--green); }
.topbar__nav a.topbar__nav-admin { display: none; color: var(--green); }
.topbar__toggle, .topbar__burger { display: none; }

/* ── Langbar (modelo Schedu-Lex/DynaPlots, colores del tema) ─────────── */
.lang-bar {
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center;
  gap: 0 4px;
  padding: 4px 12px;
  background: rgba(12, 10, 18, .94);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--topbar-h);     /* = altura del panel: si cambia uno, cambia el otro */
  z-index: 190;
  direction: ltr;           /* mismo orden de botones en árabe y hebreo */
}
.legal-buttons { margin-inline-end: auto; display: flex; flex-direction: column; gap: .3rem; }
.legal-buttons a {
  /* tipografía de interfaz y sin espaciado: el árabe y el devanagari se escriben con letras unidas */
  font: 700 .66rem var(--font-ui); letter-spacing: 0; text-transform: uppercase; text-align: center;
  color: var(--text); border: 1px solid var(--magenta); border-radius: 5px; padding: .2rem .55rem;
  background: rgba(224, 64, 138, .08);
}
.legal-buttons a:hover { background: rgba(224, 64, 138, .2); text-decoration: none; }
.btn-lang {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; cursor: pointer;
  padding: 3px 4px;
  font-family: inherit; text-decoration: none;
  flex: 0 1 54px; min-width: 0;
}
.btn-lang:hover { text-decoration: none; }
.flag-ball {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  /* FlagEmoji primero (banderas en Windows); Inter de fallback. */
  font-family: 'FlagEmoji', 'Inter', sans-serif;
  position: relative; overflow: hidden;
  background: radial-gradient(circle at 38% 36%, #3a3248 0%, #241e30 55%, #17131f 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,.5), inset 0 -2px 5px rgba(0,0,0,.3);
  transition: transform .18s ease, box-shadow .18s ease;
  user-select: none;
}
.flag-ball::after {
  content: ''; position: absolute; top: 3px; left: 6px;
  width: 56%; height: 42%;
  background: linear-gradient(155deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,.06) 60%, transparent 100%);
  border-radius: 50%; pointer-events: none;
}
.btn-lang:hover .flag-ball { transform: translateY(-2px); }
.btn-lang.active .flag-ball { box-shadow: 0 0 0 2px var(--green), 0 0 14px rgba(74,222,128,.35); }
.flag-ball-esperanto { font-size: 0; }
.flag-ball-esperanto::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 20px; height: 14px; transform: translate(-50%, -50%);
  background: no-repeat center / 100% 100% url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 100'><rect width='150' height='100' fill='%23009a44'/><rect width='50' height='50' fill='%23ffffff'/><polygon fill='%23009a44' points='25,8 29.99,20.13 43.09,21.06 33.11,29.59 36.16,42.37 25,35.52 13.84,42.37 16.89,29.59 6.91,21.06 20.01,20.13'/></svg>");
}
.lang-native { font-size: 10px; font-weight: 700; color: #e8e3f0; line-height: 1.2; white-space: nowrap; }
.lang-translated { font-size: 9px; color: var(--muted); line-height: 1.2; white-space: nowrap; }
.btn-lang.active .lang-native { color: var(--green); }

/* ── Ventanas y terminales ───────────────────────────────────────────── */
.window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  overflow: hidden;
}
.window__bar {
  display: flex; align-items: center; gap: .75rem;
  height: 34px; padding: 0 .75rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.window__dots { display: inline-flex; gap: 6px; }
.window__dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a3248; }
.window__dots i:nth-child(1) { background: #ff5f57; }
.window__dots i:nth-child(2) { background: #febc2e; }
.window__dots i:nth-child(3) { background: #28c840; }
.window__title { font: 500 .78rem var(--font-mono); color: var(--muted); flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window__body { padding: 1.4rem; }
.terminal {
  margin: 0; padding: 1rem 1.2rem;
  font: .88rem/1.7 var(--font-mono);
  color: #d7f5e0;
  background: #0a0810;
  white-space: pre-wrap; word-break: break-all;
  direction: ltr; text-align: left;
}
.caret {
  display: inline-block; width: .6em; height: 1.1em; vertical-align: text-bottom;
  background: var(--green); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Héroe ───────────────────────────────────────────────────────────── */
.hero { padding: 4rem 0 2rem; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.eyebrow { color: var(--green); font-size: .9rem; margin-bottom: 1rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1rem; }
.hero__note { color: var(--muted); font-size: .82rem; }
.hero__term { margin-top: 1.75rem; }
.hero__term .terminal { min-height: 9.5em; }
.hero__art { position: relative; }
.hero__art::before {
  content: ''; position: absolute; inset: 12% 10%;
  background: radial-gradient(circle, rgba(74,222,128,.22), rgba(180,85,224,.12) 45%, transparent 70%);
  filter: blur(30px); z-index: -1;
}
/* Cheshie de la portada: todo el conjunto (gato y piezas de la animación) flota junto. */
.cheshie { position: relative; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 25px 40px rgba(0,0,0,.55)); }
.cheshie__gato { display: block; width: 100%; height: auto; }
/* Huevo de pascua (cheshie-portada.js): el aparatito verde entre las patas de Cheshie. */
.cheshie__huevo { position: absolute; left: 41.7%; top: 77.8%; width: 22.2%; height: 14.6%; z-index: 1; }
@keyframes float { 50% { transform: translateY(-10px); } }
/* Escena de la animación: 720 px de diseño, escalada al ancho real (cheshie-portada.js). */
.cheshie__escena { position: absolute; left: 0; top: 0; width: 720px; height: 720px; transform-origin: 0 0; pointer-events: none; }
.cheshie__pieza { position: absolute; left: 0; top: 0; width: 1024px; height: 1024px; transform-origin: 0 0; opacity: 0; }
.cheshie__pieza img, .cheshie__pieza canvas { position: absolute; left: 0; top: 0; }

/* ── Log de arranque ─────────────────────────────────────────────────── */
.bootlog__lines { list-style: none; white-space: normal; }
.bootlog__lines li { opacity: 0; transform: translateX(-6px); transition: opacity .35s, transform .35s; }
.bootlog__lines li.is-on { opacity: 1; transform: none; }
.bootlog__lines .ok { font-weight: 700; }

/* ── Apps ────────────────────────────────────────────────────────────── */
/* Las 4 apps en una fila y de igual altura; 2×2 en pantallas medianas, 1 en el celular. */
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
@media (max-width: 1100px) { .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .app-grid { grid-template-columns: 1fr; } }
.app-card { display: flex; flex-direction: column; }
.app-card .window__body { flex: 1; display: flex; flex-direction: column; padding: 1.1rem; }
.app-card .window__body > .btn { margin-top: auto; align-self: flex-start; }
.app-card .checklist { margin-bottom: .75rem; }
.app-card .checklist li { font-size: .92rem; }
.app-card { transition: transform .2s, border-color .2s, box-shadow .2s; }
.app-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px var(--accent); }
.app-card__art { height: 170px; margin: -.25rem 0 .9rem; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 18%, transparent), transparent); }
.cheshie-fx { position: relative; height: 100%; max-width: 100%; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.cheshie-fx img { display: block; }
.cheshie-fx__full { max-width: 100%; max-height: 100%; height: 100%; width: auto; object-fit: contain; }
.cheshie-fx__part { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Gato de Cheshire (cheshie-tarjetas.js): escena en píxeles de la imagen, escalada a su tamaño real. */
.cheshie-fx__escena { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.cheshie-fx__escena > div { position: absolute; left: 0; top: 0; width: 1024px; height: 1024px; transform-origin: 0 0; }
.cheshie-fx__escena img, .cheshie-fx__escena canvas { position: absolute; left: 0; top: 0; }
.cheshie-fx__props { z-index: 1; }
.window.keys { margin-bottom: 1.5rem; }
/* Tira de apps en la página de cada app. */
.app-switch { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.app-switch__item { display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .8rem .35rem .4rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text); font-size: .9rem; background: var(--surface); }
.app-switch__item .app-icon { width: 1.9rem; height: 1.9rem; font-size: .62rem; border-radius: 50%; }
.app-switch__item:hover { border-color: var(--accent); }
.app-switch__item.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.app-function { margin: 0 0 .35rem; color: var(--muted); font-size: .9rem; }
.app-card__head { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.app-card__head h3 { margin: 0 0 .25rem; font-size: 1.1rem; line-height: 1.25; }
.app-card__tagline { color: #cfc7dd; }
.app-card__meta { color: var(--muted); font-size: .8rem; }
.app-icon {
  flex: none; display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 14px;
  font: 800 .9rem var(--font-mono); color: #0a0810;
  background: var(--accent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 45%, transparent);
}
.app-icon--lg { width: 72px; height: 72px; font-size: 1.1rem; border-radius: 18px; }
.badge {
  display: inline-block; font: 600 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
  padding: .15rem .5rem; border-radius: 4px; border: 1px solid currentColor;
}
.badge--available { color: var(--green); }
.badge--beta { color: var(--amber); }
.badge--coming { color: var(--orchid); }
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.checklist li { padding-inline-start: 1.6em; position: relative; margin: .3rem 0; }
.checklist li::before { content: '[x]'; position: absolute; inset-inline-start: 0; font: 700 .78rem/1.9 var(--font-mono); color: var(--accent); }
.checklist--lg li { font-size: 1.05rem; }

/* ── Instalador ──────────────────────────────────────────────────────── */
.install__tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.install__tabs button {
  font: 500 .82rem var(--font-mono); color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: .45rem .8rem; cursor: pointer;
}
.install__tabs button.is-active { color: #07130b; background: var(--green); border-color: var(--green); }
.copy-btn {
  font: 500 .72rem var(--font-mono); color: var(--muted);
  background: transparent; border: 1px solid var(--border); border-radius: 4px; padding: .15rem .5rem; cursor: pointer;
}
.copy-btn:hover { color: var(--green); border-color: var(--green); }
.install__note { font-size: .85rem; margin-top: .75rem; }

/* ── Ficha de producto ───────────────────────────────────────────────── */
.crumbs { color: var(--muted); font-size: .85rem; }
.product { display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; align-items: start; }
.product__title { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1rem; }
.product__title h1 { margin: 0 0 .3rem; }
.product__info { position: sticky; top: calc(var(--topbar-h) + 80px); }
.pkginfo { display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; }
.pkginfo dt { color: var(--green); }
.pkginfo dd { margin: 0; color: #d7f5e0; }
.product__actions { display: grid; gap: .6rem; padding: 1rem; }
.product__actions .btn { justify-content: center; }

/* ── Precios ─────────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.tiers { width: 100%; border-collapse: collapse; }
.tiers th, .tiers td { text-align: start; padding: .55rem 0; border-bottom: 1px dashed var(--border); }
.tiers th { font: 600 .75rem var(--font-mono); text-transform: uppercase; color: var(--muted); }
.tiers td:last-child, .tiers th:last-child { text-align: end; }
.plan .tiers { font-size: .82rem; }
.plan .tiers td, .plan .tiers th { white-space: nowrap; padding-inline: .3rem; }
.plan .tiers th { font-size: .62rem; white-space: normal; }
.plan .tiers td:not(:first-child), .plan .tiers th:not(:first-child) { text-align: end; }

/* ── Banda final ─────────────────────────────────────────────────────── */
.cta-band__inner {
  text-align: center; padding: 3rem 1.5rem;
  border: 1px solid var(--border); border-radius: 16px;
  background: linear-gradient(135deg, rgba(180,85,224,.14), rgba(74,222,128,.08));
}
.cta-band__inner p { color: var(--muted); }

/* ── Pie y línea de estado ───────────────────────────────────────────── */
.footer { margin-top: 3rem; border-top: 1px solid var(--border); background: var(--bg-2); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding: 3rem 1.25rem; }
.footer h3 { font: 700 .8rem var(--font-mono); text-transform: uppercase; color: var(--muted); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: .35rem 0; }
.footer li a { color: #cfc7dd; }
.footer__brand img { border-radius: 50%; margin-bottom: .5rem; }
.footer__legal { padding-bottom: 1.5rem; font-size: .8rem; }
.footer__legal p { margin: 0 0 .4rem; max-width: 90ch; }
.footer__legal a { font-weight: 600; }
.statusline {
  display: flex; gap: 0; font: 600 .75rem/1 var(--font-mono);
  background: #08070c; border-top: 1px solid var(--border);
  direction: ltr;
}
.statusline span { padding: .45rem .8rem; white-space: nowrap; }
.statusline__mode { background: var(--green); color: #07130b; }
.statusline__file { background: var(--surface-2); color: #fff; }
.statusline__fill { flex: 1; }
.statusline span:not(.statusline__mode):not(.statusline__file):not(.statusline__fill) { color: var(--muted); border-inline-start: 1px solid var(--border); }

/* ── Formularios ─────────────────────────────────────────────────────── */
.auth { max-width: 520px; }
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-size: .9rem; color: #cfc7dd; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="number"],
.form input[type="date"], .form input[type="file"], .form select, .form textarea {
  width: 100%; font: 400 .95rem var(--font-ui); color: var(--text);
  background: #0a0810; border: 1px solid var(--border); border-radius: 6px; padding: .65rem .75rem;
}
.form textarea { font-family: var(--font-mono); font-size: .9rem; resize: vertical; }
.form input[type="date"] { color-scheme: dark; }
.form input[type="file"] { padding: .45rem .6rem; }
.form input[type="color"] { width: 4rem; height: 2.4rem; padding: .15rem; background: #0a0810; border: 1px solid var(--border); border-radius: 6px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(74,222,128,.15); }
.form .check { display: flex; align-items: flex-start; gap: .5rem; }
.form .check input { margin-top: .3rem; accent-color: var(--green); }
.form button { justify-self: start; }
.form__links { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.25rem 0 0; font-size: .9rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: .75rem 1rem; border-radius: 6px; margin: 0 0 1rem; font-size: .92rem; border: 1px solid; }
.alert ul { margin: 0; padding-inline-start: 1.1rem; }
.alert--ok { color: var(--green); border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.alert--err { color: var(--red); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }

/* ── Cuenta ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.licenses { width: 100%; border-collapse: collapse; font-size: .92rem; }
.licenses th, .licenses td { text-align: start; padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.licenses th { font: 600 .72rem var(--font-mono); text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.licenses .key { white-space: nowrap; direction: ltr; }
.licenses .key span { margin-inline-end: .5rem; }
.licenses small { display: block; margin-top: .2rem; }
.licenses .device td { padding-top: .35rem; padding-bottom: .35rem; background: rgba(255,255,255,.015); font-size: .85rem; }
.licenses .device small { margin-inline-start: .75rem; display: inline; }
.licenses .device form { margin: 0; }
.trial-card form { margin: 0; }
.subscriptions { margin-top: 1.5rem; }
.subscriptions form { margin: 0; }
.logout { margin-top: 3rem; }
@media (max-width: 760px) { .form__row { grid-template-columns: 1fr; } }

/* ── Descargas ───────────────────────────────────────────────────────── */
.download { margin-bottom: 2rem; }
.download__title { margin: 0 0 .2rem; }
.download__title a { color: #fff; }
.files { width: 100%; border-collapse: collapse; font-size: .88rem; margin: .5rem 0 1rem; }
.files th, .files td { text-align: start; padding: .55rem .6rem; border-bottom: 1px dashed var(--border); white-space: nowrap; }
.files th { font: 600 .7rem var(--font-mono); text-transform: uppercase; color: var(--muted); }
.files .num { text-align: end; }
.files .sha span { margin-inline-end: .4rem; }
.changelog { margin: 0 0 1rem; }
.changelog summary { cursor: pointer; color: var(--green); font-family: var(--font-mono); font-size: .88rem; }
.changelog pre { white-space: pre-wrap; font: .85rem/1.6 var(--font-mono); background: #0a0810; border: 1px solid var(--border); border-radius: 6px; padding: .75rem 1rem; }
.verify .terminal { border-radius: 6px; margin: .5rem 0 1rem; }

/* ── Legales y FAQ ────────────────────────────────────────────────────── */
.legal { line-height: 1.75; }
.legal h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.legal h2 { font-size: 1.25rem; margin-top: 2.2rem; padding-top: .4rem; border-top: 1px solid var(--border); }
.legal h3 { font-size: 1.05rem; margin-top: 1.4rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .92rem; }
.legal th, .legal td { text-align: start; vertical-align: top; padding: .55rem .7rem; border: 1px solid var(--border); }
.legal th { background: var(--surface-2); font-weight: 600; }
.legal code { font-family: var(--font-mono); font-size: .88em; background: #0a0810; padding: .1em .35em; border-radius: 4px; }
.legal li { margin: .3rem 0; }
.legal-note { border-color: var(--border); background: var(--surface); color: var(--muted); }
.legal-docs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.legal-docs a { padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 6px; color: #cfc7dd; font-size: .9rem; }
.legal-docs a.is-active { border-color: var(--green); color: var(--green); }
.faq__title { margin-top: 2.5rem; }
.faq { display: grid; gap: .5rem; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.faq__item summary { cursor: pointer; padding: .85rem 1rem; font-weight: 600; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before { content: '+'; display: inline-block; width: 1.3em; color: var(--green); font-family: var(--font-mono); }
.faq__item[open] summary::before { content: '−'; }
.faq__answer { padding: 0 1rem 1rem 2.3rem; color: #cfc7dd; }
.faq__answer p:last-child { margin-bottom: 0; }
.faq__answer code { font-family: var(--font-mono); font-size: .88em; background: #0a0810; padding: .1em .35em; border-radius: 4px; }
.faq__more { margin-top: 2.5rem; }
.request-code { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; color: var(--green); letter-spacing: .06em; margin: .25rem 0 1rem; direction: ltr; }

/* ── Checkout ──────────────────────────────────────────────────────── */
.checkout__mode { border: 1px solid var(--border); border-radius: 8px; padding: .75rem 1rem 1rem; margin: 0; display: grid; gap: .4rem; }
.checkout__mode legend { padding: 0 .4rem; font-weight: 600; }
.plan-option { display: grid !important; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .75rem !important;
  padding: .55rem .75rem; border-radius: 6px; border: 1px solid transparent; cursor: pointer; }
.plan-option:hover { background: var(--surface-2); }
.plan-option:has(input:checked) { border-color: var(--green); background: rgba(74,222,128,.06); }
.plan-option input { accent-color: var(--green); }
.plan-option__price { display: grid; text-align: end; }
.plan-option__price small { color: var(--muted); font-size: .78rem; }
.checkout__saving { color: var(--green); font-weight: 600; }
.bundles__title { margin-top: 3rem; }
.bundle-builder { display: grid; gap: .5rem; margin-top: 1rem; }
.checkout__note { font-size: .85rem; margin: 0; }
.plan .btn { margin-top: 1rem; }

/* ── Responsive ──────────────────────────────────────────────────────── */
/* banderas más compactas en pantallas medianas: entran junto a los botones legales */
@media (max-width: 1240px) and (min-width: 761px) {
  .btn-lang { flex-basis: 47px; padding: 3px 2px; }
  .flag-ball { width: 28px; height: 28px; font-size: 16px; }
  .lang-native { font-size: 9px; }
  .lang-translated { font-size: 8px; }
}
/* el reloj va centrado en el panel: solo cuando hay lugar para que no pise el menú */
@media (max-width: 1360px) {
  .topbar__clock { display: none; }
}
@media (max-width: 900px) {
  .hero__grid, .product { grid-template-columns: 1fr; }
  .hero__art { max-width: 420px; margin: 0 auto; order: -1; }
  .product__info { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .topbar__burger { display: flex; flex-direction: column; gap: 4px; margin-inline-start: auto; cursor: pointer; padding: .4rem; }
  .topbar__burger span { width: 20px; height: 2px; background: #fff; border-radius: 2px; }
  .topbar__nav {
    display: none; position: fixed; top: var(--topbar-h); inset-inline: 0;
    flex-direction: column; padding: 1rem; background: rgba(8,7,12,.98); border-bottom: 1px solid var(--border);
  }
  .topbar__toggle:checked ~ .topbar__nav { display: flex; }
  .topbar__nav a.topbar__nav-admin { display: block; }
  .topbar__nav-user { display: grid; gap: .1rem; padding-top: .5rem; margin-top: .5rem; border-top: 1px solid var(--border); }
  .topbar__nav-user form { margin: 0; }
  .topbar__nav-user button { background: none; border: 0; color: inherit; font: inherit; padding: .5rem 0; text-align: start; cursor: pointer; }
  .topbar__session { display: none; }
  .lang-bar { justify-content: center; position: static; }
  .legal-buttons { width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: center; margin: 0 0 .4rem; }
  .section { padding: 3rem 0; }
  .statusline span:nth-child(n+4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bootlog__lines li { opacity: 1; transform: none; }
}
