/* ============================================================================
   /personal — Tier Brújula individual (Fase 4 wizard-of-oz, Bloque 1)
   Glassmorphism oscuro consistente con el resto del sitio.
   ============================================================================ */

.personal-hero {
    padding: clamp(4rem, 9vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
    position: relative;
}

.personal-hero .eyebrow {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold, #F2B340);
    padding: 0.35rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--gold, #F2B340) 30%, transparent);
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.personal-hero h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.2rem, 5.5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--fg);
    max-width: 22ch;
    margin: 0 0 1.5rem;
}

.personal-hero .lede {
    font-family: var(--sans);
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.6;
    color: var(--fg-2);
    max-width: 60ch;
    margin: 0 0 2.25rem;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.hero-ctas .cta-primary,
.hero-ctas .cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.95rem 1.6rem;
    border-radius: 100px;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.hero-ctas .cta-primary {
    background: var(--cyan, #34E0D0);
    color: #060B14;
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--cyan, #34E0D0) 35%, transparent);
}

.hero-ctas .cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px -8px color-mix(in srgb, var(--cyan, #34E0D0) 50%, transparent);
}

.hero-ctas .cta-secondary {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--hair);
}

.hero-ctas .cta-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--fg-3);
}

.hero-note {
    font-family: var(--sans);
    font-size: 0.88rem;
    color: var(--fg-3);
    margin: 0;
}

/* ============ Cómo funciona ============ */
.howto {
    padding: clamp(3rem, 6vw, 5rem) 0;
    background: var(--bg-2, rgba(255, 255, 255, 0.015));
    border-top: 1px solid var(--hair);
    border-bottom: 1px solid var(--hair);
}

.howto-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2.25rem;
    counter-reset: step;
}

.howto-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: start;
}

.howto-step-num {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    color: var(--cyan, #34E0D0);
    min-width: 3rem;
    text-align: center;
}

.howto-step h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.25rem;
    margin: 0 0 0.6rem;
    color: var(--fg);
}

.howto-step p {
    font-family: var(--sans);
    color: var(--fg-2);
    line-height: 1.6;
    margin: 0;
    max-width: 65ch;
}

/* ============ Comparativa con Lector ============ */
.vs-reader {
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.vs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 700px) {
    .vs-grid { grid-template-columns: 1fr; }
}

.vs-col {
    padding: 1.75rem 1.75rem 1.5rem;
    border: 1px solid var(--hair);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
}

.vs-col-premium {
    border-color: color-mix(in srgb, var(--cyan, #34E0D0) 25%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--cyan, #34E0D0) 5%, transparent),
        rgba(255, 255, 255, 0.02));
}

.vs-col h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: var(--fg);
}

.vs-col-premium h3 { color: var(--cyan, #34E0D0); }

.vs-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.vs-col li {
    font-family: var(--sans);
    color: var(--fg-2);
    padding: 0.55rem 0;
    border-top: 1px solid var(--hair);
    line-height: 1.5;
    font-size: 0.95rem;
}

.vs-col li:first-child { border-top: none; }

/* ============ Onboarding form ============ */
.onboarding {
    padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 7rem);
}

.wrap-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

.form-intro {
    font-family: var(--sans);
    color: var(--fg-2);
    line-height: 1.6;
    margin: 0 0 2.5rem;
    max-width: 60ch;
}

.onboarding-form { display: grid; gap: 2rem; }

.form-field { display: grid; gap: 0.5rem; }

.form-field > label {
    font-family: var(--sans);
    font-weight: 500;
    color: var(--fg);
    font-size: 0.95rem;
}

.field-help {
    font-family: var(--sans);
    font-size: 0.82rem;
    color: var(--fg-3);
    margin: 0;
    line-height: 1.45;
}

.form-field input[type="email"],
.form-field input[type="text"],
.form-field textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--hair);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: border-color 0.15s ease, background 0.15s ease;
    box-sizing: border-box;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--cyan, #34E0D0);
    background: rgba(52, 224, 208, 0.04);
}

