/* ---- tokens.css ---- */
/* ==========================================================================
   Crypto Hub · tokens de diseño
   Oscuro, violeta/azul, sobrio. Nada de degradados grandes ni halos.
   Contraste medido sobre el fondo real (#070b14), no estimado.
   ========================================================================== */

:root {
  /* Superficies */
  --bg: #070b14;
  --bg-2: #0a101c;
  --surface: #0e1626;
  --surface-2: #142033;
  --surface-3: #182740;
  --line: #1e2a3f;
  --line-2: #2a3a55;

  /* Texto (ratios sobre --bg) */
  --text: #e8edf7;      /* ~15:1  */
  --text-2: #a3b1c6;    /* ~7,4:1 */
  --text-3: #7c8ba3;    /* ~5,0:1 */

  /* Acentos */
  --accent: #9c8fff;        /* enlaces y foco sobre oscuro, ~7:1 */
  --accent-solid: #6c5ce7;  /* botón primario, blanco encima */
  --accent-solid-hover: #7d6ef0;
  --blue: #3d9bff;
  --ok: #35d07f;
  --warn: #f0a24e;
  --danger: #f0716b;

  /* Tipografía */
  --font-display: "Sora", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Forma */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --maxw: 1200px;
  --gutter: 20px;

  /* Sombras: multicapa con desplazamiento, nunca halo de color */
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 28px rgba(2, 6, 14, .45);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 18px 44px rgba(2, 6, 14, .55);

  /* Movimiento */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 130ms;
  --t-base: 180ms;
  --t-slow: 320ms;
  --t-reveal: 700ms;
  --t-reveal-slow: 800ms;

  /* Foco */
  --focus: #b3a9ff;
  --focus-ring: 0 0 0 3px rgba(156, 143, 255, .28);

  color-scheme: dark;
}

/* ---- base.css ---- */
/* ==========================================================================
   Crypto Hub · base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
svg { display: block; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--text);
  text-wrap: balance;
  /* Palabras largas sin espacios (compuestos alemanes) deben caber a 320 px. */
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -.03em;
}

h2 {
  font-size: clamp(22px, 2.5vw, 30px);
  letter-spacing: -.025em;
}

h3 { font-size: 18px; }
h4 { font-size: 15px; letter-spacing: 0; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 2px;
}
a:hover { color: #b3a9ff; text-decoration: underline; }

ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin: 0 0 .35em; }

strong { color: var(--text); font-weight: 600; }
small { font-size: 12.5px; }

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

code, kbd {
  font-family: var(--font-mono);
  font-size: .92em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
}

/* ---------- Accesibilidad ---------- */

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--accent-solid);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 12px; text-decoration: none; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout ---------- */

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }

.section-head {
  max-width: 720px;
  margin: 0 0 32px;
}
.section-head p {
  color: var(--text-2);
  font-size: 17px;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .section { padding: 52px 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  h1 { font-size: clamp(30px, 8vw, 40px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---- componentes.css ---- */
/* ==========================================================================
   Crypto Hub · componentes
   ========================================================================== */

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 20, .82);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(7, 11, 20, .94);
}
@supports (backdrop-filter: blur(10px)) {
  .site-header { backdrop-filter: blur(12px) saturate(140%); }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -.02em;
  text-decoration: none;
  flex: none;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand__mark {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--accent);
}
.brand__sub {
  display: block;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 1px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav__link:hover {
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}
.nav__link[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
/* Objetivo tactil minimo (24x24) para el conmutador de idioma de dos idiomas. */
.header-actions .lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
}

.header-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.header-search:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.header-search svg { width: 18px; height: 18px; }

/* Botón de menú móvil */
.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.menu-btn:hover { background: var(--surface-2); }
.menu-btn__bars { width: 18px; height: 12px; position: relative; }
.menu-btn__bars span,
.menu-btn__bars::before,
.menu-btn__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t-base) var(--ease), opacity var(--t-fast) var(--ease);
}
.menu-btn__bars::before { top: 0; }
.menu-btn__bars span { top: 5.25px; }
.menu-btn__bars::after { bottom: 0; }

.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(5.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars span { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-5.25px) rotate(-45deg); }

/* Panel móvil */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 14px 0 22px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li + li { border-top: 1px solid var(--line); }
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 4px;
  color: var(--text);
  font-size: 16px;
  text-decoration: none;
}
.mobile-nav a span {
  color: var(--text-3);
  font-size: 12px;
}
.mobile-nav .btn { width: 100%; margin-top: 16px; }

