/* ==================================================================
   FDX Journal — hoja de estilos unica.
   Diseno pensado en oscuro primero; el modo claro son pasos propios
   de la misma rampa, no un volteo automatico.

   Paleta verificada (contraste WCAG y separacion OKLab bajo
   deuteranopia y protanopia):
     oscuro  acento 6.07 · ganancia 8.92 · perdida 4.85 · G/P CVD 13.8
     claro   acento 5.91 · ganancia 4.95 · perdida 4.63 · G/P CVD  8.4
   ================================================================== */

:root {
  color-scheme: dark;

  --page: #08080a;
  --page-alt: #0d0d11;
  --surface: #101014;
  --surface-2: #17171d;
  --surface-3: #1e1e26;

  --text-primary: #f4f4f6;
  --text-secondary: #a5a5b0;
  --text-muted: #74747f;

  --grid: #22222b;
  --axis: #2e2e38;
  --border: #22222b;
  --border-strong: #32323d;
  --field: #16161c;
  --hover-wash: rgba(255, 255, 255, 0.05);

  --accent: #9d7bff;
  --accent-ink: #0a0a0c;
  --accent-soft: rgba(157, 123, 255, 0.14);
  --accent-line: rgba(157, 123, 255, 0.34);

  --profit: #34c98a;
  --loss: #e5484d;

  /* charts.js usa --series-1 como color de la serie unica. */
  --series-1: #9d7bff;
  --series-1-soft: rgba(157, 123, 255, 0.14);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 24px 60px rgba(0, 0, 0, 0.55);
  --glow: 0 0 0 1px rgba(157, 123, 255, 0.2), 0 18px 50px rgba(157, 123, 255, 0.14);

  --radius: 12px;
  --radius-lg: 18px;
  --font: "Segoe UI Variable Display", "Segoe UI", Inter, system-ui,
    -apple-system, "Helvetica Neue", Arial, sans-serif;
  --tracking-tight: -0.03em;
}

@media (prefers-color-scheme: light) {
  :root:where(:not([data-theme="dark"])) {
    color-scheme: light;
    --page: #ffffff;
    --page-alt: #f4f4f7;
    --surface: #ffffff;
    --surface-2: #f6f6f9;
    --surface-3: #ececf2;
    --text-primary: #101014;
    --text-secondary: #55555f;
    --text-muted: #85858f;
    --grid: #e6e6ec;
    --axis: #c9c9d2;
    --border: #e4e4ea;
    --border-strong: #cfcfd8;
    --field: #ffffff;
    --hover-wash: rgba(16, 16, 20, 0.04);
    --accent: #6b3df0;
    --accent-ink: #ffffff;
    --accent-soft: rgba(107, 61, 240, 0.1);
    --accent-line: rgba(107, 61, 240, 0.28);
    --profit: #07805a;
    --loss: #d93636;
    --series-1: #6b3df0;
    --series-1-soft: rgba(107, 61, 240, 0.12);
    --shadow: 0 1px 2px rgba(16, 16, 20, 0.06);
    --shadow-lift: 0 24px 60px rgba(16, 16, 20, 0.12);
    --glow: 0 0 0 1px rgba(107, 61, 240, 0.16), 0 18px 50px rgba(107, 61, 240, 0.1);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #ffffff;
  --page-alt: #f4f4f7;
  --surface: #ffffff;
  --surface-2: #f6f6f9;
  --surface-3: #ececf2;
  --text-primary: #101014;
  --text-secondary: #55555f;
  --text-muted: #85858f;
  --grid: #e6e6ec;
  --axis: #c9c9d2;
  --border: #e4e4ea;
  --border-strong: #cfcfd8;
  --field: #ffffff;
  --hover-wash: rgba(16, 16, 20, 0.04);
  --accent: #6b3df0;
  --accent-ink: #ffffff;
  --accent-soft: rgba(107, 61, 240, 0.1);
  --accent-line: rgba(107, 61, 240, 0.28);
  --profit: #07805a;
  --loss: #d93636;
  --series-1: #6b3df0;
  --series-1-soft: rgba(107, 61, 240, 0.12);
  --shadow: 0 1px 2px rgba(16, 16, 20, 0.06);
  --shadow-lift: 0 24px 60px rgba(16, 16, 20, 0.12);
  --glow: 0 0 0 1px rgba(107, 61, 240, 0.16), 0 18px 50px rgba(107, 61, 240, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--page);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* =============================================================== marca */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark em {
  font-style: normal;
  font-weight: 500;
  color: var(--text-secondary);
}

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  flex: none;
}

.wordmark-mark svg {
  width: 15px;
  height: 15px;
  display: block;
}

.wordmark.lg {
  font-size: 20px;
}

.wordmark.lg .wordmark-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

/* ============================================================= botones */

.btn,
button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  background: var(--field);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 9px 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, opacity 0.14s, transform 0.14s;
}

