/* ============ Tokens ============ */
:root {
  --bg: #0b0a12;
  --bg-2: #12101c;
  --surface: rgba(255, 255, 255, .045);
  --surface-solid: #15131f;
  --surface-hover: rgba(255, 255, 255, .08);
  --ink: #f4f2fb;
  --muted: #a09bb4;
  --faint: #6d6882;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --brand1: #ff4d6d;
  --brand2: #7c4dff;
  --brand3: #22d3ee;
  --ok: #22c55e;
  --err: #ff5d73;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, .6);
  --radius: 18px;
  --blob-opacity: .55;
  --grid-color: rgba(255, 255, 255, .035);
  --c1: var(--brand1);
  --c2: var(--brand2);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f6fb; --bg-2: #ffffff; --surface: rgba(255, 255, 255, .7); --surface-solid: #ffffff;
  --surface-hover: rgba(255, 255, 255, .95); --ink: #15121f; --muted: #5d5872; --faint: #8f8aa3;
  --line: rgba(20, 14, 40, .09); --line-strong: rgba(20, 14, 40, .16);
  --shadow: 0 10px 40px -12px rgba(40, 20, 90, .18); --blob-opacity: .28; --grid-color: rgba(20, 14, 40, .045);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f6fb; --bg-2: #ffffff; --surface: rgba(255, 255, 255, .7); --surface-solid: #ffffff;
    --surface-hover: rgba(255, 255, 255, .95); --ink: #15121f; --muted: #5d5872; --faint: #8f8aa3;
    --line: rgba(20, 14, 40, .09); --line-strong: rgba(20, 14, 40, .16);
    --shadow: 0 10px 40px -12px rgba(40, 20, 90, .18); --blob-opacity: .28; --grid-color: rgba(20, 14, 40, .045);
    color-scheme: light;
  }
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.55 "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
main { flex: 1; position: relative; z-index: 1; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.08; margin: 0; }
kbd { font: 500 .72rem/1 "JetBrains Mono", ui-monospace, monospace; padding: 4px 6px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }
[data-lucide], svg.lucide { width: 1.1em; height: 1.1em; stroke-width: 2; flex: none; }
i[data-fb] { font-style: normal; }
::selection { background: color-mix(in srgb, var(--brand2) 45%, transparent); }

/* Fondo animado */
.bg-mesh { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--blob-opacity); will-change: transform; }
.blob-1 { width: 560px; height: 560px; background: var(--brand1); top: -220px; left: -120px; animation: float1 22s ease-in-out infinite; }
.blob-2 { width: 620px; height: 620px; background: var(--brand2); top: -160px; right: -200px; animation: float2 26s ease-in-out infinite; }
.blob-3 { width: 460px; height: 460px; background: var(--brand3); top: 420px; left: 35%; opacity: calc(var(--blob-opacity) * .5); animation: float3 30s ease-in-out infinite; }
@keyframes float1 { 50% { transform: translate(120px, 80px) scale(1.1); } }
@keyframes float2 { 50% { transform: translate(-140px, 120px) scale(.92); } }
@keyframes float3 { 50% { transform: translate(-120px, -80px) scale(1.15); } }
.bg-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-color) 1px, transparent 1px), linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%); }

/* Animación de entrada */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .7s cubic-bezier(.2, .7, .2, 1) forwards; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .24s; } .d4 { animation-delay: .32s; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } .blob { animation: none; } }

/* ============ Barra superior ============ */
.topbar { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: color-mix(in srgb, var(--bg) 70%, transparent); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.22rem; text-decoration: none; letter-spacing: -.03em; }
.logo-mark { display: grid; filter: drop-shadow(0 4px 14px rgba(124, 77, 255, .45)); }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; padding: 8px 13px; border-radius: 10px;
  font-weight: 600; font-size: .9rem; color: var(--muted); white-space: nowrap; transition: color .15s, background .15s; }
.nav a:hover { color: var(--ink); background: var(--surface-hover); }
.nav a:hover [data-lucide], .nav a:hover svg { color: var(--c1); }
.search-btn { display: inline-flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; min-width: 210px; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: .9rem;
  transition: border-color .15s, background .15s; }
.search-btn span { flex: 1; text-align: left; }
.search-btn:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; flex: none; font-size: 1.05rem; }
.icon-btn:hover { background: var(--surface-hover); }
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: inline-block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: inline-block !important; }
  :root:not([data-theme="light"]) .only-light { display: none !important; }
}

/* ============ Hero ============ */
.hero { padding: 84px 0 56px; text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 10px; border-radius: 999px; text-decoration: none;
  font-size: .85rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line-strong);
  background: linear-gradient(var(--surface), var(--surface)) padding-box; transition: color .15s; }
.pill:hover { color: var(--ink); }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent);
  animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ok) 0%, transparent); } }
