/*
 * Fondo principal de la página.
 * Para volver al degradé original, cambia --page-bg por --page-bg-gradient.
 */
:root {
    --page-bg-white: #fff;
    --page-bg-gradient: linear-gradient(135deg, #b9c3fa, #84c7fb);
    --page-bg: var(--page-bg-white);
}

.inscripcion-body {
    background: var(--page-bg);
}

/* Versión discreta en la esquina superior derecha de la cabecera (fuera del flujo) */
.brand {
    position: relative;
}

.brand .version-number {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.3px;
    color: #9aa8c4;
    pointer-events: none;
}

.steps,
.substep-card .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.selected-plan-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 20px;
    padding: 10px 14px;
    border: 1px solid #c8e1ff;
    border-radius: 9px;
    background: linear-gradient(110deg, #f1f7ff 0%, #f8fbff 100%);
}

.plan-sidebar {
    min-width: 0;
    padding: 12px;
    border: 1px solid #d5deed;
    border-radius: 6px;
    background: #f8faff;
}

.plan-columns-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) minmax(270px, 1fr);
    align-items: start;
    gap: 20px;
}

.plan-sidebar .selected-plan-summary {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 8px 10px;
    margin: 0;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 1px solid #dce6f5;
    border-radius: 0;
    background: transparent;
}

.plan-sidebar .selected-plan-icon {
    width: 48px;
    height: 48px;
}

.plan-sidebar .selected-plan-copy {
    gap: 3px;
    font-size: 11px;
}

.plan-sidebar .selected-plan-copy strong {
    font-size: 13px;
}

.plan-sidebar .selected-plan-copy small {
    font-size: 11px;
    line-height: 1.4;
}

.plan-sidebar .selected-plan-actions {
    grid-column: 1 / -1;
    flex: initial;
    gap: 5px;
}

.plan-sidebar .plan-summary-link {
    width: 100%;
    min-height: 32px;
}

.result-content {
    padding: 0 12px;
    text-align: center;
}

.result-heading {
    margin: 2px 0 14px;
}

.result-heading .result-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 9px;
    font-size: 29px;
}

.result-heading h1 {
    margin-bottom: 5px;
    font-size: 25px;
}

.result-heading p {
    max-width: 920px;
    margin: 0 auto;
    color: #52618a;
    font-size: 13px;
    line-height: 1.45;
}

.result-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr);
    align-items: start;
    gap: 16px;
    text-align: left;
}

.result-sidebar {
    display: grid;
    min-width: 0;
    gap: 12px;
}

.result-panel {
    min-width: 0;
    padding: 12px;
    border: 1px solid #d5deed;
    border-radius: 6px;
    background: #f8faff;
    color: #354477;
}

.result-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 11px;
    color: var(--dark);
    font-size: 17px;
}

.result-panel-icon {
    display: flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #deedff;
    color: var(--blue);
}

.result-panel-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.result-details-list,
.result-summary-list {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
    margin: 0;
    border: 1px solid #d9e5f5;
    border-radius: 5px;
    overflow: hidden;
    font-size: 12px;
}

.result-details-list dt,
.result-details-list dd,
.result-summary-list dt,
.result-summary-list dd {
    min-width: 0;
    margin: 0;
    padding: 7px 9px;
    border-bottom: 1px solid #e1eaf6;
    overflow-wrap: anywhere;
}

.result-details-list dt,
.result-summary-list dt {
    color: #66779f;
}

.result-details-list dd,
.result-summary-list dd {
    color: var(--dark);
}

.result-details-list dt:nth-last-of-type(1),
.result-details-list dd:nth-last-of-type(1),
.result-summary-list dt:nth-last-of-type(1),
.result-summary-list dd:nth-last-of-type(1) {
    border-bottom: 0;
}

.result-summary-list {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    border: 0;
    border-radius: 0;
    font-size: 12px;
}

.result-summary-list dt,
.result-summary-list dd {
    padding: 5px 2px;
    border-bottom: 0;
}

.result-summary-list dd {
    text-align: right;
}

