/* Onboarding surface tokens: components below consume these so dark
   mode (toggle via [data-theme="dark"] or system preference) flips every
   surface, frame and accent consistently. Mirrors the main.css pattern. */
:root {
    --onb-surface: #ffffff;
    --onb-good-bg: #eef7f0;
    --onb-good-frame: #1e7a3c;
    --onb-good-ink: #1e7a3c;
    --onb-frame: var(--navy);
    --onb-pill-current-bg: var(--blue);
    --onb-pill-state-bg: #ffffff;
    --onb-pill-state-ink: var(--blue);
    --onb-accent-ink: var(--blue);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --onb-surface: var(--wash);
        --onb-good-bg: rgba(74, 183, 116, 0.12);
        --onb-good-frame: #3daa6f;
        --onb-good-ink: #4cc07f;
        --onb-frame: var(--line-2);
        --onb-pill-current-bg: var(--blue-deep);
        --onb-pill-state-ink: var(--blue-deep);
        --onb-accent-ink: var(--blue-hi);
    }
}

:root[data-theme="dark"] {
    --onb-surface: var(--wash);
    --onb-good-bg: rgba(74, 183, 116, 0.12);
    --onb-good-frame: #3daa6f;
    --onb-good-ink: #4cc07f;
    --onb-frame: var(--line-2);
    --onb-pill-current-bg: var(--blue-deep);
    --onb-pill-state-ink: var(--blue-deep);
    --onb-accent-ink: var(--blue-hi);
}

/* Onboarding landing + per-track pages. */

/* ---- Track page header: compact documentation style, no hero ---- */
.onb-doc-head {
    padding: 6rem 1.5rem 0;
}

.onb-doc-head-inner {
    max-width: 72rem;
    margin: 0 auto;
}

.onb-crumbs ol {
    color: var(--muted);
}

.onb-crumbs li + li::before {
    color: var(--faint);
}

.onb-crumbs a {
    color: var(--onb-accent-ink);
}

.onb-crumbs a:hover {
    border-bottom-color: var(--blue);
}

.onb-doc-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--heading);
    margin: 0.2rem 0 0.5rem;
}

/* ---- Landing sections ---- */
.onb-section {
    padding: 3rem 1.5rem;
    border-top: 1px solid var(--line);
}

.onb-container {
    max-width: 72rem;
    margin: 0 auto;
}

.onb-section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--heading);
    margin: 0.4rem 0 1rem;
}

/* Body copy: full ink colour (muted grey was hard to read at length) and a
   ~70-character measure. */
.onb-text {
    max-width: 44rem;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 0.9rem;
}

/* First paragraph of a module: one or two sentences saying what it is for. */
.onb-lede {
    max-width: 44rem;
    font-size: 1.08rem;
    line-height: 1.6;
    color: var(--heading);
    margin: 0 0 1.25rem;
}

/* Sub-sections inside a module (Module 1's "How Stage 2 works", etc.). */
.onb-subhead {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--heading);
    margin: 2rem 0 0.6rem;
}

/* Scannable point lists: bold lead-in, then one or two plain sentences. */
.onb-points {
    max-width: 44rem;
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    list-style: square;
    color: var(--ink);
    line-height: 1.6;
}
.onb-points li { margin: 0 0 0.55rem; padding-left: 0.2rem; }
.onb-points li::marker { color: var(--blue); }
.onb-points strong { color: var(--heading); }
.onb-points a { color: var(--onb-accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.onb-points-numbered { list-style: decimal; }
.onb-points-numbered li::marker { font-family: var(--font-mono); font-weight: 700; }

/* Label / description pairs (team operations: Tasks, Meetings, ...). */
.onb-facts {
    max-width: 44rem;
    margin: 0.5rem 0 1rem;
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    border-top: 1px solid var(--line);
}
.onb-facts dt,
.onb-facts dd {
    margin: 0;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
}
.onb-facts dt {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--onb-accent-ink);
    padding-top: 1rem;
}
.onb-facts dd { color: var(--ink); line-height: 1.65; }
.onb-facts dd strong { color: var(--heading); }
.onb-facts a { color: var(--onb-accent-ink); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 640px) {
    .onb-facts { grid-template-columns: 1fr; }
    .onb-facts dt { border-bottom: 0; padding-bottom: 0.15rem; }
    .onb-facts dd { padding-top: 0; }
}

.onb-text a,
.onb-item-note a,
.onb-where a {
    color: var(--onb-accent-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.onb-track-meta {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.25rem;
}


/* ---- Content groups and lists ---- */
.onb-group-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--heading);
    margin: 1.75rem 0 0.75rem;
}

.onb-module-progress {
    display: inline-block;
    margin-left: 0.6rem;
    padding: 0.1rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--muted);
    vertical-align: middle;
    transform: translateY(-2px);
}

