.recomendador-page {
    width: min(1220px, 94%);
    margin: 36px auto 64px;
    color: #0f172a;
}

.recomendador-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr);
    gap: 32px;
    align-items: end;
    margin-bottom: 28px;
    padding: 8px 2px 4px;
}

.recomendador-eyebrow,
.recommend-step {
    display: inline-block;
    color: #0f8f94;
    font-weight: 800;
    font-size: .76rem;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.recomendador-hero h1 {
    margin: 7px 0 12px;
    font-size: clamp(2.15rem, 4vw, 3.55rem);
    line-height: 1.02;
    letter-spacing: -.045em;
    color: #0f172a;
}

.recomendador-hero p {
    max-width: 790px;
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.7;
}

.recomendador-method {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #dce8ec;
    border-radius: 18px;
    background: linear-gradient(145deg, #f8fcfd, #eef8f9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}

.recomendador-method > div {
    display: grid;
    gap: 3px;
}

.recomendador-method > div > span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-bottom: 5px;
    border-radius: 9px;
    background: #159ca2;
    color: #fff;
    font-weight: 800;
}

.recomendador-method strong {
    color: #172033;
    font-size: .9rem;
}

.recomendador-method small {
    color: #6b7a8d;
    font-size: .77rem;
}

.recomendador-method > i {
    color: #56bfc4;
    font-style: normal;
    font-weight: 900;
}

.recommend-alert {
    padding: 14px 16px;
    margin: 14px 0;
    border-radius: 12px;
    border: 1px solid transparent;
    line-height: 1.5;
}

.recommend-alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.recommend-alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.recommend-alert-info {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #075985;
}

.recommend-form {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 26px;
    box-shadow: 0 16px 44px rgba(15, 23, 42, .07);
}

.recommend-form-head,
.recommend-resources-head,
.recommend-results-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.recommend-form-head {
    margin-bottom: 20px;
}

.recommend-form-head h2,
.recommend-results-title h2 {
    margin: 5px 0 7px;
    color: #0f172a;
    letter-spacing: -.02em;
}

.recommend-form-head p,
.recommend-results-title p,
.recommend-resources-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.recommend-form-badge {
    flex: 0 0 auto;
    padding: 7px 11px;
    border-radius: 999px;
    background: #e8f8f8;
    color: #0f7f84;
    font-weight: 800;
    font-size: .76rem;
}

.recommend-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.recommend-field-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #e3e8ef;
    border-radius: 15px;
    background: #fafcfd;
}

.recommend-field-label {
    color: #334155;
    font-weight: 800;
    font-size: .9rem;
}

.recommend-field-card small {
    color: #64748b;
    line-height: 1.45;
}

.recommend-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    background: #fff;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.recommend-input-wrap:focus-within {
    border-color: #159ca2;
    box-shadow: 0 0 0 3px rgba(21, 156, 162, .12);
}

.recommend-input-wrap > span {
    flex: 0 0 auto;
    width: 42px;
    text-align: center;
    color: #0f8f94;
    font-weight: 800;
}

.recommend-input-wrap input,
.recommend-input-wrap select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px 10px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1e293b;
    font: inherit;
}

.recommend-resources {
    margin-top: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 17px;
    background: #fbfdfd;
}

.recommend-resources-head {
    align-items: center;
}

.recommend-resources-head h3 {
    margin: 5px 0 6px;
    color: #1e293b;
    font-size: 1.05rem;
}

.recommend-resource-counter {
    flex: 0 0 auto;
    min-width: 116px;
    padding: 11px 13px;
    border-radius: 13px;
    background: #eaf8f8;
    text-align: center;
}

.recommend-resource-counter strong {
    display: block;
    color: #0f7f84;
    font-size: 1.45rem;
    line-height: 1;
}

.recommend-resource-counter span {
    display: block;
    margin-top: 4px;
    color: #51707a;
    font-size: .72rem;
}

.recommend-resource-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 12px;
}

.recommend-resource-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.recommend-check {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.recommend-check:hover {
    transform: translateY(-1px);
    border-color: #9edbdd;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
}

.recommend-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.recommend-check-mark {
    display: grid;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 1px solid #c8d5df;
    border-radius: 7px;
    color: transparent;
    background: #fff;
    font-size: .78rem;
    font-weight: 900;
}

.recommend-check:has(input:checked) {
    background: #effafa;
    border-color: #5bc5c9;
}

.recommend-check:has(input:checked) .recommend-check-mark {
    background: #159ca2;
    border-color: #159ca2;
    color: #fff;
}

.recommend-check-all {
    width: fit-content;
    min-height: auto;
    padding: 8px 11px;
    background: #f8fbfc;
    font-weight: 700;
}

.recommend-check-all::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #159ca2;
}

