/* KairSun Mastery v2 — comparador Free|Mastery y profundidad con mini-UI real.
 *
 * Pass 2 (más dramático): hero con luz animada eficiente (sólo transform/opacity),
 * tipografía display (Cinzel vía var(--display) + .seal-gold de contrast-a11y),
 * board con hover/focus ricos y antes/después ilustrativo en mini-gráficos CSS,
 * casos numerados, FAQ con apertura animada y CTA final con aura.
 *
 * Dueño: agente Mastery. Se carga DESPUÉS de marketing.css y de los CSS de
 * assets/css/screens/ (de ahí vienen tokens, `.btn`, `.section-chip*`,
 * `.eco-pill*`, `.honest-chip`, `.page-cta-row`, `.help-next` y las clases de
 * los mocks; este archivo no los redefine, sólo los contextualiza).
 *
 * Reglas duras: sin JS, sin estilos inline, sin `!important` nuevos, fuentes
 * locales (var(--font)/var(--display) del marketing.css), contraste AA, focus
 * visible, `prefers-reduced-motion` respetado, responsive desde 320 px. Todo el
 * prefijo es `ksm-` para no pisar otras páginas.
 */

/* Ancho de lectura de la página: el comparador necesita más que los 65-72ch
 * del `.prose` original, sin llegar al ancho completo del `.wrap`. */
.ksm-page { max-width: 880px; }

.ksm-section { margin: 0 0 46px; }
.ksm-page > .ksm-section:first-child { margin-top: 28px; }
.ksm-section > h2 {
  position: relative;
  margin: 0 0 10px;
  padding-bottom: 10px;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
/* Filete corto teal→gold: firma de sección, no glitter. */
.ksm-section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 54px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--mastery), var(--gold-base));
  opacity: 0.75;
}
.ksm-lead {
  margin: 0 0 18px;
  max-width: 48rem;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.5;
  text-wrap: pretty;
}
.ksm-lead strong { color: var(--text); }

/* `.prose ul` / `.prose li` / `.prose p` de marketing.css tienen más
 * especificidad que una clase sola: estos resets devuelven el layout propio. */
.prose .ksm-chips,
.prose .ksm-not,
.prose .ksm-depth,
.prose .ksm-cta__chips,
.prose .eco-pills { padding-left: 0; padding-right: 0; }

/* ---------- Hero cinematográfico v3 ---------- */