.onb-module-progress.is-complete {
    border-color: color-mix(in srgb, var(--blue) 45%, transparent);
    color: var(--onb-accent-ink);
}

.onb-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.onb-list li {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}

.onb-list li:last-child {
    border-bottom: 0;
}

.onb-list > li > a {
    color: var(--onb-accent-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.onb-item-name {
    display: block;
    font-weight: 600;
    color: var(--heading);
}

.onb-item-note {
    display: block;
    margin-top: 0.2rem;
}

/* ---- Where things live ---- */
.onb-where {
    margin: 0;
    max-width: 52rem;
}

.onb-where-row {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

.onb-where-row:last-child {
    border-bottom: 0;
}

.onb-where-row dt {
    font-weight: 600;
    color: var(--heading);
}

.onb-where-row dd {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .onb-where-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

/* ---- Landing tiles: four track cards, hub style ---- */
.onb-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 640px) {
    .onb-tiles {
        grid-template-columns: 1fr;
    }
}

/* ---- Track page layout: sidebar + content ---- */
.onb-layout {
    display: grid;
    grid-template-columns: 17.5rem minmax(0, 1fr);
    gap: 2.5rem;
    max-width: 72rem;
    margin: 0 auto;
    padding: 2rem 1.5rem 3.5rem;
}

.onb-toc {
    position: sticky;
    top: 5.5rem;
    align-self: start;
    max-height: calc(100vh - 7rem);
    overflow: auto;
}

.onb-toc-heading {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

/* Module list: the page's only module navigator. Bordered entries with a
   number badge (the look of the old top menu), stacked in the sidebar. */
.onb-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.onb-nav a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 2px solid var(--line);
    background: var(--onb-surface);
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--heading);
    text-decoration: none;
}

.onb-nav a:hover {
    border-color: var(--blue);
}

.onb-nav a:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.onb-nav a[aria-current="true"] {
    border-color: var(--blue);
    background: var(--onb-pill-current-bg);
    color: #fff;
}

.onb-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    font-size: 0.72rem;
    flex: 0 0 auto;
}

.onb-nav-label {
    padding-top: 2px;
}

.onb-nav-note {
    display: block;
    margin-top: 2px;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.onb-nav a[aria-current="true"] .onb-nav-note { color: #fff; opacity: 0.85; }
.onb-nav a[aria-current="true"] .onb-nav-badge { background: var(--onb-pill-state-bg); color: var(--onb-pill-state-ink); }
.onb-nav a.is-complete .onb-nav-badge { background: #1e7a3c; color: #fff; }
.onb-nav a.is-complete[aria-current="true"] .onb-nav-badge { background: var(--onb-pill-state-bg); color: var(--onb-good-ink); }

.onb-toc-mobile {
    display: none;
}

.onb-doc {
    min-width: 0;
}

.onb-doc .onb-track-meta {
    margin-top: 0;
}

@media (max-width: 860px) {
    .onb-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 1.25rem 3rem;
    }

    .onb-toc {
        position: static;
        max-height: none;
    }

    .onb-toc-desktop {
        display: none;
    }

    .onb-toc-mobile {
        display: block;
        border: 1px solid var(--line);
        background: var(--paper);
        padding: 0.7rem 1rem;
    }

    .onb-toc-mobile summary {
        font-family: var(--font-mono);
        font-size: 0.75rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--muted);
        cursor: pointer;
    }

    .onb-toc-mobile .onb-nav {
        margin-top: 0.6rem;
    }

    .onb-toc-mobile .onb-progress {
        margin: 0.75rem 0 1rem;
    }
}

/* ---- Section heading anchors (matches safety docs) ---- */
.onb-doc h3[id] .h-anchor,
.onb-doc .onb-module h3 .h-anchor {
    font-size: 0.85em;
    color: var(--muted);
    text-decoration: none;
    margin-left: 0.45rem;
    opacity: 0;
    transition: opacity 120ms ease;
}

.onb-doc h3[id]:hover .h-anchor,
.onb-doc .onb-module h3:hover .h-anchor,
.onb-doc h3[id] .h-anchor:focus-visible,
.onb-doc .onb-module h3 .h-anchor:focus-visible {
    opacity: 1;
}

/* Track checklist */
.onb-progress {
    border: 2px solid var(--onb-frame);
    background: var(--wash);
    padding: 12px 14px;
    margin: 0 0 1.5rem;
}
.onb-progress-text { font-size: 0.95rem; }
.onb-progress-count { font-weight: 700; }
.onb-progress-note { color: var(--muted); font-size: 0.85rem; }
.onb-progress-bar {
    height: 8px;
    background: var(--line);
    margin-top: 10px;
}
.onb-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--blue, #2f6df6);
    transition: width 0.25s ease;
}
.onb-checklist > li.onb-task {
    display: block;
    position: relative;
    padding-left: 72px;
}
.onb-check {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.onb-task-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    background: var(--navy, #0f1e33);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}
.onb-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--blue, #2f6df6);
    cursor: pointer;
}
.onb-badge {
    float: right;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--line-2);
    padding: 2px 8px;
    margin-top: 3px;
}
.onb-done .onb-item-name,
.onb-done > a { text-decoration: line-through; opacity: 0.55; }
.onb-done .onb-item-note { opacity: 0.7; }

/* Spacious per-item task cards (each lecture, tutorial, lab and task
   gets its own card instead of a dense list row) */
.onb-cards > li.onb-task {
    border: 2px solid var(--onb-frame);
    border-bottom: 2px solid var(--onb-frame);
    background: var(--onb-surface);
    padding: 26px 28px 24px 92px;
    margin-bottom: 26px;
    font-size: 1rem;
}

.onb-cards .onb-check {
    top: 26px;
    left: 28px;
}

.onb-cards .onb-task-num {
    min-width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.onb-cards .onb-item-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

.onb-card-desc {
    margin: 0.6rem 0 0;
    max-width: 46rem;
    color: var(--ink);
    line-height: 1.65;
}

.onb-card-keys {
    margin: 0.55rem 0 0;
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.6;
}

.onb-card-keys strong {
    color: var(--heading);
}

/* How-to steps and checklists inside a task card. Reset the .onb-list row
   styling (borders, padding) that would otherwise leak into nested items. */
.onb-steps,
.onb-proof-list {
    margin: 0.7rem 0 0;
    padding-left: 1.4rem;
    color: var(--ink);
    line-height: 1.6;
}
.onb-steps { list-style: decimal; }
.onb-proof-list { list-style: square; }
.onb-list .onb-steps li,
.onb-list .onb-proof-list li {
    padding: 0.15rem 0 0.15rem 0.2rem;
    border-bottom: 0;
    font-size: 0.95rem;
    color: inherit;
}
.onb-steps li::marker { font-family: var(--font-mono); font-weight: 700; color: var(--onb-accent-ink); }
.onb-steps strong, .onb-proof-list strong { color: var(--heading); }

.onb-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.onb-btn-row .btn-primary,
.onb-btn-row .btn-ghost {
    font-size: 0.78rem;
    padding: 0.6rem 1.15rem;
}

/* Notes button: warm attention accent so the written notes stand out
   from the video/slides/quiz actions, in light and dark themes. */
.onb-btn-row .btn-notes {
    --notes-ink: #b54708;
    color: var(--notes-ink);
    border-color: color-mix(in srgb, var(--notes-ink) 55%, transparent);
    background: color-mix(in srgb, var(--notes-ink) 8%, transparent);
}

.onb-btn-row .btn-notes:hover,
.onb-btn-row .btn-notes:focus-visible {
    background: var(--notes-ink);
    border-color: var(--notes-ink);
    color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .onb-btn-row .btn-notes {
        --notes-ink: #f2a44a;
    }
    :root:not([data-theme]) .onb-btn-row .btn-notes:hover,
    :root:not([data-theme]) .onb-btn-row .btn-notes:focus-visible {
        color: #1a1206;
    }
}

:root[data-theme="dark"] .onb-btn-row .btn-notes {
    --notes-ink: #f2a44a;
}

:root[data-theme="dark"] .onb-btn-row .btn-notes:hover,
:root[data-theme="dark"] .onb-btn-row .btn-notes:focus-visible {
    color: #1a1206;
}

/* Tip box: points readers at the team-written notes; uses the same
   warm accent as the Notes buttons so the two read as one idea. */
.onb-tip {
    --notes-ink: #b54708;
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin: 0 0 18px;
    padding: 12px 16px;
    border: 1px solid color-mix(in srgb, var(--notes-ink) 45%, transparent);
    border-left: 4px solid var(--notes-ink);
    background: color-mix(in srgb, var(--notes-ink) 8%, transparent);
}

.onb-tip-label {
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--notes-ink);
}

.onb-tip p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--heading);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .onb-tip {
        --notes-ink: #f2a44a;
        background: color-mix(in srgb, var(--notes-ink) 12%, transparent);
    }
    :root:not([data-theme]) .onb-tip p {
        color: var(--snow);
    }
}

