/* =============================================================================
   MonkeyTF2 — hoja de estilos

   Lenguaje visual: oscuro, sobrio y de exchange moderno.
   Paleta tomada como referencia de los exchanges de llaves mas pulidos:
   fondo #17191c, superficies #1a1d20 / #1f2225, bordes #2a2e32, texto #ffffff,
   secundario #848b8d y acento #5865f2. Radios generosos y mucho aire.
   ========================================================================== */

:root {
  /* Superficies */
  --bg: #17191c;
  --bg-deep: #121417;
  --surface: #1a1d20;
  --surface-2: #1f2225;
  --surface-3: #25292d;
  --border: #2a2e32;
  --border-strong: #303539;

  /* Texto */
  --text: #ffffff;
  --text-soft: #c7ccd0;
  --muted: #848b8d;
  --faint: #62696b;

  /* Acento */
  --accent: #5865f2;
  --accent-hover: #6b77f5;
  --accent-soft: rgba(88, 101, 242, 0.14);
  --accent-line: rgba(88, 101, 242, 0.4);

  /* Estados */
  --green: #26d07c;
  --green-soft: rgba(38, 208, 124, 0.12);
  --amber: #f99c00;
  --amber-soft: rgba(249, 156, 0, 0.12);
  --red: #f04438;
  --red-soft: rgba(240, 68, 56, 0.12);

  /* Formas */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --pill: 999px;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.03) inset;

  --font: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

/* ---------------------------------------------------------------- Reset --- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 50% -160px, rgba(88, 101, 242, 0.16), transparent 70%),
    radial-gradient(600px 300px at 90% 0%, rgba(38, 208, 124, 0.05), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
}

h3 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.15em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.35em;
}

strong {
  color: var(--text);
  font-weight: 620;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.875em;
}

hr,
.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

img,
svg {
  max-width: 100%;
}

::selection {
  background: rgba(88, 101, 242, 0.35);
  color: #fff;
}

/* Scrollbar discreta */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: var(--pill);
}

::-webkit-scrollbar-thumb:hover {
  background: #34393e;
}

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

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.shell > main {
  flex: 1;
  padding: 28px 0 56px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0 -20px;
  padding: 0 20px;
  background: rgba(23, 25, 28, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1140px;
  margin: 0 auto;
  height: 62px;
}

.header-spacer {
  flex: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.brand-dot {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--accent), #8b5cf6);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 4px 12px rgba(88, 101, 242, 0.35);
  position: relative;
  flex: none;
}

.brand-dot::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  opacity: 0.85;
}

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

.nav a {
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav a.active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--border) inset;
}

/* Precio en vivo de la cabecera */
.ticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-soft);
  white-space: nowrap;
}

.ticker b {
  color: var(--text);
  font-weight: 600;
}

.ticker .up {
  color: var(--green);
}

.ticker .down {
  color: var(--amber);
}

/* ------------------------------------------------------------ Tipografia --- */

.muted {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

.small {
  font-size: 0.82rem;
}

.tiny {
  font-size: 0.74rem;
}

.right {
  text-align: right;
}

.nowrap {
  white-space: nowrap;
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 14px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 18px; }
.mt-3 { margin-top: 26px; }

.hidden {
  display: none !important;
}

/* ---------------------------------------------------------------- Bloques -- */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title h3 {
  margin: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: start;
}

.grid {
  display: grid;
  gap: 14px;
}

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

.empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.012);
}

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

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: start;
  padding: 18px 0 10px;
}

/* La columna de texto se centra verticalmente en pantallas grandes, sin dejar
   un hueco muerto arriba cuando la tarjeta de cambio es alta. */
.hero > div:first-child {
  padding-top: clamp(8px, 6vh, 70px);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.05rem);
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin-bottom: 14px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), #9d7bf7 55%, #58c8f2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1rem;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 20px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 5px 12px 5px 8px;
  border-radius: var(--pill);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #cdd2ff;
}

.hero-pill span.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(38, 208, 124, 0.18);
}

.hero-stats {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  min-width: 96px;
}

.hero-stat .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--faint);
  margin-bottom: 3px;
}