.btn:hover,
button:hover {
  background: var(--hover-wash);
  border-color: var(--text-muted);
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn-primary,
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover,
button.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  filter: brightness(1.1);
}

button.primary {
  width: 100%;
}

.btn-ghost {
  background: transparent;
}

.btn-lg {
  padding: 13px 22px;
  font-size: 15px;
  border-radius: 10px;
}

.btn-arrow::after {
  content: "→";
  font-size: 1.05em;
  transition: transform 0.16s;
}

.btn-arrow:hover::after {
  transform: translateX(3px);
}

/* ============================================================== campos */

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--text-primary);
  background: var(--field);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.alert {
  background: color-mix(in srgb, var(--loss) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--loss) 48%, transparent);
  color: var(--text-primary);
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 18px;
  font-size: 13px;
}

/* ============================================================ pildoras */

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  margin-bottom: 18px;
}

.pill.is-profit {
  background: color-mix(in srgb, var(--profit) 14%, transparent);
  color: var(--profit);
  border-color: color-mix(in srgb, var(--profit) 40%, transparent);
}

.pill.is-neutral {
  background: var(--surface-3);
  color: var(--text-secondary);
  border-color: var(--border-strong);
}

/* ==================================================================
   FONDO ESPACIAL — superficies publicas (portada y acceso)
   Nebulosa + tres capas de estrellas, todo con degradados. Sin
   imagenes, sin JS. Estas paginas van SIEMPRE en oscuro: sobre un
   cielo estrellado el modo claro seria ilegible, asi que la clase
   fija los tokens en vez de dejarlos al sistema.
   ================================================================== */

body.space {
  color-scheme: dark;
  background: #04040a;
  --page: transparent;
  --page-alt: transparent;
  --surface: rgba(18, 18, 28, 0.72);
  --surface-2: rgba(28, 28, 42, 0.66);
  --surface-3: rgba(40, 40, 58, 0.7);
  --text-primary: #f6f6fa;
  --text-secondary: #b0b0c4;
  /* Mas claro que en el panel: aqui el texto cae sobre la nebulosa, que
     es mas luminosa que una superficie plana. */
  --text-muted: #9d9db4;
  --grid: rgba(255, 255, 255, 0.09);
  --axis: rgba(255, 255, 255, 0.16);
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.2);
  --field: rgba(16, 16, 26, 0.72);
  --hover-wash: rgba(255, 255, 255, 0.07);
  --accent: #a98bff;
  --accent-ink: #0a0a12;
  --accent-soft: rgba(169, 139, 255, 0.16);
  --accent-line: rgba(169, 139, 255, 0.38);
  --profit: #34c98a;
  --loss: #f0565b;
  --series-1: #a98bff;
  --series-1-soft: rgba(169, 139, 255, 0.16);
  --shadow-lift: 0 24px 70px rgba(0, 0, 0, 0.7);
  --glow: 0 0 0 1px rgba(169, 139, 255, 0.22), 0 20px 60px rgba(122, 80, 255, 0.22);
}

/* Nebulosa: manchas grandes y difusas, fijas al viewport. */
.sky,
.rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.rain {
  overflow: hidden;
}