/* Siete enlaces dejan de caber antes que con seis: el menu movil entra a 1080. */
@media (max-width: 1080px) {
  .nav, .header-actions .btn { display: none; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .header-actions { margin-left: auto; }
}

/* Entre 1081 y 1200 el boton del header se cae antes que la navegacion: el
   mismo CTA ya esta en el hero y en el menu movil. */
@media (max-width: 1200px) {
  .header-actions .btn { display: none; }
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }

.btn--primary {
  background: var(--accent-solid);
  color: #fff;
  box-shadow: 0 8px 22px rgba(108, 92, 231, .28);
}
.btn--primary:hover { background: var(--accent-solid-hover); color: #fff; }

.btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--text);
}
.btn--ghost:hover { background: var(--surface); border-color: var(--text-3); color: var(--text); }

.btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Etiquetas y estados ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
}
.chip--ok { color: var(--ok); border-color: rgba(53, 208, 127, .32); background: rgba(53, 208, 127, .08); }
/* Un chip con una lista larga (las redes de un DEX) tiene que poder partirse. */
.chip--multi {
  white-space: normal;
  align-items: flex-start;
  padding: 4px 10px;
  border-radius: 12px;
  line-height: 1.45;
  text-align: left;
}.chip--soon { color: var(--warn); border-color: rgba(240, 162, 78, .3); background: rgba(240, 162, 78, .08); }
.chip--accent { color: var(--accent); border-color: rgba(156, 143, 255, .3); background: rgba(156, 143, 255, .08); }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* ---------- Tarjetas ---------- */

.card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.card:hover { border-color: var(--line-2); }

a.card, .card--link {
  display: block;
  color: inherit;
  text-decoration: none;
}
a.card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-2); }
a.card:hover .card__title { color: var(--accent); }

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--accent);
}
.card__icon svg { width: 19px; height: 19px; }

.card__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  transition: color var(--t-fast) var(--ease);
}
.card__text {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-3);
}

/* Tarjeta de herramienta */
.tool {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease);
}
a.tool:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: rgba(156, 143, 255, .45);
  background: var(--surface-2);
}
.tool__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.tool__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--accent);
}
.tool__ico svg { width: 17px; height: 17px; }
.tool__name {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.tool__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}
.tool__formula {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-3);
  overflow-wrap: anywhere;
  min-height: 3.1em;
}
.tool[data-estado="pendiente"] { background: var(--bg-2); }
.tool[data-estado="pendiente"] .tool__name { color: var(--text-2); }

.tool__go {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color var(--t-fast) var(--ease);
}
a.tool:hover .tool__go { color: var(--accent); }

.section-more {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

/* ---------- Panel / calculadora rápida ---------- */

.panel {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 42%);
  box-shadow: var(--shadow-2);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(90deg, transparent, rgba(156, 143, 255, .55), transparent);
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel__title {
  margin: 0;
  max-width: 19ch;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--text-2);
}

.field { margin: 0 0 12px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
}
.field__row {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field__row:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.field__row input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.field__row input:focus { outline: none; }
.field__suffix {
  padding: 0 12px;
  color: var(--text-3);
  font-size: 13px;
  border-left: 1px solid var(--line);
}

.out {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.out__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-2);
}
.out__row b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.out__row--total {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-2);
}
.out__row--total b { color: var(--accent); font-size: 19px; font-family: var(--font-display); }