.result-summary-list .result-total-label,
.result-summary-list .result-total-value {
    padding-top: 9px;
    border-top: 1px solid #dce6f5;
}

.result-summary-list .result-total-value {
    font-weight: 700;
}

.quote-block {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #c8dcff;
    border-radius: 6px;
    background: #f2f7ff;
}

.quote-block h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 7px;
    color: #182554;
    font-size: 14px;
}

.quote-icon {
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dceaff;
    color: #0874f9;
    font-size: 17px;
    font-weight: 700;
}

.quote-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    margin: 0;
    font-size: 12px;
}

.quote-list dt,
.quote-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.quote-list dt {
    color: #66779f;
}

.quote-list dd {
    color: var(--dark);
    text-align: right;
}

.quote-list .quote-emphasis {
    margin-top: 4px;
    padding-top: 7px;
    border-top: 1px solid #c8dcff;
    color: #075fc5;
    font-weight: 700;
}

.quote-block.today {
    border-color: #f3d477;
    background: #fff9e8;
}

.quote-block.today .quote-icon {
    background: #ffedb5;
    color: #1b2b5c;
}

.quote-block.today .quote-emphasis {
    border-color: #f3d477;
    border-radius: 4px;
    background: #fff1c2;
    color: #17224c;
    font-size: 14px;
}

.quote-note {
    margin: 10px 0 0;
    padding: 9px;
    border: 1px solid #c8dcff;
    border-radius: 5px;
    background: #edf6ff;
    color: #354477;
    font-size: 12px;
    line-height: 1.45;
}

.payment-sidebar .summary > #quote-content .quote-block {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #c8dcff;
    border-radius: 6px;
    background: #f2f7ff;
}

.payment-sidebar .summary > #quote-content .quote-block.today {
    border-color: #f3d477;
    background: #fff9e8;
}

.payment-sidebar .summary > #quote-content .quote-list {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    margin: 0;
}

.payment-sidebar .summary > #quote-content .quote-list dt,
.payment-sidebar .summary > #quote-content .quote-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.payment-sidebar .summary > #quote-content .quote-list dd {
    justify-self: end;
    padding-left: 4px;
    text-align: right;
}

.result-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid #c8e1ff;
    border-radius: 5px;
    background: #edf6ff;
    color: #354477;
    font-size: 12px;
    line-height: 1.45;
}

.result-notice-icon {
    display: flex;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 2px solid var(--blue);
    border-radius: 50%;
    color: var(--blue);
    font-size: 17px;
    font-weight: 700;
}

.result-notice strong {
    color: #174d91;
}

.result-notice p {
    margin: 3px 0 0;
}

.result-notice-error {
    border-color: #f0d7d7;
    background: #fff8f8;
}

.result-notice-error .result-notice-icon {
    border-color: #c84650;
    color: #c84650;
}

.result-notice-error strong {
    color: #9f2933;
}

.result-app-panel {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px;
    border: 1px solid #c7ebd0;
    border-radius: 6px;
    background: #f1fbf4;
    color: #18743a;
}

.result-app-icon {
    display: flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ddf4e4;
    font-size: 22px;
}

.result-app-copy {
    min-width: 0;
    font-size: 11px;
}

.result-app-copy strong {
    font-size: 13px;
}

.result-app-copy p {
    margin: 4px 0 8px;
    line-height: 1.4;
}

.result-store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.result-store-badges span {
    padding: 6px 10px;
    border-radius: 4px;
    background: #202124;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.result-actions .btn {
    min-width: 0;
    width: 100%;
}

.result-actions .result-whatsapp-button {
    width: 100%;
    min-height: 42px;
}

.result-actions-single {
    grid-template-columns: minmax(0, 1fr);
}

.result-actions-single .btn {
    margin: 0;
}

.result-card {
    width: min(100%, 1280px);
    min-height: 0;
    padding: 20px 28px 18px;
}

.result-card .result-content {
    padding: 0;
}

.result-columns {
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    align-items: stretch;
    gap: 16px;
}

.result-columns > .result-panel {
    height: 100%;
}

