/* ============================================
   Hub pages (mobile UX direction, 2026-08-30)
   Spec: dev/design-review/mobile-ux/deep-dive.html, "08 Hub pieces".
   Progress card, tool tiles, chapter rows in three states, and the
   sticky Continue dock. Built on the same --fh-* tokens and .fh-btn/
   .fh-radius primitives as header.css/home.css.
   ============================================ */

.fh-pagehead {
    padding: 28px 0 20px;
}
.fh-pagehead h1 {
    font-family: var(--fh-font-display);
    font-weight: 800;
    font-size: 2.2rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
}
.fh-pagehead p {
    color: var(--fh-ink-2);
    margin: 0;
    max-width: 62ch;
}

/* ---- Choice row: picking among a few options (the three exams) ---- */
.fh-exams {
    display: grid;
    gap: 12px;
}
.fh-exam {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--fh-rule);
    border-radius: var(--fh-radius);
    background: var(--fh-surface);
    text-decoration: none;
    color: inherit;
    min-height: 88px;
}
.fh-exam:active {
    background: var(--fh-tint);
}
.fh-exam h3 {
    font-family: var(--fh-font-display);
    font-weight: 500;
    font-size: 1.35rem;
    margin: 8px 0 2px;
    letter-spacing: -0.02em;
}
.fh-exam p {
    margin: 0;
    color: var(--fh-ink-2);
    font-size: 0.92rem;
}
.fh-exam__stats {
    font-family: var(--fh-font-mono);
    font-size: 0.78rem;
    color: var(--fh-ink-2);
    margin-top: 8px;
}
.fh-exam__stats b {
    color: var(--fh-ink);
    font-weight: 600;
}
.fh-exam svg {
    width: 22px;
    height: 22px;
    color: var(--fh-accent-text);
}

/* ---- Progress card ---- */
.fh-progress {
    border: 1px solid var(--fh-rule);
    border-radius: var(--fh-radius);
    background: var(--fh-surface);
    padding: 18px;
    display: grid;
    gap: 12px;
}
.fh-progress__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.fh-progress__top b {
    font-family: var(--fh-font-display);
    font-weight: 500;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}
.fh-progress__top span {
    font-family: var(--fh-font-mono);
    font-size: 0.78rem;
    color: var(--fh-ink-2);
}
.fh-progress__bar {
    height: 8px;
    border-radius: 999px;
    background: var(--fh-gray-100);
    overflow: hidden;
}
.fh-progress__bar i {
    display: block;
    height: 100%;
    background: var(--fh-accent);
    border-radius: 999px;
}

/* ---- Tool tiles ---- */
.fh-tools {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.fh-tool {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 14px 6px 12px;
    min-height: 84px;
    border: 1px solid var(--fh-rule);
    border-radius: var(--fh-radius-sm);
    background: var(--fh-surface);
    text-decoration: none;
    color: inherit;
    font-size: 0.78rem;
    text-align: center;
    line-height: 1.2;
}
.fh-tool:active {
    background: var(--fh-tint);
}
.fh-tool svg {
    width: 22px;
    height: 22px;
    color: var(--fh-accent-text);
}

/* ---- Chapter rows, grouped into units ---- */
.fh-unit {
    margin-top: 28px;
}
.fh-unit__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 4px;
}
.fh-unit__head h3 {
    font-family: var(--fh-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fh-ink-2);
    margin: 0;
    font-weight: 600;
}
.fh-unit__head span {
    font-family: var(--fh-font-mono);
    font-size: 0.72rem;
    color: var(--fh-ink-2);
}
.fh-ch {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 10px 0;
    border-bottom: 1px solid var(--fh-rule);
    text-decoration: none;
    color: inherit;
}
.fh-ch:last-child {
    border-bottom: 0;
}
.fh-ch__n {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-family: var(--fh-font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1.5px solid var(--fh-rule);
    color: var(--fh-ink-2);
}
.fh-ch--done .fh-ch__n {
    background: var(--fh-accent);
    border-color: var(--fh-accent);
    color: var(--fh-accent-ink);
}
.fh-ch--now .fh-ch__n {
    border-color: var(--fh-accent-text);
    color: var(--fh-accent-text);
}
.fh-ch b {
    display: block;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.25;
}
.fh-ch small {
    color: var(--fh-ink-2);
    font-size: 0.82rem;
}
.fh-ch--now b {
    color: var(--fh-accent-text);
}
/* Not-yet-written: honest instead of hidden, per deep-dive.html C1 —
   a filled ring or a hidden row would imply a chapter that doesn't exist. */
.fh-ch--soon {
    opacity: 0.55;
}
.fh-ch--soon b {
    color: var(--fh-ink-2);
}

/* ---- Sticky Continue dock ---- */
.fh-dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 30;
    background: var(--fh-surface-inverse);
    color: var(--fh-on-inverse);
    border-radius: 999px;
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 6px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}
.fh-dock small {
    display: block;
    font-family: var(--fh-font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
}
.fh-dock b {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--fh-on-inverse);
}
.fh-dock .fh-btn {
    margin-left: auto;
    min-height: 44px;
    flex-shrink: 0;
}
.fh-dock-space {
    height: 84px;
}

@media (min-width: 900px) {
    .fh-pagehead {
        padding: 56px 0 24px;
    }
    .fh-pagehead h1 {
        font-size: 3rem;
    }
    .fh-tools {
        grid-template-columns: repeat(2, 1fr);
    }
    .fh-dock,
    .fh-dock-space {
        display: none;
    }
    .fh-exams {
        grid-template-columns: repeat(3, 1fr);
    }
    .fh-exam {
        grid-template-columns: 1fr;
        align-content: start;
        padding: 24px;
    }
    .fh-exam svg {
        display: none;
    }
}