.note {
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-3);
}

/* ---------- Lista de comprobación ---------- */

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.checklist li {
  position: relative;
  margin: 0;
  padding-left: 26px;
  color: var(--text-2);
  font-size: 14.5px;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 14px;
  height: 8px;
  border-left: 1.6px solid var(--ok);
  border-bottom: 1.6px solid var(--ok);
  transform: rotate(-45deg);
}

/* ---------- Aviso ---------- */

.alert {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(240, 162, 78, .28);
  border-left: 3px solid var(--warn);
  border-radius: 4px var(--r-sm) var(--r-sm) 4px;
  background: rgba(240, 162, 78, .06);
  color: var(--text-2);
  font-size: 14px;
}
.alert svg { width: 18px; height: 18px; color: var(--warn); flex: none; margin-top: 2px; }
.alert p { margin: 0; }
.alert strong { color: var(--text); }

/* ---------- FAQ ---------- */

.faq {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
.faq + .faq { margin-top: 10px; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1;
  color: var(--text-3);
  transition: transform var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.faq[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq summary:hover { background: var(--surface-2); }
.faq__body {
  padding: 0 20px 18px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ---------- Pie ---------- */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 52px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.footer-brand p {
  max-width: 34ch;
  margin: 12px 0 0;
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.6;
}
.footer-col__title {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 8px; }
.footer-col a {
  color: var(--text-2);
  font-size: 14px;
  text-decoration: none;
}
.footer-col a:hover { color: var(--text); text-decoration: underline; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12.5px;
}
.footer-bottom p { margin: 0; max-width: 74ch; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal a { color: var(--text-3); }
.footer-legal a:hover { color: var(--text-2); }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   Movimiento
   Revelado al entrar en pantalla: solo opacity y transform, sin tocar layout.
   La clase la pone ui.js (mejora progresiva: sin JS todo queda visible) y se
   retira al terminar para no interferir con el :hover de las tarjetas.
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal-slow) var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Entrada del hero: animacion CSS, no transicion. La clase la pone ui.js,
   asi que sin JS el hero se ve completo y no hay estado oculto en el HTML. */
.hero.anim-in .hero__inner > div > * {
  animation: heroIn var(--t-reveal-slow) var(--ease) both;
}
.hero.anim-in .hero__inner > .panel {
  animation: heroIn var(--t-reveal-slow) var(--ease) both;
  animation-delay: 180ms;
}
.hero.anim-in .hero__inner > div > *:nth-child(1) { animation-delay: 60ms; }
.hero.anim-in .hero__inner > div > *:nth-child(2) { animation-delay: 120ms; }
.hero.anim-in .hero__inner > div > *:nth-child(3) { animation-delay: 200ms; }
.hero.anim-in .hero__inner > div > *:nth-child(4) { animation-delay: 270ms; }
.hero.anim-in .hero__inner > div > *:nth-child(5) { animation-delay: 330ms; }

@keyframes heroIn {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to   { opacity: 1; transform: none; }
}

/* Halo lento del hero. Solo transform: no repinta ni reordena nada. */
.hero::before {
  content: "";
  position: absolute;
  inset: -12% -6% auto -6%;
  height: 78%;
  pointer-events: none;
  background: radial-gradient(58% 62% at 72% 18%, rgba(108, 92, 231, .16), transparent 72%);
  animation: heroDrift 20s var(--ease) infinite alternate;
  will-change: transform;
}
.hero__inner { position: relative; z-index: 1; }
@keyframes heroDrift {
  from { transform: translate3d(-1.4%, -1%, 0) scale(1); }
  to   { transform: translate3d(1.4%, 1.6%, 0) scale(1.05); }
}

/* Respuesta al puntero: solo en dispositivos con raton real. */
@media (hover: hover) and (pointer: fine) {
  .tool-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
  .door:hover .door__go svg { transform: translateX(4px); }
  .btn:hover svg { transform: translateX(4px); }
}

.door__go svg,
.btn svg {
  transition: transform var(--t-base) var(--ease);
}

/* Al imprimir, nada puede quedar transparente. */
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero::before { display: none; }
}

/* Por debajo de 380 px el lema y el boton de idioma no caben junto al logo:
   se retira el lema (decorativo) para que la cabecera no desborde. */
@media (max-width: 380px) {
  .brand__sub { display: none; }
  .brand { font-size: 15.5px; }
  .header-actions { gap: 6px; }
}
/* A 320 px, con barra de desplazamiento de escritorio, la cabecera se salia
   6 px. Se reduce el hueco y el relleno solo en ese tramo. */
@media (max-width: 340px) {
  .header-inner { gap: 12px; padding-left: 14px; padding-right: 14px; }
}
/* ---- home.css ---- */
/* ==========================================================================
   Crypto Hub · portada
   ========================================================================== */

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px;
  align-items: center;
}

.hero h1 { margin-bottom: 18px; }
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero__lead {
  max-width: 56ch;
  margin: 0 0 26px;
  color: var(--text-2);
  font-size: 17.5px;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-3);
  font-size: 13px;
}
.hero__meta li {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}
.hero__meta svg { width: 14px; height: 14px; color: var(--ok); flex: none; }

/* ---------- Puertas de entrada ---------- */

.doors { padding-top: 56px; }

.door {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.door:hover {
  text-decoration: none;
  transform: translateY(-8px);
  border-color: rgba(156, 143, 255, .4);
  background: var(--surface-2);
  box-shadow: var(--shadow-2);
}
.door__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--accent);
}
.door__ico svg { width: 20px; height: 20px; }
.door h3 {
  margin: 0 0 6px;
  font-size: 16.5px;
  letter-spacing: -.01em;
}
.door p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}
.door__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.door__go svg { width: 14px; height: 14px; transition: transform var(--t-base) var(--ease); }
.door:hover .door__go svg { transform: translateX(3px); }