.hero-stat .value {
  font-family: var(--mono);
  font-size: 1.16rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hero-stat .value.green { color: var(--green); }
.hero-stat .value.amber { color: var(--amber); }

/* Lista de garantias bajo las cifras */
.hero-points {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.hero-points li {
  position: relative;
  margin: 0;
  padding-left: 26px;
  font-size: 0.855rem;
  line-height: 1.5;
  color: var(--muted);
}

.hero-points li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 1px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--green-soft);
  border: 1px solid rgba(38, 208, 124, 0.32);
  color: var(--green);
  font-size: 0.66rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-points li strong {
  color: var(--text-soft);
  font-weight: 620;
}

/* ------------------------------------------------------------------ KPI ---- */

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.kpi-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-bottom: 5px;
}

.kpi-value {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.kpi-value.green { color: var(--green); }
.kpi-value.yellow,
.kpi-value.amber { color: var(--amber); }
.kpi-value.red { color: var(--red); }

.kpi-sub {
  margin-top: 4px;
  font-size: 0.74rem;
  color: var(--muted);
}

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

.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-danger,
.steam-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.06s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn:active,
.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active,
.btn-danger:active,
.steam-btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-ghost:disabled,
.btn-danger:disabled,
.steam-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 6px 18px rgba(88, 101, 242, 0.28);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-3);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-soft);
  padding: 8px 12px;
  font-size: 0.82rem;
}

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

.btn-danger {
  background: var(--red-soft);
  border-color: rgba(240, 68, 56, 0.35);
  color: #ff8f86;
}

.btn-danger:hover {
  background: rgba(240, 68, 56, 0.2);
  color: #ffb3ad;
}

.btn-sm {
  padding: 7px 11px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

.steam-btn {
  background: #1b2838;
  border-color: #2a475e;
  color: #fff;
}

.steam-btn:hover {
  background: #2a475e;
  color: #fff;
}

/* ---------------------------------------------------------------- Campos --- */

.field {
  margin-bottom: 16px;
}

.field label,
.field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-soft);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-deep);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input::placeholder,
textarea::placeholder {
  color: #565d60;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input[type='number'] {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.field-hint {
  margin-top: 6px;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Etiqueta con control a la derecha (por ejemplo, el selector de unidad) */
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.label-row > label {
  margin-bottom: 0;
}

.unit-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
}

.unit-switch button {
  padding: 4px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.unit-switch button:hover {
  color: var(--text);
}

.unit-switch button.active {
  background: var(--surface-3);
  color: var(--text);
}

/* Total de la operacion, justo encima del boton principal */
.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.total-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.total-value {
  font-family: var(--mono);
  font-size: 1.32rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Pie discreto de la tarjeta */
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.73rem;
  color: var(--faint);
}

.field-hint a {
  color: var(--accent);
  font-weight: 500;
}

.field-error {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #ff8f86;
}

/* ------------------------------------------------------------------ Tabs --- */

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.tabs button {
  flex: 1;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tabs button:hover {
  color: var(--text);
}

.tabs button.active {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 1px 3px rgba(0, 0, 0, 0.4);
}

.tabs button.active.sell {
  background: var(--green-soft);
  color: #7ef0b6;
  box-shadow: 0 0 0 1px rgba(38, 208, 124, 0.28) inset;
}

/* ---------------------------------------------------------- Cotizacion ----- */

.quote {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-deep);
}

.quote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.quote-row + .quote-row {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.quote-row span:last-child {
  color: var(--text);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.quote-row:last-child span:last-child {
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--green);
}

/* ---------------------------------------------------------------- Avisos --- */

.alert {
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.alert strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.86rem;
}

.alert-info {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: #d3d7ff;
}

.alert-info strong {
  color: #fff;
}

.alert-ok {
  background: var(--green-soft);
  border-color: rgba(38, 208, 124, 0.3);
  color: #b6f3d5;
}

.alert-ok strong {
  color: #eafff4;
}

.alert-warn {
  background: var(--amber-soft);
  border-color: rgba(249, 156, 0, 0.3);
  color: #ffdca6;
}

.alert-warn strong {
  color: #fff2d9;
}

.alert-error {
  background: var(--red-soft);
  border-color: rgba(240, 68, 56, 0.32);
  color: #ffb4ae;
}

.alert-error strong {
  color: #ffe3e1;
}

/* --------------------------------------------------------------- Badges ---- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  white-space: nowrap;
}

.badge-live {
  border-color: rgba(38, 208, 124, 0.32);
  background: var(--green-soft);
  color: #7ef0b6;
}

.badge-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(38, 208, 124, 0.16);
}

.badge-mock {
  border-color: rgba(249, 156, 0, 0.32);
  background: var(--amber-soft);
  color: #ffcf7d;
}

.badge-dim {
  background: transparent;
  color: var(--muted);
}

/* ---------------------------------------------------------------- Tablas --- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  font-weight: 600;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

td.num,
td.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* --------------------------------------------------- Pasos y estados ------- */

.steps-help {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: paso;
}

.steps-help li {
  position: relative;
  padding: 0 0 16px 34px;
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

.steps-help li::before {
  counter-increment: paso;
  content: counter(paso);
  position: absolute;
  left: 0;
  top: -1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: #c3c9ff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps-help li::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 4px;
  width: 1px;
  background: var(--border);
}

.steps-help li:last-child {
  padding-bottom: 0;
}

.steps-help li:last-child::after {
  display: none;
}

.steps-help strong {
  color: var(--text);
}

/* Linea de tiempo de una orden */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 18px 26px;
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
}

.timeline li::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 2px;
  width: 1px;
  background: var(--border);
}

.timeline li:last-child::after {
  display: none;
}

.timeline li.done {
  color: var(--text-soft);
}

.timeline li.done::before {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(38, 208, 124, 0.14);
}

.timeline li.current {
  color: var(--text);
  font-weight: 600;
}

.timeline li.current::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Etiqueta de estado de una orden */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: var(--pill);
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
}