.hero h1 { font-size: clamp(2.6rem, 7.2vw, 5.4rem); font-weight: 800; margin: 26px 0 20px; }
.grad-text { background: linear-gradient(100deg, var(--brand1), #ff9a3c 25%, var(--brand2) 60%, var(--brand3) 90%);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 8s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.lead { color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 56ch; margin: 0 auto; }
.hero-search { position: relative; width: 100%; max-width: 680px; margin: 34px auto 0; display: flex; align-items: center; gap: 12px;
  padding: 6px 10px 6px 22px; border-radius: 20px; background: var(--surface-solid); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), 0 0 0 0 transparent; transition: box-shadow .2s, border-color .2s; color: var(--muted); font-size: 1.2rem; }
.hero-search::before { content: ""; position: absolute; inset: -1px; border-radius: 21px; padding: 1px; z-index: -1; opacity: 0;
  background: linear-gradient(120deg, var(--brand1), var(--brand2), var(--brand3)); transition: opacity .2s; }
.hero-search:focus-within { border-color: transparent; box-shadow: var(--shadow), 0 0 0 6px color-mix(in srgb, var(--brand2) 18%, transparent); }
.hero-search:focus-within::before { opacity: 1; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; padding: 16px 0; }
.quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; font-size: .86rem; color: var(--faint); align-items: center; }
.quick a { text-decoration: none; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); transition: all .15s; }
.quick a:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-hover); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 54px; width: 100%; max-width: 720px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(10px); }
.stats div { padding: 18px 10px; display: flex; flex-direction: column; gap: 2px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.stats span { font-size: .82rem; color: var(--muted); }

/* ============ Secciones ============ */
.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.section-head p { color: var(--muted); margin: 6px 0 0; }
.bento-section { margin-top: 20px; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: 14px; }
.bento-card { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 22px; text-decoration: none;
  border-radius: 22px; border: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(12px);
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), border-color .25s; isolation: isolate; }
.bento-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c1) 50%, var(--line)); }
.bento-card.b1 { grid-column: span 2; grid-row: span 2; }
.bento-card.b2, .bento-card.b5, .bento-card.b6 { grid-column: span 2; }
.bento-card.b5 p, .bento-card.b6 p { display: block; max-width: 40ch; }
.bento-card.b1 h3 { font-size: 2rem; }
.bento-card.b1 .bento-icon { width: 72px; height: 72px; font-size: 2rem; border-radius: 20px; }
.bento-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff; font-size: 1.4rem;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 10px 30px -8px var(--c1); margin-bottom: auto; }
.bento-cat { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c1); margin-top: 16px; }
.bento-card h3 { font-size: 1.3rem; font-weight: 800; margin-top: 4px; }
.bento-card p { color: var(--muted); font-size: .9rem; margin: 6px 0 0; display: none; }
.bento-card.b1 p, .bento-card.b2 p { display: block; max-width: 40ch; }
.bento-cta { display: none; align-items: center; gap: 6px; margin-top: 16px; font-weight: 700; font-size: .92rem; color: var(--c1); }
.bento-card.b1 .bento-cta { display: inline-flex; }
.bento-cta svg { transition: transform .2s; }
.bento-card:hover .bento-cta svg { transform: translateX(4px); }
.bento-glow { position: absolute; z-index: -1; width: 340px; height: 340px; right: -120px; bottom: -160px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c1) 45%, transparent), transparent 70%); opacity: .55; transition: opacity .3s, transform .4s; }
.bento-card:hover .bento-glow { opacity: .9; transform: scale(1.15); }
.bento-card.b1 .bento-glow { width: 560px; height: 560px; right: -180px; bottom: -240px; }

/* Spotlight que sigue al ratón */
.spot::after, .tcard::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c1) 16%, transparent), transparent 45%); }
.spot:hover::after, .tcard:hover::after { opacity: 1; }

/* Pestañas */
.tools-section { margin-top: 80px; scroll-margin-top: 80px; }
/* Barra de pestañas: cápsula de vidrio flotante con indicador deslizante */
.tabs-sentinel { height: 1px; margin-bottom: -1px; }
.tabs-bar { position: sticky; top: 78px; z-index: 20; display: flex; justify-content: center; margin: 4px 0 26px; pointer-events: none; }
.tabs { position: relative; pointer-events: auto; display: flex; gap: 2px; max-width: 100%; padding: 6px; overflow-x: auto; scrollbar-width: none;
  border-radius: 18px; border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface-solid) 62%, transparent);
  backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 6px 20px -12px rgba(20, 10, 50, .25);
  transition: box-shadow .3s, background .3s, transform .3s; }
.tabs::-webkit-scrollbar { display: none; }
.tabs-bar.is-stuck .tabs { background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 18px 40px -16px rgba(20, 10, 50, .45); }
.tabs-ink { position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 0; width: 0; border-radius: 13px; opacity: 0;
  background: linear-gradient(135deg, var(--ink-c1, var(--brand1)), var(--ink-c2, var(--brand2)));
  box-shadow: 0 8px 22px -8px var(--ink-c1, var(--brand1)), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .42s cubic-bezier(.3, 1.25, .45, 1), width .42s cubic-bezier(.3, 1.25, .45, 1), opacity .2s, background .3s; }
.tabs-ink.is-ready { opacity: 1; }
.tab { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 13px;
  cursor: pointer; background: transparent; color: var(--muted); font: inherit; font-size: .92rem; white-space: nowrap;
  transition: color .25s, background .2s; -webkit-tap-highlight-color: transparent; }
.tab b { font-weight: 600; }
.tab > svg, .tab > i { color: var(--c1); transition: color .25s, transform .3s; }
.tab:not(.is-active):hover { color: var(--ink); background: var(--surface-hover); }
.tab:not(.is-active):hover > svg { transform: scale(1.12); }
.tab:focus-visible { outline: 2px solid var(--c1); outline-offset: 2px; }
.tab-count { min-width: 24px; text-align: center; font: 600 .7rem/1 "JetBrains Mono", monospace; padding: 4px 6px; border-radius: 7px;
  color: var(--faint); background: color-mix(in srgb, var(--ink) 6%, transparent); transition: all .25s; }
.tab.is-active { color: #fff; }
.tab.is-active > svg, .tab.is-active > i { color: #fff; }
.tab.is-active .tab-count { color: #fff; background: rgba(255, 255, 255, .22); }
/* Sin JS (o antes de medir) la pestaña activa se pinta sola */
.tabs:not(.has-ink) .tab.is-active { background: linear-gradient(135deg, var(--c1), var(--c2)); }

/* Tarjetas de herramientas */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.tcard { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 18px; text-decoration: none; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(10px); overflow: hidden;
  transition: transform .2s cubic-bezier(.2, .7, .2, 1), border-color .2s, background .2s; }
.tcard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c1) 45%, var(--line)); background: var(--surface-hover); }
.tcard.is-hidden { display: none; }
.tcard.pop { animation: pop .35s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.tcard-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; font-size: 1.15rem; color: var(--c1);
  background: color-mix(in srgb, var(--c1) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c1) 22%, transparent);
  transition: all .25s; }