.sky {
  background:
    radial-gradient(58% 44% at 18% 8%, rgba(108, 62, 214, 0.42) 0%, transparent 62%),
    radial-gradient(48% 40% at 84% 16%, rgba(38, 96, 206, 0.34) 0%, transparent 64%),
    radial-gradient(52% 46% at 66% 76%, rgba(150, 54, 168, 0.26) 0%, transparent 66%),
    radial-gradient(70% 50% at 30% 96%, rgba(28, 132, 152, 0.2) 0%, transparent 68%),
    linear-gradient(180deg, #06060f 0%, #04040a 55%, #070713 100%);
}

/* Lluvia de resultados. Los elementos los crea rain.js; aqui solo vive
   la caida. La opacidad la fija el script por elemento (--o) para dar
   profundidad: las cifras lejanas caen mas lentas y tenues. */
.rain b {
  position: absolute;
  top: -8vh;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
  animation-name: fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.rain .up {
  color: var(--profit);
}

.rain .down {
  color: var(--loss);
}

@keyframes fall {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  9%   { opacity: var(--o, 0.2); }
  88%  { opacity: var(--o, 0.2); }
  100% { transform: translate3d(0, 118vh, 0); opacity: 0; }
}

/* El contenido va por encima del cielo y de la lluvia. */
body.space > header,
body.space > main,
body.space > footer,
body.space > .auth {
  position: relative;
  z-index: 1;
}

/* Sobre el cielo, las tarjetas se translucen y desenfocan lo de detras:
   las cifras que caen se intuyen sin llegar a estorbar la lectura. */
body.space .mock,
body.space .fx,
body.space .lp-proof div,
body.space .auth-aside {
  backdrop-filter: blur(14px);
}

/* --------------------------------------------------- foco de los campos */
/* En vez del cerco morado, una nube blanca que sube desde el borde
   inferior y marca donde estas escribiendo. El centro del degradado
   queda FUERA del campo, asi que dentro solo entra el borde tenue de la
   nube y el texto blanco nunca se pierde encima. */

body.space input,
body.space textarea,
body.space select {
  transition: border-color 0.16s, box-shadow 0.22s, background 0.22s;
}

body.space input:focus,
body.space textarea:focus,
body.space select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  border-bottom-color: #ffffff;
  background-image: radial-gradient(
    130% 78% at 50% 132%,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.16) 34%,
    rgba(255, 255, 255, 0.04) 56%,
    transparent 74%
  );
  box-shadow:
    0 -1px 0 0 rgba(255, 255, 255, 0.06) inset,
    0 8px 26px -10px rgba(255, 255, 255, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Teclado: el borde superior tambien se marca, para que el foco se vea
   incluso si la nube pasa desapercibida. */
body.space input:focus-visible,
body.space textarea:focus-visible,
body.space select:focus-visible {
  border-color: rgba(255, 255, 255, 0.72);
}

body.space .lp-nav {
  background: rgba(6, 6, 15, 0.62);
}

/* Las bandas dejan de ser un color plano: solo un velo mas oscuro. */
body.space .lp-band {
  background: rgba(4, 4, 12, 0.42);
}

body.space .lp-proof {
  background: rgba(255, 255, 255, 0.09);
}

body.space .lp-proof div {
  background: rgba(10, 10, 20, 0.55);
}

body.space .lp-hero::before {
  display: none;
}

/* En el acceso, el panel de marca lleva un velo para que se lea la
   division sin tapar el cielo. */
body.space .auth-aside {
  background: rgba(6, 6, 16, 0.5);
}

body.space .auth-aside::before {
  display: none;
}

/* rain.js no llega a crear nada si se pide menos movimiento; esto cubre
   lo que ya estuviera en pantalla. */
@media (prefers-reduced-motion: reduce) {
  .rain {
    display: none;
  }
}

/* ==================================================================
   LANDING
   ================================================================== */

.lp-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 15px 32px;
  background: color-mix(in srgb, var(--page) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.lp-nav-links {
  display: flex;
  gap: 26px;
  margin-right: auto;
  font-size: 14px;
  font-weight: 500;
}

.lp-nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.lp-nav-links a:hover {
  color: var(--text-primary);
}

@media (max-width: 720px) {
  .lp-nav {
    padding: 13px 20px;
    gap: 14px;
  }

  .lp-nav-links {
    display: none;
  }

  .lp-nav .wordmark {
    margin-right: auto;
  }
}

.lp-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 720px) {
  .lp-wrap {
    padding: 0 20px;
  }
}

/* -------------------------------------------------------------- hero */

.lp-hero {
  position: relative;
  padding: 96px 0 88px;
  text-align: center;
  overflow: hidden;
}

/* Halo del acento detras del titular. */
.lp-hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  width: 900px;
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    var(--accent-soft) 0%,
    transparent 68%
  );
  pointer-events: none;
}