/* ---------- Bloque partido (texto + lista) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* ---------- Metodología ---------- */

.method {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--line);
  overflow: hidden;
}
.method__item {
  padding: 24px 22px;
  background: var(--surface);
}
.method__num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--accent);
}
.method__item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.method__item p {
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ---------- Directorio (avance) ---------- */

.field-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.field-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
}
.field-list svg { width: 15px; height: 15px; margin-top: 3px; color: var(--accent); flex: none; }

/* ---------- Guías ---------- */

.guide {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}
.guide:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--line-2);
  background: var(--surface-2);
}
.guide__tag {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
}
.guide h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  line-height: 1.35;
}
.guide p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.guide__meta {
  margin-top: auto;
  padding-top: 14px;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 44px 0; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .method { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero__lead { font-size: 16px; }
  .hero__actions .btn { width: 100%; }
  .field-list { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .hero__meta { gap: 8px 14px; }
}

/* ---- paginas.css ---- */
/* ==========================================================================
   Crypto Hub · paginas interiores (herramientas, y luego guias)
   ========================================================================== */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 24px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
}
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--text-2); }
.crumbs span[aria-current] { color: var(--text-2); }

.page-head {
  max-width: 780px;
  padding: 18px 0 28px;
}
.page-head h1 { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 14px; }
.page-head .lead {
  margin: 0 0 18px;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.65;
}
.page-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Disposicion herramienta + lateral ---------- */

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 8px;
}
.calc { padding: 24px; }
.calc__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.calc__grid .field--wide { grid-column: 1 / -1; }

.calc select,
.calc .field__row select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
}
.calc select:focus { outline: none; }
.calc .field__row select option { background: var(--surface-2); color: var(--text); }