.tcard:hover .tcard-icon { color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); border-color: transparent;
  box-shadow: 0 8px 22px -8px var(--c1); transform: rotate(-6deg) scale(1.05); }
.tcard-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.tcard-title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tcard-desc { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.tcard-arrow { color: var(--faint); opacity: 0; transform: translate(-4px, 4px); transition: all .2s; }
.tcard:hover .tcard-arrow { opacity: 1; transform: none; color: var(--c1); }
.badge { font-style: normal; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px;
  color: var(--c1); background: color-mix(in srgb, var(--c1) 14%, transparent); }
.badge-new { color: #fff; background: linear-gradient(135deg, var(--brand1), var(--brand2)); }
.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 1.05rem; }
.empty [data-lucide], .empty svg { width: 42px; height: 42px; color: var(--faint); }

/* Cómo funciona */
.how { margin-top: 90px; }
.how-card { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 26px; overflow: hidden;
  background: var(--surface); backdrop-filter: blur(12px); }
.how-step { position: relative; padding: 34px 28px; }
.how-step + .how-step { border-left: 1px solid var(--line); }
.how-step > [data-lucide], .how-step > svg { width: 30px; height: 30px; color: var(--brand2); }
.how-step h3 { font-size: 1.2rem; margin: 16px 0 6px; }
.how-step p { margin: 0; color: var(--muted); font-size: .94rem; }
.how-num { position: absolute; top: 18px; right: 24px; font-size: 3.4rem; font-weight: 800; line-height: 1; letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 1px var(--line-strong); }

/* ============ Página de herramienta ============ */
.tool-hero { position: relative; padding: 46px 0 10px; }
.tool-hero-glow { position: absolute; z-index: -1; left: 50%; top: -120px; width: 900px; height: 500px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--c1) 30%, transparent), transparent 65%); filter: blur(20px); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--faint); flex-wrap: wrap; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--c1); }
.crumbs span { color: var(--ink); font-weight: 600; }
.tool-title { display: flex; align-items: center; gap: 20px; margin-top: 22px; }
.tool-icon { flex: none; width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; font-size: 2.1rem; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 18px 40px -12px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .3); }
.tool-title h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
.tool-title .lead { margin: 8px 0 0; text-align: left; }
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 28px 0 0; counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--faint); }
.steps li + li::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--line-strong); margin-right: 4px; }
.steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; border: 1px solid var(--line-strong); }
.steps li.is-active { color: var(--ink); }
.steps li.is-active span { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.steps li.is-done span { color: var(--c1); border-color: var(--c1); }

.panel { position: relative; margin: 24px 0; padding: 26px; border-radius: 26px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent); backdrop-filter: blur(20px); box-shadow: var(--shadow); }

.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 52px 20px;
  cursor: pointer; border-radius: 20px; isolation: isolate; transition: transform .2s; }
.drop::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: color-mix(in srgb, var(--c1) 6%, transparent);
  border: 2px dashed color-mix(in srgb, var(--c1) 40%, var(--line)); transition: all .2s; }
.drop:hover::before, .drop.over::before { background: color-mix(in srgb, var(--c1) 12%, transparent); border-color: var(--c1); }
.drop.over { transform: scale(1.01); }
.drop-icon { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; color: #fff; font-size: 1.8rem; margin-bottom: 10px;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 14px 34px -10px var(--c1); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.drop-title { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.drop-sub { color: var(--muted); font-size: .92rem; }
.drop-link { color: var(--c1); font-weight: 700; }
.drop-formats { margin-top: 8px; font: 500 .7rem "JetBrains Mono", monospace; color: var(--faint); letter-spacing: .04em; }

.file-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); font-size: .92rem; animation: pop .3s both; }
.file-list .thumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: none; display: grid; place-items: center;
  font: 700 .66rem "JetBrains Mono", monospace; color: var(--c1); background: color-mix(in srgb, var(--c1) 14%, transparent); }
.file-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list .size { color: var(--faint); font: .78rem "JetBrains Mono", monospace; }
.file-list button { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 30px; height: 30px; border-radius: 8px; font-size: .95rem; }
.file-list button:hover { background: var(--surface-hover); color: var(--ink); }

.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.options-text { margin-top: 0; padding-top: 0; border-top: 0; }
.options-title { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; color: var(--muted); letter-spacing: -.01em; }
.field { position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-textarea { grid-column: 1 / -1; }
.field:has(.seg) { grid-column: span 2; }
.field > label { font-weight: 600; font-size: .86rem; color: var(--muted); }
.field small { color: var(--faint); font-size: .78rem; }
.field input:not([type=checkbox]):not([type=color]):not([type=radio]), .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 14px; width: 100%;
  transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; font: .9rem/1.6 "JetBrains Mono", ui-monospace, monospace; min-height: 200px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--c1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 18%, transparent); }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 38px !important; cursor: pointer; }
.select-wrap select option { background: var(--surface-solid); color: var(--ink); }
.select-wrap > [data-lucide], .select-wrap > svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.char-count { position: absolute; right: 12px; bottom: 10px; font: .72rem "JetBrains Mono", monospace; color: var(--faint); pointer-events: none; }
.color-wrap { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.color-wrap input { width: 36px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 8px; }
.color-wrap input::-webkit-color-swatch-wrapper { padding: 0; }
.color-wrap input::-webkit-color-swatch { border: 0; border-radius: 8px; }
.color-wrap code { font: .85rem "JetBrains Mono", monospace; color: var(--muted); text-transform: uppercase; }

/* Control segmentado */
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line-strong); }
.seg label { flex: 1; min-width: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 8px 10px; border-radius: 9px; font-size: .86rem; font-weight: 600; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all .18s; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 6px 16px -8px var(--c1); }
.seg input:focus-visible + span { outline: 2px solid var(--c1); outline-offset: 2px; }