:root[data-theme="dark"] .onb-tip {
    --notes-ink: #f2a44a;
    background: color-mix(in srgb, var(--notes-ink) 12%, transparent);
}

:root[data-theme="dark"] .onb-tip p {
    color: var(--snow);
}

.onb-btn-row span.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.onb-card-res {
    margin: 16px 0 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
}

.onb-card-res a {
    color: var(--onb-accent-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 640px) {
    /* Header row: number + checkbox + title, then full-width body below */
    .onb-cards > li.onb-task {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        column-gap: 10px;
        padding: 16px 16px 18px;
        margin-bottom: 16px;
    }
    .onb-cards .onb-check {
        position: static;
        flex: 0 0 auto;
        gap: 10px;
        margin-top: 1px;
    }
    .onb-cards .onb-task-num {
        min-width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    .onb-check input[type="checkbox"] {
        width: 22px;
        height: 22px;
        margin: 0;
    }
    .onb-cards .onb-item-name {
        order: 1;
        flex: 1 1 0;
        min-width: 0;
        font-size: 1.08rem;
    }
    .onb-cards .onb-badge {
        order: 2;
        float: none;
        margin: 2px 0 0 auto;
    }
    .onb-cards .onb-card-desc,
    .onb-cards .onb-steps,
    .onb-cards .onb-proof-list,
    .onb-cards .onb-card-keys,
    .onb-cards .onb-card-fig,
    .onb-cards .onb-card-res,
    .onb-cards .onb-btn-row {
        order: 3;
        flex: 0 0 100%;
    }
    .onb-cards .onb-card-desc { margin-top: 0.55rem; }
    .onb-cards .onb-btn-row { margin-top: 14px; }
}

/* Progress: complete state, reset control, chooser tiles */
.onb-progress-complete {
    border-color: var(--onb-good-frame);
    background: var(--onb-good-bg);
}

.onb-progress-complete .onb-progress-bar span {
    background: var(--onb-good-frame);
}

.onb-reset {
    margin-top: 12px;
    background: none;
    border: 1px solid var(--line-2);
    color: var(--muted);
    font-size: 0.8rem;
    padding: 6px 12px;
    cursor: pointer;
}

.onb-reset:hover {
    border-color: var(--heading);
    color: var(--heading);
}

.tile-progress {
    display: block;
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--muted);
}

.tile-progress-count {
    display: block;
}

.tile-progress-bar {
    display: block;
    height: 6px;
    background: var(--line);
    margin-top: 6px;
}

.tile-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--blue, #2f6df6);
}

