:root {
      --bg: #10161d;
      --bgDeep: #090d12;
      --card: #151b22;
      --card2: #1b222b;
      --text: #f4f6f8;
      --muted: #9aa4af;
      --muted2: #c7cdd4;
      --border: #2b343f;
      --accent: #6001d2;
      --accentHover: #7b2cff;
      --cyan: #2dd4ff;
      --accentSoft: rgba(96, 1, 210, 0.16);
      --accentSoftStrong: rgba(96, 1, 210, 0.26);
      --good: #00b386;
      --bad: #ff4d5f;
      --warning: #f7b500;
      --shadow: rgba(0, 0, 0, 0.38);
    }

    * { box-sizing: border-box; }

    html { font-family: "Rubik", Arial, sans-serif; }

    body {
      margin: 0;
      padding: 24px;
      font-family: inherit;
      color: var(--text);
      background: linear-gradient(180deg, #090d12 0%, #10161d 38%, #121820 100%);
    }

    .container {
      max-width: 1220px;
      margin: 0 auto;
    }

    .container::before {
      display: none;
    }

    h1 {
      margin: 0 0 8px;
      font-size: 34px;
      letter-spacing: -0.5px;
      font-weight: 800;
    }

    h2 {
      margin: 0 0 12px;
      font-size: 22px;
      font-weight: 700;
    }

    .subtitle {
      color: var(--muted);
      margin: 0 0 28px;
      line-height: 1.5;
    }

    .module-switcher {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin: -10px 0 28px;
    }

    .module-button {
      position: relative;
      width: auto;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 11px 16px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: #151b22;
      color: var(--muted2);
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      transition: 0.2s ease;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    }

    .module-button:hover {
      transform: translateY(-1px);
      border-color: rgba(0, 179, 134, 0.42);
      color: var(--text);
      background: #1a222b;
    }

    .module-button.active {
      background: rgba(0, 179, 134, 0.13);
      border-color: rgba(0, 179, 134, 0.46);
      color: var(--good);
    }
    .module-button,
    .module-button:hover,
    .module-button:focus,
    .module-button:visited {
      text-decoration: none;
}

    .info-dot {
      position: relative;
      width: 18px;
      height: 18px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(45, 212, 255, 0.12);
      color: var(--cyan);
      border: 1px solid rgba(45, 212, 255, 0.35);
      font-size: 12px;
      font-weight: 800;
      line-height: 1;
    }

    .info-dot::after {
      content: attr(data-tooltip);
      position: absolute;
      left: 50%;
      bottom: calc(100% + 10px);
      transform: translateX(-50%) translateY(4px);
      width: max-content;
      max-width: 260px;
      padding: 9px 11px;
      border-radius: 10px;
      background: #0f151c;
      color: var(--text);
      border: 1px solid var(--border);
      box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.35;
      opacity: 0;
      pointer-events: none;
      transition: 0.18s ease;
      z-index: 20;
      white-space: normal;
      text-align: left;
    }

    .info-dot:hover::after,
    .module-button:focus .info-dot::after {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    .card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 22px;
      box-shadow: 0 10px 28px var(--shadow);
    }

    input,
    select,
    button {
      font-family: inherit;
    }

    input,
    select {
      width: 100%;
      padding: 12px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: #0f151c;
      color: var(--text);
      font-size: 16px;
    }

    input:focus,
    select:focus,
    button:focus {
      outline: 2px solid rgba(0, 179, 134, 0.28);
      border-color: var(--good);
      outline-offset: 3px;
    }

    .note {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.5;
      margin-top: 16px;
    }

    .compact-calculator {
      margin: 16px 0 22px;
      padding: 16px;
      border-radius: 16px;
      background: linear-gradient(180deg, #18202a, var(--card2));
      border: 1px solid var(--border);
    }

    .compact-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 14px;
    }

    .compact-header strong {
      display: block;
      font-size: 17px;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 4px;
    }

    .compact-header p {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.45;
    }

    .compact-form-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
    }

    .compact-field {
      background: #151b22;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 12px;
    }

    .compact-field label {
      display: block;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 10px;
    }

    .compact-field select {
      min-height: 43px;
      font-size: 15px;
      font-weight: 700;
    }

    .stepper-control {
      min-height: 43px;
      display: grid;
      grid-template-columns: 34px 1fr 34px;
      align-items: center;
      gap: 8px;
    }

    .stepper-control input {
      min-width: 0;
      width: 100%;
      height: 43px;
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: #0f151c;
      color: var(--text);
      font-size: 15px;
      font-weight: 700;
      letter-spacing: 0;
      text-align: center;
      box-shadow: none;
    }

    .stepper-control input:focus {
      outline: 2px solid rgba(0, 179, 134, 0.28);
      border-color: var(--good);
      outline-offset: 3px;
      box-shadow: none;
    }

    .step-btn {
      width: 34px;
      height: 34px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: #0f151c;
      color: var(--text);
      font-size: 19px;
      font-weight: 800;
      line-height: 1;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: 0.2s ease;
      padding: 0;
    }

    .step-btn:hover {
      transform: translateY(-1px);
      border-color: rgba(0, 179, 134, 0.42);
      background: #19212a;
    }

    .step-btn.plus {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }

    .step-btn.plus:hover {
      background: var(--accentHover);
      border-color: var(--accentHover);
    }

    .secondary-restore-button {
      width: auto;
      white-space: nowrap;
      padding: 10px 14px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: #0f151c;
      color: var(--muted2);
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .secondary-restore-button:hover {
      transform: translateY(-1px);
      border-color: rgba(0, 179, 134, 0.42);
      color: var(--text);
      background: #19212a;
    }

    .simple-tab-context {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 12px;
      align-items: center;
      margin: 14px 0 10px;
      padding: 14px;
      border-radius: 14px;
      background: rgba(0, 179, 134, 0.09);
      border: 1px solid rgba(0, 179, 134, 0.22);
    }

    .simple-tab-context strong {
      color: var(--good);
    }

    .simple-tab-context p {
      margin: 0;
      color: var(--muted2);
      font-size: 14px;
      line-height: 1.45;
    }

    .tab-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px 11px;
      border-radius: 999px;
      background: rgba(0, 179, 134, 0.14);
      border: 1px solid rgba(0, 179, 134, 0.28);
      color: var(--good);
      font-weight: 800;
      white-space: nowrap;
    }

    .assumptions-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin-top: 16px;
    }

    .assumption-item,
    .summary-item {
      background: linear-gradient(180deg, #18202a, var(--card2));
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px;
    }

    .assumption-item span,
    .summary-item span {
      display: block;
      color: var(--muted);
      font-size: 13px;
      margin-bottom: 8px;
    }

    .assumption-item strong,
    .summary-item strong {
      display: block;
      font-size: 18px;
      line-height: 1.25;
    }

    .summary-row {
      display: grid;
      grid-template-columns: 1.25fr 1fr 1fr 1fr;
      gap: 12px;
      margin-top: 18px;
    }

    .summary-item select {
      min-height: 44px;
      font-size: 15px;
      font-weight: 700;
    }

    #selectedAssetValue,
    #comparisonInvested {
      color: var(--cyan);
    }

    .comparison-toolbar {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: center;
      margin: 22px 0 20px;
    }

    .comparison-toolbar p {
      margin: 6px 0 0;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.45;
    }

    .restore-button {
      width: auto;
      min-width: 140px;
      padding: 11px 16px;
      border-radius: 999px;
      border: 1px solid var(--accent);
      background: var(--accent);
      color: #fff;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      transition: 0.2s ease;
    }

    .restore-button:hover {
      background: var(--accentHover);
      transform: translateY(-1px);
    }

    .asset-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
    }

    .asset-card {
      background: #151b22;
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 18px;
      transition: 0.2s ease;
      position: relative;
      overflow: hidden;
    }

    .asset-card:hover {
      transform: translateY(-2px);
      border-color: rgba(0, 179, 134, 0.35);
      background: #19212a;
    }

    .asset-card.selected {
      border-color: rgba(0, 179, 134, 0.72);
      box-shadow: 0 0 0 1px rgba(0, 179, 134, 0.1), 0 12px 30px rgba(0, 0, 0, 0.28);
    }

    .asset-card.selected::after {
      content: "Seleccionado";
      position: absolute;
      top: 12px;
      right: 12px;
      font-size: 11px;
      background: rgba(0, 179, 134, 0.16);
      color: var(--good);
      padding: 5px 8px;
      border-radius: 999px;
      font-weight: 800;
    }

    .asset-header {
      display: flex;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 12px;
    }

    .asset-icon {
      font-size: 22px;
      width: 32px;
      text-align: center;
      flex: 0 0 auto;
    }

    .asset-title {
      flex: 1;
      min-width: 0;
      padding-right: 34px;
    }

    .asset-title h3 {
      margin: 0;
      font-size: 18px;
      line-height: 1.2;
    }

    .asset-rate-control {
      margin-top: 12px;
    }

    .asset-rate-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .asset-rate-top strong {
      color: var(--text);
      white-space: nowrap;
    }

    .asset-rate-slider {
      --slider-progress: 0%;
      appearance: none;
      -webkit-appearance: none;
      width: 100%;
      height: 9px;
      padding: 0;
      border: 0;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--good) var(--slider-progress), #2a3440 var(--slider-progress));
      cursor: pointer;
    }

    .asset-rate-slider::-webkit-slider-thumb {
      appearance: none;
      -webkit-appearance: none;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--good);
      border: 3px solid #10161d;
      box-shadow: 0 0 0 2px rgba(0, 179, 134, 0.35);
    }

    .asset-rate-slider::-moz-range-thumb {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--good);
      border: 3px solid #10161d;
      box-shadow: 0 0 0 2px rgba(0, 179, 134, 0.35);
    }

    .asset-rate-limits {
      display: flex;
      justify-content: space-between;
      color: var(--muted);
      font-size: 12px;
      margin-top: 7px;
    }

    .asset-value {
      font-size: 28px;
      letter-spacing: -0.5px;
      margin-top: 12px;
      margin-bottom: 8px;
      color: var(--cyan);
      font-weight: 800;
    }

    .asset-value.negative-value {
      color: var(--bad);
    }

    .asset-value.extreme-color {
      color: #b579ff;
    }

    .asset-metrics {
      color: var(--muted2);
      font-weight: 700;
      font-size: 14px;
      line-height: 1.6;
    }

    .asset-metrics span {
      color: var(--text);
    }

    .asset-metrics .profitability-value {
      color: var(--good);
    }

    .risk-pill {
      display: inline-block;
      margin-top: 10px;
      padding: 5px 9px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 800;
    }

    .risk-low {
      background: rgba(0, 179, 134, 0.14);
      color: var(--good);
    }

    .risk-medium {
      background: rgba(247, 181, 0, 0.15);
      color: var(--warning);
    }

    .risk-high {
      background: rgba(255, 77, 95, 0.15);
      color: var(--bad);
    }

    .risk-extreme {
      background: rgba(181, 121, 255, 0.16);
      color: #b579ff;
    }

    .asset-reference {
      margin-top: 12px;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.4;
    }

    .asset-description {
      margin-top: 8px;
      color: var(--muted2);
      font-size: 13px;
      line-height: 1.45;
    }

    .asset-bar {
      height: 7px;
      background: #0f151c;
      border-radius: 999px;
      overflow: hidden;
      margin-top: 14px;
    }

    .asset-bar-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--cyan), var(--good));
      border-radius: 999px;
      transition: width 0.2s ease;
    }

    @media (max-width: 1050px) {
      .asset-grid { grid-template-columns: repeat(2, 1fr); }
      .summary-row, .assumptions-grid, .compact-form-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 700px) {
      body { padding: 16px; }
      h1 { font-size: 28px; }
      .comparison-toolbar { flex-direction: column; align-items: stretch; }
      .restore-button { width: 100%; }
      .asset-grid, .summary-row, .assumptions-grid, .simple-tab-context, .compact-form-grid { grid-template-columns: 1fr; }
      .compact-header { flex-direction: column; align-items: stretch; }
      .secondary-restore-button { width: 100%; }
    }

    @media (max-width: 640px) {
      .module-switcher { display: grid; grid-template-columns: 1fr; }
      .module-button { width: 100%; }
      .info-dot::after { left: auto; right: 0; transform: translateY(4px); }
      .info-dot:hover::after,
      .module-button:focus .info-dot::after { transform: translateY(0); }
    }
      .logo-wrapper {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      margin-bottom: 25px;
}

    .site-logo {
     max-width: 250px;
     height: auto;
     display: block;
}
.logo {
      display: flex;
      align-items: center;
      gap: 15px;
      background: transparent;
      font-family: "Montserrat", Arial, sans-serif;
      margin-bottom: 20px;
}