.lp-hero > * {
  position: relative;
}

.lp-title {
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.04em;
  margin: 0 auto 22px;
  max-width: 15ch;
}

.lp-title em {
  font-style: normal;
  color: var(--accent);
}

.lp-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 auto 34px;
  max-width: 54ch;
}

.lp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 56px;
}

/* ------------------------------------------------- animacion del hero */
/* Hace de video: dibuja la curva, sube las barras y cuenta el neto.
   Un solo ciclo de 9 s, en bucle, sin ningun archivo externo. */

.fx {
  max-width: 900px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift), var(--glow);
  overflow: hidden;
  text-align: left;
}

.fx-chrome {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.fx-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--profit);
  flex: none;
  animation: fx-pulse 2.4s ease-in-out infinite;
}

@keyframes fx-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.fx-chrome .fx-spacer {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.fx-body {
  display: grid;
  gap: 24px;
  padding: 24px;
}

@media (min-width: 780px) {
  .fx-body {
    grid-template-columns: 210px 1fr;
    align-items: center;
  }
}

.fx-net-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* Contador: una columna de valores que sube a saltos dentro de una
   ventana de altura fija. */
.fx-counter {
  height: 44px;
  overflow: hidden;
  margin-bottom: 4px;
}

.fx-counter ul {
  margin: 0;
  padding: 0;
  list-style: none;
  animation: fx-count 9s steps(1, end) infinite;
}

.fx-counter li {
  height: 44px;
  display: flex;
  align-items: center;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--profit);
  font-variant-numeric: tabular-nums;
}

@keyframes fx-count {
  0%    { transform: translateY(0); }
  16%   { transform: translateY(-44px); }
  32%   { transform: translateY(-88px); }
  48%   { transform: translateY(-132px); }
  64%   { transform: translateY(-176px); }
  100%  { transform: translateY(-176px); }
}

.fx-net-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.fx-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.fx-mini div {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
}

.fx-mini b {
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.fx-mini span {
  font-size: 10.5px;
  color: var(--text-muted);
}

.fx-plot {
  min-width: 0;
}

.fx-plot svg {
  display: block;
  width: 100%;
  height: auto;
}

/* La curva se dibuja de izquierda a derecha. */
.fx-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: fx-draw 9s ease-out infinite;
}

