/* HSK Vocabulary Hub (/hsk/hsk-1) — word table, mock test, and print/PDF styles. */

/* ---------- Quick jump nav ---------- */
.hsk-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ---------- Word table ---------- */
.hsk-table-wrap {
    max-height: 70vh;
    overflow-y: auto;
}

.hsk-table {
    margin-bottom: 0;
}

.hsk-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bs-body-bg, #fff);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.hsk-table thead th.hsk-nosort {
    cursor: default;
}

.hsk-table .hsk-hanzi {
    font-size: 1.5rem;
    line-height: 1.2;
    white-space: nowrap;
}

.hsk-table .hsk-trad {
    font-size: 0.9rem;
    opacity: 0.65;
    white-space: nowrap;
}

.hsk-table .hsk-pinyin {
    font-size: 1.05rem;
    white-space: nowrap;
}

.hsk-table .hsk-example {
    font-size: 0.85rem;
    opacity: 0.75;
}

.hsk-audio-btn {
    min-width: 2.4rem;
}

.hsk-count-note {
    font-variant-numeric: tabular-nums;
}

/* ---------- Mock test ---------- */
.hsk-test-hanzi {
    font-size: 3rem;
    line-height: 1.2;
}

.hsk-test-option {
    text-align: left;
    font-size: 1.1rem;
}

.hsk-test-option .hsk-opt-pinyin {
    font-size: 0.9rem;
    opacity: 0.7;
}

.hsk-test-timer {
    font-variant-numeric: tabular-nums;
    font-size: 1.25rem;
}

.hsk-test-timer.hsk-timer-low {
    color: #dc3545;
    font-weight: 700;
}

.hsk-miss-hanzi {
    font-size: 1.4rem;
    white-space: nowrap;
}

/* ---------- Dark mode ---------- */
[data-bs-theme="dark"] .hsk-table thead th {
    background: var(--bs-body-bg, #212529);
}

/* ---------- Print / Save as PDF ---------- */
.hsk-print-header {
    display: none;
}

@media print {
    /* Hide everything except the word list section. */
    header, nav, footer, .footer,
    .hsk-no-print,
    .adsbygoogle,
    .ad-placeholder {
        display: none !important;
    }

    .hsk-print-header {
        display: block;
        margin-bottom: 0.75rem;
    }

    .hsk-table-wrap {
        max-height: none;
        overflow: visible;
    }

    .hsk-table thead th {
        position: static;
        cursor: default;
    }

    .hsk-table .hsk-audio-col,
    .hsk-table .hsk-audio-btn {
        display: none !important;
    }

    .hsk-table {
        font-size: 11px;
    }

    .hsk-table .hsk-hanzi {
        font-size: 15px;
    }

    a[href]::after {
        content: "" !important;
    }
}