/* ---- Module 1 roadmap graphic ---- */
.onb-roadmap { margin: 0.5rem 0 1.25rem; }
.onb-roadmap-cap { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); margin-top: 0.4rem; }
/* Member path. Plain HTML boxes (not a fixed-size SVG) so labels always wrap
   inside their box; connectors are drawn with ::before on each step. */
.onb-roadmap .rm-steps {
    list-style: none;
    margin: 0;
    padding: 1.4rem 0 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 22px;
    max-width: 52rem;
}
.onb-roadmap .rm-step {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 3.6rem;
    padding: 8px 8px;
    border: 1.5px solid var(--line);
    border-radius: 4px;
    text-align: center;
    font-family: var(--font-mono);
    overflow-wrap: anywhere;
}
.onb-roadmap .rm-step + .rm-step::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    width: 22px;
    border-top: 1.5px solid var(--muted);
}
.onb-roadmap .rm-t { font-size: 0.8rem; line-height: 1.25; }
.onb-roadmap .rm-s { font-size: 0.68rem; line-height: 1.25; opacity: 0.85; }
.onb-roadmap .rm-done { background: var(--navy); border-color: var(--navy); color: var(--mist); }
.onb-roadmap .rm-current { background: var(--blue); border-color: var(--blue); color: #fff; }
.onb-roadmap .rm-current .rm-t { font-weight: 700; }
.onb-roadmap .rm-next .rm-t { color: var(--heading); }
.onb-roadmap .rm-next .rm-s { color: var(--muted); opacity: 1; }
.onb-roadmap .rm-here {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 4px);
    color: var(--onb-accent-ink);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}