/* ICONO PRINCIPAL */
    .logo-icon {
      width: 130px;
      height: 90px;
      position: relative;
      border-radius: 24px;
      background: linear-gradient(135deg, #007c89 0%, #00a878 55%, #37d873 100%);
      box-shadow: 0 14px 30px rgba(0, 130, 110, 0.18);
      overflow: hidden;
}

/* Capa interior suave */
    .logo-icon::before {
      content: "";
      position: absolute;
      inset: 5px;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.08);
      border: 2px solid rgba(255, 255, 255, 0.22);
}

/* CONTENEDOR DE VELAS */
    .candles {
      position: absolute;
      inset: 12px 12px 2px 13px;
      z-index: 2;
}

/* VELAS */
    .candle {
      position: absolute;
      bottom: 16px;
      width: 12px;
      border-radius: 4px;
      background: rgba(255, 255, 255, 0.95);
}

/* Mechas de las velas */
    .candle::before,
    .candle::after {
      content: "";
      position: absolute;
      left: 50%;
      width: 3px;
      background: rgba(255, 255, 255, 0.95);
      border-radius: 4px;
      transform: translateX(-50%);
}

    .candle::before {
      top: -8px;
      height: 9px;
}

    .candle::after {
      bottom: -7px;
      height: 9px;
}