/* Interruptor */
.field-checkbox { justify-content: flex-end; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; font-size: .9rem; padding: 10px 0; color: var(--ink) !important; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.switch input:checked + .switch-ui { background: linear-gradient(135deg, var(--c1), var(--c2)); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--c1); outline-offset: 2px; }
.field.hidden-opt { display: none; }

/* Botones */
.btn-primary { position: relative; overflow: hidden; margin-top: 26px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px; border: 0; border-radius: 16px; color: #fff; font: inherit; font-weight: 700; font-size: 1.06rem; cursor: pointer;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 14px 34px -12px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s, box-shadow .2s, filter .2s; }
.btn-primary::before { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .25), transparent 70%); transition: transform .7s; }
.btn-primary:hover { box-shadow: 0 18px 44px -12px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .25); filter: brightness(1.06); }
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary svg { transition: transform .2s; }
.btn-primary:active { transform: scale(.99); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 11px 18px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; transition: background .15s; }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-download { display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 14px; border: 0; cursor: pointer; font: inherit;
  font-weight: 700; color: #fff; text-decoration: none; background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 14px 30px -12px #22c55e; transition: transform .15s, filter .15s; }
.btn-download:hover { filter: brightness(1.08); transform: translateY(-1px); }

.progress { position: relative; margin-top: 16px; height: 40px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.progress .bar { position: absolute; inset: 0 auto 0 0; width: 0; transition: width .2s;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c1) 55%, transparent), color-mix(in srgb, var(--c2) 55%, transparent)); }
.progress.indeterminate .bar { width: 40% !important; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { 0% { left: -40%; } 100% { left: 100%; } }
.progress span { position: relative; display: block; text-align: center; line-height: 38px; font-size: .86rem; font-weight: 700; }
.error { margin-top: 16px; padding: 13px 16px; border-radius: 12px; color: var(--err); font-weight: 600; font-size: .94rem;
  background: color-mix(in srgb, var(--err) 10%, transparent); border: 1px solid color-mix(in srgb, var(--err) 30%, transparent); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* Resultado */
.result { text-align: center; animation: pop .45s cubic-bezier(.2, .7, .2, 1) both; }
.result h2 { font-size: 2rem; font-weight: 800; margin: 8px 0 4px; }
.result.is-inline { text-align: left; animation: pop .3s both; }
.result.is-inline .success-mark { display: none; }
.result.is-inline h2 { font-size: 1.05rem; color: var(--ok); margin: 0; display: flex; align-items: center; gap: 8px; }
.result.is-inline h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.result.is-inline .row { justify-content: flex-start; }
.result.is-inline .result-text { min-height: 320px; }
.success-mark { width: 74px; height: 74px; margin: 0 auto; }
.success-mark svg { width: 100%; height: 100%; fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.success-mark circle { stroke-dasharray: 152; stroke-dashoffset: 152; animation: draw .6s ease-out forwards;
  fill: color-mix(in srgb, var(--ok) 12%, transparent); }
.success-mark path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .5s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.result-meta { color: var(--muted); margin: 6px 0 20px; font-size: .94rem; }
.result-meta .saved { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; font-weight: 700; color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, transparent); }
.result-preview { display: block; max-width: 100%; max-height: 440px; margin: 18px auto 8px; border-radius: 16px; border: 1px solid var(--line);
  background: repeating-conic-gradient(var(--surface-hover) 0 25%, transparent 0 50%) 0 0 / 22px 22px; }
.result-text { width: 100%; min-height: 240px; margin-top: 18px; text-align: left; font: .9rem/1.6 "JetBrains Mono", ui-monospace, monospace; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 14px; resize: vertical; white-space: pre; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; }
.confetti { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100; }

.trust { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 4px 0 0; color: var(--faint); font-size: .85rem; }
.trust li { display: flex; align-items: center; gap: 7px; }
.trust [data-lucide], .trust svg { color: var(--ok); }
.related { margin-top: 70px; }

/* ============ Paleta de comandos ============ */
.palette { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(5, 4, 12, .55); backdrop-filter: blur(6px); animation: fade .15s; }
.palette-box { position: relative; width: 100%; max-width: 620px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent); backdrop-filter: blur(24px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
  animation: pop .2s cubic-bezier(.2, .7, .2, 1); }
@keyframes fade { from { opacity: 0; } }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 4px 16px 4px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 1.15rem; }
.palette-input input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; padding: 16px 0; }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: 54vh; overflow-y: auto; }
.palette-list li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; }
.palette-list li a .pi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--c1);
  background: color-mix(in srgb, var(--c1) 14%, transparent); }
.palette-list li a .pt { flex: 1; min-width: 0; }
.palette-list li a .pt b { display: block; font-weight: 600; }
.palette-list li a .pt small { display: block; color: var(--faint); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-list li a .pc { font-size: .72rem; font-weight: 700; color: var(--c1); }
.palette-list li.is-sel a { background: var(--surface-hover); }
.palette-list li.is-sel a .pi { color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.palette-list .pempty { padding: 26px; text-align: center; color: var(--muted); }
.palette-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--faint); }
.palette-foot kbd { margin-right: 3px; }

