@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('../fonts/nunito-sans/latin-variable.woff2') format('woff2');
}

@font-face {
    font-family: 'Alex Brush';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/alex-brush/AlexBrush-Regular.ttf') format('truetype');
}

#signed-name {
    font-family: 'Alex Brush', cursive;
    font-size: 46px;
    font-weight: 400;
    line-height: 1.4;
}

:root {
    color-scheme: light;
    font-family: 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #17212c;
    background: #f7f9fc;
    font-size: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

a {
    color: #29476c;
    text-underline-offset: 3px;
}

button,
input {
    font: inherit;
}

button,
a,
input,
summary {
    touch-action: manipulation;
}

:focus-visible {
    outline: 3px solid #c37d17;
    outline-offset: 4px;
}

p,
li {
    line-height: 1.75;
}

h1,
h2,
h3 {
    line-height: 1.25;
    letter-spacing: -.025em;
}

h1 {
    font-size: 1.8rem;
    margin: 8px 0;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .17em;
    font-size: .72rem;
    font-weight: 700;
    color: #466183;
    margin: 0 0 14px;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 300px;
    background: #1c2d44;
    color: #dce4ee;
    padding: 32px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand {
    display: block;
    width: fit-content;
    max-width: 100%;
    padding: 0 4px;
}

.brand-logo {
    display: block;
    width: 140px;
    max-width: 100%;
    height: auto;
}

.sidebar .eyebrow {
    color: #a8b9d0;
}

.sidebar a {
    color: #edf3fa;
}

.overall p {
    font-size: .8rem;
}

.progress-caption {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: .78rem;
}

.overall progress {
    height: 5px;
    margin-top: 12px;
}

.sidebar progress::-webkit-progress-bar {
    background: #40526a;
}

.sidebar progress::-webkit-progress-value {
    background: #99bedf;
}

.sidebar progress::-moz-progress-bar {
    background: #99bedf;
}

.module-menu>summary {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    padding: 8px;
    cursor: pointer;
}

.module-menu>summary span {
    display: none;
}

.nav-module {
    margin: 8px -8px;
}

.nav-module>summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-size: .86rem;
}

.nav-module>summary::-webkit-details-marker {
    display: none;
}

.nav-module[open]>summary {
    background: #2d4058;
}

.nav-module small {
    display: block;
    color: #b7c6d8;
    font-size: .7rem;
    line-height: 1.5;
    margin-top: 4px;
}

.module-number {
    flex-shrink: 0;
    border: 1px solid #73869d;
    border-radius: 5px;
    padding: 6px;
    font-size: .75rem;
}

.nav-module ol {
    list-style: none;
    margin: 4px 8px 12px 28px;
    padding-left: 12px;
    border-left: 1px solid #52627a;
}

.nav-module li {
    font-size: .8rem;
    line-height: 1.4;
    margin: 4px 0;
}

.nav-module li a,
.nav-module li>span {
    display: block;
    padding: 10px 12px;
    border-radius: 4px;
    overflow-wrap: anywhere;
}

.nav-module li a {
    text-decoration: none;
}

.nav-module li>span {
    color: #b7c6d8;
}

.nav-module a:hover,
.nav-module [aria-current=page] {
    background: #344a64;
}

.sidebar-account {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #52627a;
    display: grid;
    gap: 12px;
    font-size: .8rem;
}

.sidebar-account .signout {
    background: none;
    border: 1px solid #8193aa;
    color: white;
    padding: 8px 16px;
    margin: 0;
}

.sidebar-intro {
    color: #b7c6d8;
    font-size: 1.25rem;
}

.workspace {
    margin-left: 300px;
    min-width: 0;
}

.page-header {
    padding: 28px 44px 20px;
    background: white;
    border-bottom: 1px solid #e1e7ef;
}

.heading-row {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 24px;
}

.module-status {
    text-align: right;
    flex-shrink: 0;
    font-size: .8rem;
}

.module-status span {
    text-transform: uppercase;
    color: #64748b;
    display: block;
    letter-spacing: .05em;
}

.module-status strong {
    display: block;
    margin-top: 6px;
}

.module-status small {
    display: block;
    margin-top: 5px;
    color: #64748b;
}

progress {
    display: block;
    appearance: none;
    border: 0;
    width: 100%;
    height: 6px;
    background: #e3e9f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 22px 0 12px;
    accent-color: #29476c;
}

progress::-webkit-progress-bar {
    background: #e3e9f0;
}

progress::-webkit-progress-value {
    background: #29476c;
}

progress::-moz-progress-bar {
    background: #29476c;
}

.section-strip {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 4px 0 10px;
}

.section-strip a {
    white-space: nowrap;
    font-size: .76rem;
    text-decoration: none;
    padding: 5px 0;
    color: #62718a;
}

.section-strip [aria-current=page] {
    color: #29476c;
    font-weight: 700;
    border-bottom: 2px solid #29476c;
}

main {
    max-width: 1100px;
    padding: 30px 44px 64px;
    margin: 0 auto;
}

.reading {
    max-width: 850px;
    min-height: 42vh;
}

.reading-title {
    font-size: 28px;
    margin: 0 0 28px;
}

.markdown-body {
    font-family: 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: transparent;
}

.markdown-body li p {
    margin: 0;
}

.reading dl {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
    padding: 18px 0;
    border-block: 1px solid #d9e1eb;
}

.reading dt {
    font-size: 1rem;
    font-weight: 700;
    color: #526681;
}

.reading dd {
    margin: 0 20px 0 0;
    overflow-wrap: anywhere;
}

.reading-footer {
    border-top: 1px solid #dce4ed;
    padding-top: 24px;
    margin-top: 40px;
}

.card {
    background: white;
    border: 1px solid #dce4ed;
    border-radius: 10px;
    padding: 28px;
    margin: 22px 0;
}

.card ol {
    padding-left: 22px;
}

.card li {
    margin: 12px 0;
}

label {
    display: block;
    font-weight: 600;
    margin: 12px 0 8px;
}

input {
    width: 100%;
    border: 1px solid #8a9bb0;
    border-radius: 6px;
    padding: 12px;
    background: white;
    color: #17212c;
}

button,
.button {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #29476c;
    color: white;
    font: inherit;
    font-size: .9rem;
    padding: 13px 22px;
    text-decoration: none;
    cursor: pointer;
    margin-top: 12px;
    line-height: 1.5;
}

button:hover,
.button:hover {
    background: #1c3554;
}

.secondary {
    background: white;
    border-color: #bccbda;
    color: #29476c;
}

.secondary:hover {
    background: #edf2f8;
}

.choice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-weight: 400;
    line-height: 1.7;
}