.form-field textarea { resize: vertical; min-height: 90px; }

/* Radio + checkbox tiles ----------------------------------------- */
.radio-group, .checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.radio-group-inline {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.radio-tile, .check-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--hair);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.92rem;
    color: var(--fg-2);
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    line-height: 1.4;
}

.radio-tile:hover, .check-tile:hover {
    border-color: var(--fg-3);
    background: rgba(255, 255, 255, 0.04);
}

.radio-tile input, .check-tile input {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--fg-3);
    border-radius: 50%;
    background: transparent;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    margin: 0;
}

.check-tile input { border-radius: 4px; }

.radio-tile input:checked,
.check-tile input:checked {
    border-color: var(--cyan, #34E0D0);
    background: var(--cyan, #34E0D0);
}

.radio-tile input:checked::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #060B14;
}

.check-tile input:checked::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #060B14;
    font-size: 11px;
    font-weight: 700;
}

.radio-tile:has(input:checked),
.check-tile:has(input:checked) {
    border-color: var(--cyan, #34E0D0);
    color: var(--fg);
    background: rgba(52, 224, 208, 0.06);
}

/* Honeypot — invisible para humanos. */
.honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* Submit ---------------------------------------------------------- */
.form-actions {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.form-actions .cta-primary {
    width: max-content;
    padding: 1rem 2rem;
    border: none;
    border-radius: 100px;
    background: var(--cyan, #34E0D0);
    color: #060B14;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-actions .cta-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px -8px color-mix(in srgb, var(--cyan, #34E0D0) 50%, transparent);
}

.form-actions .cta-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.form-disclaimer {
    font-family: var(--sans);
    font-size: 0.82rem;
    color: var(--fg-3);
    margin: 0;
    line-height: 1.5;
    max-width: 60ch;
}

/* Resultado ------------------------------------------------------- */
.form-result {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-family: var(--sans);
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-result.ok {
    background: rgba(52, 224, 208, 0.08);
    border: 1px solid color-mix(in srgb, var(--cyan, #34E0D0) 30%, transparent);
    color: var(--fg);
}

.form-result.err {
    background: rgba(255, 107, 138, 0.08);
    border: 1px solid color-mix(in srgb, var(--rose, #FF6B8A) 30%, transparent);
    color: var(--fg);
}

/* ============ Tiles con descripción inline (roles, horizonte, bloques) ============ */
/* Variantes "with-desc" del radio-group y checkbox-grid — más espacio vertical
   por tile para que entre la descripción debajo del título. */

.radio-group-with-desc {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.checkbox-grid-with-desc {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.radio-group-with-desc .radio-tile,
.checkbox-grid-with-desc .check-tile {
    align-items: flex-start;
    padding: 0.95rem 1.1rem;
    gap: 0.75rem;
}

.radio-group-with-desc .radio-tile input,
.checkbox-grid-with-desc .check-tile input {
    margin-top: 0.25rem;
}

.tile-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    position: relative;
}

.tile-title {
    font-weight: 500;
    color: var(--fg);
    font-size: 0.95rem;
    line-height: 1.25;
}

.tile-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--fg-3);
    text-transform: uppercase;
    margin-top: 0.05rem;
}

.tile-desc {
    font-family: var(--sans);
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--fg-3);
}

.radio-tile:has(input:checked) .tile-title,
.check-tile:has(input:checked) .tile-title {
    color: var(--cyan, #34E0D0);
}

.radio-tile:has(input:checked) .tile-desc,
.check-tile:has(input:checked) .tile-desc {
    color: var(--fg-2);
}

/* ============ Colapsable de sub-tesis (priority_theses) ============ */
.theses-expand {
    border: 1px solid var(--hair);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.theses-expand[open] {
    border-color: color-mix(in srgb, var(--cyan, #34E0D0) 25%, transparent);
    background: rgba(52, 224, 208, 0.025);
}

.theses-expand > summary {
    cursor: pointer;
    padding: 0.95rem 1.15rem;
    font-family: var(--sans);
    font-size: 0.92rem;
    color: var(--fg-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    list-style: none;
    transition: color 0.15s ease, background 0.15s ease;
}

.theses-expand > summary:hover { color: var(--fg); }

.theses-expand > summary::-webkit-details-marker { display: none; }

.theses-summary-text::before {
    content: "▸ ";
    display: inline-block;
    margin-right: 0.5em;
    transition: transform 0.18s ease;
}

.theses-expand[open] .theses-summary-text::before {
    content: "▾ ";
}

.theses-counter {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--cyan, #34E0D0);
    letter-spacing: 0.02em;
}

.theses-list {
    padding: 0.5rem 1.15rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid var(--hair);
}

.theses-loading {
    font-family: var(--sans);
    font-size: 0.88rem;
    color: var(--fg-3);
    text-align: center;
    padding: 1rem 0;
    margin: 0;
}

.theses-group { display: flex; flex-direction: column; gap: 0.4rem; }

.theses-group-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--fg-2);
    padding: 0.6rem 0 0.3rem;
    border-bottom: 1px solid var(--hair);
    margin-bottom: 0.3rem;
}

.theses-group-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--fg-3);
    text-transform: uppercase;
    padding: 0.12rem 0.45rem;
    border: 1px solid var(--hair);
    border-radius: 100px;
}

.thesis-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s ease;
    line-height: 1.35;
}

.thesis-check:hover {
    background: rgba(255, 255, 255, 0.03);
}

.thesis-check input {
    appearance: none;
    width: 15px;
    height: 15px;
    border: 1.5px solid var(--fg-3);
    border-radius: 4px;
    background: transparent;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    margin: 0.15rem 0 0;
}

.thesis-check input:checked {
    border-color: var(--cyan, #34E0D0);
    background: var(--cyan, #34E0D0);
}

.thesis-check input:checked::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #060B14;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.thesis-label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.thesis-title {
    font-family: var(--sans);
    font-size: 0.88rem;
    color: var(--fg);
}

.thesis-check:has(input:checked) .thesis-title {
    color: var(--cyan, #34E0D0);
}

.thesis-code {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--fg-3);
    letter-spacing: 0.04em;
}


/* ============================================================================
   Bloque 4: Stripe Checkout post-onboarding
   ========================================================================== */

.checkout-block {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--hair, rgba(120,170,240,0.12));
}

.checkout-card {
    padding: 2rem 1.75rem 1.85rem;
    border: 1px solid color-mix(in srgb, var(--cyan, #34E0D0) 35%, var(--hair));
    border-radius: 16px;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--cyan, #34E0D0) 7%, transparent) 0%,
            rgba(255, 255, 255, 0.02) 60%,
            transparent 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.checkout-card h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    color: var(--fg, #EAF1FB);
    margin: 0 0 0.85rem;
    letter-spacing: -0.01em;
}

.checkout-card p {
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--fg-dim, rgba(234,241,251,0.7));
    margin: 0 0 1.4rem;
}

.checkout-card .cta-primary {
    width: auto;
    min-width: 280px;
    margin: 0.4rem 0 1rem;
}

.checkout-disclaimer {
    font-family: var(--sans);
    font-size: 0.82rem !important;
    line-height: 1.5;
    color: var(--fg-faint, rgba(234,241,251,0.5)) !important;
    margin: 0 !important;
}

.checkout-error {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid color-mix(in srgb, var(--rose, #FF6B8A) 40%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--rose, #FF6B8A) 8%, transparent);
    color: var(--rose, #FF6B8A);
    font-family: var(--sans);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Banner post-checkout (success/cancelled tras volver de Stripe) */
.post-checkout-banner {
    margin: 2rem 0;
    padding: 1.4rem 1.6rem;
    border-radius: 14px;
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.55;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.post-checkout-banner.post-checkout-success {
    border: 1px solid color-mix(in srgb, var(--cyan, #34E0D0) 50%, transparent);
    background: color-mix(in srgb, var(--cyan, #34E0D0) 10%, transparent);
    color: var(--fg, #EAF1FB);
}

.post-checkout-banner.post-checkout-cancelled {
    border: 1px solid color-mix(in srgb, var(--fg-dim, #888) 30%, var(--hair));
    background: rgba(255, 255, 255, 0.03);
    color: var(--fg-dim, rgba(234,241,251,0.75));
}

/* Mobile: que el botón ocupe todo el ancho */
@media (max-width: 599px) {
    .checkout-card { padding: 1.5rem 1.25rem 1.4rem; }
    .checkout-card .cta-primary { width: 100%; min-width: 0; }
}


/* ============================================================================
   Bloque "¿Ya tenés cuenta?" — Stripe Customer Portal (Commit 3 Bloque 4)
   ========================================================================== */

.manage-block {
    margin-top: 2rem;
}

.manage-details {
    border: 1px solid var(--hair, rgba(120,170,240,0.12));
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.015);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.manage-details[open] {
    border-color: color-mix(in srgb, var(--cyan, #34E0D0) 25%, var(--hair));
}

.manage-summary {
    cursor: pointer;
    padding: 1rem 1.2rem;
    font-family: var(--sans);
    font-size: 0.92rem;
    color: var(--fg-dim, rgba(234,241,251,0.7));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    list-style: none;
    user-select: none;
    transition: color 0.15s ease;
}

.manage-summary::-webkit-details-marker { display: none; }

.manage-summary:hover {
    color: var(--fg, #EAF1FB);
}

.manage-summary-arrow {
    font-size: 0.85rem;
    color: var(--fg-faint, rgba(234,241,251,0.45));
    transition: transform 0.2s ease;
}

.manage-details[open] .manage-summary-arrow {
    transform: rotate(180deg);
}

.manage-card {
    padding: 0 1.3rem 1.5rem;
}

.manage-blurb {
    font-family: var(--sans);
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--fg-dim, rgba(234,241,251,0.7));
    margin: 0 0 1.1rem;
}

.manage-form {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.manage-input {
    flex: 1;
    min-width: 220px;
    padding: 0.7rem 0.95rem;
    font-family: var(--sans);
    font-size: 0.9rem;
    border: 1px solid var(--hair, rgba(120,170,240,0.2));
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--fg, #EAF1FB);
    transition: border-color 0.15s ease;
}

.manage-input:focus {
    outline: none;
    border-color: var(--cyan, #34E0D0);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan, #34E0D0) 12%, transparent);
}

.manage-input::placeholder {
    color: var(--fg-faint, rgba(234,241,251,0.4));
}

.cta-secondary {
    padding: 0.7rem 1.3rem;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fg, #EAF1FB);
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--cyan, #34E0D0) 45%, transparent);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.cta-secondary:hover:not(:disabled) {
    background: color-mix(in srgb, var(--cyan, #34E0D0) 10%, transparent);
    border-color: var(--cyan, #34E0D0);
    color: var(--cyan, #34E0D0);
}

.cta-secondary:disabled {
    opacity: 0.55;
    cursor: wait;
}

.manage-error {
    margin-top: 0.9rem;
    padding: 0.7rem 0.95rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    line-height: 1.45;
    border: 1px solid color-mix(in srgb, var(--rose, #FF6B8A) 35%, transparent);
    background: color-mix(in srgb, var(--rose, #FF6B8A) 8%, transparent);
    color: var(--rose, #FF6B8A);
    border-radius: 8px;
}

@media (max-width: 599px) {
    .manage-form { flex-direction: column; }
    .manage-input { min-width: 0; }
    .cta-secondary { width: 100%; }
}