.result-details-list {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
}

.result-app-panel {
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding: 10px 14px;
}

.result-app-icon {
    flex-basis: 54px;
    width: 54px;
    height: 54px;
}

.result-app-icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.result-app-copy {
    flex: 1;
    font-size: 12px;
}

.result-app-copy strong {
    font-size: 15px;
}

.result-app-copy p {
    margin: 4px 0 0;
}

.result-store-badges {
    flex: 0 0 auto;
    gap: 10px;
}

.result-store-badges a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 144px;
    padding: 5px 10px;
    border-radius: 5px;
    background: #202124;
    color: #fff;
    font-size: 14px;
    line-height: 1.05;
    text-decoration: none;
}

.result-store-badges .store-logo {
    display: block;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
}

.result-store-badges .store-logo-apple {
    fill: #fff;
}

.result-store-badges .store-logo-google {
    flex-basis: 25px;
    width: 25px;
}

.result-store-badges a small {
    display: block;
    font-size: 8px;
    font-weight: 400;
}

.result-actions {
    margin-top: 12px;
}

.result-actions .btn {
    height: 42px;
}

.result-card .version {
    padding-top: 10px;
    border-top: 1px solid #edf0f7;
    color: #71809e;
    font-weight: 400;
}

@media (max-width: 900px) {
    .result-columns {
        grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
    }

    .result-store-badges a {
        min-width: 120px;
    }
}

@media (max-width: 700px) {
    .result-card {
        padding: 16px 18px;
    }

    .result-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .result-app-panel {
        flex-wrap: wrap;
    }

    .result-app-copy {
        flex: 1 1 calc(100% - 70px);
    }

    .result-store-badges {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .result-card {
        padding: 14px 12px;
    }

    .result-content .result-heading p {
        font-size: 12px;
    }

    .result-panel {
        padding: 10px;
    }

    .result-details-list,
    .result-summary-list {
        grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
        font-size: 11px;
    }
}

.substep-card .branch.active {
    border-color: var(--blue);
    background: #eaf4ff;
    color: var(--blue);
}

.substep-card .branch.active::before {
    content: "✓";
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.substep-card .step.is-active > span {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

.inscripcion-card > .cyberday-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2vw, 28px);
    min-height: 50px;
    margin: -16px -28px 20px;
    padding-top: 16px;
    padding-right: 24px;
    padding-bottom: 8px;
    padding-left: 24px;
    border-bottom: 1px solid #dce6f5;
    background: linear-gradient(90deg, #f5f9ff, #fff 48%, #f5f9ff);
    color: #52618a;
    text-align: left;
    position: relative;
    /* reserve space: left offset (48px) + logo width (82px) + gap (12px) */
    padding-left: 142px;
}

.inscripcion-card > .cyberday-brand img {
    width: 82px;
    flex: 0 0 auto;
    margin: 0;
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
}

.cyberday-divider {
    width: 1px;
    height: 30px;
    background: #cbd6e8;
}

.cyberday-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #101b58;
    font-size: 20px;
    white-space: nowrap;
}

.cyberday-logo svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: #7952ff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.3;
}

.cyberday-promo {
    font-size: 12px;
    font-weight: 400;
    text-align: center;
}

.cyberday-limited {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    white-space: nowrap;
}

.cyberday-limited svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: #788bab;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.plan-content .plans .plan,
.plan-change-dialog .change-plans .plan {
    overflow: hidden;
}

/* Positioning for modal plan detail card so the discount ribbon is anchored to the card */
.plan-detail-card {
    position: relative;
    overflow: visible; /* allow the ribbon to overflow the card corner */
}

/* anchor the ribbon to the description panel (left column) inside the modal */
.plan-detail-description {
    position: relative;
    overflow: visible;
}

.plan-content .plans .plan.has-monthly-discount label,
.plan-change-dialog .change-plans .plan.has-monthly-discount label {
    padding-right: 64px;
}

.monthly-discount-ribbon {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    /* reduced by ~30% as requested */
    width: 84px;
    height: 84px;
    overflow: hidden;
    background: #f04444;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    color: #fff;
    pointer-events: none;
}