.ksm-hero {
  position: relative;
  max-width: 880px;
  padding-bottom: 12px;
  isolation: isolate;
}
/* El contenido va en su propia capa para quedar sobre la luz. */
.ksm-hero > * { position: relative; z-index: 1; }
.ksm-hero h1 {
  font-size: clamp(2rem, 5.4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
/* En display serif los signos sueltos pesan poco: la coma pide aire. */
.ksm-hero h1 .seal-gold { white-space: nowrap; }
.ksm-hero .answer-first { max-width: 62ch; }
.ksm-hero .eyebrow { letter-spacing: 0.14em; }

/* Luz: capa propia con máscaras suaves. Sólo se anima transform/opacity. */
.ksm-hero-aura {
  position: absolute;
  top: -78px;
  left: 50%;
  z-index: 0;
  width: min(980px, 100%);
  height: 420px;
  transform: translateX(-50%);
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
}
.ksm-hero-aura::before,
.ksm-hero-aura::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.ksm-hero-aura::before {
  background:
    radial-gradient(38% 52% at 22% 32%, rgba(45, 212, 191, 0.34), transparent 68%),
    radial-gradient(34% 48% at 82% 24%, rgba(245, 196, 81, 0.3), transparent 66%),
    radial-gradient(52% 62% at 50% 8%, rgba(56, 189, 248, 0.16), transparent 70%);
  -webkit-mask-image: radial-gradient(68% 68% at 50% 42%, #000 38%, transparent 78%);
  mask-image: radial-gradient(68% 68% at 50% 42%, #000 38%, transparent 78%);
}
.ksm-hero-aura::after {
  background: conic-gradient(
    from 20deg at 50% 42%,
    transparent 0 16%,
    rgba(245, 196, 81, 0.18) 24%,
    transparent 34% 56%,
    rgba(45, 212, 191, 0.2) 66%,
    transparent 76% 100%
  );
  -webkit-mask-image: radial-gradient(58% 58% at 50% 42%, #000 28%, transparent 74%);
  mask-image: radial-gradient(58% 58% at 50% 42%, #000 28%, transparent 74%);
  opacity: 0.8;
}
@keyframes ksm-drift {
  to { transform: rotate(1turn); }
}
@keyframes ksm-breathe {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}
@media (prefers-reduced-motion: no-preference) {
  .ksm-hero-aura::before { animation: ksm-breathe 11s ease-in-out infinite; }
  .ksm-hero-aura::after { animation: ksm-drift 46s linear infinite; }
}
.ksm-hero-cta { margin-top: 6px; }

/* ---------- Comparador interactivo (radios, CSS puro) ---------- */

.ksm-cmp > input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.ksm-cmp__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 16px;
}
.ksm-cmp__tabs label {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 24, 27, 0.62);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}
.ksm-cmp__tabs label:hover {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}
.ksm-cmp__tabs label:active { transform: translateY(0); }
.ksm-cmp > input:nth-of-type(1):checked ~ .ksm-cmp__tabs label:nth-of-type(1),
.ksm-cmp > input:nth-of-type(2):checked ~ .ksm-cmp__tabs label:nth-of-type(2),
.ksm-cmp > input:nth-of-type(3):checked ~ .ksm-cmp__tabs label:nth-of-type(3),
.ksm-cmp > input:nth-of-type(4):checked ~ .ksm-cmp__tabs label:nth-of-type(4),
.ksm-cmp > input:nth-of-type(5):checked ~ .ksm-cmp__tabs label:nth-of-type(5),
.ksm-cmp > input:nth-of-type(6):checked ~ .ksm-cmp__tabs label:nth-of-type(6),
.ksm-cmp > input:nth-of-type(7):checked ~ .ksm-cmp__tabs label:nth-of-type(7) {
  color: #071214;
  background: linear-gradient(135deg, var(--gold-hi, #FFE9B8), var(--gold-base, #FFD777) 55%, var(--gold-deep, #E8A93E));
  border-color: rgba(245, 196, 81, 0.75);
  box-shadow: 0 4px 14px rgba(245, 196, 81, 0.22);
}
.ksm-cmp > input:nth-of-type(1):focus-visible ~ .ksm-cmp__tabs label:nth-of-type(1),
.ksm-cmp > input:nth-of-type(2):focus-visible ~ .ksm-cmp__tabs label:nth-of-type(2),
.ksm-cmp > input:nth-of-type(3):focus-visible ~ .ksm-cmp__tabs label:nth-of-type(3),
.ksm-cmp > input:nth-of-type(4):focus-visible ~ .ksm-cmp__tabs label:nth-of-type(4),
.ksm-cmp > input:nth-of-type(5):focus-visible ~ .ksm-cmp__tabs label:nth-of-type(5),
.ksm-cmp > input:nth-of-type(6):focus-visible ~ .ksm-cmp__tabs label:nth-of-type(6),
.ksm-cmp > input:nth-of-type(7):focus-visible ~ .ksm-cmp__tabs label:nth-of-type(7) {
  outline: 2px solid var(--gold-base, #FFD777);
  outline-offset: 2px;
}
.ksm-cmp__panes > .ksm-pane { display: none; }
.ksm-cmp > input:nth-of-type(1):checked ~ .ksm-cmp__panes > .ksm-pane:nth-child(1),
.ksm-cmp > input:nth-of-type(2):checked ~ .ksm-cmp__panes > .ksm-pane:nth-child(2),
.ksm-cmp > input:nth-of-type(3):checked ~ .ksm-cmp__panes > .ksm-pane:nth-child(3),
.ksm-cmp > input:nth-of-type(4):checked ~ .ksm-cmp__panes > .ksm-pane:nth-child(4),
.ksm-cmp > input:nth-of-type(5):checked ~ .ksm-cmp__panes > .ksm-pane:nth-child(5),
.ksm-cmp > input:nth-of-type(6):checked ~ .ksm-cmp__panes > .ksm-pane:nth-child(6),
.ksm-cmp > input:nth-of-type(7):checked ~ .ksm-cmp__panes > .ksm-pane:nth-child(7) {
  display: grid;
}
.ksm-pane { gap: 14px; }
@media (min-width: 760px) {
  .ksm-pane { grid-template-columns: 1fr 1fr; }
}
.ksm-col {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: rgba(24, 24, 27, 0.5);
}
.ksm-col > * { position: relative; z-index: 1; }
/* Barrido de vidrio: vive bajo el contenido y nunca atrapa el puntero. */
.ksm-col::after {
  content: "";
  position: absolute;
  inset: -40% -60%;
  z-index: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.09) 50%, transparent 58%);
  opacity: 0;
  pointer-events: none;
}
.ksm-col--free { border-color: rgba(45, 212, 191, 0.24); }
.ksm-col--mastery {
  border-color: rgba(245, 196, 81, 0.3);
  background:
    linear-gradient(160deg, rgba(245, 196, 81, 0.08), rgba(45, 212, 191, 0.04) 65%),
    rgba(24, 24, 27, 0.5);
}
.ksm-col h3 {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mastery);
}
.ksm-col--mastery h3 { color: var(--gold-base); }
.ksm-col p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.5;
  text-wrap: pretty;
}

/* Hover/focus ricos: elevación corta + barrido. Sólo con motion permitido. */
@media (prefers-reduced-motion: no-preference) {
  .ksm-col {
    transition:
      transform 0.2s ease,
      border-color 0.2s ease,
      box-shadow 0.2s ease,
      background 0.2s ease;
  }
  .ksm-col:hover,
  .ksm-col:focus-within {
    transform: translateY(-3px);
    border-color: rgba(45, 212, 191, 0.45);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
  }
  .ksm-col--mastery:hover,
  .ksm-col--mastery:focus-within { border-color: rgba(245, 196, 81, 0.5); }
  .ksm-col:hover::after,
  .ksm-col:focus-within::after {
    opacity: 1;
    transform: translateX(16%);
    transition: transform 0.55s ease, opacity 0.3s ease;
  }
}

/* Ejemplo concreto: línea chica y acento medido, nunca protagonista. */
.ksm-eg {
  display: block;
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid rgba(45, 212, 191, 0.5);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}
.ksm-col .ksm-eg { margin-top: 10px; }
.ksm-col--mastery .ksm-eg { border-left-color: rgba(245, 196, 81, 0.5); }

/* ---------- Antes/después: la profundidad ilustrada en CSS puro ----------
 * Dos mini-gráficos con los MISMOS datos de muestra: a la izquierda el crudo
 * que ya te muestra Free; a la derecha la lectura que agrega Mastery (meta,
 * mejor día, recaída, reparto). Decorativo: el texto de la ficha es el claim. */

.ksm-ba {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 2px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(9, 9, 11, 0.34);
}
@media (min-width: 640px) {
  .ksm-ba {
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 10px;
  }
}
.ksm-ba__side {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(24, 24, 27, 0.5);
}
.ksm-ba__side--deep {
  border-color: rgba(245, 196, 81, 0.28);
  background:
    linear-gradient(160deg, rgba(245, 196, 81, 0.07), rgba(45, 212, 191, 0.05)),
    rgba(24, 24, 27, 0.5);
}
.ksm-ba__arrow {
  align-self: center;
  justify-self: center;
  color: var(--mastery);
  font-size: 1rem;
  font-weight: 800;
  transform: rotate(90deg);
}
@media (min-width: 640px) {
  .ksm-ba__arrow { transform: none; }
}
.ksm-ba__tag {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ksm-ba__side--deep .ksm-ba__tag { color: var(--gold-base); }
.ksm-ba__cap {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}
.ksm-ba__side--deep .ksm-ba__cap { color: var(--text-2); }

/* Barras verticales (agua, ánimo, rutina, crónica). */
.ksm-ba__plot {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 54px;
}
.ksm-ba__bars {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  width: 100%;
  height: 100%;
}
.ksm-ba__bars > i {
  flex: 1 1 0;
  min-height: 4px;
  height: calc(var(--v, 50) * 1%);
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.55), rgba(100, 116, 139, 0.32));
}
.ksm-ba__side--deep .ksm-ba__bars > i {
  background: linear-gradient(180deg, rgba(94, 234, 212, 0.62), rgba(15, 118, 110, 0.42));
}
.ksm-ba__side--deep .ksm-ba__bars > .ksm-ba__bar--best {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-deep));
  box-shadow: 0 0 10px rgba(245, 196, 81, 0.35);
}
.ksm-ba__side--deep .ksm-ba__bars > .ksm-ba__bar--drop {
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.7), rgba(29, 78, 216, 0.5));
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}
.ksm-ba__side--deep .ksm-ba__bars > .ksm-ba__bar--late {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.85), rgba(180, 83, 9, 0.55));
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}
.ksm-ba__goal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 83%;
  z-index: 2;
  border-top: 1px dashed rgba(245, 196, 81, 0.6);
}