/* ============ Pie ============ */
.footer { position: relative; z-index: 1; margin-top: 100px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 30px; padding-top: 50px; padding-bottom: 30px; }
.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 34ch; }
.footer-privacy { display: flex; align-items: center; gap: 8px; }
.footer-privacy svg, .footer-privacy [data-lucide] { color: var(--ok); }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.footer-col h4 { margin: 0 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c1); }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--ink); }
.footer-col .more { color: var(--c1); font-weight: 600; }
.footer-bottom { padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--line); color: var(--faint); font-size: .82rem;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover, .footer-bottom a[aria-current] { color: var(--ink); }
.footer-langs { display: flex; gap: 16px; }
.footer-eco { display: flex; align-items: center; gap: 8px; }
.footer-eco a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.footer-eco a:hover { border-color: currentColor; }
.footer-eco svg, .footer-eco [data-lucide] { color: #a78bfa; }

/* ============ Marca ============ */
.logo-text { display: inline-flex; align-items: baseline; gap: 6px; }
.logo-text b { font-weight: 800; letter-spacing: .02em; }
.logo-text span { font-weight: 600; color: var(--muted); letter-spacing: -.01em; }

/* ============ Selector de idioma ============ */
.lang-menu { position: relative; flex: none; }
.lang-menu summary { list-style: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-btn { width: auto; padding: 0 11px; gap: 6px; display: inline-flex; align-items: center; font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.lang-btn svg, .lang-btn [data-lucide] { width: 17px; height: 17px; color: var(--muted); }
.lang-menu[open] .lang-btn { border-color: var(--line-strong); background: var(--surface-hover); }
.lang-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; padding: 6px; z-index: 60;
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  display: grid; gap: 2px; animation: langIn .16s ease-out; }
@keyframes langIn { from { opacity: 0; transform: translateY(-4px); } }
.lang-list a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: .92rem; }
.lang-list a:hover { background: var(--surface-hover); }
.lang-list a.is-active { background: var(--surface-hover); }
.lang-list a svg, .lang-list a [data-lucide] { margin-left: auto; width: 16px; height: 16px; color: var(--ok); }
.lang-code { width: 28px; padding: 2px 0; text-align: center; border-radius: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .05em;
  background: linear-gradient(135deg, #ff4d6d, #7c4dff); color: #fff; }

/* ============ Responsive ============ */
@media (max-width: 1000px) {
  .nav a span { display: none; }
  .search-btn { min-width: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .bento-card.b1 { grid-column: span 2; grid-row: span 2; }
  .bento-card.b5, .bento-card.b6 { grid-column: span 1; }
  .bento-card.b5 p, .bento-card.b6 p { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { gap: 10px; }
  .nav { display: none; }
  .search-btn { margin-left: auto; padding: 9px 12px; }
  .search-btn span, .search-btn kbd { display: none; }
  .lang-btn span { display: none; }
  .lang-btn { padding: 0; width: 40px; justify-content: center; }
  .hero { padding: 54px 0 36px; }
  .hero-search kbd { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(150px, auto); gap: 10px; }
  .bento-card.b1 { grid-row: span 1; min-height: 260px; }
  .bento-card { padding: 16px; }
  .bento-card.b2 { grid-column: span 2; }
  .bento-card.b1 h3 { font-size: 1.6rem; }
  .bento-card h3 { font-size: 1.05rem; }
  .tgrid { grid-template-columns: 1fr; }
  .tabs-bar { top: 74px; margin-bottom: 18px; }
  .tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
  .tab { padding: 9px 13px; }
  .how-card { grid-template-columns: 1fr; }
  .how-step + .how-step { border-left: 0; border-top: 1px solid var(--line); }
  .tool-title { flex-direction: column; align-items: flex-start; gap: 14px; }
  .tool-icon { width: 62px; height: 62px; font-size: 1.7rem; }
  .panel { padding: 18px; border-radius: 22px; }
  .field:has(.seg) { grid-column: 1 / -1; }
  .options { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===================================================================
   Herramientas interactivas para desarrolladores
   =================================================================== */
.wrap.wide { max-width: 1440px; }
.ws { position: relative; margin: 22px 0 18px; border-radius: 22px; border: 1px solid var(--line-strong); overflow: hidden;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent); backdrop-filter: blur(20px); box-shadow: var(--shadow); }
.ws-flow { padding: 22px; }
.ws-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px;
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 70%, transparent); }
.ws-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ws-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ws-tab { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--muted); font: 600 .85rem "JetBrains Mono", monospace; transition: all .15s; }
.ws-tab .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--d); }
.ws-tab:hover { color: var(--ink); }
.ws-tab.is-active { color: var(--ink); background: var(--surface-hover); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.ws-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 600;
  white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.ws-btn:hover { background: var(--surface-hover); border-color: var(--line-strong); }
.ws-btn:active { transform: scale(.97); }
.ws-btn.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 6px 18px -8px var(--c1); }
.ws-btn.tiny { height: 26px; padding: 0 9px; font-size: .75rem; border-radius: 8px; }
.ws-btn.is-flash { color: var(--ok); border-color: var(--ok); }
.file-btn { position: relative; }
.switch.small { padding: 0 6px; font-size: .82rem; gap: 8px; }
.switch.small .switch-ui { width: 34px; height: 20px; }
.switch.small .switch-ui::after { width: 14px; height: 14px; }
.switch.small input:checked + .switch-ui::after { transform: translateX(14px); }

.ws-split { display: flex; height: min(72vh, 760px); min-height: 420px; }
.ws-split.is-dragging { cursor: col-resize; user-select: none; }
.ws-split.is-dragging iframe { pointer-events: none; }
.ws-pane { position: relative; min-width: 0; display: flex; flex-direction: column; }
.ws-editors { flex: 0 0 50%; }
.ws-pane:last-child { flex: 1; }
.ws-handle { flex: none; width: 9px; cursor: col-resize; position: relative; background: var(--line); }
.ws-handle::after { content: ""; position: absolute; left: 3px; top: 50%; width: 3px; height: 38px; margin-top: -19px; border-radius: 3px; background: var(--line-strong); transition: background .15s; }
.ws-handle:hover::after, .ws-split.is-dragging .ws-handle::after { background: var(--c1); }
.ws.is-stacked .ws-split { flex-direction: column; height: auto; }
.ws.is-stacked .ws-editors { flex-basis: 360px !important; }
.ws.is-stacked .ws-handle { display: none; }
.ws.is-stacked .ws-preview { min-height: 480px; border-top: 1px solid var(--line); }
.ed { flex: 1; min-height: 0; display: flex; }
.ed[hidden] { display: none; }
.ed textarea.cm-fallback, .ed > textarea { width: 100%; height: 100%; border: 0; resize: none; padding: 14px; background: transparent; color: var(--ink);
  font: .88rem/1.6 "JetBrains Mono", monospace; outline: 0; }

/* CodeMirror con los colores de la web */
.ws .CodeMirror { flex: 1; height: 100%; font: .88rem/1.65 "JetBrains Mono", ui-monospace, monospace; background: transparent; color: var(--ink); }
.ws .CodeMirror-gutters { background: transparent; border-right: 1px solid var(--line); }
.ws .CodeMirror-linenumber { color: var(--faint); padding: 0 10px 0 6px; }
.ws .CodeMirror-cursor { border-left: 2px solid var(--c1); }
.ws .CodeMirror-activeline-background { background: color-mix(in srgb, var(--c1) 7%, transparent); }
.ws .CodeMirror-selected, .ws .CodeMirror-focused .CodeMirror-selected { background: color-mix(in srgb, var(--c2) 28%, transparent) !important; }
.ws .CodeMirror-matchingbracket, .ws .CodeMirror-matchingtag { color: inherit !important; background: color-mix(in srgb, var(--c1) 22%, transparent); border-radius: 2px; }
.ws .CodeMirror-lines { padding: 12px 0; }
.ws .cm-tag { color: #f472b6; } .ws .cm-attribute { color: #a78bfa; } .ws .cm-string { color: #34d399; }
.ws .cm-keyword { color: #c084fc; } .ws .cm-def { color: #60a5fa; } .ws .cm-variable-2, .ws .cm-variable-3 { color: #38bdf8; }
.ws .cm-number, .ws .cm-atom { color: #fb923c; } .ws .cm-comment { color: var(--faint); font-style: italic; }
.ws .cm-property { color: #60a5fa; } .ws .cm-qualifier, .ws .cm-builtin { color: #fbbf24; } .ws .cm-bracket { color: var(--muted); }
.ws .cm-header { color: var(--c1); font-weight: 700; } .ws .cm-link, .ws .cm-url { color: #38bdf8; } .ws .cm-quote { color: #a3a3a3; font-style: italic; }
.ws .cm-strong { font-weight: 800; } .ws .cm-em { font-style: italic; }
:root[data-theme="light"] .ws .cm-string { color: #059669; } :root[data-theme="light"] .ws .cm-tag { color: #db2777; }
:root[data-theme="light"] .ws .cm-number, :root[data-theme="light"] .ws .cm-atom { color: #ea580c; }
:root[data-theme="light"] .ws .cm-property, :root[data-theme="light"] .ws .cm-def { color: #2563eb; }
:root[data-theme="light"] .ws .cm-keyword { color: #9333ea; } :root[data-theme="light"] .ws .cm-qualifier { color: #b45309; }

/* Vista previa HTML + consola */
.ws-preview { background: #fff; }
.preview-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; background: var(--surface-solid); border-bottom: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.preview-bar .dots { display: flex; gap: 6px; } .preview-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.preview-bar .dots i:nth-child(1) { background: #ff5f57; } .preview-bar .dots i:nth-child(2) { background: #febc2e; } .preview-bar .dots i:nth-child(3) { background: #28c840; }
.preview-bar .url { flex: 1; padding: 4px 10px; border-radius: 7px; background: var(--surface); font-family: "JetBrains Mono", monospace; }
.status { color: var(--ok); font-weight: 600; transition: transform .2s; } .status.pulse { transform: scale(1.15); }
.ws-preview iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.console { height: 150px; display: flex; flex-direction: column; background: #0f0d17; color: #e7e5f0; border-top: 1px solid var(--line); }
.console-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; font-size: .78rem; font-weight: 700; color: #a09bb4; border-bottom: 1px solid rgba(255,255,255,.07); }
.console-head span { display: flex; align-items: center; gap: 6px; } .console-head b { color: #fff; background: #6366f1; border-radius: 6px; padding: 0 6px; font-size: .7rem; }
.console-head b:empty { display: none; }
.console .ws-btn { background: rgba(255,255,255,.06); color: #e7e5f0; border-color: rgba(255,255,255,.1); }
.console-body { flex: 1; overflow: auto; padding: 4px 0; font: .8rem/1.55 "JetBrains Mono", monospace; }
.log { padding: 2px 12px; white-space: pre-wrap; border-bottom: 1px solid rgba(255,255,255,.04); }
.log .lt { display: inline-block; min-width: 44px; margin-right: 8px; font-size: .68rem; text-transform: uppercase; color: #7c7891; }
.log .ll { font-style: normal; margin-left: 8px; font-size: .7rem; color: #7c7891; }
.log-warn { color: #fbbf24; background: rgba(251,191,36,.07); } .log-error { color: #ff7b8b; background: rgba(255,93,115,.08); }

/* Visor JSON */
.ws-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.ws-search input { border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: .86rem; width: 190px; }
.ws-search span { font-size: .72rem; color: var(--faint); white-space: nowrap; }
.tree-pane { background: color-mix(in srgb, var(--bg) 40%, transparent); }
.tree-status { padding: 9px 14px; font-size: .8rem; font-weight: 600; border-bottom: 1px solid var(--line); color: var(--muted); }
.tree-status.is-ok { color: var(--ok); } .tree-status.is-err { color: var(--err); background: color-mix(in srgb, var(--err) 8%, transparent); }
.tree { flex: 1; overflow: auto; padding: 10px 6px; font: .86rem/1.75 "JetBrains Mono", monospace; }
.tree ul { list-style: none; margin: 0; padding-left: 18px; } .tree .tree-root { padding-left: 0; }
.tree li.is-closed > ul { display: none; }
.tn { display: flex; align-items: baseline; gap: 0; padding: 0 6px; border-radius: 6px; cursor: default; white-space: nowrap; }
.tn:hover { background: var(--surface-hover); }
.tn.is-sel { background: color-mix(in srgb, var(--c1) 16%, transparent); }
.tn.is-hit { background: color-mix(in srgb, #facc15 28%, transparent); }
.tw { width: 16px; flex: none; color: var(--faint); cursor: pointer; }
.tn-branch > .tn > .tw::before { content: "▾"; display: inline-block; transition: transform .15s; }
.tn-branch.is-closed > .tn > .tw::before { transform: rotate(-90deg); }
.tk { color: #60a5fa; } .tp { color: var(--faint); } .tb { color: var(--muted); cursor: pointer; }
.tc { margin: 0 6px; padding: 0 7px; border-radius: 6px; font-size: .72rem; color: var(--faint); background: var(--surface); cursor: pointer; }
.tn-branch:not(.is-closed) > .tn .tc, .tn-branch:not(.is-closed) > .tn .tb-end { display: none; }
.tv-string { color: #34d399; } .tv-number { color: #fb923c; } .tv-boolean { color: #c084fc; } .tv-null { color: var(--faint); font-style: italic; }
:root[data-theme="light"] .tk { color: #2563eb; } :root[data-theme="light"] .tv-string { color: #059669; } :root[data-theme="light"] .tv-number { color: #ea580c; }
.tl { margin-left: 6px; color: var(--c1); text-decoration: none; }
.tree-path { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.tree-path code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "JetBrains Mono", monospace; color: var(--ink); }

/* Regex */
.rx-pattern { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 16px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface);
  font: 1.05rem "JetBrains Mono", monospace; transition: border-color .15s, box-shadow .15s; }
.rx-pattern:focus-within { border-color: var(--c1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 16%, transparent); }
.ws.has-error .rx-pattern { border-color: var(--err); }
.rx-slash { color: var(--faint); font-size: 1.3rem; }
.rx-pattern input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; padding: 10px 0; }
.rx-flags { display: flex; gap: 3px; }
.rx-flag { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--faint); cursor: pointer; font: 600 .9rem "JetBrains Mono", monospace; transition: all .15s; }
.rx-flag.is-on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.rx-status { min-height: 22px; padding: 4px 4px 0; font-size: .82rem; font-weight: 600; } .rx-status.is-err { color: var(--err); }
.rx-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; margin-top: 8px; }
.rx-col { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rx-label { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .84rem; font-weight: 700; color: var(--muted); }
.rx-label small { font-weight: 500; color: var(--faint); } .rx-label .ws-btn { margin-left: auto; }
.rx-count { margin-left: auto; padding: 2px 9px; border-radius: 999px; font-size: .74rem; color: var(--c1); background: color-mix(in srgb, var(--c1) 14%, transparent); }
.rx-count:empty { display: none; }
.rx-editor { position: relative; height: 300px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); overflow: hidden; }
.rx-backdrop, .rx-editor textarea { position: absolute; inset: 0; margin: 0; padding: 14px; font: .9rem/1.7 "JetBrains Mono", monospace; white-space: pre-wrap; word-wrap: break-word; overflow: auto; letter-spacing: 0; }
.rx-backdrop { color: transparent; pointer-events: none; }
.rx-backdrop mark { color: transparent; border-radius: 3px; background: color-mix(in srgb, var(--c1) 30%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c1) 55%, transparent); }
.rx-backdrop mark.m1 { background: color-mix(in srgb, var(--c2) 30%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c2) 55%, transparent); }
.rx-backdrop .empty { display: inline-block; width: 2px; height: 1em; background: var(--c1); }
.rx-editor textarea { border: 0; resize: none; outline: 0; background: transparent; color: var(--ink); caret-color: var(--c1); }
.rx-input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: .9rem "JetBrains Mono", monospace; outline: 0; }
.rx-input:focus { border-color: var(--c1); }
.rx-out { margin: 0; max-height: 200px; overflow: auto; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 7%, transparent); border: 1px dashed color-mix(in srgb, var(--ok) 40%, transparent); font: .86rem/1.6 "JetBrains Mono", monospace; white-space: pre-wrap; }
.rx-matches { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.rx-m { padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: .84rem; }
.rx-mh { display: flex; align-items: center; gap: 10px; } .rx-mh b { color: var(--c1); font-size: .76rem; }
.rx-mh code, .rx-g code { font-family: "JetBrains Mono", monospace; word-break: break-all; } .rx-mh small { margin-left: auto; color: var(--faint); white-space: nowrap; }
.rx-g { display: flex; gap: 10px; margin: 4px 0 0 26px; font-size: .8rem; } .rx-g span { color: var(--faint); min-width: 60px; font-family: "JetBrains Mono", monospace; }
.rx-empty, .rx-more { color: var(--faint); font-size: .86rem; margin: 6px 0; }
.rx-cheats, .rx-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-cheats button, .rx-presets button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; transition: all .15s; }
.rx-cheats button:hover, .rx-presets button:hover { color: var(--ink); border-color: var(--c1); }
.rx-cheats code { color: var(--c1); font: 600 .8rem "JetBrains Mono", monospace; }

/* Markdown */
.md-stats { font-size: .78rem; color: var(--faint); margin-right: 4px; }
.md-format .ws-btn { width: 36px; padding: 0; justify-content: center; }
.md-preview-pane { overflow: auto; background: color-mix(in srgb, var(--bg) 40%, transparent); }
.md-preview { padding: 26px 34px; max-width: 760px; line-height: 1.7; }
.md-preview h1, .md-preview h2, .md-preview h3 { margin: 1.2em 0 .5em; } .md-preview h1:first-child { margin-top: 0; }
.md-preview h1 { font-size: 2rem; } .md-preview h2 { font-size: 1.45rem; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.md-preview a { color: var(--c1); }
.md-preview code { font: .86em "JetBrains Mono", monospace; padding: 2px 6px; border-radius: 6px; background: var(--surface-hover); }
.md-preview pre { padding: 14px 16px; border-radius: 12px; background: #0f0d17; color: #e7e5f0; overflow: auto; } .md-preview pre code { background: none; padding: 0; }
.md-preview blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--c1); color: var(--muted); background: var(--surface); border-radius: 0 10px 10px 0; }
.md-preview table { border-collapse: collapse; margin: 1em 0; } .md-preview th, .md-preview td { border: 1px solid var(--line-strong); padding: 7px 14px; }
.md-preview th { background: var(--surface-hover); } .md-preview img { max-width: 100%; border-radius: 10px; }
.md-preview input[type=checkbox] { accent-color: var(--c1); margin-right: 6px; } .md-preview li:has(> input) { list-style: none; margin-left: -1.2em; }

/* JWT */
.jwt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.jwt-col { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.jwt-token { min-height: 260px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); outline: 0;
  font: .9rem/1.7 "JetBrains Mono", monospace; word-break: break-all; white-space: pre-wrap; }
.jwt-token:focus { border-color: var(--c1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 15%, transparent); }
.jwt-token:empty::before { content: attr(data-placeholder); color: var(--faint); }
.jwt-token .t0 { color: #fb7185; } .jwt-token .t1 { color: #a78bfa; } .jwt-token .t2 { color: #22d3ee; } .jwt-token .tdot { color: var(--ink); font-weight: 800; }
.jwt-state { font-size: .88rem; font-weight: 700; padding: 10px 14px; border-radius: 12px; } .jwt-state:empty { display: none; }
.jwt-state.is-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.jwt-state.is-warn { color: #f59e0b; background: color-mix(in srgb, #f59e0b 12%, transparent); }
.jwt-state.is-err { color: var(--err); background: color-mix(in srgb, var(--err) 10%, transparent); }
.jwt-note { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--faint); margin: 0; }
.jwt-part { border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.jwt-part.p-h { border-top: 3px solid #fb7185; } .jwt-part.p-p { border-top: 3px solid #a78bfa; } .jwt-part.p-s { border-top: 3px solid #22d3ee; }
.jwt-ph { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: .86rem; }
.jwt-ph span { color: var(--faint); font-size: .76rem; } .jwt-ph .ws-btn { margin-left: auto; }
.jwt-part pre { margin: 0; padding: 12px 14px; font: .84rem/1.6 "JetBrains Mono", monospace; overflow: auto; max-height: 280px; white-space: pre-wrap; word-break: break-all; }
.jk { color: #60a5fa; } .js { color: #34d399; } .jn { color: #fb923c; } .jb { color: #c084fc; }
.jwt-claims { display: grid; gap: 6px; } .jwt-claims:empty { display: none; }
.jwt-claims div { display: flex; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--surface); font-size: .84rem; }
.jwt-claims span { min-width: 100px; color: var(--faint); } .jwt-claims small { color: var(--muted); font-weight: 500; }

/* Colores */
.cc-top { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.cc-swatch { position: relative; width: 110px; height: 110px; border-radius: 26px; cursor: pointer; flex: none; display: grid; place-items: center;
  box-shadow: 0 20px 44px -16px var(--pick, #6366f1), inset 0 0 0 1px rgba(255,255,255,.15); transition: background .2s; }
.cc-swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cc-swatch span { color: #fff; font-size: 1.5rem; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.cc-input { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 6px; }
.cc-input label { font-size: .84rem; font-weight: 700; color: var(--muted); }
.cc-input input { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 1rem "JetBrains Mono", monospace; outline: 0; }
.cc-input input:focus { border-color: var(--c1); }
.cc-err { min-height: 18px; color: var(--err); font-size: .8rem; font-weight: 600; }
.cc-formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 18px; }
.cc-f { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; font: inherit; transition: border-color .15s, background .15s; }
.cc-f:hover { border-color: var(--c1); background: var(--surface-hover); }
.cc-f span { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.cc-f code { font: .9rem "JetBrains Mono", monospace; word-break: break-all; }
.cc-f i { position: absolute; top: 10px; right: 12px; font-style: normal; font-size: .72rem; color: var(--c1); opacity: 0; transition: opacity .15s; }
.cc-f:hover i, .cc-f i.is-flash { opacity: 1; }
.cc-section { margin-top: 26px; } .cc-section h3 { font-size: 1rem; margin-bottom: 10px; }
.cc-scale { display: flex; border-radius: 14px; overflow: hidden; }
.cc-chip { flex: 1; min-width: 0; height: 64px; border: 0; cursor: pointer; font: 600 .66rem "JetBrains Mono", monospace; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 8px; transition: transform .15s, flex .2s; }
.cc-chip:hover { flex: 1.8; } .cc-chip.is-base { flex: 1.8; outline: 3px solid var(--ink); outline-offset: -3px; }
.cc-harm { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.cc-h { padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.cc-h span { font-size: .8rem; font-weight: 700; color: var(--muted); } .cc-h div { display: flex; gap: 6px; margin-top: 8px; }
.cc-h button { flex: 1; height: 44px; border: 0; border-radius: 10px; cursor: pointer; transition: transform .15s; } .cc-h button:hover { transform: translateY(-3px); }
.cc-contrast { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-c { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 16px; }
.cc-c > b { font-size: 2.6rem; line-height: 1; } .cc-c strong { display: block; } .cc-c span { font: 600 1.1rem "JetBrains Mono", monospace; }
.cc-c p { display: flex; gap: 6px; margin: 6px 0 0; flex-wrap: wrap; }
.cc-c em { font-style: normal; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.18); }
.cc-c em.no { opacity: .55; text-decoration: line-through; }

@media (max-width: 860px) {
  .ws-split { flex-direction: column; height: auto; }
  .ws-editors, .ws-split > .ws-pane:first-child { flex-basis: 380px !important; }
  .ws-handle { display: none; }
  .ws-preview, .tree-pane, .md-preview-pane { min-height: 420px; border-top: 1px solid var(--line); }
  .rx-grid, .jwt-grid, .cc-contrast { grid-template-columns: 1fr; }
  .ws-btn span { display: none; }
  .ws-search input { width: 120px; }
}