.recommend-check-all .recommend-check-mark {
    display: none;
}

.recommend-clear-resources {
    border: 0;
    background: transparent;
    color: #64748b;
    font-weight: 700;
    cursor: pointer;
    padding: 7px 0;
}

.recommend-clear-resources:hover {
    color: #0f7f84;
}

.recommend-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
}

.recommend-form-note {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: .82rem;
}

.recommend-form-note > span {
    color: #159ca2;
}

.recommend-submit,
.recommend-feedback button {
    border: 0;
    border-radius: 12px;
    background: #159ca2;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.recommend-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 48px;
    padding: 12px 18px;
    box-shadow: 0 10px 22px rgba(21, 156, 162, .2);
}

.recommend-submit b {
    font-size: 1.05rem;
}

.recommend-submit:hover,
.recommend-feedback button:hover {
    transform: translateY(-1px);
    background: #0f858a;
}

.recommend-results {
    margin-top: 38px;
}

.recommend-results-title {
    align-items: center;
    margin-bottom: 18px;
}

.recommend-count-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #64748b;
    font-size: .82rem;
}

.recommend-count {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #e6f7f7;
    color: #0f7f84;
    font-size: 1.1rem;
    font-weight: 900;
}

.recommend-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.recommend-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .055);
}

.recommend-card-featured {
    border-color: #79d0d4;
    box-shadow: 0 14px 32px rgba(21, 156, 162, .12);
}

.recommend-card-featured::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #159ca2, #62d5d9);
}

.recommend-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 11px;
}

.recommend-rank {
    display: flex;
    align-items: center;
    gap: 9px;
}

.recommend-rank > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #173d48;
    color: #fff;
    font-weight: 900;
}

.recommend-rank small {
    color: #64748b;
    font-weight: 700;
}

.recommend-score-wrap {
    text-align: right;
}

.recommend-score-wrap span {
    display: block;
    color: #64748b;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.recommend-score-wrap strong {
    color: #047857;
    font-size: 1.2rem;
}

.recommend-score-track {
    height: 7px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #e9eef3;
    overflow: hidden;
}

.recommend-score-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #159ca2, #4fd1d6);
}

.recommend-card-title > span {
    color: #0f8f94;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.recommend-card-title h3 {
    margin: 5px 0 14px;
    color: #172033;
    font-size: 1.16rem;
    line-height: 1.35;
}

.recommend-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0 0 14px;
}

.recommend-meta > div {
    padding: 10px 11px;
    border: 1px solid #edf1f5;
    border-radius: 10px;
    background: #fafcfd;
}

.recommend-meta dt {
    color: #6b7a8d;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.recommend-meta dd {
    margin: 4px 0 0;
    color: #1e293b;
    font-weight: 800;
    font-size: .86rem;
}

.recommend-difficulty-bar {
    display: inline-flex;
    gap: 4px;
    width: 118px;
    max-width: 100%;
}

.recommend-difficulty-segment {
    flex: 1 1 0;
    height: 7px;
    border-radius: 999px;
    background: #dfe7ee;
}

.recommend-difficulty-segment.active {
    background: #159ca2;
}

.recommend-explain {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 14px;
    padding: 11px 12px;
    border-radius: 11px;
    background: #f0faf7;
    border: 1px solid #d6efe7;
}

.recommend-explain > span {
    display: grid;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #d6f5ea;
    color: #047857;
    font-weight: 900;
}

.recommend-explain p {
    margin: 0;
    color: #45665f;
    font-size: .82rem;
    line-height: 1.45;
}

.recommend-card-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.recommend-required {
    min-width: 0;
    padding: 12px;
    border: 1px solid #edf1f5;
    border-radius: 11px;
    background: #f8fafc;
    color: #334155;
}

.recommend-required > strong {
    display: block;
    margin-bottom: 8px;
    font-size: .82rem;
    color: #334155;
}

.recommend-required > span {
    color: #64748b;
    font-size: .82rem;
}

.recommend-required ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.recommend-required li {
    position: relative;
    padding-left: 13px;
    color: #475569;
    font-size: .82rem;
    line-height: 1.4;
}

.recommend-required li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #159ca2;
}

