:root {
    --navy:       #164679;
    --gold:       #DABE80;
    --gold-light: #D9CBAC;
    --light-blue: #EDF0F4;
    --gray:       #F5F5F6;
    --border:     #d6dbe1;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    background: #fff;
    color: #222;
}

/* ── Header ── */
header {
    background: var(--navy);
    color: #fff;
    padding: 1.25rem 2rem;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.header-logo {
    height: 48px;
    width: auto;
    display: block;
}
.header-right {
    font-size: 0.95rem;
    font-weight: 400;
    text-align: right;
    white-space: nowrap;
    color: #fff;
}

/* ── Tablet / mobile header ── */
@media (max-width: 680px) {
    .header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .header-right {
        text-align: center;
        white-space: normal;
    }
}

/* ── Gold divider ── */
.gold-divider {
    height: 6px;
    background: var(--gold);
}

/* ── Main content ── */
main {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* ── Headings ── */
h1 {
    color: var(--navy);
    font-size: 1.75rem;
    margin-top: 0;
}
h2 {
    color: var(--navy);
    border-bottom: 3px solid var(--gold);
    padding-bottom: 0.4rem;
    margin-top: 2.5rem;
}
#accessibility-statement-heading {
    margin-top: 0;
}
h3 {
    color: var(--navy);
    margin-top: 2rem;
}

/* ── Lists ── */
ul, ol { padding-left: 1.2rem; }

/* ── Definition lists ── */
dl  { margin: 0; }
dt  { font-weight: 600; margin-top: 0.5rem; }
dd  { margin-left: 1.5rem; color: #444; }

/* ── Tables ── */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}
caption {
    text-align: left;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}
thead { background: var(--navy); color: #fff; }
th, td {
    padding: 0.65rem;
    border: 1px solid var(--border);
    text-align: left;
}

/* ── Tab interface ── */
.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border-bottom: 3px solid var(--gold);
    margin-top: 1.5rem;
    margin-bottom: 0;
    padding: 0;
    list-style: none;
}
.tab-bar li { margin: 0; padding: 0; }
.tab-btn {
    display: block;
    padding: 0.55rem 1.1rem;
    background: var(--gray);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}
.tab-btn:hover { background: #dde3ec; }
.tab-btn[aria-selected="true"] {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.tab-panel {
    border: 1px solid var(--border);
    border-top: none;
    padding: 1.25rem 1.25rem 0.25rem;
    border-radius: 0 0 4px 4px;
}
.tab-panel[hidden] { display: none; }

/* ── Mobile tabs: scroll horizontally if needed ── */
@media (max-width: 680px) {
    .tab-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.2rem;
        padding-bottom: 1px;
    }
    .tab-btn {
        font-size: 0.82rem;
        padding: 0.5rem 0.75rem;
        flex-shrink: 0;
    }
}

/* ── Print: show all tab panels ── */
@media print {
    .tab-bar { display: none; }
    .tab-panel[hidden] { display: block !important; }
    .tab-panel { border: none; padding: 0; }
}

/* ── Accordion (mobile) ── */
.accordion { margin-top: 1.5rem; }
.acc-item {
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 0.4rem;
    overflow: hidden;
}
.acc-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--navy);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    gap: 0.5rem;
}
.acc-btn:hover { background: #003d8f; }
.acc-icon {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    position: relative;
}
.acc-icon::before,
.acc-icon::after {
    content: '';
    position: absolute;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s;
}
.acc-icon::before { width: 2px; height: 100%; left: 50%; transform: translateX(-50%); }
.acc-icon::after  { width: 100%; height: 2px; top: 50%; transform: translateY(-50%); }
.acc-btn[aria-expanded="true"] .acc-icon::before {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}
.acc-panel {
    padding: 1rem 1rem 0.25rem;
    background: #fff;
}
.acc-panel[hidden] { display: none; }

/* Program Course List sits below accordion on mobile */
.acc-course-list {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 3px solid var(--gold);
}
.acc-course-list h3 {
    margin-top: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -5rem;
    z-index: 1000;
    padding: 0.75rem 1rem;
    background: var(--gold-light);
    color: #000;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
}

:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 3px;
}

.course-info-table {
    margin-top: 1rem;
    border-left: 6px solid var(--gold);
}

.course-info-table th {
    width: 12rem;
    color: var(--navy);
    background: var(--gray);
    vertical-align: top;
}

.course-info-table td {
    vertical-align: top;
}

.course-summary dt {
    color: var(--navy);
}

.competency-list li {
    margin-bottom: 0.5rem;
}

.statement {
    background: var(--gray);
    border-left: 6px solid var(--gold);
    padding: 1rem 1.25rem;
    margin-top: 2rem;
}

.doc-revised {
    display: block;
    font-size: 0.75rem;
    color: #d6dbe1;
    margin-top: 0.4rem;
    letter-spacing: 0.01em;
}

.doc-revised-label {
    font-weight: 600;
}

@media (max-width: 680px) {
    .course-summary dl {
        grid-template-columns: 1fr;
    }

    .course-summary dt {
        border-bottom: none;
        padding-bottom: 0.15rem;
    }

    .course-summary dd {
        padding-top: 0;
    }
}

@media print {
    .skip-link {
        display: none;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    h2,
    h3 {
        break-after: avoid;
    }

    li,
    tr,
    .statement,
    .course-summary {
        break-inside: avoid;
    }
}

/* ── Print: expand all accordions ── */
@media print {
    .acc-btn { background: #000 !important; }
    .acc-panel[hidden] { display: block !important; }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Footer ── */
footer {
    background: var(--navy);
    color: #fff;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    margin-top: 3rem;
}

/* ── Print ── */
@media print {
    header, footer {
        background: #000 !important;
        color: #fff !important;
    }
    .gold-divider { background: #000 !important; }
}
