:root {
    --compare-primary: #5b21b6;
    --compare-primary-dark: #3b1178;
    --compare-primary-soft: #f5f3ff;
    --compare-ink: #111827;
    --compare-muted: #667085;
    --compare-line: #e7e5ee;
    --compare-surface: #ffffff;
    --compare-bg: #f8f7fb;
    --compare-success: #15803d;
    --compare-success-soft: #ecfdf3;
}

.public-shell {
    background: linear-gradient(180deg, #fff 0%, var(--compare-bg) 100%);
}

.public-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--compare-line);
    background:
        radial-gradient(circle at 88% 10%, rgba(91, 33, 182, .10), transparent 30%),
        linear-gradient(180deg, #fff 0%, #faf9ff 100%);
}

.public-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--compare-primary);
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.public-title {
    color: var(--compare-ink);
    font-weight: 850;
    letter-spacing: -.045em;
    line-height: 1.02;
}

.public-copy {
    color: var(--compare-muted);
    line-height: 1.75;
}

.public-card {
    border: 1px solid var(--compare-line);
    border-radius: 22px;
    background: var(--compare-surface);
    box-shadow: 0 14px 34px rgba(16, 24, 40, .06);
}

.public-pill {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .42rem .68rem;
    border: 1px solid var(--compare-line);
    border-radius: 999px;
    background: #fff;
    color: #475467;
    font-size: .78rem;
    font-weight: 700;
}

.public-action {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--compare-primary), #7c3aed);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(91, 33, 182, .20);
}

.public-action:hover,
.public-action:focus {
    color: #fff;
    background: linear-gradient(135deg, #4c1d95, #6d28d9);
}

/* Footer público */
.compare-footer {
    background: #111827;
    color: #fff;
}

.compare-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 850;
    text-decoration: none;
}

.compare-footer__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
    font-weight: 900;
}

.compare-footer__copy {
    max-width: 330px;
    color: #98a2b3;
    font-size: .9rem;
    line-height: 1.7;
}

.compare-footer__socials {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.compare-footer__socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #344054;
    border-radius: 10px;
    background: #1d2939;
    color: #d0d5dd;
    text-decoration: none;
    transition: transform .16s ease, background .16s ease, color .16s ease;
}

.compare-footer__socials a:hover {
    transform: translateY(-2px);
    background: #344054;
    color: #fff;
}

.compare-footer__title {
    margin-bottom: .8rem;
    color: #fff;
    font-size: .8rem;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.compare-footer__links {
    display: grid;
    gap: .55rem;
}

.compare-footer__links a,
.compare-footer__bottom a {
    color: #98a2b3;
    font-size: .88rem;
    text-decoration: none;
}

.compare-footer__links a:hover,
.compare-footer__bottom a:hover {
    color: #fff;
}

.compare-footer__course {
    display: block;
    padding: .85rem;
    border: 1px solid #344054;
    border-radius: 14px;
    background: #1d2939;
    color: #fff;
    text-decoration: none;
}

.compare-footer__course span {
    display: block;
    margin-bottom: .25rem;
    color: #a78bfa;
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.compare-footer__course strong {
    display: block;
    font-size: .88rem;
    line-height: 1.45;
}

.compare-footer__bottom {
    border-top: 1px solid #344054;
    color: #667085;
    font-size: .78rem;
}

/* Legales */
.legal-page {
    background: var(--compare-bg);
}

.legal-page__hero {
    padding: 3.4rem 0 2.8rem;
    border-bottom: 1px solid var(--compare-line);
    background: #fff;
}

.legal-page__layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.legal-nav {
    position: sticky;
    top: 96px;
    padding: .9rem;
    border: 1px solid var(--compare-line);
    border-radius: 18px;
    background: #fff;
}

.legal-nav__title {
    padding: .4rem .55rem .75rem;
    color: #98a2b3;
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.legal-nav a {
    display: block;
    padding: .7rem .75rem;
    border-radius: 10px;
    color: #475467;
    font-size: .88rem;
    font-weight: 650;
    text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a.active {
    background: var(--compare-primary-soft);
    color: var(--compare-primary);
}

.legal-content {
    padding: 2rem;
    border: 1px solid var(--compare-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .04);
}

.legal-content h2 {
    margin-top: 2rem;
    color: var(--compare-ink);
    font-size: 1.15rem;
    font-weight: 800;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p,
.legal-content li {
    color: #475467;
    line-height: 1.8;
}

/* Errores */
.error-page {
    min-height: 68vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 50% 20%, rgba(91, 33, 182, .10), transparent 32%),
        #fff;
}

.error-page__code {
    display: inline-flex;
    padding: .45rem .75rem;
    border-radius: 999px;
    background: var(--compare-primary-soft);
    color: var(--compare-primary);
    font-size: .75rem;
    font-weight: 850;
    letter-spacing: .08em;
}

.error-page__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    margin-bottom: 1.3rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #ede9fe, #f5f3ff);
    color: var(--compare-primary);
    font-size: 2rem;
}

/* Login */
.login-page {
    min-height: calc(100vh - 72px);
    background:
        radial-gradient(circle at 12% 18%, rgba(91, 33, 182, .10), transparent 28%),
        linear-gradient(180deg, #fff, #f8f7fb);
}

.login-panel {
    overflow: hidden;
    border: 1px solid var(--compare-line);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 25px 60px rgba(16, 24, 40, .10);
}

.login-panel__intro {
    height: 100%;
    padding: 2.5rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(124, 58, 237, .42), transparent 35%),
        linear-gradient(145deg, #1f1533, #3b1178);
    color: #fff;
}

.login-panel__intro p {
    color: #ddd6fe;
    line-height: 1.7;
}

.login-panel__form {
    padding: 2.5rem;
}

.login-panel .form-control {
    min-height: 50px;
    border-radius: 12px;
}

@media (max-width: 991.98px) {
    .legal-page__layout {
        grid-template-columns: 1fr;
    }

    .legal-nav {
        position: static;
        display: flex;
        overflow-x: auto;
        gap: .35rem;
        padding: .7rem;
        white-space: nowrap;
    }

    .legal-nav__title {
        display: none;
    }

    .legal-nav a {
        flex: 0 0 auto;
    }
}

@media (max-width: 575.98px) {
    .public-title {
        font-size: 2.1rem;
    }

    .legal-page__hero {
        padding: 2.5rem 0 2rem;
    }

    .legal-content {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .login-panel__intro,
    .login-panel__form {
        padding: 1.5rem;
    }
}