/* Grilla de días (límites). */
.ksm-ba__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  width: 100%;
}
.ksm-ba__grid > i {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.16);
}
.ksm-ba__grid > i.ksm-d-on { background: rgba(45, 212, 191, 0.5); }
.ksm-ba__grid > i.ksm-d-slip {
  background: linear-gradient(180deg, #FCA5A5, #B91C1C);
  box-shadow: 0 0 9px rgba(248, 113, 113, 0.5);
}
.ksm-ba__grid > i.ksm-d-today {
  outline: 1px solid rgba(245, 196, 81, 0.75);
  outline-offset: 1px;
}

/* Barra compuesta (skills): total vs reparto por atributo. */
.ksm-ba__stack {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.16);
}
.ksm-ba__stack > i {
  height: 100%;
  width: calc(var(--w, 33) * 1%);
}
.ksm-ba__stack > i:nth-child(1) { background: linear-gradient(90deg, var(--gold-hi), var(--gold-deep)); }
.ksm-ba__stack > i:nth-child(2) { background: linear-gradient(90deg, #5EEAD4, #0F766E); }
.ksm-ba__stack > i:nth-child(3) { background: linear-gradient(90deg, #C4B5FD, #7C3AED); }
.ksm-ba__stack > i:nth-child(4) { background: rgba(148, 163, 184, 0.22); }
.ksm-ba__side--raw .ksm-ba__stack > i { background: rgba(148, 163, 184, 0.4); }

/* Medidor horizontal (comidas): 30 vs 90 días. */
.ksm-ba__meter {
  display: grid;
  gap: 6px;
  width: 100%;
}
.ksm-ba__meter-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.16);
}
.ksm-ba__meter-track > i {
  display: block;
  height: 100%;
  width: calc(var(--w, 33) * 1%);
  border-radius: inherit;
}
.ksm-ba__side--raw .ksm-ba__meter-track > i {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.55), rgba(100, 116, 139, 0.4));
}
.ksm-ba__side--deep .ksm-ba__meter-track > i {
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.7), rgba(245, 196, 81, 0.7));
}
.ksm-ba__meter-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Alturas y anchos de muestra: una clase por valor, sin estilos inline. */
.ksm-v44 { --v: 44; }
.ksm-v50 { --v: 50; }
.ksm-v55 { --v: 55; }
.ksm-v58 { --v: 58; }
.ksm-v60 { --v: 60; }
.ksm-v62 { --v: 62; }
.ksm-v64 { --v: 64; }
.ksm-v66 { --v: 66; }
.ksm-v67 { --v: 67; }
.ksm-v72 { --v: 72; }
.ksm-v74 { --v: 74; }
.ksm-v75 { --v: 75; }
.ksm-v78 { --v: 78; }
.ksm-v82 { --v: 82; }
.ksm-v84 { --v: 84; }
.ksm-v86 { --v: 86; }
.ksm-v87 { --v: 87; }
.ksm-v88 { --v: 88; }
.ksm-v90 { --v: 90; }
.ksm-v92 { --v: 92; }
.ksm-v96 { --v: 96; }
.ksm-w15 { --w: 15; }
.ksm-w21 { --w: 21; }
.ksm-w32 { --w: 32; }
.ksm-w33 { --w: 33; }
.ksm-w100 { --w: 100; }

