@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #000000;
  --card: #0d0d0d;
  --line: #1f1f1f;
  --fg: #ffffff;
  --muted: #a3a3a3;
  --gray: #3a3a3a;
  --blue: #3b82f6;
  --orange: #f97316;
  --red: #ef4444;
  --max: 640px;
  --pad: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
[hidden] {
  display: none !important;
}
html {
  scroll-padding-top: 64px;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ── header + pasos ── */
.top {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  transform: translateY(-110%);
  transition: transform 0.35s ease;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) var(--pad) 8px;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}
.brand-sq {
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.6);
}
.top.show {
  transform: none;
}
.top-nav {
  display: flex;
  gap: 14px;
  font-size: 13.5px;
  font-weight: 700;
}
.top-nav a {
  color: var(--muted);
  text-decoration: none;
}
.top-nav a:hover {
  color: #fff;
}
@media (max-width: 400px) {
  .top-nav {
    display: none;
  }
}
.top-actions {
  display: flex;
  gap: 8px;
}
.chip {
  background: transparent;
  border: 1px solid #333;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
/* ── layout ── */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) calc(90px + env(safe-area-inset-bottom));
}
.sec {
  padding-top: 32px;
}
.sec + .sec {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}
.kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.h1,
.h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.h1 {
  font-size: clamp(34px, 9vw, 52px);
}
.h2 {
  font-size: clamp(28px, 7.4vw, 40px);
  margin-top: 6px;
}
.h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lead {
  margin-top: 12px;
  color: #d4d4d4;
  font-size: 17px;
}
.small {
  font-size: 13.5px;
  line-height: 1.45;
}
.muted {
  color: var(--muted);
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-top: 16px;
}
.sub-h {
  margin-top: 26px;
  font-weight: 800;
  font-size: 15px;
  color: #d4d4d4;
}