.monthly-discount-ribbon .ribbon-content {
    position: absolute;
    /* adjusted to stay centered inside smaller triangle */
    top: 6px;
    right: -14px;
    left: auto;
    width: 98px;
    transform: rotate(45deg);
    transform-origin: center center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    box-sizing: border-box;
    color: #fff;
    text-align: center;
    pointer-events: none;
}
/* prefer the first line to keep percent and DCTO. inline */
.monthly-discount-ribbon .ribbon-content > span { display:block; white-space:nowrap; padding:0 4px; }


.monthly-discount-ribbon .ribbon-percent {
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    display: inline-block;
    margin-left: 20px;
    margin-right: 0px;
}

.monthly-discount-ribbon .ribbon-dcto {
    font-size: 9px;
    font-weight: 800;
    display: inline-block;
    vertical-align: baseline;
    margin-top: 0;
    margin-left: 20px;
    margin-right: 0px;
}

.monthly-discount-ribbon .ribbon-label {
    font-size: 10px;
    font-weight: 600;
    margin-top: 4px;
    opacity: 0.98;
}

@media (max-width: 520px) {
    /* increase triangle by ~10% for mobile to improve legibility */
    .monthly-discount-ribbon {
        width: 82px;
        height: 82px;
    }
    .monthly-discount-ribbon .ribbon-content {
        top: 4px;
        right: -8px;
        left: auto;
        width: 101px;
        padding: 6px 6px;
    }

    .monthly-discount-ribbon .ribbon-percent { font-size: 12px; }
    .monthly-discount-ribbon .ribbon-dcto { font-size: 9px; }
    .monthly-discount-ribbon .ribbon-label { font-size: 8px; }
}

.plan-content .plans .plan .monthly-price-original,
.plan-change-dialog .change-plans .plan .monthly-price-original {
    display: inline-block;
    margin-right: 8px;
    color: #64728e;
    font-size: 12px;
    font-weight: 400;
    text-decoration: line-through;
    vertical-align: 3px;
}

.plan-content .plans .plan .price small,
.plan-change-dialog .change-plans .plan .price small {
    margin-left: 3px;
}

.plan-content .plans .plan-enrollment-pricing,
.plan-change-dialog .change-plans .plan-enrollment-pricing {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 30px;
    padding: 4px 7px;
    white-space: nowrap;
}

.enrollment-price-original {
    color: #64728e;
    font-weight: 400;
    text-decoration: line-through;
}