.results {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-2);
}
.results__title {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.results .out { margin: 0; padding: 0; border: 0; }

.calc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.side { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.side .card { padding: 20px; min-width: 0; }
.side h2 {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.formula {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
}
.side ul { margin: 0; padding-left: 1.1em; }
.side li { color: var(--text-2); font-size: 13.5px; line-height: 1.55; }

/* ---------- Prosa de la pagina ---------- */

.prose { max-width: 760px; }
.prose--wide { max-width: none; }
.prose--wide > p, .prose--wide > h2, .prose--wide > h3, .prose--wide > ul, .prose--wide > ol,
.prose--wide > blockquote, .prose--wide > table { max-width: 760px; }
.prose--wide .paths, .prose--wide .lesson-grid, .prose--wide .level-block { max-width: none; }
.prose h2 { margin-top: 34px; font-size: clamp(20px, 2.1vw, 26px); }
.prose p, .prose li { color: var(--text-2); font-size: 15.5px; line-height: 1.7; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.prose th, .prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th { color: var(--text); font-weight: 600; }
.prose td { color: var(--text-2); font-variant-numeric: tabular-nums; }
.prose code { font-variant-numeric: normal; }

/* ---------- Relacionadas ---------- */

.related { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.related h2 { margin-bottom: 16px; }
.related .grid { gap: 12px; }
.related a.card {
  padding: 16px;
  font-size: 14px;
  color: var(--text-2);
}
.related a.card strong { display: block; margin-bottom: 4px; color: var(--text); }

/* ---------- Glosario ---------- */

.glossary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 32px;
  margin: 18px 0 10px;
}
.glossary dt {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}
.glossary dd {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .glossary { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* ---------- Indice de herramientas ---------- */

.tools-index { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-row {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease),
              transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.tool-row:hover { text-decoration: none; border-color: rgba(156, 143, 255, .4); background: var(--surface-2); }

.tool-row__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--accent);
}
.tool-row__ico svg { width: 18px; height: 18px; }
.tool-row h3, .tool-row .tool-row__title { margin: 0 0 4px; font-size: 15.5px; }
.tool-row p { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }

@media (max-width: 980px) {
  .tool-layout { grid-template-columns: minmax(0, 1fr); }
  .tools-index { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .calc { padding: 18px; }
  .calc__grid { grid-template-columns: minmax(0, 1fr); }
  .page-head .lead { font-size: 16px; }
  .results { padding: 14px; }
}

/* --------------------------------------------------------------------------
   "Antes de fiarte de la cifra": enlace contextual de cada calculadora a las
   guias que explican el concepto. Mismo ancho que el texto, sin tarjeta.
   -------------------------------------------------------------------------- */
.read-next {
  margin-top: 26px;
  padding: 14px 18px;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--surface);
}
.read-next p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-2);
}
.read-next a { color: var(--accent); }
/* ---- directorio.css ---- */
/* ==========================================================================
   Crypto Hub · directorio de exchanges y fichas
   ========================================================================== */

.dir-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 18px;
}
.dir-toolbar input[type="search"],
.dir-toolbar select {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.dir-toolbar input[type="search"] { min-width: 220px; flex: 1 1 220px; }
.dir-toolbar select { flex: 0 1 auto; }
.dir-count { color: var(--text-3); font-size: 13px; margin-left: auto; }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow-x: auto;
  background: var(--surface);
}
table.dir {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 720px;
}
table.dir th,
table.dir td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.dir thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 1;
}
table.dir tbody tr:hover { background: var(--surface-2); }
table.dir tbody tr:last-child td { border-bottom: 0; }
table.dir a { font-weight: 600; }

.nv {
  display: inline-block;
  padding: 2px 7px;
  border: 1px dashed var(--line-2);
  border-radius: 999px;
  color: var(--text-3);
  font-size: 11px;
  white-space: nowrap;
}
.nv--warn { border-color: rgba(240, 162, 78, .4); color: var(--warn); }
.nv--ok { border-color: rgba(53, 208, 127, .4); color: var(--ok); }

/* ---------- Ficha ---------- */

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--line);
  overflow: hidden;
  margin: 0 0 20px;
}
.fact {
  padding: 16px 18px;
  background: var(--surface);
}
.fact dt {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.fact dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.45;
}
.fact dd a { color: var(--accent); }