/* 6 velas siempre en ascenso */
    .candle-1 {
      left: 1px;
      height: 12px;
      opacity: 0.72;
}

    .candle-2 {
      left: 18px;
      height: 20px;
      opacity: 0.78;
}

    .candle-3 {
      left: 36px;
      height: 28px;
      opacity: 0.82;
}

    .candle-4 {
      left: 54px;
      height: 36px;
      opacity: 0.86;
}

    .candle-5 {
      left: 72px;
      height: 42px;
      opacity: 0.88;
}

    .candle-6 {
      left: 90px;
      height: 50px;
      opacity: 0.96;
}

/* TEXTO */
    .logo-text h1 {
      margin: 0;
      font-size: 32px;
      line-height: 1;
      font-weight: 800;
      letter-spacing: -1px;
}

    .logo-text .light {
      color: #A9CFC1;
}

    .logo-text .green {
      color: #00a86b;
}

    .logo-text p {
      margin: 3px 0 0;
      font-size: 12px;
      font-weight: 400;
      color: #A9CFC1;
      letter-spacing: 1px;
}
.site-footer {
  max-width: 1220px;
  margin: 34px auto 0;
  padding: 22px 0 6px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.footer-brand {
  margin: 0;
  color: var(--muted2);
  font-size: 14px;
  font-weight: 700;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted2);
  font-size: 14px;
  font-weight: 700;
}
.footer-email {
  color: #00a86b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.footer-email:hover {
  color: #00b386;
  text-decoration: none;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 700px) {
  .site-footer {
    margin-left: 16px;
    margin-right: 16px;
  }
}