/* ------------------------------------------------------------------ Prosa -- */

.prose {
  max-width: 74ch;
}

.prose h2 {
  margin-top: 1.6em;
  font-size: 1.25rem;
}

.prose h3 {
  margin-top: 1.3em;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 0.92rem;
}

.prose ul {
  padding-left: 1.2em;
}

.prose strong {
  color: var(--text-soft);
}

/* -------------------------------------------------------------- Codigo ----- */

.code-box {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-deep);
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #d7e2ff;
  word-break: break-all;
  line-height: 1.5;
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-row .code-box {
  flex: 1;
  min-width: 0;
}

/* --------------------------------------------------------------- Footer ---- */

.footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 -20px;
  padding: 20px 20px 26px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--faint);
}

.footer a {
  color: var(--muted);
  font-size: 0.8rem;
}

.footer a:hover {
  color: var(--text);
}

/* --------------------------------------------------------------- Grafica --- */

.chart {
  width: 100%;
  height: 240px;
  display: block;
}

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

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 22px;
  }

  .hero p {
    max-width: 62ch;
  }

  .split {
    grid-template-columns: 1fr;
  }

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

  /* Sin sitio para el marcador de precios: sobra con las cifras del hero. */
  .ticker {
    display: none;
  }
}

@media (max-width: 880px) {
  /* La navegacion completa no cabe en una fila: pasa a una segunda linea
     desplazable, en lugar de desaparecer. */
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 9px 0 7px;
    gap: 8px;
  }

  .header-spacer {
    display: none;
  }

  .brand {
    margin-right: auto;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14.5px;
  }

  .shell {
    padding: 0 14px;
  }

  .header {
    margin: 0 -14px;
    padding: 0 14px;
  }

  .header-inner {
    height: auto;
    gap: 10px;
    padding: 8px 0 6px;
  }

  .ticker {
    font-size: 0.72rem;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .panel {
    padding: 16px;
    border-radius: var(--radius-md);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 18px;
  }

  .footer {
    margin: 0 -14px;
    padding: 18px 14px 22px;
  }

  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .steam-btn {
    width: 100%;
  }

  .row .btn-ghost,
  .row-between .btn-ghost {
    width: auto;
  }
}

/* ------------------------------------------------------------- Utilidad ---- */

.keep {
  min-width: 0;
}

/* Los hijos de una rejilla o de un flex no deben poder ensanchar la pagina:
   sin esto, un texto largo o un campo ancho desbordan en movil. */
.shell > *,
.hero > *,
.split > *,
.grid > *,
.row > *,
.row-between > * {
  min-width: 0;
}

/* ------------------------------------------------------ Pantalla de carga -- */

.boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 70vh;
  text-align: center;
}

.boot-mark {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  opacity: 0.9;
  animation: latido 1.6s ease-in-out infinite;
}

.boot p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

@keyframes latido {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* -------------------------------------------------------- Pasos de orden --- */

.step-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 620;
  color: var(--text);
  margin-bottom: 2px;
}

.step-note {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
