:root {
    --ink: #182230;
    --muted: #667085;
    --line: #d0d5dd;
    --bg: #f6f8fb;
    --panel: #ffffff;
    --accent: #0b6b74;
    --accent-dark: #084d54;
    --danger: #b42318;
    --ok: #087443;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.45;
}

a {
    color: var(--accent);
    text-decoration: none;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.brand {
    font-weight: 700;
    color: var(--ink);
}

.topbar nav {
    display: flex;
    gap: 16px;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 32px auto;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.academy-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 20px;
}

.hero-copy {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 34px;
    border: 1px solid #b7dfe3;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(11, 107, 116, 0.94), rgba(24, 34, 48, 0.88)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='420' viewBox='0 0 900 420'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.18' stroke-width='2'%3E%3Cpath d='M70 310h180v-90H70zM290 310h180V140H290zM510 310h180V90H510z'/%3E%3Cpath d='M90 242h140M310 174h140M530 124h140M90 274h110M310 206h96M530 156h120'/%3E%3Ccircle cx='730' cy='120' r='44'/%3E%3Cpath d='M706 120h48M730 96v48'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    color: #ffffff;
}

.hero-copy h1 {
    max-width: 720px;
    margin-bottom: 14px;
    font-size: clamp(32px, 4vw, 54px);
}

.lead {
    max-width: 700px;
    margin: 0;
    font-size: 19px;
    color: rgba(255, 255, 255, 0.88);
}

.eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy .eyebrow {
    color: #c8f4f7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 24px;
}

.exam-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    min-height: 320px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.exam-card h2 {
    margin-bottom: 4px;
    font-size: 28px;
}

.status-pill {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid #b7dfe3;
    border-radius: 999px;
    background: #eef7f8;
    color: #164c52;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pill.danger {
    border-color: #fecdca;
    background: #fef3f2;
    color: var(--danger);
}

.exam-facts {
    display: grid;
    gap: 12px;
    margin: 0;
}

.exam-facts div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.exam-facts div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.exam-facts dt {
    color: var(--muted);
    font-weight: 700;
}

.exam-facts dd {
    margin: 0;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 20px;
}

.course-panel p {
    max-width: 760px;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.course-meta span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f9fafb;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.checklist {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.checklist li {
    position: relative;
    padding-left: 28px;
}

.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: inset 0 0 0 5px #d8f0f2;
}

.stats-row {
    margin-bottom: 20px;
}

.welcome-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 20px;
}

.welcome-copy {
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 38px;
    border: 1px solid #b7dfe3;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(24, 34, 48, 0.92), rgba(11, 107, 116, 0.88)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='520' viewBox='0 0 1000 520'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.17' stroke-width='2'%3E%3Cpath d='M90 340h210v-120H90zM340 340h210V160H340zM590 340h210V100H590z'/%3E%3Cpath d='M120 260h150M370 205h150M620 145h150M120 295h110M370 240h125M620 180h110'/%3E%3Cpath d='M130 400h660M190 430h420'/%3E%3Ccircle cx='830' cy='130' r='52'/%3E%3Cpath d='M805 130h50M830 105v50'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    color: #ffffff;
}

.welcome-copy h1 {
    max-width: 760px;
    margin-bottom: 14px;
    font-size: clamp(34px, 4vw, 58px);
}

.welcome-copy .eyebrow {
    color: #c8f4f7;
}

.welcome-steps {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 380px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.welcome-steps h2 {
    margin-bottom: 18px;
}

.welcome-steps ol {
    display: grid;
    gap: 14px;
    margin: 0;
    padding-left: 22px;
}

.welcome-steps li {
    padding-left: 4px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.feature-card {
    min-height: 190px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #eef7f8;
    color: var(--accent);
    font-weight: 700;
}

.feature-card h2 {
    font-size: 22px;
}

.access-panel {
    scroll-margin-top: 24px;
}

.free-courses h2 {
    margin-bottom: 8px;
}

.free-courses > .muted {
    margin-top: 0;
    margin-bottom: 18px;
}

.access-code {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    background: #eef7f8;
    color: #164c52;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    font-weight: 700;
}

.course-name-button {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    text-align: left;
    text-decoration: underline;
}

.course-name-button:hover {
    background: transparent;
    color: var(--accent-dark);
}

.course-dialog {
    width: min(560px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 20px 45px rgba(24, 34, 48, 0.25);
}

.course-dialog::backdrop {
    background: rgba(24, 34, 48, 0.6);
}

.course-dialog-content {
    padding: 24px;
}

.course-dialog-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.course-dialog-heading h2 {
    margin-bottom: 12px;
}

.dialog-close {
    min-height: 32px;
    width: 32px;
    padding: 0;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
}

.access-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
    margin-bottom: 18px;
}

.access-heading h2 {
    font-size: 30px;
}

.access-note {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid #b7dfe3;
    border-radius: 8px;
    background: #eef7f8;
    color: #164c52;
}

.access-note span {
    color: #344054;
}

.grid {
    display: grid;
    gap: 16px;
}

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

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.stat strong {
    display: block;
    font-size: 30px;
}

h1, h2, h3 {
    line-height: 1.15;
    margin-top: 0;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px 12px;
    font: inherit;
    background: #ffffff;
}

input[type="checkbox"], input[type="radio"] {
    width: auto;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.field {
    margin-bottom: 16px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}

.inline-form {
    display: inline;
}

.link-button {
    display: inline;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--danger);
    font: inherit;
    font-weight: 400;
    cursor: pointer;
}

.link-button:hover {
    background: transparent;
    color: var(--danger);
    text-decoration: underline;
}

.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    padding: 10px 15px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.button.secondary {
    background: #344054;
}

.button.danger, button.danger {
    background: var(--danger);
}

.button.ghost {
    background: #ffffff;
    color: var(--accent);
    border: 1px solid var(--line);
}

button:hover, .button:hover {
    background: var(--accent-dark);
    color: #ffffff;
}

.button.danger:hover, button.danger:hover {
    background: #b42318;
}

.alert {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    background: #e7f6ec;
    color: var(--ok);
}

.alert.error {
    background: #fef3f2;
    color: var(--danger);
}

.notice {
    padding: 12px 14px;
    border: 1px solid #b7dfe3;
    border-radius: 6px;
    margin-bottom: 18px;
    background: #eef7f8;
    color: #164c52;
}

.certificate-valid {
    border-color: #9ad4b4;
    background: #fbfffd;
}

.materials-list {
    display: grid;
    gap: 14px;
}

.material-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.material-item h2 {
    margin: 8px 0 6px;
    font-size: 20px;
}

.tag {
    display: inline-flex;
    border: 1px solid #b7dfe3;
    border-radius: 999px;
    padding: 3px 8px;
    color: #164c52;
    background: #eef7f8;
    font-size: 12px;
    text-transform: uppercase;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th, td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
}

.question {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    margin-top: 18px;
}

.timer-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
    margin: 16px 0;
    background: #eef7f8;
    border: 1px solid #b7dfe3;
    border-radius: 8px;
}

.timer-bar strong {
    font-size: 24px;
    font-variant-numeric: tabular-nums;
}

.timer-bar strong.is-warning {
    color: var(--danger);
}

.answers {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.choice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
}

.choice input {
    width: auto;
    margin-top: 4px;
}

.footer {
    width: min(1120px, calc(100% - 32px));
    margin: 40px auto 24px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .academy-hero,
    .dashboard-grid,
    .welcome-hero,
    .access-heading {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .welcome-copy {
        min-height: auto;
        padding: 26px;
    }

    .hero-copy h1,
    .welcome-copy h1 {
        font-size: 34px;
    }

    .lead {
        font-size: 17px;
    }

    .exam-card {
        min-height: auto;
    }

    .welcome-steps {
        min-height: auto;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .grid.two, .grid.three, .grid.four {
        grid-template-columns: 1fr;
    }

    .material-item {
        flex-direction: column;
    }
}