.choice input {
    width: 20px;
    height: 20px;
    margin-top: 4px;
    flex-shrink: 0;
    accent-color: #29476c;
}

.actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.navigation-actions {
    margin-top: 24px;
    justify-content: space-between;
}

.notice,
.error {
    padding: 16px 20px;
    border-radius: 6px;
    line-height: 1.6;
}

.error ul,
.error li,
.notice li,
.notice ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.notice,
.error {
    margin-bottom: 2rem;
}

.notice {
    background: #e6f2ed;
    color: #244f3f;
}

.error {
    background: #fff0ed;
    color: #8b2920;
}

.muted,
small {
    color: #61728a;
}

small {
    display: block;
    font-size: .8rem;
    margin-top: 10px;
}

.badge {
    display: inline-block;
    font-size: .75rem;
    background: #e9eff6;
    border-radius: 4px;
    padding: 3px 9px;
    color: #3b536d;
}

fieldset {
    min-width: 0;
}

legend {
    font-weight: 650;
    padding: 0 8px;
}

.skip-link {
    position: fixed;
    top: -70px;
    left: 16px;
    z-index: 5;
    background: white;
    padding: 12px;
}

.skip-link:focus {
    top: 12px;
}

main:focus {
    outline: none;
}

/* The overview and sign-in pages have a separate, centred shell. */
.portal-header {
    background: #1c2d44;
    color: white;
}

.portal-header-inner {
    max-width: 1184px;
    min-height: 104px;
    padding: 24px 32px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.portal-brand {
    display: block;
    flex-shrink: 0;
    line-height: 0;
}

.portal-brand img {
    width: 160px;
    height: auto;
}

.portal-account {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: .9rem;
    min-width: 0;
}

.portal-account span {
    overflow-wrap: anywhere;
}

.portal-account .signout {
    margin: 0;
    padding: 9px 16px;
    color: white;
    background: transparent;
    border: 1px solid #8293a9;
    white-space: nowrap;
}

.portal-account .signout:hover {
    background: #30445f;
}

.portal-label {
    color: #d4deea;
    font-size: .9rem;
}

.portal main {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 56px 32px 80px;
}

.overview-heading {
    margin-bottom: 32px;
}

.overview-heading .eyebrow {
    text-transform: none;
    letter-spacing: 0;
    font-size: 1rem;
    margin-bottom: 8px;
}

.overview-heading h1 {
    font-size: clamp(1.8rem, 4vw, 2.25rem);
    margin: 0;
}

.onboarding-card {
    margin: 0;
    padding: 28px;
    overflow-wrap: anywhere;
}

.onboarding-card h2,
.onboarding-card h3 {
    margin: 0 0 16px;
}

.onboarding-card p {
    margin: 0;
    color: #52647b;
    font-size: .95rem;
}

.onboarding-card-current {
    border-top: 4px solid #29476c;
    padding: 32px;
}

.onboarding-card-current .button {
    margin-top: 16px;
    min-width: 140px;
    text-align: center;
}

.onboarding-history {
    margin-top: 40px;
}

.onboarding-history > h2 {
    font-size: 1rem;
    margin: 0 0 16px;
    color: #52647b;
}

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

.onboarding-empty {
    margin: 0;
    padding: 32px;
}

.portal-auth main {
    max-width: 536px;
    padding-top: 64px;
}

.portal-auth .card {
    margin: 0;
    padding: 32px;
    box-shadow: 0 8px 28px rgb(28 45 68 / 4%);
    overflow-wrap: anywhere;
}

.portal-auth h1 {
    font-size: 1.75rem;
    margin: 0 0 16px;
}

.portal-auth .card > p:not(.eyebrow) {
    color: #52647b;
    margin: 0 0 24px;
}

.portal-auth button {
    width: 100%;
    margin-top: 20px;
}

.portal-auth #code {
    font-size: 1.5rem;
    letter-spacing: .25em;
    text-align: center;
}

.auth-footer {
    text-align: center;
    color: #61728a;
    font-size: .875rem;
    padding: 8px 12px;
}

.auth-footer > a {
    display: inline-block;
    padding: 12px 0;
}

@media (max-width: 600px) {
    .portal-header-inner {
        padding: 20px;
        min-height: 88px;
        gap: 16px;
    }

    .portal-brand img {
        width: 132px;
    }

    .portal-account {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
        font-size: .8rem;
        text-align: right;
    }

    .portal-label {
        max-width: 100px;
        text-align: right;
        font-size: .8rem;
    }

    .portal main {
        padding: 32px 20px 48px;
    }

    .overview-heading {
        margin-bottom: 24px;
    }

    .onboarding-card,
    .onboarding-card-current,
    .onboarding-empty,
    .portal-auth .card {
        padding: 24px;
    }

    .history-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .onboarding-card-current .button {
        width: 100%;
    }
}