.verify {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: 4px var(--r-sm) var(--r-sm) 4px;
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 13.5px;
  margin: 0 0 20px;
}
.verify svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent); }
.verify p { margin: 0; }

.cols-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.list-ok, .list-no { list-style: none; margin: 0; padding: 0; }
.list-ok li, .list-no li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-2);
}
.list-ok li::before {
  content: "+"; position: absolute; left: 0; color: var(--ok); font-weight: 700;
}
.list-no li::before {
  content: "−"; position: absolute; left: 0; color: var(--danger); font-weight: 700;
}

@media (max-width: 720px) {
  .fact-grid, .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .dir-count { width: 100%; margin-left: 0; }
}

/* Evita desbordes por cadenas largas (redes, dominios) en tarjetas */
.card__text, .card__title, .fact dd { overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   Comparador de exchanges
   La barra reutiliza .dir-toolbar; aqui solo van las etiquetas visibles y el
   boton de ordenacion, que tiene que parecer texto de cabecera y ser teclable.
   -------------------------------------------------------------------------- */
.compare__label { font-size: 13px; color: var(--text-2); }
.compare__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
}
.compare__sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
}
.compare__sort::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid currentColor;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.compare__sort:hover::after { opacity: .45; }
th[aria-sort="ascending"] .compare__sort::after,
th[aria-sort="descending"] .compare__sort::after { opacity: 1; }
th[aria-sort="descending"] .compare__sort::after { transform: rotate(180deg); }
.compare__sort:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.compare-table td:nth-child(3) { white-space: nowrap; }
/* En movil cada etiqueta va encima de su control: con flex-wrap una etiqueta
   al 100 % fuerza su propia linea y el select cae justo debajo. */
@media (max-width: 720px) {
  .compare__label { width: 100%; margin-bottom: -4px; }
  .compare__check { width: 100%; }
}
/* ---- aprender.css ---- */
/* ==========================================================================
   Crypto Hub · centro educativo, seguridad y directorios de redes
   ========================================================================== */

/* ---------- Cabecera de leccion ---------- */

.lesson-head { max-width: 820px; }
.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}
.lesson-meta .chip { font-variant-numeric: tabular-nums; }

.level-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  background: var(--surface);
}
.level-pill--beginner { color: var(--ok); border-color: rgba(53, 208, 127, .3); background: rgba(53, 208, 127, .07); }
.level-pill--intermediate { color: var(--blue); border-color: rgba(61, 155, 255, .32); background: rgba(61, 155, 255, .07); }
.level-pill--advanced { color: var(--accent); border-color: rgba(156, 143, 255, .34); background: rgba(156, 143, 255, .08); }

/* ---------- Rutas de aprendizaje ---------- */

.paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 8px;
}
.path {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.path__n {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: .08em;
}
.path h3 { margin: 6px 0 6px; font-size: 17px; }
.path p { margin: 0 0 14px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.path ol {
  margin: 0;
  padding-left: 1.15em;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}
.path ol a { color: var(--text-2); }
.path ol a:hover { color: var(--accent); }
.path__foot {
  margin-top: auto;
  padding-top: 14px;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Bloques por nivel ---------- */

.level-block { margin-top: 38px; }
.level-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.level-block__head h2 { margin: 0; font-size: clamp(20px, 2.2vw, 26px); }
.level-block__head p { margin: 0; color: var(--text-2); font-size: 14px; }

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.lesson-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.lesson-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  border-color: rgba(156, 143, 255, .42);
  background: var(--surface-2);
  box-shadow: var(--shadow-2);
}
.lesson-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.lesson-card__n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--text-3);
}
.lesson-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.lesson-card p {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
}
.lesson-card__meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Navegacion entre lecciones ---------- */

