/* RF-048 — «Comprar rifas». Alineado con los tokens y superficies de ui-kit.css. */
.cp { padding-bottom: 48px; }
.cp > .wrap { width: 100%; max-width: none; padding-inline: 0; display: grid; gap: 36px; }
.cp > .wrap > * { min-width: 0; }
.cp > .wrap > .org-breadcrumb { margin-bottom: -16px; }

/* Cabecera */
.cp-hero { display: grid; gap: 14px; padding-bottom: 28px; border-bottom: 2px solid var(--n-950); }
.cp-title { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; font-size: clamp(2.1rem, 1.2rem + 4.2vw, 3.9rem); max-width: 18ch; color: var(--n-950); }
.cp-title em { font-style: normal; color: var(--accent); }
.cp-lead { margin: 0; max-width: 56ch; font-size: 1.08rem; line-height: 1.55; color: var(--n-700); }
.cp-proof { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }
.cp-proof li { padding: 6px 14px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 0.85rem; border: 1px solid #a7f3d0; }

.cp-h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-family: var(--display); font-size: clamp(1.25rem, 1rem + 1.1vw, 1.65rem); font-weight: 800; letter-spacing: -0.02em; color: var(--n-950); }
.cp-step { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--n-950); color: var(--n-0); font-size: 0.9rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cp-small { margin: 12px 0 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.cp-small:empty { display: none; }
.cp-lead-sm { margin: -6px 0 14px; color: var(--n-700); }
.cp-block { display: grid; gap: 4px; align-content: start; }

/* Saldo */
.cp-balance { padding: 22px 24px; border-radius: var(--radius-lg); background: var(--n-950); color: var(--n-0); display: grid; gap: 10px; justify-items: start; }
.cp-balance .cp-h2 { color: var(--n-0); margin: 0; }
.cp-balance-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cp-balance-list li { padding: 8px 14px; border-radius: var(--radius-md); background: rgba(255,255,255,.1); font-weight: 800; }
.cp-balance-list li small { display: block; font-weight: 600; opacity: .7; }
.cp-balance-list li.is-empty { background: transparent; padding-left: 0; font-weight: 600; opacity: .8; }
.cp-balance .cp-small { color: rgba(255,255,255,.75); margin: 0; }
.cp-balance .btn-ghost { color: var(--n-0); border-color: rgba(255,255,255,.4); }

/* Elegir */
.cp-choose { display: grid; gap: 8px; }
.cp-choose .cp-h2 { margin-top: 18px; }
.cp-choose .cp-h2:first-child { margin-top: 0; }
.cp-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 12px; }
.cp-size, .cp-mode {
  text-align: left; display: grid; gap: 4px; min-height: 44px; padding: 16px 18px; border-radius: var(--radius-md); cursor: pointer;
  background: var(--surface); border: 2px solid var(--n-200); color: var(--n-900); font: inherit;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.cp-size:hover, .cp-mode:hover { border-color: var(--n-400); }
.cp-size:focus-visible, .cp-mode:focus-visible { outline: 3px solid var(--accent-glow); outline-offset: 2px; }
.cp-size strong { font-size: 1.02rem; letter-spacing: -0.01em; }
.cp-size-hint { font-size: 0.85rem; color: var(--text-muted); }
.cp-size-price { margin-top: 6px; font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--accent-ink); }
.cp-size[aria-checked="true"], .cp-mode[aria-checked="true"] { background: var(--n-950); border-color: var(--n-950); color: var(--n-0); }
.cp-size[aria-checked="true"] .cp-size-hint, .cp-mode[aria-checked="true"] span { color: rgba(255,255,255,.75); }
.cp-size[aria-checked="true"] .cp-size-price { color: var(--accent-bright); }
.cp-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.cp-mode strong { font-size: 1.05rem; }
.cp-mode em { margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--n-0); font-style: normal; font-size: 0.76rem; }
.cp-mode span { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; }

