@font-face {
    font-family: Manrope;
    src: url("../fonts/manrope/manrope.ydtkt4wa28.ttf") format("truetype");
    font-weight: 200 800;
    font-display: block;
}

.nexo-home {
    --nexo-canvas: var(--application-canvas, #f5f8f9);
    --nexo-surface: var(--application-surface, #fff);
    --nexo-text: var(--application-text, #20313a);
    --nexo-muted: var(--application-muted, #63757e);
    --nexo-border: var(--application-border, #e0e7e9);
    --nexo-brand: var(--tenant-brand-primary, #086b75);
    --nexo-soft: color-mix(in srgb, var(--nexo-brand) 10%, var(--nexo-surface));
    --nexo-rail: var(--application-rail, #edf2f3);
    --focus-ring-color: #1165c5;
    font-family: Manrope, system-ui, sans-serif;
    color: var(--nexo-text);
}

.nexo-home.tenant-brand-primary--teal { --nexo-brand: #086b75; }
[data-color-scheme="dark"] .nexo-home {
    --nexo-canvas: var(--workspace-surface);
    --nexo-surface: var(--color-surface);
    --nexo-text: var(--color-text-primary);
    --nexo-muted: var(--color-text-muted);
    --nexo-border: var(--color-border);
    --nexo-brand: var(--color-action-primary);
    --nexo-rail: var(--workspace-rail);
    --focus-ring-color: #93b4ff;
}

.nexo-home .app-workbench { grid-template-columns: 226px minmax(0, 1fr); background: var(--nexo-canvas); }
.nexo-home .app-rail {
    padding: 28px 18px 20px;
    color: var(--nexo-text);
    background: var(--nexo-rail);
    border-inline-end: 1px solid var(--nexo-border);
    overflow: auto;
}
.nexo-home .app-rail__brand {
    grid-template-columns: 38px minmax(0, 1fr);
    flex-shrink: 0;
    justify-items: start;
    gap: 10px;
    margin: 0 8px 42px;
    color: inherit;
}
.nexo-home .app-rail__brand > span { width: 38px; height: 38px; border-radius: 4px; }
.nexo-home .app-rail__brand strong { text-align: start; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.nexo-home .overline, .nexo-home__rail-label {
    color: var(--nexo-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.nexo-home__rail-label { margin: 0 10px 12px; }
.nexo-home .app-rail__nav { gap: 4px; }
.nexo-home .app-rail__secondary { display: grid; gap: 4px; }
.nexo-home .app-rail a:focus-visible { outline-color: var(--focus-ring-color); }
.nexo-home :is(.app-rail__nav, .app-rail__secondary) > a {
    display: flex;
    gap: 12px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--nexo-text);
}
.nexo-home :is(.app-rail__nav, .app-rail__secondary) > a strong { font-size: 13px; font-weight: 700; }
.nexo-home :is(.app-rail__nav, .app-rail__secondary) > a[aria-current="page"],
.nexo-home :is(.app-rail__nav, .app-rail__secondary) > a:hover { color: var(--nexo-brand); background: var(--nexo-surface); }
.nexo-home__rail-footer { margin-top: auto; padding: 32px 10px 0; display: grid; gap: 6px; font-size: 11px; }
.nexo-home__rail-footer > span { color: var(--nexo-muted); }
.nexo-home__rail-footer > a { margin-top: 12px; padding-block: 12px; border-top: 1px solid var(--nexo-border); color: inherit; }
.nexo-home .app-topbar {
    min-height: 72px;
    height: auto;
    padding: 12px 40px;
    background: var(--nexo-surface);
    border-bottom: 1px solid var(--nexo-border);
    color: var(--nexo-text);
}
.nexo-home .app-topbar > div:first-child > strong { font-size: 14px; font-weight: 600; }
.nexo-home .app-topbar > div:first-child > span { display: none; }
.nexo-home .app-topbar__identity { background: var(--nexo-soft); color: var(--nexo-text); }

.nexo-home .student-home { display: block; width: auto; max-width: none; margin: 0; padding: 40px; }
.nexo-home .student-home__welcome { padding: 0; border: 0; }
.nexo-home .student-home__welcome h1 { margin: 12px 0 8px; font-size: 32px; line-height: 1.25; letter-spacing: -.025em; font-weight: 700; }
.nexo-home .student-home__welcome p:last-child,
.nexo-home .student-home__section > header > span { color: var(--nexo-muted); }
.nexo-home .student-home__section { margin-top: 32px; }
.nexo-home .student-home__section > header { align-items: baseline; }
.nexo-home .student-home__section > header h2 { font-size: 22px; margin: 0; }
.nexo-home .student-home__section > header > span { font-size: 12px; text-align: end; }

.nexo-resume { border: 1px solid var(--nexo-border); border-radius: 16px; overflow: hidden; background: var(--nexo-surface); }
.nexo-resume__course { display: grid; grid-template-columns: minmax(0, 35%) minmax(0, 1fr); gap: 28px; padding: 24px; align-items: center; }
.nexo-resume__cover { display: grid; place-items: center; aspect-ratio: 5 / 3; border-radius: 8px; overflow: hidden; background: var(--nexo-canvas); }
.nexo-resume__cover img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.nexo-home .course-tile__body h2, .nexo-home .course-tile__description { display: block; overflow-wrap: anywhere; }
.nexo-home .course-tile__cover--empty { aspect-ratio: 3 / 1; max-height: 132px; min-height: 0; width: 100%; background: var(--nexo-canvas); color: var(--nexo-muted); }
.nexo-resume__cover > span { color: var(--nexo-muted); font-size: 30px; font-weight: 700; }
.nexo-resume__details { overflow-wrap: anywhere; }
.nexo-resume__details h3 { font-size: 30px; line-height: 1.27; letter-spacing: -.025em; margin: 8px 0 12px; }
.nexo-resume__details p { font-size: 14px; line-height: 1.55; color: var(--nexo-muted); margin: 0 0 12px; }
.nexo-resume__details .overline { margin: 10px 0 0; font-size: 11px; }
.nexo-resume__details .nexo-resume__metadata { font-size: 12px; margin-bottom: 0; }
.nexo-resume__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(150px, 20%);
    gap: 24px;
    align-items: center;
    background: var(--nexo-soft);
    border-top: 1px solid var(--nexo-border);
    padding: 24px 28px;
}
.nexo-resume__footer p { margin: 0 0 4px; }
.nexo-resume__footer small { display: block; color: var(--nexo-muted); font-size: 12px; }
.nexo-resume__footer .nexo-resume__action {
    gap: 14px;
    min-height: 48px;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--nexo-brand);
    border-color: transparent;
    color: white;
    font-size: 14px;
}
.nexo-resume__footer .nexo-resume__action:hover { filter: brightness(.9); }
[data-color-scheme="dark"] .nexo-resume__footer .nexo-resume__action { color: var(--color-action-on-primary); }
.nexo-resume__progress { display: grid; gap: 3px; border-inline-start: 1px solid var(--nexo-border); padding-inline-start: 20px; }
.nexo-resume__progress strong { font-size: 24px; color: var(--nexo-muted); }
.nexo-resume__progress progress {
    appearance: none;
    height: 5px;
    width: 100%;
    border: 0;
    border-radius: 9px;
    overflow: hidden;
    background: var(--nexo-border);
}
.nexo-resume__progress progress::-webkit-progress-bar { background: var(--nexo-border); }
.nexo-resume__progress progress::-webkit-progress-value { background: var(--nexo-brand); }
.nexo-resume__progress progress::-moz-progress-bar { background: var(--nexo-brand); }

.nexo-home__overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin-block: 32px; }
.nexo-home__overview h2 { margin: 0 0 8px; font-size: 16px; }
.nexo-home__overview .overline { font-size: 11px; }
.nexo-home__overview p { color: var(--nexo-muted); max-width: 38ch; margin: 0; font-size: 14px; line-height: 1.6; }
.nexo-home__metrics { display: flex; flex-wrap: wrap; gap: 16px 28px; }
.nexo-home__metrics a { display: grid; color: var(--nexo-muted); text-decoration: none; font-size: 12px; }
.nexo-home__metrics a:hover { text-decoration: underline; }
.nexo-home__metrics strong { color: var(--nexo-text); font-size: 24px; font-weight: 600; }
.nexo-home__learning-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--nexo-brand); font-size: 12px; }
.nexo-home__enrollment { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 24px; border-top: 1px solid var(--nexo-border); font-size: 12px; color: var(--nexo-muted); }
.nexo-home__enrollment a { color: inherit; }

@media (min-width: 768px) and (max-width: 1199px) {
    .nexo-home .app-workbench { grid-template-columns: 226px minmax(0, 1fr); }
    .nexo-home .student-home, .nexo-home .app-topbar { padding-inline: 24px; }
    .nexo-resume__details h3 { font-size: 24px; }
}

@media (max-width: 767px) {
    .authenticated-app.nexo-home:not(.nexo-studio) {
        --nexo-mobile-nav-height: 4rem;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        overscroll-behavior-y: none;
    }
    .nexo-home:not(.nexo-studio) .app-workbench {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        height: 100dvh;
        min-height: 0;
        padding-bottom: calc(var(--nexo-mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    }
    .nexo-home:not(.nexo-studio) .app-workbench__body {
        grid-row: 1;
        grid-column: 1;
        overflow: auto;
        min-height: 0;
        overscroll-behavior-y: contain;
        scroll-padding-block: 8px;
    }
    .nexo-home .app-topbar { position: relative; }
    .nexo-home:not(.nexo-studio) .app-rail {
        position: fixed;
        inset: auto 0 0;
        height: calc(var(--nexo-mobile-nav-height) + env(safe-area-inset-bottom, 0px));
        max-height: none;
        overflow: visible;
        padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
        background: var(--nexo-surface);
        border: 0;
        border-top: 1px solid var(--nexo-border);
    }
    .nexo-home .app-rail__brand, .nexo-home__rail-label, .nexo-home__rail-footer { display: none; }
    .nexo-home:not(.nexo-studio) .app-rail__nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 100%; }
    .nexo-home:not(.nexo-studio) .app-rail__nav:not(:has(.app-rail__more)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nexo-home:not(.nexo-studio) .app-rail__secondary { display: none; }
    .nexo-home:not(.nexo-studio) .app-rail__more { display: block; min-width: 0; }
    .nexo-home:not(.nexo-studio) .app-rail__nav > a,
    .nexo-home:not(.nexo-studio) .app-rail__more > summary {
        min-width: 0;
        display: grid;
        gap: 4px;
        padding: 6px 2px;
        min-height: 44px;
        height: 100%;
        justify-items: center;
        align-content: center;
        text-align: center;
        color: var(--nexo-text);
        border-radius: 8px;
        cursor: pointer;
        list-style: none;
    }
    .nexo-home:not(.nexo-studio) .app-rail__more > summary::-webkit-details-marker { display: none; }
    .nexo-home:not(.nexo-studio) .app-rail__nav > a strong,
    .nexo-home:not(.nexo-studio) .app-rail__more > summary strong { font-size: .69rem; overflow-wrap: anywhere; line-height: 1.2; }
    .nexo-home .app-rail__more:has([aria-current="page"]) > summary,
    .nexo-home .app-rail__more[open] > summary { color: var(--nexo-brand); background: var(--nexo-soft); }
    .nexo-home .app-rail__more-panel {
        position: fixed;
        bottom: calc(var(--nexo-mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 8px);
        right: 8px;
        width: min(24rem, calc(100vw - 16px));
        max-height: min(70dvh, calc(100dvh - var(--nexo-mobile-nav-height) - env(safe-area-inset-bottom, 0px) - 24px));
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 8px;
        border: 1px solid var(--nexo-border);
        border-radius: 12px;
        background: var(--nexo-surface);
        box-shadow: 0 8px 28px rgb(0 0 0 / 16%);
    }
    .nexo-home .app-rail__more-panel > a {
        display: flex;
        justify-content: start;
        gap: 12px;
        padding: 10px 12px;
        min-height: 44px;
        border-radius: 8px;
        color: var(--nexo-text);
    }
    .nexo-home .app-rail__more-panel > a strong { font-size: .875rem; text-align: start; }
    .nexo-home .app-rail__more-panel > a:is(:hover, [aria-current="page"]) { background: var(--nexo-soft); color: var(--nexo-brand); }
    .nexo-home .app-topbar { padding-inline: 20px; }
    .nexo-home .student-home { padding: 24px 20px; }
    .nexo-home .student-home__welcome h1 { font-size: 28px; }
    .nexo-home .student-home__section > header h2 { font-size: 20px; }
    .nexo-resume__course, .nexo-resume__footer, .nexo-home__overview { grid-template-columns: 1fr; gap: 16px; }
    .nexo-resume__course, .nexo-resume__footer { padding: 16px; }
    .nexo-resume__details h3 { font-size: 24px; }
    .nexo-resume__cover--empty { aspect-ratio: 3 / 1; }
    .nexo-resume__footer .nexo-resume__action { justify-content: center; }
    .nexo-resume__progress { border: 0; padding: 0; grid-template-columns: 1fr auto; align-items: center; }
    .nexo-resume__progress strong { font-size: 14px; }
    .nexo-resume__progress progress { grid-column: 1 / -1; }
}

@media (max-width: 240px) {
    .nexo-home .app-rail__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.nexo-home .nexo-home__secondary {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 22rem));
}
/* Shared inset for the eight workspace entry screens; other surfaces keep their layout. */
.nexo-home .app-workbench__content > .workspace-entry-surface {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px;
}
.nexo-home .workspace-entry-surface > :is(.student-home__welcome, .learning-library-overview, .student-requests__heading, .documents-heading, .admin-center__heading) {
    margin-top: 0;
    padding-top: 0;
}
.nexo-home .workspace-entry-surface :is(.student-home__welcome, .learning-heading, .student-requests__heading, .documents-heading, .admin-center__heading) h1 { margin-top: 0; }
@media (max-width: 767px) {
    .nexo-home .app-workbench__content > .workspace-entry-surface { padding: 20px; }
}

/* Entry descriptions follow Mi aprendizaje; secondary labels and card text are unchanged. */
.nexo-home .workspace-entry-surface :is(.student-home__welcome, .learning-heading, .student-requests__heading, .documents-heading, .admin-center__heading) h1:has(+ p) {
    margin-bottom: 8px;
}
.nexo-home .workspace-entry-surface :is(.student-home__welcome, .learning-heading, .student-requests__heading, .documents-heading, .admin-center__heading) h1 + p {
    margin: 0;
    color: var(--nexo-muted);
    font-family: Manrope, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: normal;
}
