/* Demostraciones interactivas (programados, listas, avisos, herramientas). Usan también reportes.css para el panel
   «Juega», la portada y la tabla de planes. El teléfono dibujado imita la app (src/constants/msl-theme.ts). */

.d-hero-visual {
  display: flex;
  justify-content: center;
}

.d-hero-visual .mock {
  width: min(380px, 100%);
  transform: rotate(-2deg);
}

/* ---------- Teléfono ---------- */
.d-phone {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 48px;
  background: #0d1f17;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #24382e;
}

.d-screen {
  position: relative;
  min-height: 660px;
  border-radius: 38px;
  background: var(--background);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.d-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 26px 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text);
}

.d-status::after {
  content: "";
  width: 22px;
  height: 11px;
  border-radius: 3px;
  border: 1.5px solid currentColor;
  box-shadow: inset 14px 0 0 -1px currentColor;
}

.d-appbar {
  padding: 6px 18px 10px;
}

.d-appbar small {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.d-appbar h3 {
  margin: 2px 0 0;
  font-size: 1.35rem;
  color: var(--accent-strong);
}

.d-body {
  flex: 1;
  padding: 0 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.d-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 14px;
}

.d-card h4 {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.d-green {
  background: linear-gradient(135deg, #0f3d2c, #14523a);
  color: #fff;
  border: 0;
}

.d-green h4,
.d-green small {
  color: rgba(255, 255, 255, 0.75);
}

.d-big {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.d-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.d-row:last-child {
  border-bottom: 0;
}

.d-row .d-ico {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  font-size: 1.05rem;
}

.d-row .d-main {
  flex: 1;
  min-width: 0;
}

.d-row .d-main b {
  display: block;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d-row .d-main small {
  color: var(--muted);
  font-size: 0.78rem;
}

.d-row .d-amt {
  font-weight: 800;
  white-space: nowrap;
}

.d-in {
  color: var(--income);
}

.d-out {
  color: var(--expense);
}

.d-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--accent-soft);
  color: var(--accent-strong);
  white-space: nowrap;
}

.d-pill.warn {
  background: #fbf1d9;
  color: #a9780a;
}

.d-pill.bad {
  background: #fbe7e5;
  color: var(--expense);
}

.d-btn {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  min-height: 40px;
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  background: var(--accent-strong);
  color: #fff;
  cursor: pointer;
}

.d-btn.ghost {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.d-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.d-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.d-empty {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 8px 0;
}

.d-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.d-field input,
.d-field select {
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 12px;
  min-height: 44px;
  background: #fff;
  width: 100%;
  min-width: 0;
}

.d-field input:focus,
.d-field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.d-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.d-fields .full {
  grid-column: 1 / -1;
}

.d-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 14px 8px;
}

.d-chips button {
  flex: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  min-height: 36px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.d-chips button[aria-pressed="true"] {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

/* Hoja que sube desde abajo dentro del teléfono. */
.d-sheet {
  position: absolute;
  inset: auto 0 0;
  background: #fff;
  border-radius: 26px 26px 0 0;
  padding: 18px 16px 22px;
  box-shadow: 0 -10px 40px rgba(13, 31, 23, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 5;
  animation: d-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.d-sheet h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--accent-strong);
}

.d-sheet[hidden],
.d-scrim[hidden] {
  display: none;
}

.d-scrim {
  position: absolute;
  inset: 0;
  background: rgba(13, 31, 23, 0.35);
  z-index: 4;
}

@keyframes d-up {
  from {
    translate: 0 100%;
  }
}

.d-toast {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 16px;
  z-index: 6;
  background: var(--accent-strong);
  color: #fff;
  border-radius: 16px;
  padding: 11px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  animation: d-up 0.3s ease;
}

.d-toast[hidden] {
  display: none;
}

.d-new {
  animation: d-new 1.6s ease;
}

@keyframes d-new {
  0%,
  30% {
    background-color: rgba(47, 168, 119, 0.22);
  }
}

/* Panel: botones de acción. */
.d-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.d-actions .d-btn {
  flex: 1 1 auto;
}

.d-panel-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

/* «Conoce más» al final de cada página. */
.d-more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.d-more a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.d-more a:hover {
  border-color: var(--accent);
}

.d-more a[aria-current] {
  display: none;
}

@media (max-width: 640px) {
  .d-phone {
    padding: 8px;
    border-radius: 40px;
  }

  .d-screen {
    border-radius: 33px;
    min-height: 600px;
  }

  .d-big {
    font-size: 1.5rem;
  }
}

@media (max-width: 360px) {
  .d-fields {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .d-sheet,
  .d-toast,
  .d-new {
    animation: none;
  }
}

/* ---------- Listas ---------- */
.l-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.l-item:last-child {
  border-bottom: 0;
}

.l-item .d-main b {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
}

.l-item .d-main small {
  color: var(--muted);
  font-size: 0.75rem;
}

.l-item.on .d-main b {
  text-decoration: line-through;
  color: var(--muted);
}

.l-check {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.l-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.l-check span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid #9fc4b1;
  display: grid;
  place-items: center;
  transition: background 0.15s;
}

.l-check input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
}

.l-check input:checked + span::after {
  content: "✓";
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

.l-check input:focus-visible + span {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.l-price {
  display: flex;
  align-items: center;
  gap: 1px;
  font-weight: 800;
  color: var(--muted);
}

.l-price input {
  width: 62px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--background);
  font: inherit;
  font-weight: 800;
  color: var(--text);
  padding: 6px;
  min-height: 36px;
  text-align: right;
}

.l-price input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.l-del {
  flex: none;
  width: 32px;
  height: 36px;
  border: 0;
  background: none;
  color: #9fb3a9;
  font-size: 1.25rem;
  cursor: pointer;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.l-add {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.l-add input {
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  min-height: 42px;
}

.l-add input:first-child {
  flex: 1;
}

.l-add input[type="number"] {
  width: 76px;
}

.l-add .d-btn {
  padding: 8px 14px;
}

.l-bar {
  position: sticky;
  bottom: 0;
  margin: 0 -14px -18px;
  padding: 12px 16px 16px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.l-bar > div {
  flex: 1;
  min-width: 0;
}

.l-bar small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.l-bar strong {
  font-size: 1.3rem;
  color: var(--accent-strong);
}

.l-accounts {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f3d2c, #14523a);
  color: #fff;
}

.l-accounts > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
  border-radius: 8px;
}

.l-accounts span {
  opacity: 0.8;
}

.l-acc-head {
  font-size: 1rem !important;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.l-last {
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  flex-wrap: wrap;
}

.r-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.r-quick button {
  border: 1px solid var(--border);
  background: var(--background);
  border-radius: 999px;
  padding: 7px 12px;
  min-height: 38px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-strong);
  cursor: pointer;
}

/* ---------- Avisos ---------- */
.a-lock {
  min-height: 660px;
  background: radial-gradient(circle at 30% 10%, #2fa877, transparent 55%), radial-gradient(circle at 80% 80%, #2f6fd0, transparent 50%), #0f3d2c;
  color: #fff;
}

.a-lock .d-status {
  color: #fff;
}

.a-time {
  text-align: center;
  font-size: 4.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 26px;
}

.a-date {
  text-align: center;
  font-weight: 600;
  opacity: 0.85;
  margin-top: 6px;
  text-transform: capitalize;
}

.a-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 12px 20px;
}

.a-notif {
  background: rgba(255, 255, 255, 0.86);
  color: #0d1f17;
  border-radius: 20px;
  padding: 11px 14px 12px;
  backdrop-filter: blur(10px);
  animation: a-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.a-app {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #4b5f55;
  margin-bottom: 4px;
}

.a-app img {
  border-radius: 5px;
}

.a-app span {
  margin-left: auto;
  font-weight: 600;
  letter-spacing: 0;
}

.a-notif b {
  display: block;
  font-size: 0.92rem;
}

.a-notif p {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: #33463c;
}

.a-none {
  text-align: center;
  opacity: 0.75;
  font-weight: 600;
  padding: 20px 0;
}

@keyframes a-in {
  from {
    opacity: 0;
    translate: 0 -12px;
    scale: 0.97;
  }
}

.a-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 10px;
  text-align: center;
}

.a-wd {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}

.a-day {
  position: relative;
  aspect-ratio: 1;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #9fb3a9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.a-day small {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.a-day.has {
  background: var(--accent-soft);
  color: var(--accent-strong);
  cursor: pointer;
}

.a-day.sel {
  background: var(--accent-strong);
  color: #fff;
}

.a-day.sel small {
  color: rgba(255, 255, 255, 0.8);
}

.a-day i {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  background: #d9822b;
  color: #fff;
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 17px;
  padding: 0 4px;
}

.a-toggles {
  display: grid;
  gap: 2px;
  margin-top: 6px;
}

.a-toggles .r-switch {
  justify-content: space-between;
  color: var(--text);
  width: 100%;
}

.a-toggles .r-switch span {
  order: 2;
  flex: none;
}

.a-hours {
  padding: 4px 0 0;
}

.a-cards {
  display: grid;
  grid-template-columns: 1fr 64px 64px;
  gap: 6px 8px;
  align-items: center;
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

.a-cards small {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.a-cards input {
  width: 100%;
  font: inherit;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  min-height: 40px;
}

/* ---------- Herramientas ---------- */
.h-form {
  display: grid;
  gap: 10px;
}

.h-presets {
  display: flex;
  gap: 6px;
}

.h-presets button {
  flex: 1;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  min-height: 38px;
  font: inherit;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
}

.h-presets button[aria-pressed="true"] {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.h-res {
  display: grid;
  gap: 6px;
}

.h-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 0.9rem;
}

.h-line span {
  opacity: 0.8;
}

.h-line.big b {
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.h-verdict {
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  margin-bottom: 4px;
}

.h-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 110px;
}

.h-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(to top, #c9ddd1 var(--p), var(--accent) var(--p));
}

.h-checks {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.88rem;
  font-weight: 700;
}

.h-checks label,
.h-subs label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  cursor: pointer;
}

.h-subs input,
.h-checks input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex: none;
}

.h-info {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.h-info strong {
  display: block;
  margin-bottom: 4px;
}

.h-info p {
  margin: 0;
  font-size: 0.92rem;
}

.h-tools {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.h-tools button {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--background);
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 48px;
  font: inherit;
  cursor: pointer;
}

.h-tools button b {
  display: block;
  color: var(--accent-strong);
  font-size: 0.92rem;
}

.h-tools button small {
  color: var(--muted);
  font-size: 0.8rem;
}

.h-tools button > span:first-child {
  font-size: 1.2rem;
}

@media (prefers-reduced-motion: reduce) {
  .a-notif {
    animation: none;
  }
}

/* Portada con captura de la app. */
.d-shot {
  width: 290px;
  border-radius: 34px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-3deg);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.d-hero-visual:hover .d-shot {
  transform: rotate(0) translateY(-6px);
}

.d-hero-lock {
  width: 300px;
  border-radius: 40px;
  padding: 30px 12px 26px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-3deg);
}

.d-hero-lock .a-time {
  margin-top: 0;
  font-size: 3.4rem;
}

@media (max-width: 960px) {
  .d-shot {
    width: 240px;
  }

  .d-hero-lock {
    width: min(300px, 100%);
  }
}

/* Ajustes: altura fija del teléfono con scroll interno, campos ocultos, renglones. */
.d-screen {
  height: 720px;
  min-height: 0;
}

.d-screen > .d-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.d-field[hidden],
.r-check[hidden] {
  display: none !important;
}

.r-control .d-field {
  align-items: stretch;
  justify-content: flex-start;
  font-size: 0.8rem;
}

.l-item .d-main {
  flex: 1;
  min-width: 0;
}

.p-confirm {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: end;
  padding-bottom: 10px;
}

.p-confirm .d-btn {
  padding: 9px 12px;
  min-height: 44px;
}

.a-date {
  text-transform: none;
}

@media (max-width: 640px) {
  .d-screen {
    height: min(640px, calc(100svh - 120px));
    min-height: 520px;
  }

  .a-lock {
    min-height: 0;
  }
}

/* El avisito va arriba para no tapar los botones de abajo. */
.d-toast {
  top: 44px;
  bottom: auto;
}

@keyframes d-down {
  from {
    translate: 0 -20px;
    opacity: 0;
  }
}

.d-toast:not([hidden]) {
  animation: d-down 0.3s ease;
}

/* ---------- Calculadoras gratis (herramientas.html) ---------- */
.t-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.t-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.t-pick:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.t-pick b {
  display: block;
  color: var(--accent-strong);
  font-size: 0.95rem;
  line-height: 1.25;
}

.t-pick small {
  color: var(--muted);
  font-size: 0.8rem;
}

.t-ico {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  font-size: 1.25rem;
}

.t-pick[aria-pressed="true"] {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px var(--accent-strong), var(--shadow);
}

.t-pick[aria-pressed="true"] .t-ico {
  background: var(--accent-strong);
}

.t-work {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 90px;
}

.t-form h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--accent-strong);
}

.t-form > p {
  margin: 4px 0 18px;
}

.t-form .d-fields {
  gap: 14px;
}

.t-form .d-field small {
  font-weight: 500;
  font-size: 0.78rem;
}

.t-gap {
  margin: 14px 0;
}

.t-side {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 90px;
}

.t-res {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0f3d2c, #14523a);
  color: #fff;
}

.t-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.t-line span {
  opacity: 0.8;
}

.t-line b {
  text-align: right;
}

.t-line.big b {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.t-verdict {
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.t-verdict.ok {
  background: rgba(127, 224, 168, 0.25);
}

.t-verdict.bad {
  background: rgba(255, 140, 130, 0.28);
}

.t-bars {
  height: 130px;
  margin-top: 4px;
  padding: 12px 12px 0;
  background: var(--background);
  border-radius: 16px 16px 0 0;
}

.t-axis {
  display: flex;
  justify-content: space-between;
  padding: 4px 12px 10px;
  background: var(--background);
  border-radius: 0 0 16px 16px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
  margin-top: -12px;
}

.t-how,
.t-app {
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
}

.t-how {
  background: var(--background);
  color: var(--muted);
}

.t-how strong {
  color: var(--text);
}

.t-how p,
.t-app p {
  margin: 4px 0 0;
}

.t-app {
  display: flex;
  gap: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.t-app > span {
  font-size: 1.4rem;
}

.t-app a {
  display: inline-block;
  margin-top: 6px;
  font-weight: 800;
  text-decoration: none;
}

.t-subs {
  display: grid;
  gap: 8px;
}

.t-sub {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 90px 92px;
  gap: 8px;
  align-items: center;
}

.t-sub input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.t-sub input[type="text"],
.t-sub input[type="number"],
.t-sub select {
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 42px;
  min-width: 0;
  width: 100%;
  background: #fff;
  color: var(--text);
}

.t-add {
  margin-top: 12px;
}

.t-perks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.t-perks article {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.t-perks span {
  font-size: 1.7rem;
}

.t-perks h3 {
  margin: 10px 0 6px;
  color: var(--accent-strong);
  font-size: 1.1rem;
}

.t-perks p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.t-free-note {
  text-align: center;
  margin-top: 20px !important;
}

@media (max-width: 960px) {
  .t-work {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .t-side {
    position: static;
  }

  .t-perks {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .t-picker {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px 18px;
    padding: 2px 16px 6px;
    scroll-snap-type: x mandatory;
  }

  .t-pick {
    flex: 0 0 72%;
    scroll-snap-align: start;
  }

  .t-work {
    padding: 16px;
    border-radius: 20px;
  }

  .t-line.big b {
    font-size: 1.6rem;
  }

  .t-perks {
    grid-template-columns: 1fr;
  }

  .t-sub {
    grid-template-columns: 22px minmax(0, 1fr) 76px;
  }

  .t-sub select {
    grid-column: 2 / -1;
  }
}

/* ---------- Comparador de inversiones (inversiones.html) ---------- */
.i-hero {
  width: min(360px, 100%);
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, #0f3d2c, #14523a);
  color: #fff;
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.d-hero-visual:hover .i-hero {
  transform: rotate(0) translateY(-6px);
}

.i-hero small {
  opacity: 0.75;
  font-weight: 700;
}

.i-hero strong {
  display: block;
  font-size: 2.4rem;
  letter-spacing: -0.02em;
}

.i-hero-gain {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(127, 224, 168, 0.25);
  font-weight: 800;
  font-size: 0.85rem;
}

.i-hero svg {
  display: block;
  width: 100%;
  height: 70px;
  margin: 14px 0 8px;
}

.i-hero path {
  fill: none;
  stroke: #9be7bd;
  stroke-width: 3;
  stroke-linejoin: round;
}

.i-hero-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.92rem;
}

.i-list {
  display: grid;
  gap: 12px;
}

.i-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--c);
  border-radius: 16px;
  background: var(--background);
}

.i-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.i-card-head i,
.i-row i {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
  display: inline-block;
}

.i-card-head input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--accent-strong);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 8px;
  background: transparent;
}

.i-card-head input:hover,
.i-card-head input:focus {
  border-color: var(--border);
  background: #fff;
  outline: none;
}

.i-tier-check {
  font-size: 0.88rem;
  font-weight: 700;
}

.i-tier-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.i-horizons {
  flex-wrap: wrap;
}

.i-horizons button {
  flex: 1 0 auto;
  padding: 0 10px;
}

.i-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.85rem;
}

.i-presets button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 36px;
  font: inherit;
  font-weight: 700;
  color: var(--accent-strong);
  cursor: pointer;
}

.i-head-line {
  opacity: 0.8;
  font-size: 0.9rem;
}

.i-row {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.i-row i {
  margin-right: 8px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.i-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-weight: 700;
}

.i-row-top b {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.i-row-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  font-size: 0.82rem;
  opacity: 0.8;
}

.i-chart {
  padding: 12px 12px 0;
  border-radius: 16px;
  background: var(--background);
}

.i-chart svg {
  display: block;
  width: 100%;
  height: 150px;
}

.i-chart .t-axis {
  margin-top: 0;
  padding: 4px 0 10px;
}