.recommend-required li small {
    display: inline-block;
    margin-left: 4px;
    color: #7a8999;
}

.recommend-feedback,
.recommend-discarded {
    margin-top: 16px;
}

.recommend-feedback {
    padding-top: 14px;
    border-top: 1px solid #edf1f5;
}

.recommend-feedback summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    color: #0f7f84;
    font-weight: 800;
    list-style: none;
}

.recommend-feedback summary::-webkit-details-marker,
.recommend-discarded summary::-webkit-details-marker {
    display: none;
}

.recommend-feedback form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 13px;
    border-radius: 11px;
    background: #f8fafc;
}

.recommend-feedback label {
    display: grid;
    gap: 5px;
    color: #475569;
    font-size: .82rem;
    font-weight: 700;
}

.recommend-feedback select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
}

.recommend-feedback button {
    justify-self: start;
    padding: 9px 13px;
}

.recommend-no-results,
.recommend-empty {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
}

.recommend-no-results > span {
    color: #159ca2;
    font-size: 1.5rem;
}

.recommend-no-results p {
    margin: 5px 0 0;
    color: #64748b;
}

.recommend-discarded {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.recommend-discarded summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #334155;
    font-weight: 800;
    list-style: none;
}

.recommend-discarded summary b {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #fff1f2;
    color: #be123c;
}

.recommend-discarded-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.recommend-discarded-list article {
    padding: 12px;
    border-left: 3px solid #fca5a5;
    border-radius: 8px;
    background: #fff7f7;
}

.recommend-discarded-list ul {
    margin: 8px 0 0;
}

/* Dark mode */
html[data-theme="dark"] .recomendador-page {
    color: #e8f0f7;
}

html[data-theme="dark"] .recomendador-hero h1,
html[data-theme="dark"] .recommend-form-head h2,
html[data-theme="dark"] .recommend-results-title h2,
html[data-theme="dark"] .recommend-card-title h3,
html[data-theme="dark"] .recommend-resources-head h3 {
    color: #f3f7fb !important;
}

html[data-theme="dark"] .recomendador-hero p,
html[data-theme="dark"] .recommend-form-head p,
html[data-theme="dark"] .recommend-results-title p,
html[data-theme="dark"] .recommend-resources-head p,
html[data-theme="dark"] .recommend-field-card small {
    color: #aebed0 !important;
}

html[data-theme="dark"] .recomendador-eyebrow,
html[data-theme="dark"] .recommend-step,
html[data-theme="dark"] .recommend-card-title > span {
    color: #54d1d6;
}