.lesson-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.lesson-nav a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
.lesson-nav a:hover { text-decoration: none; border-color: var(--line-2); background: var(--surface-2); }
.lesson-nav span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.lesson-nav strong { font-size: 14.5px; color: var(--text); }
.lesson-nav a:last-child { text-align: right; }

/* ---------- Avisos dentro de prosa ---------- */

.prose h3 { margin-top: 26px; font-size: 18px; }
.prose blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 15px;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.prose .formula { margin: 16px 0; }
.prose .alert { margin: 18px 0; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

.example {
  margin: 20px 0;
  padding: 18px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
}
.example__tag {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.example p { margin: 0 0 8px; font-size: 14.5px; }
.example p:last-child { margin-bottom: 0; }

/* ---------- Checklist interactiva ---------- */

.check {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
.check__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.check__head h2 { margin: 0; font-size: 16px; }
.check__count { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.check__bar {
  height: 5px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.check__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-solid), var(--accent));
  transition: width var(--t-base) var(--ease);
}
.check ul { list-style: none; margin: 0; padding: 0; }
.check li { border-bottom: 1px solid var(--line); }
.check li:last-child { border-bottom: 0; }
.check label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 20px;
  cursor: pointer;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.55;
}
.check label:hover { background: var(--surface-2); }
.check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--accent-solid);
}
.check input:checked + span { color: var(--text-3); text-decoration: line-through; }
.check__reset { padding: 14px 20px; }
.check__actions { padding: 14px 20px; border-top: 1px solid var(--line); }
.check__note { padding: 0 20px 18px; margin: 0; font-size: 12px; color: var(--text-3); }

/* ---------- Tabla comparadora ---------- */

.compare-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 16px;
}
.compare-toolbar input,
.compare-toolbar select {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.compare-toolbar input { min-width: 220px; flex: 1 1 220px; }
.compare-count { color: var(--text-3); font-size: 13px; margin-left: auto; }

/* ---------- Ficha de red / stablecoin / wallet ---------- */

.profile-head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin-bottom: 8px;
}
.profile-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  flex: none;
}
.profile-head h1 { margin: 0; }
.profile-head .page-chips { margin-top: 8px; }

.risk-list { list-style: none; margin: 0; padding: 0; }
.risk-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}
.risk-list li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(240, 113, 107, .14);
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
}

.source-line {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.6;
}
.source-line a { color: var(--text-2); }

/* ---------- Buscador ---------- */

.search-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
}
.search-box input {
  flex: 1 1 260px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
}
.search-box input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
/* Placeholder legible: el gris por defecto daba 4,1:1 sobre el fondo oscuro. */
::placeholder { color: var(--text-3); opacity: 1; }
main:focus { outline: none; }
.search-count { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }

.search-results .card strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text);
}
.search-desc {
  display: block;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}
.search-lang {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: .08em;
}

/* ---------- Pagina 404 ---------- */

.nf {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px 0 40px;
  text-align: center;
}
.nf__code {
  font-family: var(--font-display);
  font-size: clamp(72px, 14vw, 132px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--surface-3);
}
.nf h1 { margin: 8px 0 12px; }
.nf p { color: var(--text-2); font-size: 16px; line-height: 1.6; }
.nf__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .paths { grid-template-columns: minmax(0, 1fr); }
  .lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  .lesson-grid { grid-template-columns: minmax(0, 1fr); }
  .lesson-nav { grid-template-columns: minmax(0, 1fr); }
  .lesson-nav a:last-child { text-align: left; }
  .profile-mark { width: 52px; height: 52px; font-size: 17px; }
}

/* Pantallas muy estrechas: las tablas de prosa deben caber sin desbordar.
   Los textos largos se parten; el diseno de 375 px en adelante no cambia. */
@media (max-width: 400px) {
  .prose table { width: 100%; table-layout: fixed; }
  .prose th, .prose td, table.dir th, table.dir td { padding-left: 6px; padding-right: 6px; overflow-wrap: break-word; }
  .chip { max-width: 100%; white-space: normal; }
}