@keyframes fx-draw {
  0%   { stroke-dashoffset: 1000; }
  55%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

.fx-area {
  opacity: 0;
  animation: fx-fade 9s ease-out infinite;
}

@keyframes fx-fade {
  0%, 20% { opacity: 0; }
  60%     { opacity: 1; }
  100%    { opacity: 1; }
}

.fx-dot {
  opacity: 0;
  animation: fx-dot 9s ease-out infinite;
}

@keyframes fx-dot {
  0%, 52% { opacity: 0; }
  58%     { opacity: 1; }
  100%    { opacity: 1; }
}

/* Barras del resultado diario: crecen escalonadas desde la base. */
.fx-bar {
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(0);
  animation: fx-grow 9s ease-out infinite;
}

/* Las barras en perdida cuelgan del eje: crecen hacia abajo. */
.fx-bar.down {
  transform-origin: top;
}

@keyframes fx-grow {
  0%, 8%  { transform: scaleY(0); }
  38%     { transform: scaleY(1); }
  100%    { transform: scaleY(1); }
}

.fx-bar:nth-of-type(2)  { animation-delay: 0.10s; }
.fx-bar:nth-of-type(3)  { animation-delay: 0.20s; }
.fx-bar:nth-of-type(4)  { animation-delay: 0.30s; }
.fx-bar:nth-of-type(5)  { animation-delay: 0.40s; }
.fx-bar:nth-of-type(6)  { animation-delay: 0.50s; }
.fx-bar:nth-of-type(7)  { animation-delay: 0.60s; }
.fx-bar:nth-of-type(8)  { animation-delay: 0.70s; }
.fx-bar:nth-of-type(9)  { animation-delay: 0.80s; }
.fx-bar:nth-of-type(10) { animation-delay: 0.90s; }
.fx-bar:nth-of-type(11) { animation-delay: 1.00s; }
.fx-bar:nth-of-type(12) { animation-delay: 1.10s; }

/* -------------------------------------------------------- indicadores */

.lp-proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  margin: 72px 0 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.lp-proof div {
  background: var(--page);
  padding: 22px 20px;
  text-align: left;
}

.lp-proof dt {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.lp-proof dd {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

/* ------------------------------------------------------------ bandas */

.lp-band {
  background: var(--page-alt);
  border-block: 1px solid var(--border);
}

.lp-section {
  padding: 88px 0;
}

.lp-section-head {
  max-width: 56ch;
  margin-bottom: 48px;
}

.lp-section-head h2 {
  font-size: clamp(27px, 3.8vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.lp-section-head p {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary);
}

/* ----------------------------------------------- bloques de producto */
/* Cada capacidad se demuestra con una maqueta real, no se describe. */

.lp-showcase {
  display: grid;
  gap: 44px;
  align-items: center;
  padding: 62px 0;
  border-top: 1px solid var(--border);
}

@media (min-width: 900px) {
  .lp-showcase {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 64px;
  }

  .lp-showcase.flip .lp-showcase-copy {
    order: 2;
  }
}

.lp-showcase-copy h3 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

.lp-showcase-copy p {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 15px;
}

.lp-showcase-copy ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.lp-showcase-copy li {
  padding: 8px 0 8px 22px;
  position: relative;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.lp-showcase-copy li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

/* Marco comun de todas las maquetas. */
.mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  min-width: 0;
}

.mock-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.mock-head span {
  margin-left: auto;
  font-weight: 400;
  color: var(--text-muted);
}

.mock-body {
  padding: 16px;
}

.mock table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.mock th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  text-align: left;
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--border);
}

.mock td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.mock tr:last-child td {
  border-bottom: none;
}

.mock .r {
  text-align: right;
}

/* Barras proporcionales de la maqueta de analisis. */
.mock-bars {
  display: grid;
  gap: 11px;
}

.mock-bar-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
}

.mock-bar-track {
  height: 9px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.mock-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.mock-note {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 13px;
  margin-bottom: 11px;
}

.mock-note-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.mock-note-value {
  font-size: 13px;
}

.mock-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mock-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}

.mock-stars {
  color: var(--accent);
  letter-spacing: 0.12em;
}

/* ------------------------------------------------------------ metricas */

.lp-metrics {
  display: grid;
  gap: 0 36px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-metrics li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.lp-metrics b {
  font-weight: 600;
}

.lp-metrics span {
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------------------------------------------------------- cierre */

.lp-cta {
  text-align: center;
  padding: 104px 0;
}

.lp-cta h2 {
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}

.lp-cta p {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 auto 32px;
  max-width: 50ch;
}

.lp-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.lp-footer .lp-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

/* ==================================================================
   ACCESO
   ================================================================== */

.auth {
  min-height: 100vh;
  display: grid;
}

@media (min-width: 880px) {
  .auth {
    grid-template-columns: 1.05fr 1fr;
  }
}

.auth-aside {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  background: var(--page-alt);
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.auth-aside::before {
  content: "";
  position: absolute;
  bottom: -220px;
  left: -120px;
  width: 640px;
  height: 500px;
  background: radial-gradient(ellipse at center, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
}

.auth-aside > * {
  position: relative;
}

@media (min-width: 880px) {
  .auth-aside {
    display: flex;
  }
}

.auth-aside h2 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
  max-width: 17ch;
}

.auth-aside h2 em {
  font-style: normal;
  color: var(--accent);
}

.auth-aside p {
  color: var(--text-secondary);
  margin: 0;
  max-width: 42ch;
}

.auth-aside footer {
  font-size: 12px;
  color: var(--text-muted);
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 32px 24px;
}

.auth-card {
  width: 100%;
  max-width: 360px;
}

.auth-card .wordmark {
  margin-bottom: 30px;
}

@media (min-width: 880px) {
  .auth-card .wordmark {
    display: none;
  }
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-card .sub {
  color: var(--text-secondary);
  margin: 0 0 26px;
}

.auth-back {
  display: inline-block;
  margin-top: 22px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.auth-back:hover {
  color: var(--text-primary);
}

/* ==================================================================
   PANEL
   ================================================================== */

.appbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.appbar .wordmark {
  text-decoration: none;
}

.appbar-account {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: auto;
  padding-left: 18px;
  border-left: 1px solid var(--border);
  min-width: 0;
}

@media (max-width: 760px) {
  .appbar-account {
    order: 3;
    width: 100%;
    padding-left: 0;
    border-left: none;
  }
}

.appbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.conn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex: none;
}

.dot.ok {
  background: var(--profit);
}

.dot.bad {
  background: var(--loss);
}

main {
  padding: 22px 24px 64px;
  max-width: 1400px;
  margin: 0 auto;
}

/* --------------------------------------------------- barra de control */

.controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 22px;
  overflow: hidden;
}

.filters {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 14px 16px;
}

.filters .field {
  margin: 0;
  min-width: 132px;
}

.filters .field.grow {
  flex: 1 1 140px;
}

.range-presets {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.range-presets button {
  border: none;
  background: none;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.range-presets button:hover {
  background: var(--hover-wash);
  border-color: transparent;
}

.range-presets button[aria-pressed="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
}

.tabs {
  display: flex;
  gap: 2px;
  padding: 0 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.tabs button {
  border: none;
  background: none;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  padding: 11px 14px;
  margin-bottom: -1px;
}

.tabs button:hover {
  background: var(--hover-wash);
  border-color: transparent;
  border-bottom-color: var(--border-strong);
}

.tabs button[aria-selected="true"] {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.panel[hidden] {
  display: none;
}

/* ---------------------------------------------------------------- cards */

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.card > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card h2 {
  font-size: 14px;
  font-weight: 600;
}

.card .hint {
  font-size: 12px;
  color: var(--text-muted);
}

.hero {
  padding: 24px;
}

.hero .label {
  font-size: 13px;
  color: var(--text-secondary);
}

.hero .value {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 4px 0 2px;
  font-variant-numeric: tabular-nums;
}

.hero .meta {
  font-size: 13px;
  color: var(--text-secondary);
}

.tiles {
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
}

.tile .label {
  font-size: 12px;
  color: var(--text-secondary);
}

.tile .value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.tile .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pos {
  color: var(--profit);
}

.neg {
  color: var(--loss);
}

.charts {
  grid-template-columns: 1fr;
}

@media (min-width: 1000px) {
  .charts.split {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------------------------- leyenda */

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: none;
}

/* -------------------------------------------------------------- graficos */

.chart {
  width: 100%;
  position: relative;
}

.chart svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.chart .empty {
  display: grid;
  place-items: center;
  height: 180px;
  color: var(--text-muted);
  font-size: 13px;
}

.tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  z-index: 5;
  transform: translate(-50%, -100%);
  opacity: 0;
  transition: opacity 0.1s;
}

.tooltip.on {
  opacity: 1;
}

.tooltip b {
  font-weight: 600;
}

/* ---------------------------------------------------------------- tablas */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  position: sticky;
  top: 0;
  background: var(--surface);
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tbody tr:hover {
  background: var(--hover-wash);
}

tbody tr.selected {
  background: var(--accent-soft);
}

.row-link {
  cursor: pointer;
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}

.bar-cell {
  position: relative;
  min-width: 110px;
}

.bar-cell .bar {
  height: 8px;
  border-radius: 0 4px 4px 0;
  display: block;
}

/* ----------------------------------------------------------------- notas */

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  z-index: 40;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
}

.drawer[hidden] {
  display: none;
}

.drawer header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.drawer h2 {
  font-size: 16px;
  font-weight: 700;
}

.drawer dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0 0 20px;
  font-size: 13px;
}

.drawer dt {
  color: var(--text-secondary);
}

.drawer dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.saved {
  font-size: 12px;
  color: var(--profit);
}

.muted {
  color: var(--text-muted);
}

.banner {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--loss) 45%, transparent);
  border-left: 3px solid var(--loss);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
}

.banner[hidden] {
  display: none;
}

.loading {
  opacity: 0.55;
  transition: opacity 0.15s;
}

/* Sin movimiento: la animacion se congela en su estado final. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    animation-fill-mode: forwards !important;
    transition: none !important;
  }

  .fx-counter ul {
    transform: translateY(-176px);
  }

  .fx-line {
    stroke-dashoffset: 0;
  }

  .fx-area,
  .fx-dot {
    opacity: 1;
  }

  .fx-bar {
    transform: scaleY(1);
  }
}