/* ---------- Profundidad: casos con mini-UI real de assets/css/screens/ ---------- */

.ksm-depth {
  counter-reset: ksm-step;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 780px) {
  .ksm-depth { grid-template-columns: 1fr 1fr; }
}
.ksm-case {
  counter-increment: ksm-step;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(45, 212, 191, 0.22);
  background:
    linear-gradient(160deg, rgba(45, 212, 191, 0.06), rgba(245, 196, 81, 0.04)),
    rgba(24, 24, 27, 0.5);
}
/* Numeral fantasma en display: ordena la lectura sin robar contraste.
 * El texto alternativo vacío (`/ ""`) evita que un lector anuncie el número. */
.ksm-case::before {
  content: counter(ksm-step, decimal-leading-zero) / "";
  position: absolute;
  top: 4px;
  right: 14px;
  font-family: var(--display);
  font-size: 2.5rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.ksm-case--gold { border-color: rgba(245, 196, 81, 0.3); }
.ksm-case--gold::before { color: rgba(245, 196, 81, 0.14); }
p.ksm-case-kicker {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mastery);
}
.ksm-case--gold p.ksm-case-kicker { color: var(--gold-base); }
p.ksm-case-claim {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  text-wrap: pretty;
  max-width: 34ch;
}
.ksm-case > .ksm-ui { margin: 14px 0; position: relative; z-index: 1; }
.ksm-case-note {
  display: block;
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

/* Contexto de las mini-UIs: la unidad `--u` (1dp real) existe fuera del
 * teléfono porque los mocks la miden en `calc(N * var(--u))`. */
.ksm-ui { --u: calc(min(380px, 88vw) / 393); margin: 0 0 14px; }
.ksm-ui.preview-animo { --u: calc(min(380px, 88vw) / 393); }

.ksm-ui.ks-w {
  position: relative;
  height: auto;
  overflow: hidden;
  padding: 10px 0 12px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  background: linear-gradient(170deg, rgba(45, 196, 237, 0.08), rgba(6, 16, 23, 0.6));
}
.ksm-ui.preview-animo {
  padding: 12px 14px;
  border: 1px solid rgba(155, 123, 255, 0.22);
  background: rgba(20, 22, 28, 0.55);
}
.ksm-ui.ks-routine-track {
  position: static;
  inset: auto;
  overflow: visible;
  padding: 14px;
  border: 1px solid rgba(255, 176, 32, 0.22);
}
.ksm-ui.ls-phone {
  padding: 14px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  background: rgba(19, 14, 32, 0.55);
}
.ksm-ui[data-screen="skills"] {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(91, 246, 255, 0.18);
  background: rgba(20, 22, 28, 0.55);
}
.ksm-ui.ks-fh {
  height: auto;
  padding: 12px 14px 14px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  background: rgba(8, 21, 12, 0.6);
}

/* Utilidades mínimas para no usar estilos inline en las mini-UIs. */
.ksm-p-58 { --p: 0.58; }
.ksm-p-66 { --p: 0.66; }
.ksm-p-72 { --p: 0.72; }
.ksm-p-84 { --p: 0.84; }
.ksm-p-88 { --p: 0.88; }
.ksm-p-90 { --p: 0.9; }
.ksm-p-96 { --p: 0.96; }
.ksm-ring-87 { --ring: 87; }

/* ---------- Honestidad ---------- */

.ksm-not {
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.ksm-not li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(24, 24, 27, 0.45);
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.45;
}
.ksm-not li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 0.5em;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--mastery);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.35);
}
.ksm-not li strong { color: var(--text); }
.ksm-chips { margin-bottom: 16px; }