.enrollment-discount {
    margin-left: auto;
    padding: 4px 6px;
    border-radius: 4px;
    background: #8296b5;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}

@media (max-width: 800px) {
    .inscripcion-card > .cyberday-brand {
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .cyberday-promo {
        order: 1;
        flex-basis: 100%;
    }
}

@media (max-width: 520px) {
    .inscripcion-card > .cyberday-brand {
        margin: -14px -14px 18px;
        padding-top: 12px;
        padding-right: 10px;
        padding-bottom: 8px;
        padding-left: 10px;
        gap: 8px;
    }

    .inscripcion-card > .cyberday-brand img {
        width: 58px;
    }

    .cyberday-logo {
        font-size: 17px;
    }

    .cyberday-logo svg {
        width: 25px;
        height: 25px;
    }

    .cyberday-limited {
        font-size: 10px;
    }

    .plan-content .plans .plan-enrollment-pricing,
    .plan-change-dialog .change-plans .plan-enrollment-pricing {
        flex-wrap: wrap;
        white-space: normal;
    }

    .enrollment-discount {
        margin-left: 0;
    }
}

.plan-content .plans .plan label {
    font-size: 15px;
    line-height: 1.35;
}

.plan-content .plans .plan-enrollment {
    font-size: 11px;
}

.plan-content .benefit-group h3 {
    font-size: 12px;
}

.plan-content .plans .plan ul {
    font-size: 12px;
    line-height: 1.45;
}

.plan-content .plans .plan li {
    margin: 5px 0;
    padding-left: 16px;
}

.plan-content .benefits-toggle {
    font-size: 12px;
}

.identity-help {
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 10px;
    padding: 10px;
    border-color: #bfe7cb;
    background: #f2fbf4;
    color: #354477;
}

.identity-help-icon {
    display: flex;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: #168044;
}

.identity-help-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.identity-help-copy {
    display: grid;
    flex: 1 1 220px;
    gap: 3px;
    min-width: 0;
    color: #18743a;
    font-size: 12px;
    line-height: 1.4;
}

.identity-help-title {
    color: #18743a;
    font-size: 13px;
}

.identity-help-copy > span {
    flex: 1 1 220px;
}

.identity-help-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border: 1px solid #168044;
    border-radius: 5px;
    background: #168044;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.identity-help-button:hover {
    background: #116b38;
}

.identity-help-button:focus-visible {
    outline: 2px solid #168044;
    outline-offset: 2px;
}

.identity-help-button svg {
    width: 18px;
    height: 18px;
    margin-right: 7px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.identity-content .resend {
    margin: 9px 0 12px;
}

.identity-content .resend-wait strong {
    color: var(--blue);
}

.identity-content .resend a[hidden],
.identity-content .resend-wait[hidden] {
    display: none;
}

@media (max-width: 520px) {
    .identity-help-button {
        width: 100%;
        margin-left: 36px;
    }
}

.selected-plan-icon {
    display: flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #deedff;
    color: var(--blue);
}

.selected-plan-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.selected-plan-copy {
    display: grid;
    flex: 1;
    gap: 3px;
    min-width: 0;
    color: #354477;
    font-size: 13px;
}

.selected-plan-copy strong {
    color: var(--dark);
    font-size: 14px;
}

.selected-plan-name {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.selected-plan-name-wrap.is-expanded .selected-plan-name {
    display: block;
    overflow: visible;
}

.selected-plan-name-toggle {
    display: none;
    margin: 2px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--blue);
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.selected-plan-name-toggle:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.selected-plan-copy span,
.selected-plan-copy small {
    overflow-wrap: anywhere;
}

.selected-plan-copy small {
    color: #59698f;
    font-size: 12px;
}

.selected-plan-actions {
    display: flex;
    flex: 0 0 176px;
    flex-direction: column;
    gap: 6px;
}

.plan-summary-link,
.plan-detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid #91c6ff;
    border-radius: 5px;
    background: #fff;
    color: var(--blue);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.plan-summary-link:hover {
    background: #edf6ff;
}

.plan-summary-link svg {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.plan-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 18px;
    background: #17285866;
}

.plan-modal.open {
    display: flex;
}

#plan-detail-modal {
    z-index: 1002;
}

.plan-modal-dialog {
    display: flex;
    flex-direction: column;
    width: min(100%, 1180px);
    max-height: min(92vh, 900px);
    overflow: hidden;
    padding: 20px;
    border: 1px solid #d6deed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 36px #1024503d;
}

.plan-detail-dialog {
    width: min(100%, 1260px);
}

.plan-modal-header {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.plan-modal-header h2 {
    margin: 0 0 3px;
    color: var(--dark);
    font-size: 18px;
}

.plan-modal-header p {
    margin: 0;
    color: #52618a;
    font-size: 11px;
    line-height: 1.4;
}

.plan-modal-x {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #71809e;
    font-size: 24px;
    cursor: pointer;
}

.plan-detail-content {
    min-height: 0;
    overflow: auto;
}

.plan-detail-card {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 14px;
}

.plan-detail-description,
.plan-detail-benefits {
    min-width: 0;
    padding: 16px;
    border: 1px solid #dce5f1;
    border-radius: 6px;
}

.plan-detail-description {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fbff;
}

.plan-detail-description > strong {
    font-size: 15px;
    line-height: 1.35;
}

.plan-detail-badge {
    align-self: flex-start;
    padding: 4px 9px;
    border: 1px solid var(--blue);
    border-radius: 4px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
}

.plan-detail-price {
    color: var(--dark);
    font-size: 26px;
}

.plan-detail-description dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 14px;
    margin: 2px 0 0;
    padding-top: 12px;
    border-top: 1px solid #e1eaf5;
    font-size: 13px;
}

.plan-detail-description dt,
.plan-detail-description dd {
    display: flex;
    align-items: center;
}

.plan-detail-description dt {
    gap: 7px;
    color: #52618a;
}

.plan-detail-description dt svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--blue);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.plan-detail-description dd {
    justify-content: flex-end;
    margin: 0;
    color: var(--dark);
    font-weight: 700;
    text-align: right;
}

.plan-detail-benefits {
    background: #f1fbf5;
    border-color: #d5efdd;
    color: #187b35;
}

.plan-detail-benefits.excluded {
    background: #fff4f4;
    border-color: #f3dada;
    color: #bd3434;
}

.plan-detail-benefits h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.35;
}