/* ── inputs ── */
.steppers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.stepper {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #000;
  border: 1px solid #262626;
  border-radius: 14px;
  padding: 10px 8px;
}
.st-label {
  font-size: 13px;
  font-weight: 700;
  color: #d4d4d4;
}
.st-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}
.st-btn {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #333;
  background: #141414;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  touch-action: manipulation;
}
.st-btn:active {
  background: #fff;
  color: #000;
}
.st-val {
  width: 54px;
  min-width: 0;
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
  color: #fff;
  font: 700 32px "Space Grotesk", sans-serif;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.st-val::-webkit-outer-spin-button,
.st-val::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.st-val.red {
  color: var(--red);
}
.st-unit {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.inputs > input[type="range"] {
  margin-top: 10px;
}
.field-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 600;
  margin-bottom: 6px;
}
.out {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}
.red {
  color: var(--red);
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #fff var(--p, 50%), #2a2a2a var(--p, 50%));
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: #2a2a2a;
}
input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: #fff;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
}
input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: #fff;
}
input[type="range"].range-red::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--red) var(--p, 50%), #2a2a2a var(--p, 50%));
}
input[type="range"].range-red::-moz-range-progress {
  background: var(--red);
}
input[type="range"].range-red::-webkit-slider-thumb {
  background: var(--red);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
}
input[type="range"].range-red::-moz-range-thumb {
  background: var(--red);
}
details > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
details > summary::-webkit-details-marker {
  display: none;
}
details > summary::after {
  content: "+";
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
}
details[open] > summary::after {
  content: "–";
}
.guide {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 8px;
}
.guide-tabs {
  display: flex;
  gap: 6px;
  margin: 14px 0 10px;
  flex-wrap: wrap;
}
.gtab {
  border: 1px solid #333;
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}
.gtab.is-on {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.steps {
  counter-reset: s;
  list-style: none;
  margin-bottom: 10px;
}
.steps li {
  counter-increment: s;
  position: relative;
  padding: 6px 0 6px 38px;
  font-size: 15px;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 5px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #1c1c1c;
  border: 1px solid #333;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.adv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 10px;
}
.mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.mini input {
  background: #000;
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font: 600 18px "Space Grotesk", sans-serif;
  padding: 8px 10px;
  width: 100%;
}

/* ── grillas ── */
.grid-head {
  margin-bottom: 10px;
}
.big-stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.num {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(46px, 13vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.unit {
  font-weight: 700;
  font-size: 15px;
  color: #d4d4d4;
}
.big-sub {
  margin-top: 6px;
  font-weight: 600;
  color: var(--muted);
}
.explain {
  font-size: 15px;
  color: #e5e5e5;
  margin-bottom: 14px;
}
.grid-wrap {
  position: relative;
}
canvas.weeks {
  display: block;
  width: 100%;
  touch-action: pan-y;
  cursor: pointer;
}
.you {
  position: absolute;
  pointer-events: none;
  border-radius: 2px;
  box-shadow: 0 0 0 2px #fff, 0 0 14px 4px rgba(255, 255, 255, 0.8);
  animation: pulse 1.4s ease-in-out infinite;
}
.you-tag {
  position: absolute;
  pointer-events: none;
  transform: translateY(-50%);
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.you-tag::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 5px 6px 5px 0;
  border-color: transparent #fff transparent transparent;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 2px #fff, 0 0 4px 1px rgba(255, 255, 255, 0.3);
  }
}
.row-info {
  margin-top: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #000;
  border: 1px solid #262626;
  font-size: 14px;
  color: #d4d4d4;
}
.row-info b {
  color: #fff;
}
.legend {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin: 14px 0 10px;
  font-size: 13.5px;
  color: #d4d4d4;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend .sw {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  flex: none;
}
.legend b {
  margin-left: auto;
  font-family: "Space Grotesk", sans-serif;
  color: #fff;
}

/* ── qué pasa si ── */

.num-inline {
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  color: #fff;
}
.btn {
  margin-top: 16px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  color: #000;
  font-weight: 800;
  font-size: 16px;
}
.adv {
  padding: 16px 18px;
}
/* ── por edad ── */
.versus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.vs-item {
  background: #000;
  border: 1px solid #262626;
  border-radius: 14px;
  padding: 12px;
}
.vs-item .vs-v {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 34px;
  line-height: 1.05;
}
.vs-item .vs-l {
  font-size: 13px;
  color: #d4d4d4;
  font-weight: 600;
}
.vs-msg {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 600;
}
.groups {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.group {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  width: 100%;
}
.group.is-on {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff inset;
}
.g-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.g-name {
  font-weight: 800;
  font-size: 17px;
}
.g-ages {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.g-say {
  margin-top: 8px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}
.g-say b {
  color: var(--red);
  font-family: "Space Grotesk", sans-serif;
}
.g-also {
  margin-top: 6px;
  font-size: 14px;
  color: #d4d4d4;
}
.g-stage {
  margin-top: 10px;
  display: inline-block;
  font-size: 13.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.14);
  color: #ffb4b4;
}
.g-src {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-block;
}
.g-more {
  display: none;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.group.is-on .g-more {
  display: block;
}
.stat-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 4px 10px;
  padding: 7px 0;
  font-size: 14px;
}
.stat-row + .stat-row {
  border-top: 1px dashed #222;
}
.stat-v {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: 1px;
}
.badge.d {
  background: #1d2a44;
  color: #93b7ff;
}
.badge.s {
  background: #3a2410;
  color: #ffb27a;
}
.src-link {
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: underline;
  text-decoration-color: #444;
  text-underline-offset: 2px;
}
.flag {
  font-size: 11px;
  font-weight: 800;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 1px 5px;
}
.ar-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.ar-stats .stat-v {
  font-size: 30px;
}
.caveats {
  padding: 16px 18px;
}
.caveats ul {
  margin-top: 12px;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #d4d4d4;
}

/* ── antes y ahora ── */
.eras {
  padding: 8px 16px;
}
.era {
  padding: 12px 0;
}
.era + .era {
  border-top: 1px solid var(--line);
}
.era-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.era-year {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}
.era-ago {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.strip {
  margin-top: 8px;
}
.strip-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 5px;
}
.strip-label .v {
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
}
.hours {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
}
.hr {
  position: relative;
  aspect-ratio: 1;
  border-radius: 2px;
  background: #1c1c1c;
  overflow: hidden;
}
.hr i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
}
.hr.hatch i {
  background-image: repeating-linear-gradient(45deg, #b5b5b5 0 2px, #4d4d4d 2px 4px) !important;
}
.strip-src {
  display: inline-block;
  margin-top: 4px;
}
.era-note {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--muted);
}
.legend-eras {
  margin-top: 12px;
}
.legend-eras .hatch-sw {
  background-image: repeating-linear-gradient(45deg, #b5b5b5 0 2px, #4d4d4d 2px 4px);
}
.chart-card {
  padding: 16px 18px;
}
#chart {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 14px;
  overflow: visible;
}
#chart text {
  font-family: "Inter", sans-serif;
  fill: #a3a3a3;
  font-size: 12px;
}
#chart .axis {
  stroke: #262626;
}
#chart .pt {
  cursor: pointer;
}

