:root {
    --home-navy: #092443;
    --home-blue: #1758c8;
    --home-teal: #087f8c;
    --home-ink: #142943;
    --home-muted: #65768b;
    --home-line: #e1e9f1;
    --home-canvas: #f5f8fc;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-padding-top: 5rem; }
body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    margin: 0;
    background: var(--home-canvas);
    color: var(--home-ink);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}
body > main { display: flex; flex: 1 0 auto; }
.portal-welcome {
    display: grid;
    width: 100%;
    min-height: 510px;
    place-items: center;
    padding: clamp(3.5rem, 8vw, 6rem) 1.25rem;
    background:
        radial-gradient(ellipse at 84% 15%, rgba(40, 185, 199, .14), transparent 32%),
        linear-gradient(135deg, #f9fbfe, #edf3f9);
}
.portal-shell { width: min(920px, 100%); margin-inline: auto; }
.portal-intro { max-width: 680px; margin: 0 auto 2rem; text-align: center; }
.portal-eyebrow {
    color: #42617e;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .055em;
}
.portal-eyebrow span { padding-inline: .3rem; color: #9aabbb; }
.portal-intro h1 {
    margin: .8rem 0 .55rem;
    color: var(--home-navy);
    font-size: clamp(2rem, 4.4vw, 3.15rem);
    font-weight: 780;
    letter-spacing: -.045em;
    line-height: 1.12;
}
.portal-intro p { margin: 0; color: var(--home-muted); font-size: clamp(.98rem, 1.7vw, 1.1rem); }
.portal-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.portal-option {
    display: grid;
    min-height: 180px;
    grid-template-columns: 48px minmax(0, 1fr) 24px;
    align-items: start;
    gap: 1rem;
    padding: 1.45rem;
    border: 1px solid var(--home-line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 12px 32px rgba(16, 42, 67, .055);
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.portal-option:hover {
    transform: translateY(-3px);
    border-color: #b8cce0;
    box-shadow: 0 18px 38px rgba(16, 42, 67, .11);
}
.portal-option:focus-visible, .portal-help a:focus-visible {
    outline: 3px solid #e3a92d;
    outline-offset: 3px;
}
.portal-option-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: .8rem;
    background: #edf3ff;
    color: var(--home-blue);
}
.portal-option-moodle .portal-option-icon { background: #e7f7f5; color: var(--home-teal); }
.portal-option-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.portal-option-copy { display: grid; gap: .35rem; }
.portal-option-copy strong { color: var(--home-navy); font-size: 1.08rem; font-weight: 780; }
.portal-option-copy > span:not(.portal-option-link) { color: var(--home-muted); font-size: .87rem; line-height: 1.5; }
.portal-option-link { display: inline-flex; align-items: center; gap: .45rem; margin-top: .45rem; color: var(--home-blue); font-size: .84rem; font-weight: 780; }
.portal-option-moodle .portal-option-link { color: var(--home-teal); }
.portal-option-arrow { padding-top: .12rem; color: #8b9caf; font-size: 1.1rem; }
.portal-help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem .75rem;
    margin-top: 1.4rem;
    color: var(--home-muted);
    font-size: .83rem;
}
.portal-help > span:first-child { color: #455a70; font-weight: 700; }
.portal-help a { color: #315b88; font-weight: 700; text-decoration: none; }
.portal-help a:hover { text-decoration: underline; }
.portal-help-divider { color: #a5b2c0; }
.cbc-portal-footer { flex-shrink: 0; }

@media (max-width: 640px) {
    .portal-welcome { min-height: 0; padding-block: 3.5rem; }
    .portal-intro { margin-bottom: 1.5rem; text-align: left; }
    .portal-options { grid-template-columns: 1fr; gap: .75rem; }
    .portal-option { min-height: 0; grid-template-columns: 42px minmax(0, 1fr) 20px; gap: .8rem; padding: 1.1rem; }
    .portal-option-icon { width: 42px; height: 42px; }
    .portal-help { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
