:root {
    --portal-ink: #1f343e;
    --portal-muted: #667780;
    --portal-blue: #165d72;
    --portal-green: #3b7859;
    --portal-line: #dce6e2;
    --portal-paper: #ffffff;
    --portal-bg: #f2f6f3;
    --portal-alert-bg: #fff6df;
    --portal-alert-border: #e4bd60;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--portal-ink);
    background: var(--portal-bg);
    font-family: "Segoe UI", sans-serif;
}

a {
    color: var(--portal-blue);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--portal-green);
    outline-offset: 3px;
}

.portal-header {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px clamp(20px, 5vw, 64px);
    border-bottom: 1px solid var(--portal-line);
    background: var(--portal-paper);
}

.portal-brand img {
    display: block;
    width: auto;
    height: 54px;
}

.portal-header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 22px;
}

.portal-header nav a {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.portal-header nav a:hover {
    text-decoration: underline;
}

.portal-main {
    display: grid;
    min-height: calc(100vh - 142px);
    place-items: center;
    padding: 48px 20px;
}

.portal-layout {
    display: grid;
    width: min(100%, 980px);
    grid-template-columns: minmax(0, 1fr) minmax(310px, 0.8fr);
    overflow: hidden;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: var(--portal-paper);
    box-shadow: 0 18px 48px rgb(31 52 62 / 9%);
}

.portal-intro {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 540px;
    padding: clamp(28px, 5vw, 54px);
    color: white;
    background: linear-gradient(145deg, #174f61, #32785e);
}

.portal-kicker {
    margin: 0 0 14px;
    color: #c9e4d3;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.portal-intro h1 {
    max-width: 460px;
    margin: 0;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.08;
}

.portal-intro-copy {
    max-width: 400px;
    color: #e2eee7;
    font-size: 16px;
    line-height: 1.65;
}

.portal-intro small {
    color: #c9e4d3;
}

.portal-panel {
    align-self: center;
    padding: clamp(26px, 4vw, 44px);
}

.portal-panel h2 {
    margin: 0 0 8px;
    font-size: 25px;
}

.portal-subtitle {
    margin: 0 0 24px;
    color: var(--portal-muted);
    line-height: 1.5;
}

.portal-notice {
    margin: 0 0 24px;
    padding: 14px 16px;
    border: 1px solid var(--portal-alert-border);
    border-left-width: 4px;
    border-radius: 4px;
    background: var(--portal-alert-bg);
    color: #5b481e;
    font-size: 14px;
    line-height: 1.55;
}

.portal-notice strong {
    display: block;
    margin-bottom: 3px;
}

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

.portal-form label {
    display: grid;
    gap: 7px;
    color: var(--portal-ink);
    font-size: 14px;
    font-weight: 600;
}

.portal-form input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--portal-line);
    border-radius: 4px;
    background: #f5f7f6;
    color: var(--portal-muted);
    font: inherit;
}

.portal-form input:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

.portal-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 0;
    border-radius: 4px;
    background: var(--portal-blue);
    color: white;
    font: inherit;
    font-weight: 700;
}

.portal-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.portal-links {
    display: grid;
    gap: 12px;
    margin-top: 20px;
    font-size: 14px;
}

.portal-links a {
    width: fit-content;
}

.portal-footer {
    padding: 18px 20px;
    border-top: 1px solid var(--portal-line);
    color: var(--portal-muted);
    font-size: 13px;
    text-align: center;
}

.portal-dashboard {
    width: min(100%, 920px);
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: var(--portal-paper);
    box-shadow: 0 18px 48px rgb(31 52 62 / 9%);
}

.portal-dashboard h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 5vw, 42px);
}

.portal-dashboard > p {
    max-width: 650px;
    color: var(--portal-muted);
    line-height: 1.65;
}

.portal-module-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: 16px;
    margin-top: 28px;
}

.portal-module {
    min-height: 120px;
    padding: 20px;
    border: 1px solid var(--portal-line);
    border-radius: 6px;
    background: #f8faf8;
}

.portal-module h2 {
    margin: 0 0 8px;
    color: var(--portal-blue);
    font-size: 17px;
}

.portal-module p {
    margin: 0;
    color: var(--portal-muted);
    font-size: 14px;
}

@media (max-width: 700px) {
    .portal-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-header nav {
        justify-content: flex-start;
    }

    .portal-main {
        padding: 24px 16px;
    }

    .portal-layout {
        grid-template-columns: 1fr;
    }

    .portal-intro {
        min-height: 270px;
        gap: 28px;
    }
}