/* ── barra fija con tu resultado ── */
.sticky-res {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translate(-50%, 140%);
  width: min(calc(100% - 24px), 600px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 16px;
  background: rgba(20, 20, 20, 0.96);
  border: 1px solid #333;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
  z-index: 30;
}
.sticky-res.show {
  transform: translate(-50%, 0);
}
.sr-num {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}
.sr-txt {
  flex: 1;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  color: #d4d4d4;
}
.sr-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff;
  color: #000;
  font-weight: 800;
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: #fff;
  color: #000;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 50;
  text-align: center;
  max-width: calc(100% - 32px);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .you {
    animation: none;
  }
}

/* ═════════ 1. VIDEO A PANTALLA COMPLETA ═════════ */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  background: #000;
  overflow: hidden;
}
.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
@media (max-aspect-ratio: 10/16) {
  .hero video {
    object-fit: cover;
  }
}
.hero-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 22%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent);
  pointer-events: none;
}
.hero-sound {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 9px 14px 9px 11px;
  font-size: 14px;
  font-weight: 700;
}
.hero-sound svg {
  width: 20px;
  height: 20px;
}
.hero-sound[aria-pressed="true"] {
  background: #fff;
  color: #000;
}
.hero-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.45);
}
.play-ic {
  position: absolute;
  left: 37px;
  top: 28px;
  border-style: solid;
  border-width: 18px 0 18px 30px;
  border-color: transparent transparent transparent #000;
}
.hero-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}
.hero-skip {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.55);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
}
.hero-bar {
  width: min(100%, 420px);
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.hero-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: #fff;
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ═════════ 1b. PANTALLA DE INICIO (el toque habilita el sonido) ═════════ */
.hero-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: #000;
}
.start-sq {
  width: 84px;
  height: 84px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.55);
  animation: beat 1.33s ease-in-out infinite;
  margin-bottom: 18px;
}
@keyframes beat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.08); }
  24% { transform: scale(1); }
  34% { transform: scale(1.05); }
}
.start-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(30px, 8vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 520px;
}
.start-sub {
  color: #d4d4d4;
  font-size: 17px;
  max-width: 420px;
}
.start-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 16px 34px;
  background: #fff;
  color: #000;
  font-weight: 800;
  font-size: 19px;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.35);
}
.start-btn svg {
  width: 22px;
  height: 22px;
}
.start-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}
.start-note svg {
  width: 18px;
  height: 18px;
}
.start-skip {
  margin-top: 6px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mini-sq {
  width: 9px;
  height: 9px;
  border-radius: 1.5px;
  background: #fff;
}

/* ═════════ 3. CÁLCULO ═════════ */
.q + .q {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.q {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.q-label {
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}
.q .st-btn {
  width: 46px;
  height: 46px;
  font-size: 26px;
}
.q .st-val {
  width: 92px;
  font-size: 44px;
}
.presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.pre {
  border: 1px solid #333;
  background: #000;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
}
.pre[aria-pressed="true"] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.result {
  text-align: center;
  padding: 22px 18px;
}
.res-lead {
  font-size: 17px;
  font-weight: 600;
  color: #d4d4d4;
}
.res-big {
  margin-top: 4px;
  line-height: 1;
}
.res-big #r-phone {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(64px, 19vw, 96px);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.res-unit {
  font-weight: 800;
  font-size: 22px;
}
.res-sub {
  margin-top: 6px;
  font-size: 17px;
  color: #e5e5e5;
}
.res-sub b {
  color: #fff;
}

.res-compare {
  margin-top: 14px;
  font-size: 14.5px;
  color: #d4d4d4;
}
.res-compare b {
  color: #fff;
}
.gc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.gc-head .h3 {
  margin: 0;
}
.seg {
  display: inline-flex;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}
.seg button[aria-selected="true"] {
  background: #fff;
  color: #000;
}

/* ═════════ 3. CÁLCULO: colores como botones ═════════ */
.chips-h {
  font-size: 13.5px;
  font-weight: 700;
  color: #d4d4d4;
  margin-bottom: 8px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-c {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #333;
  background: #000;
  border-radius: 999px;
  padding: 6px 11px 6px 8px;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.2s, background 0.2s;
}
.chip-c .sw {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  flex: none;
}
.chip-c b {
  font-family: "Space Grotesk", sans-serif;
  color: #fff;
}
.chip-c[aria-pressed="true"] {
  border-color: #fff;
  background: #1a1a1a;
  box-shadow: 0 0 0 1px #fff inset;
}
.focus-line {
  margin: 10px 0 12px;
  min-height: 22px;
  font-size: 15px;
  font-weight: 600;
  color: #e5e5e5;
}
.focus-line b {
  font-family: "Space Grotesk", sans-serif;
}

/* ═════════ 4. MÁS DATOS ═════════ */
.topic {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
}
.topic > summary {
  padding: 16px;
  align-items: center;
}
.topic[open] > summary {
  border-bottom: 1px solid var(--line);
}
.t-ic {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: #1a1a1a;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background-repeat: no-repeat;
}
.t-ic-age {
  background-image: linear-gradient(90deg, #ef4444 0 45%, #3a3a3a 45%), linear-gradient(90deg, #ef4444 0 30%, #3a3a3a 30%), linear-gradient(90deg, #ef4444 0 15%, #3a3a3a 15%);
  background-size: 22px 4px;
  background-position: center 12px, center 18px, center 24px;
}
.t-ic-hist {
  background-image: linear-gradient(90deg, #9a9a9a 0 55%, #262626 55%), linear-gradient(90deg, #fff 0 25%, #262626 25%), linear-gradient(90deg, #ef4444 0 40%, #262626 40%);
  background-size: 22px 4px;
  background-position: center 12px, center 18px, center 24px;
}
.t-ic-src {
  background-image: linear-gradient(#a3a3a3, #a3a3a3), linear-gradient(#a3a3a3, #a3a3a3), linear-gradient(#a3a3a3, #a3a3a3);
  background-size: 20px 2px, 20px 2px, 13px 2px;
  background-position: center 13px, center 19px, 10px 25px;
}
.t-txt {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
  margin-left: 12px;
  line-height: 1.25;
}
.t-txt b {
  font-size: 16.5px;
}
.t-txt small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.topic-body {
  padding: 16px;
}
.grid-card.plain {
  margin-top: 16px;
}
.caveat-list,
.src-list {
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #d4d4d4;
}
.src-list a {
  color: #d4d4d4;
}
.btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid #333;
  margin-top: 10px;
}
.eras .era:first-child {
  padding-top: 0;
}
@media (prefers-reduced-motion: reduce) {
  .start-sq {
    animation: none;
  }
}

/* ═════════ v6 · auditoría UX (sobrescribe lo anterior) ═════════ */
:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.h1,
.h2,
.start-title,
.res-lead,
.g-say {
  text-wrap: balance;
}
.kicker {
  color: var(--muted);
}
.chip.lang-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
}
.top {
  padding-top: calc(6px + env(safe-area-inset-top));
  padding-bottom: 6px;
}

/* inicio */
.start-lang {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
}
.friend {
  position: absolute;
  top: calc(66px + env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.friend b {
  color: var(--red);
  font-family: "Space Grotesk", sans-serif;
}
.start-skip {
  min-height: 44px;
  padding: 0 12px;
}

/* controles del video: arriba, como las historias */
.hero-top {
  position: absolute;
  z-index: 2;
  top: calc(8px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  max-width: 560px;
  margin: 0 auto;
}
.hero-top .hero-bar {
  width: 100%;
}
.hero-ctrl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.hero-top .hero-sound {
  position: static;
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.hero-top .hero-sound[aria-pressed="true"] {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}
.hero-top .hero-skip {
  min-height: 44px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.4);
}
.hero-end {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.72);
}

/* historia */

/* entradas: etiqueta a la izquierda, –/+ a la derecha */
.inputs {
  padding: 14px 16px;
}
.example-note {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.row-in {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 60px;
}
.row-in + .row-in {
  border-top: 1px solid var(--line);
}
.ri-label {
  font-size: 16px;
  font-weight: 700;
}
.row-in .st-row {
  width: auto;
  gap: 6px;
}
.row-in .st-btn {
  width: 44px;
  height: 44px;
  font-size: 24px;
}
.st-box {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-width: 92px;
}
.row-in .st-val {
  width: 56px;
  font-size: 34px;
  text-align: right;
}
.st-box .st-unit {
  font-size: 14px;
  font-weight: 700;
  color: #d4d4d4;
}
.inputs.is-example .st-val {
  color: #8a8a8a !important;
}
.presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 6px 0 4px;
}
.pre {
  min-height: 44px;
  padding: 0;
}
.inputs.is-example .pre[aria-pressed="true"] {
  background: #2a2a2a;
  border-color: #444;
}
.guide-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.gtab {
  min-height: 44px;
}

/* resultado */
.result {
  text-align: center;
}
.res-lead {
  font-size: 16px;
}
.res-sub {
  font-weight: 700;
}

.res-compare {
  font-size: 15px;
  font-weight: 600;
  color: #e5e5e5;
}
.res-compare small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: #8a8a8a;
}
.duel {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.duel div {
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 10px;
  background: #000;
}
.duel b {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  line-height: 1.1;
}
.duel span {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 700;
}
.feel {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.feel-item {
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 10px 6px;
  background: #000;
}
.feel-item b {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  line-height: 1.1;
}
.feel-item span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.feel-phone {
  grid-column: 1 / -1;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffb4b4;
  margin-top: 2px;
}
.result .share-btn {
  margin-top: 16px;
}

/* grilla: encabezado + fichas iguales */
.gc-head {
  margin-bottom: 10px;
}
.gc-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.mini-sq.inline {
  display: inline-block;
  vertical-align: middle;
}

.tile .sw {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: none;
}

.tiles-h {
  margin: 14px 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 64px;
  padding: 10px 9px;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  background: #141414;
  text-align: left;
  transition: opacity 0.2s, transform 0.12s, background 0.2s, border-color 0.2s;
}
.tile:active {
  transform: scale(0.97);
}
.tile b {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tile span:last-child {
  font-size: 12px;
  font-weight: 700;
  color: #a3a3a3;
}
.tile[data-cat="phone"] {
  border-color: rgba(239, 68, 68, 0.4);
}
.tile[data-cat="phone"] b {
  color: var(--red);
}
.tile[aria-pressed="true"] {
  border-width: 2px;
  padding: 9px 8px;
}
.tile[aria-pressed="true"] b {
  color: #fff;
}
.tiles.has-focus .tile[aria-pressed="false"] {
  opacity: 0.45;
}

.focus-line {
  margin: 10px 0 10px;
  min-height: 0;
  font-size: 14.5px;
}
.focus-line:empty {
  margin: 4px 0;
}
.grid-wrap {
  max-width: 460px;
  margin: 0 auto;
}
.row-info {
  min-height: 0;
  font-size: 14px;
}
.row-info .d {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin: 0 3px 0 6px;
  vertical-align: 0;
}

/* ¿y si bajás? */
.wi-q {
  font-size: 18px;
  font-weight: 800;
}
.wi-q b {
  font-family: "Space Grotesk", sans-serif;
}

/* más datos */
.typ-big {
  line-height: 1.1;
}
.typ-label {
  font-weight: 800;
  font-size: 16px;
  color: #d4d4d4;
}
.typ-num {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 40px;
}
.typ-unit {
  font-weight: 700;
}
.badge.d,
.badge.s {
  background: transparent;
  border: 1px solid #444;
  color: #a3a3a3;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.era-top {
  margin: 4px 0 10px;
  font-size: 13.5px;
  color: var(--muted);
}
.eras .hours {
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}
.strip-label {
  flex-wrap: wrap;
}

/* quien ya vio la introducción entra directo a su cuenta */
body.returning #hero {
  display: none;
}
body.returning .top {
  transform: none;
}
body.returning #vida {
  padding-top: calc(72px + env(safe-area-inset-top));
}
.intro-again {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  margin-bottom: 14px;
  border: 1px solid #333;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: #d4d4d4;
}
.intro-again svg {
  width: 16px;
  height: 16px;
}
.friend.friend-calc {
  position: static;
  margin-bottom: 14px;
  text-align: left;
}

/* ═════════ v8 · video → "¿te animás?" → tu resultado ═════════ */
.hero-end {
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: rgba(0, 0, 0, 0.84);
  animation: endIn 0.6s ease both;
}
@keyframes endIn {
  from { opacity: 0; }
}
.end-sq {
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
  background: var(--red);
  box-shadow: 0 0 44px rgba(239, 68, 68, 0.6);
}
.start-btn.red-btn {
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.45);
}
.reveal-btn {
  width: 100%;
  min-height: 56px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.35);
}
.reveal-btn:active {
  transform: scale(0.98);
}
.res-awake {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #e5e5e5;
  text-wrap: balance;
}
.res-awake b {
  color: #fff;
}
.res-awake:empty {
  display: none;
}

#mas {
  padding-bottom: 100px;
}
@media (prefers-reduced-motion: reduce) {
  .hero-end {
    animation: none;
  }
}
.start-sub {
  text-wrap: balance;
}

/* ═════════ v9 · revelación con la grilla + "¿y si usás menos?" ═════════ */
.green {
  color: #22c55e;
}
.res-tiles {
  margin-top: 14px;
  text-align: left;
}
.res-tiles .tiles-h {
  margin-top: 0;
}
.res-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 12px 0 8px;
}
.lived-sw {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #3a3a3a;
  border: 1px solid #555;
}
.result .focus-line {
  margin: 10px 0 0;
}
/* durante la revelación solo se ven el número y la grilla; el resto aparece al final */
#calc-out .res-sub,
#calc-out .res-tiles,
#calc-out .focus-line,
#calc-out .row-info,
#calc-out .facts,
#calc-out .whatif,
#calc-out .adv {
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#calc-out.seq .res-sub,
#calc-out.seq .res-tiles,
#calc-out.seq .focus-line,
#calc-out.seq .row-info,
#calc-out.seq .facts,
#calc-out.seq .whatif,
#calc-out.seq .adv {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.facts {
  text-align: center;
}
.facts .res-awake {
  margin-top: 0;
}
.wi-q {
  text-wrap: balance;
}
.whatif .row-in {
  margin-top: 6px;
}
.wi-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 4px 0 14px;
}
.wi-chip {
  min-height: 44px;
  padding: 0 4px;
  font-size: 14px;
}
.wi-chip[aria-pressed="true"] {
  background: #22c55e;
  border-color: #22c55e;
  color: #000;
}
.wi-chip:disabled {
  opacity: 0.35;
}
.wi-big {
  text-align: center;
  line-height: 1;
}
.wi-big #wi-num {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(52px, 15vw, 76px);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.wi-unit {
  font-weight: 800;
  font-size: 18px;
}
.wi-sub {
  margin-top: 6px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #e5e5e5;
}
.wi-key {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 14px 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.wi-key .sw {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.wi-key .sw + span + .sw {
  margin-left: 10px;
}
.wi-row {
  margin-top: 8px;
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  #calc-out .res-sub,
  #calc-out .res-tiles,
  #calc-out .facts,
  #calc-out .whatif,
  #calc-out .adv {
    transition: none;
  }
}