.onb-roadmap .rm-note { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin: 0.6rem 0 0; }
/* Narrow screens: stack the path vertically, connectors run down. */
@media (max-width: 640px) {
    .onb-roadmap .rm-steps { grid-auto-flow: row; grid-auto-columns: auto; gap: 14px; padding-top: 0; max-width: 22rem; }
    .onb-roadmap .rm-step { min-height: 0; padding: 8px 12px; }
    .onb-roadmap .rm-step + .rm-step::before { top: auto; bottom: 100%; right: auto; left: 50%; width: 0; height: 14px; border-top: 0; border-left: 1.5px solid var(--muted); }
    .onb-roadmap .rm-here { position: static; display: block; order: -1; margin-bottom: 2px; color: #fff; opacity: 0.85; }
}

/* ---- Module breaks + callouts (design pass) ---- */
h3.onb-group-title {
    border-top: 2px solid var(--line);
    padding-top: 2.25rem;
    margin-top: 3.25rem;
    scroll-margin-top: 90px;
}
.onb-intro h3.onb-group-title,
.onb-core h3.onb-group-title:first-child {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}
.onb-intro { margin-bottom: 0; }
.onb-callout {
    border: 2px solid var(--onb-frame);
    border-left: 6px solid var(--blue);
    background: var(--wash);
    padding: 14px 18px 16px;
    margin: 1.25rem 0 1.5rem;
}
.onb-callout p { margin: 0.4rem 0 0; line-height: 1.6; }
.onb-callout-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--onb-accent-ink);
}
@media (max-width: 640px) {
    h3.onb-group-title { margin-top: 2.5rem; padding-top: 1.75rem; }
}