/* ---------- Economía aparte (Seeds/Suns/GP/Mastery) ---------- */

.ksm-gp-dot {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold-deep));
  box-shadow: inset 0 0 0 3px rgba(9, 9, 11, 0.55);
}
.ksm-eco-note {
  margin: 12px 0 0;
  max-width: 48rem;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.5;
}
.ksm-eco-note strong { color: var(--text); }

/* ---------- FAQ (details nativo, apertura animada, sin JS) ---------- */

.ksm-faq {
  display: grid;
  gap: 10px;
  margin: 0;
  /* Habilita animar block-size:0 → auto en `::details-content`. */
  interpolate-size: allow-keywords;
}
.ksm-faq details {
  padding: 0 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(24, 24, 27, 0.45);
}
.ksm-faq details[open] { border-color: rgba(45, 212, 191, 0.38); }
.ksm-faq details:hover { border-color: rgba(45, 212, 191, 0.3); }
.ksm-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.ksm-faq summary::-webkit-details-marker { display: none; }
.ksm-faq summary::after {
  content: "+";
  flex: none;
  color: var(--mastery);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.24s ease, color 0.24s ease;
}
.ksm-faq details[open] summary::after {
  content: "×";
  color: var(--gold-base);
  transform: rotate(180deg);
}
.ksm-faq__answer {
  padding: 0 0 14px;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.5;
}
.ksm-faq__answer p { margin: 0; }
.ksm-faq__answer strong { color: var(--text); }
/* Apertura/cierre animados: en motores sin ::details-content se abre nativo. */
@media (prefers-reduced-motion: no-preference) {
  .ksm-faq details::details-content {
    block-size: 0;
    overflow: clip;
    opacity: 0;
    content-visibility: hidden;
    transition:
      block-size 0.28s ease,
      opacity 0.24s ease,
      content-visibility 0.28s allow-discrete;
  }
  .ksm-faq details[open]::details-content {
    block-size: auto;
    opacity: 1;
    content-visibility: visible;
  }
}
/* Sin motion, el contenido se muestra entero y sin transición. */
@media (prefers-reduced-motion: reduce) {
  .ksm-faq summary::after { transition: none; }
  .ksm-faq details[open] summary::after { transform: none; }
}