/* Tarjetas de compra */
.cp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 16px; align-items: stretch; margin-top: 6px; }
.cp-card { position: relative; display: grid; align-content: start; gap: 6px; padding: 26px 22px 22px; border-radius: var(--ui-radius-lg, 14px); background: var(--ui-surface, #ffffff); border: 1px solid var(--ui-border, #e2e8f0); box-shadow: var(--ui-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.05)); }
.cp-card.is-featured { border: 2px solid var(--accent); box-shadow: 0 18px 40px -18px var(--accent-glow); }
.cp-badge { position: absolute; top: -13px; left: 20px; padding: 4px 12px; border-radius: 99px; background: var(--accent); color: var(--n-0); font-size: 0.76rem; font-weight: 800; letter-spacing: .02em; }
.cp-card-title { margin: 0; font-size: 1rem; font-weight: 800; color: var(--n-600); text-transform: uppercase; letter-spacing: .06em; }
.cp-price { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 1.6rem + 2vw, 2.9rem); letter-spacing: -0.04em; line-height: 1; color: var(--n-950); }
.cp-price small { font-size: 0.38em; font-weight: 700; letter-spacing: 0; margin-left: 4px; color: var(--n-600); }
.cp-card .btn-ghost { border: 1.5px solid var(--n-950); background: var(--surface); }
.cp-per { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.cp-save { margin: 6px 0 12px; padding: 6px 12px; border-radius: var(--radius-sm); background: var(--n-100); color: var(--n-600); font-weight: 700; font-size: 0.88rem; justify-self: start; }
.cp-save.is-on { background: var(--accent-soft); color: var(--accent-ink); }
.cp-card .cp-buy { width: 100%; text-align: center; justify-content: center; margin-top: auto; }

/* Tabla */
.cp-table-wrap { overflow-x: auto; border: 1px solid var(--ui-border, #e2e8f0); border-radius: var(--ui-radius-lg, 14px); background: var(--ui-surface, #ffffff); box-shadow: var(--ui-shadow-sm); }
.cp-table { width: 100%; min-width: 520px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cp-table th, .cp-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.cp-table thead th { background: var(--n-50); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--n-600); }
.cp-table tbody th { font-weight: 700; }
.cp-table tbody tr:last-child > * { border-bottom: 0; }
.cp-table td { font-weight: 800; font-family: var(--display); }
.cp-table td em { display: block; font-style: normal; font-family: var(--font, inherit); font-size: 0.76rem; color: var(--accent-ink); font-weight: 700; }

/* Incluido */
.cp-included { padding: 28px; border-radius: var(--radius-lg); background: var(--accent-soft); border: 1px solid #a7f3d0; }
.cp-tick-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; margin: 0; padding: 0; list-style: none; }
.cp-tick-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--n-900); line-height: 1.4; }
.cp-tick-list svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }

/* Cómo funciona y botón secundario de bienvenida */
.cp-welcome-dash { border-color: var(--n-300); }
.cp-block .org-welcome-steps a { color: var(--accent-ink); font-weight: 700; }

/* Preguntas */
.cp-faq { display: grid; border-top: 1px solid var(--n-300); }
.cp-faq details { border-bottom: 1px solid var(--n-300); }
.cp-faq summary { cursor: pointer; min-height: 44px; padding: 14px 4px; font-weight: 800; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.cp-faq summary::-webkit-details-marker { display: none; }
.cp-faq summary::after { content: '+'; flex: none; font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--accent); }
.cp-faq details[open] summary::after { content: '–'; }
.cp-faq summary:focus-visible { outline: 3px solid var(--accent-glow); outline-offset: 2px; }
.cp-faq p { margin: 0 0 18px; max-width: 64ch; color: var(--n-700); line-height: 1.6; }
.cp-faq a { color: var(--accent-ink); font-weight: 700; }

@media (max-width: 520px) {
  .cp > .wrap { gap: 32px; }
  .cp-included { padding: 20px 16px; }
  .cp-balance { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) { .cp-size, .cp-mode { transition: none; } }