/* ---- Module viewer (progressive enhancement) ---- */
.onb-pager {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-top: 2rem;
}
.onb-pager button {
    font-size: 0.85rem;
    padding: 0.75rem 1.3rem;
    max-width: 48%;
}
.onb-pager button:disabled { opacity: 0.4; cursor: not-allowed; }
/* viewer active: the hidden attribute does the work; keep module-break rules off for hidden flow */
.onb-viewer-on .onb-module[hidden] { display: none; }
.onb-viewer-on .onb-module:not([hidden]) h3.onb-group-title {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}
section.onb-module:focus { outline: none; }
@media (max-width: 640px) {
    .onb-pager { flex-direction: column; }
    .onb-pager button { max-width: none; width: 100%; }
}

@media (max-width: 640px) {
    .onb-progress { padding: 10px 12px; }
    .onb-progress .onb-progress-note { display: none; }
    .onb-progress .onb-reset { padding: 6px 10px; font-size: 0.72rem; }
}

/* Figure inside a task card (e.g. Lecture 8 chicken-and-egg sketch). White
   sheet keeps the pale diagram legible in dark mode. */
.onb-card-fig {
    margin: 0.9rem 0 0;
}

.onb-card-fig img {
    display: block;
    max-width: 100%;
    height: auto;
    background: #ffffff;
    border: 1px solid var(--onb-frame);
    border-radius: 8px;
    padding: 10px;
}

.onb-tip a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Complete module: celebratory final step on Stage 1. The confetti canvas
   is clipped to the module and purely decorative (aria-hidden; the
   congratulation is real text plus an aria-live status). */
.onb-complete {
    position: relative;
    overflow: hidden;
}

.onb-confetti {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* While the celebration runs, the canvas covers the whole viewport. It
   stays non-interactive and aria-hidden, so every control underneath
   keeps working and screen readers ignore it. */
.onb-confetti.is-live {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1500;
}

/* Keep the interview summary on the same spacing rhythm as the track cards. */
.onb-complete > .onb-text {
    margin: 0 0 1rem;
}

.onb-complete > h4.onb-item-name {
    margin: 1.75rem 0 0.75rem;
}

.onb-complete > .onb-list {
    margin: 0 0 1.5rem;
}

.onb-complete > .onb-btn-row {
    margin-top: 1.5rem;
}

.onb-complete-lede {
    margin: 0 0 12px;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--heading);
}

.onb-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Final module: the viewer removes the Next control entirely. */
.onb-pager button[hidden] { display: none; }

/* A plain requirement notice, using the existing track frame and type. */
.onb-quiz-rule {
    border: 1px solid var(--onb-frame);
    border-left-width: 4px;
    padding: 1.25rem;
    margin: 1rem 0 1.5rem;
    background: var(--onb-surface);
}

.onb-quiz-rule h4 {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.25;
    color: var(--heading);
}

.onb-quiz-rule p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--muted);
}

/* ---- Guide-style modules (read through, one checkbox at the end) ---- */
.onb-guide-step {
    max-width: 46rem;
    padding: 0 0 1.5rem;
    margin: 0 0 1.5rem;
    border-bottom: 1px solid var(--line);
}
.onb-guide-step .onb-subhead {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1.25rem;
}
.onb-guide-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    background: var(--navy);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
}
.onb-guide-use {
    max-width: 44rem;
    margin: 0 0 0.25rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
.onb-guide-use strong { color: var(--heading); }
/* Screenshots: white sheet + frame so they read in both themes. */
.onb-shot {
    margin: 1rem 0 0;
    border: 1px solid var(--line);
    background: #fff;
    padding: 6px;
}
.onb-shot img { display: block; width: 100%; height: auto; }
.onb-guide-done { margin-top: 0.5rem; }
.onb-shot figcaption {
    padding: 6px 4px 2px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.5;
    color: #4c5a76;
}
.onb-facts dd .onb-shot { max-width: 100%; }