html[data-theme="dark"] .recomendador-method {
    background: linear-gradient(145deg, #111b2b, #0e1826);
    border-color: #2c3f55;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] .recomendador-method strong,
html[data-theme="dark"] .recommend-field-label,
html[data-theme="dark"] .recommend-meta dd,
html[data-theme="dark"] .recommend-required > strong,
html[data-theme="dark"] .recommend-discarded summary,
html[data-theme="dark"] .recommend-no-results strong {
    color: #eef5fb !important;
}

html[data-theme="dark"] .recomendador-method small,
html[data-theme="dark"] .recommend-rank small,
html[data-theme="dark"] .recommend-score-wrap span,
html[data-theme="dark"] .recommend-meta dt,
html[data-theme="dark"] .recommend-form-note,
html[data-theme="dark"] .recommend-count-wrap {
    color: #9fb0c2 !important;
}

html[data-theme="dark"] .recommend-form {
    background: #111b2b !important;
    border-color: #2b3c50 !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] .recommend-form-badge,
html[data-theme="dark"] .recommend-resource-counter,
html[data-theme="dark"] .recommend-count {
    background: #15343c;
    color: #7be2e6;
}

html[data-theme="dark"] .recommend-resource-counter span {
    color: #9fc0c4;
}

html[data-theme="dark"] .recommend-field-card,
html[data-theme="dark"] .recommend-resources {
    background: #0e1826;
    border-color: #2c3f55;
}

html[data-theme="dark"] .recommend-input-wrap,
html[data-theme="dark"] .recommend-feedback select {
    background: #0d1725;
    border-color: #3a5068;
}

html[data-theme="dark"] .recommend-input-wrap input,
html[data-theme="dark"] .recommend-input-wrap select,
html[data-theme="dark"] .recommend-feedback select {
    color: #f1f6fb !important;
    color-scheme: dark;
}

html[data-theme="dark"] .recommend-input-wrap input::placeholder {
    color: #8294aa;
}

html[data-theme="dark"] .recommend-check {
    background: #172437;
    border-color: #34485f;
    color: #e6eef6;
}

html[data-theme="dark"] .recommend-check:hover {
    border-color: #43aeb5;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] .recommend-check-mark {
    background: #0d1725;
    border-color: #466078;
}

html[data-theme="dark"] .recommend-check:has(input:checked) {
    background: #15343c;
    border-color: #36b9bf;
}

html[data-theme="dark"] .recommend-check:has(input:checked) .recommend-check-mark {
    background: #35bdc3;
    border-color: #35bdc3;
}

html[data-theme="dark"] .recommend-check-all {
    background: #132033;
}

html[data-theme="dark"] .recommend-clear-resources {
    color: #9fb0c2;
}

html[data-theme="dark"] .recommend-card {
    background: #111b2b;
    border-color: #2b3c50;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .recommend-card-featured {
    border-color: #327d82;
}

html[data-theme="dark"] .recommend-score-track {
    background: #27384b;
}

html[data-theme="dark"] .recommend-score-wrap strong {
    color: #7ce7c0;
}

html[data-theme="dark"] .recommend-meta > div,
html[data-theme="dark"] .recommend-required,
html[data-theme="dark"] .recommend-feedback form {
    background: #0e1826;
    border-color: #26384c;
}

html[data-theme="dark"] .recommend-required > span,
html[data-theme="dark"] .recommend-required li,
html[data-theme="dark"] .recommend-feedback label,
html[data-theme="dark"] .recommend-no-results p {
    color: #c6d2df !important;
}

html[data-theme="dark"] .recommend-required li small {
    color: #94a6b8;
}

html[data-theme="dark"] .recommend-difficulty-segment {
    background: #34475d;
}

html[data-theme="dark"] .recommend-difficulty-segment.active {
    background: #35bdc3;
}

html[data-theme="dark"] .recommend-explain {
    background: #102a28;
    border-color: #23504b;
}

html[data-theme="dark"] .recommend-explain p {
    color: #b8d7cf !important;
}

html[data-theme="dark"] .recommend-explain > span {
    background: #164138;
    color: #82e4c4;
}

html[data-theme="dark"] .recommend-feedback {
    border-top-color: #26384c;
}

html[data-theme="dark"] .recommend-feedback summary {
    color: #68dce1;
}

html[data-theme="dark"] .recommend-no-results,
html[data-theme="dark"] .recommend-empty,
html[data-theme="dark"] .recommend-discarded {
    background: #111b2b;
    border-color: #33465b;
    color: #c6d2df;
}

html[data-theme="dark"] .recommend-discarded-list article {
    background: #251c24;
    border-left-color: #ef8d98;
    color: #d9e2ec;
}

html[data-theme="dark"] .recommend-discarded summary b {
    background: #3b2028;
    color: #ffb3c0;
}

html[data-theme="dark"] .recommend-alert-info {
    background: #102b3a;
    border-color: #2e637d;
    color: #b8e4f7;
}

html[data-theme="dark"] .recommend-alert-success {
    background: #123329;
    border-color: #2d6e58;
    color: #b6efd8;
}

html[data-theme="dark"] .recommend-alert-error {
    background: #3a1b20;
    border-color: #7a3943;
    color: #ffc4cb;
}

@media (max-width: 980px) {
    .recomendador-hero {
        grid-template-columns: 1fr;
    }

    .recomendador-method {
        max-width: 560px;
    }

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

    .recommend-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .recomendador-page {
        width: min(94%, 640px);
        margin-top: 24px;
    }

    .recomendador-hero {
        gap: 20px;
    }

    .recomendador-method {
        grid-template-columns: 1fr;
    }

    .recomendador-method > i {
        display: none;
    }

    .recommend-form {
        padding: 18px;
        border-radius: 17px;
    }

    .recommend-form-head,
    .recommend-resources-head,
    .recommend-results-title,
    .recommend-form-actions,
    .recommend-resource-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .recommend-form-grid,
    .recommend-resource-grid,
    .recommend-meta,
    .recommend-card-sections {
        grid-template-columns: 1fr;
    }

    .recommend-resource-counter {
        width: 100%;
        text-align: left;
    }

    .recommend-resource-counter strong,
    .recommend-resource-counter span {
        display: inline;
    }

    .recommend-submit {
        width: 100%;
    }
}