.plan-detail-benefits h3::before {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #d7f2df;
    content: "✓";
    font-size: 15px;
}

.plan-detail-benefits.excluded h3::before {
    background: #ffdddd;
    content: "×";
    font-size: 18px;
}

.plan-detail-benefits ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #354477;
    font-size: 13px;
    line-height: 1.5;
}

.plan-detail-benefits li {
    position: relative;
    margin: 5px 0;
    padding-left: 20px;
    overflow-wrap: anywhere;
}

.plan-detail-benefits li::before {
    position: absolute;
    left: 0;
    color: #168b3a;
    content: "✓";
    font-weight: 700;
}

.plan-detail-benefits.excluded li::before {
    color: #df3038;
    content: "×";
    font-size: 16px;
}

.change-branch-tabs {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.change-plans-heading {
    flex: 0 0 auto;
    margin: 0 0 8px;
    color: var(--dark);
    font-size: 14px;
}

.plan-change-dialog .change-plans.plans {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding: 2px 4px 4px 2px;
}

.change-plans.plans .plan {
    min-height: 240px;
    height: 100%;
}

.change-plans.plans .plan.selected {
    border: 1px solid var(--blue);
    background: #f4f9ff;
    box-shadow: 0 0 0 1px #0875e11a;
}

.change-plans.plans .plan label {
    position: relative;
}

.change-plans.plans .plan input {
    position: absolute;
    top: 1px;
    left: 0;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    clip: auto;
    border: 1.5px solid #8291b1 !important;
    border-radius: 50%;
    outline: none;
    appearance: none;
    background: #fff;
}

.change-plans.plans .plan input:checked {
    border: 5px solid #fff !important;
    outline: 1px solid var(--blue);
    background: var(--blue);
}

.change-plans.plans .plan label > span {
    padding-left: 26px;
}

.plan-modal-footer {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #edf0f7;
}

.plan-modal-footer .btn {
    flex: 0 1 180px;
}

.plan-modal-footer .btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.plan-detail-footer .btn {
    flex-basis: 120px;
}

.plan-step-actions .btn {
    min-width: 0;
}

.plan-content .plans.is-empty {
    display: block;
    width: 100%;
}

.plans-empty-state {
    box-sizing: border-box;
    display: flex;
    min-height: 315px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 1px solid #d8eaff;
    border-radius: 5px;
    background: #f5f9fe;
    text-align: center;
}

.plans-empty-state h2 {
    margin: 0 0 14px;
    color: var(--dark);
    font-size: 24px;
}

.plans-empty-state p {
    margin: 0 0 5px;
    color: #59698f;
    font-size: 16px;
}

.plan-step-actions.has-no-plans .btn-back {
    flex: 0 0 216px;
}

@media (max-width: 900px) {
    .plan-change-dialog .change-plans.plans {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plan-detail-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plan-detail-description {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .selected-plan-summary {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .selected-plan-copy {
        flex-basis: calc(100% - 62px);
    }

    .selected-plan-actions {
        flex-basis: 100%;
        padding-left: 62px;
    }

    .plan-modal {
        padding: 9px;
    }

    .plan-modal-dialog {
        padding: 12px;
        max-height: 96vh;
    }

    .change-plans.plans {
        grid-template-columns: 1fr;
    }

    .plan-detail-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .plan-detail-description {
        grid-column: auto;
    }

    .plan-modal-footer {
        flex-direction: column;
    }

    .plan-modal-footer .btn {
        flex: 0 0 42px;
        width: 100%;
    }
}

.inscripcion-card.initial-card,
.inscripcion-card.identity-card,
.inscripcion-card.personal-card,
.inscripcion-card.plan-card,
.inscripcion-card.payment-card,
.inscripcion-card.contract-card,
.inscripcion-card.result-card {
    width: 100%;
    max-width: none;
    margin-right: auto;
    margin-left: auto;
}

/* Margen exterior responsive de la página */
.inscripcion-body {
    align-items: flex-start;
    padding: 14px 20px 20px;
}

@media (max-width: 1199px) {
    .inscripcion-body {
        padding: 11px 14px 14px;
    }
}

@media (max-width: 700px) {
    .inscripcion-body {
        padding: 9px 10px 10px;
    }
}

.substep-card .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.verification-form {
    display: grid;
    gap: 16px;
}

.verification-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 16px;
}

.verification-identity {
    min-width: 0;
    padding: 16px;
    border: 1px solid #d6e4f5;
    border-radius: 6px;
    background: #f8fbff;
}

.verification-identity fieldset {
    margin-bottom: 17px;
}

.verification-identity .radio-option:last-child {
    margin-right: 0;
}

.verification-identity .field-label {
    margin-bottom: 8px;
}

.verification-identity small {
    display: block;
    line-height: 1.4;
}

.verification-identity small[hidden] {
    display: none;
}

.verification-info {
    grid-column: 1 / -1;
    margin-top: 0;
}

.verification-form > .actions {
    margin-top: 0;
}

.identity-content .code-inputs {
    width: fit-content;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.plan-content .plans {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr));
}

/* When there is a single plan card, keep the visual width as if there were 4 cards in the row */
.plan-content .plans:has(.plan:only-child),
.plan-change-dialog .change-plans.plans:has(.plan:only-child) {
    grid-template-columns: repeat(4, minmax(min(100%, 255px), 1fr));
}

.payment-layout {
    gap: 20px;
}

@media (max-width: 900px) {
    .plan-columns-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .result-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .inscripcion-card.initial-card,
    .inscripcion-card.identity-card,
    .inscripcion-card.personal-card,
    .inscripcion-card.plan-card,
    .inscripcion-card.payment-card,
    .inscripcion-card.contract-card,
    .inscripcion-card.result-card {
        width: 100%;
    }

    .verification-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .verification-info {
        grid-column: auto;
    }

    .plan-content .plans {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .personal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plan-change-dialog .change-plans.plans {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .inscripcion-card.initial-card,
    .inscripcion-card.identity-card,
    .inscripcion-card.personal-card,
    .inscripcion-card.plan-card,
    .inscripcion-card.payment-card,
    .inscripcion-card.contract-card,
    .inscripcion-card.result-card {
        width: 100%;
    }

    .verification-identity {
        padding: 12px;
    }

    .plan-content .plans,
    .personal-grid,
    .payment-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .plan-change-dialog .change-plans.plans {
        grid-template-columns: minmax(0, 1fr);
    }

    .result-content {
        padding: 0 5px;
    }

    .result-heading h1 {
        font-size: 22px;
    }

    .result-details-list,
    .result-summary-list {
        grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
    }

    .result-details-list dt,
    .result-details-list dd {
        padding: 7px;
        font-size: 11px;
    }

    .result-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* La cabecera compartida debe quedar a ras del borde en result-card (padding propio) */
.result-card > .cyberday-brand {
    margin: -20px -28px 20px;
}

@media (max-width: 700px) {
    .result-card > .cyberday-brand {
        margin: -16px -18px 20px;
    }
}

@media (max-width: 520px) {
    .result-card > .cyberday-brand {
        margin: -14px -12px 18px;
    }
}