/* ---------- CTA final ---------- */

.ksm-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 38px 0 0;
  padding: 40px 24px 32px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(245, 196, 81, 0.36);
  background:
    linear-gradient(160deg, rgba(245, 196, 81, 0.12), rgba(45, 212, 191, 0.07) 60%, transparent),
    rgba(9, 9, 11, 0.55);
  text-align: center;
}
.ksm-cta__aura {
  position: absolute;
  top: -60%;
  left: 50%;
  z-index: 0;
  width: min(760px, 150%);
  height: 320px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(38% 58% at 28% 42%, rgba(45, 212, 191, 0.22), transparent 66%),
    radial-gradient(44% 62% at 74% 26%, rgba(245, 196, 81, 0.26), transparent 68%);
  -webkit-mask-image: radial-gradient(62% 68% at 50% 46%, #000 40%, transparent 80%);
  mask-image: radial-gradient(62% 68% at 50% 46%, #000 40%, transparent 80%);
  pointer-events: none;
}
.ksm-cta > * { position: relative; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .ksm-cta__aura { animation: ksm-breathe 10s ease-in-out infinite; }
}
p.ksm-cta__kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mastery);
}
.ksm-cta h2 {
  font-family: var(--display);
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.ksm-cta p {
  margin: 0 auto 18px;
  max-width: 42rem;
  color: var(--text-2);
  line-height: 1.5;
  text-wrap: pretty;
}
.ksm-cta .page-cta-row {
  justify-content: center;
  margin-top: 0;
}
.ksm-cta .ksm-cta__founder {
  margin: 16px auto 0;
  max-width: 44rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}
.ksm-cta .ksm-cta__founder strong { color: var(--gold-base); }
.ksm-cta-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Reveal por scroll (view()); sin soporte, todo queda visible ---------- */

@keyframes ksm-reveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .ksm-depth > .ksm-case,
    .ksm-cmp__panes > .ksm-pane {
      animation: ksm-reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
}

/* Movimiento: elevación corta sólo si el usuario lo permite. */
@media (prefers-reduced-motion: no-preference) {
  .ksm-case {
    transition:
      border-color 0.18s ease,
      background 0.18s ease,
      transform 0.18s ease,
      box-shadow 0.18s ease;
  }
  .ksm-case:hover {
    border-color: rgba(45, 212, 191, 0.38);
    background:
      linear-gradient(160deg, rgba(45, 212, 191, 0.09), rgba(245, 196, 81, 0.06)),
      rgba(24, 24, 27, 0.55);
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
  }
  .ksm-case--gold:hover { border-color: rgba(245, 196, 81, 0.45); }
}

@media (max-width: 520px) {
  .ksm-case { padding: 16px 14px 14px; }
  .ksm-case::before { font-size: 2rem; right: 10px; }
  .ksm-cta { padding: 28px 16px 24px; }
  .ksm-hero-aura { top: -40px; height: 280px; }
  .ksm-hero h1 { font-size: clamp(1.85rem, 7.6vw, 2.4rem); }
  .ksm-cmp__tabs label { padding: 8px 12px; font-size: 0.84rem; }
}
