/* 考试词汇 /chs/vocab — hub cards, word tables, self-test.
   Dark mode is driven by the site-wide [data-bs-theme="dark"] attribute, same as the
   other /chs tool stylesheets; nothing here reads prefers-color-scheme directly. */

/* ---------- hub cards ---------- */
.ev-card {
    display: block;
    padding: 1rem 1.1rem;
    border: 1px solid var(--bs-border-color);
    border-left-width: 5px;
    border-radius: .75rem;
    background: var(--bs-body-bg);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.ev-card:hover,
.ev-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
    color: inherit;
}

.ev-card-primary { border-left-color: var(--bs-primary); }
.ev-card-success { border-left-color: var(--bs-success); }
.ev-card-danger  { border-left-color: var(--bs-danger); }
.ev-card-info    { border-left-color: var(--bs-info); }
.ev-card-warning { border-left-color: var(--bs-warning); }

.ev-card-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .4rem;
}

.ev-card-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.ev-card-en {
    font-size: .85rem;
    color: var(--bs-secondary-color);
}

.ev-card-count {
    margin-left: auto;
    font-size: .8rem;
    font-weight: 600;
    padding: .1rem .5rem;
    border-radius: 1rem;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
}

.ev-card-blurb {
    margin-bottom: .6rem;
    font-size: .92rem;
}

.ev-card-sections {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.ev-chip {
    font-size: .72rem;
    padding: .1rem .45rem;
    border-radius: .35rem;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

/* ---------- facts strip ---------- */
.ev-fact {
    padding: .6rem .75rem;
    border-radius: .5rem;
    background: var(--bs-tertiary-bg);
}

.ev-fact-label {
    font-size: .75rem;
    color: var(--bs-secondary-color);
}

.ev-fact-value {
    font-weight: 700;
    font-size: .95rem;
}

/* ---------- jump nav + filters ---------- */
.ev-jump {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.ev-filter-btn {
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-radius: 1rem;
    padding: .2rem .75rem;
    font-size: .85rem;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.ev-filter-btn:hover {
    background: var(--bs-tertiary-bg);
}

.ev-filter-btn.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

/* ---------- word table ---------- */
.ev-table {
    font-size: .93rem;
}

.ev-word {
    font-weight: 600;
}

.ev-ipa {
    font-family: "Segoe UI", "Noto Sans", "DejaVu Sans", system-ui, sans-serif;
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

.ev-pos {
    color: var(--bs-secondary-color);
    font-style: italic;
    white-space: nowrap;
}

.ev-note {
    font-size: .86rem;
    color: var(--bs-secondary-color);
}

.ev-audio-btn {
    border: 0;
    background: transparent;
    color: var(--bs-primary);
    padding: 0 .25rem;
    cursor: pointer;
    line-height: 1;
}

.ev-audio-btn:hover {
    color: var(--bs-link-hover-color);
}

.ev-audio-btn[disabled] {
    opacity: .4;
    cursor: default;
}

/* Rows hidden by search/filter. A class rather than inline style so the print
   stylesheet can decide independently what a printed table contains. */
.ev-hidden {
    display: none !important;
}

/* ---------- strategy + plan ---------- */
.ev-strategy > li {
    margin-bottom: .6rem;
}

.ev-strategy > li:last-child {
    margin-bottom: 0;
}

.ev-phase {
    padding: .85rem 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background: var(--bs-body-bg);
}

/* ---------- self-test ---------- */
.ev-option {
    text-align: left;
    white-space: normal;
}

.ev-option.correct {
    background: var(--bs-success-bg-subtle);
    border-color: var(--bs-success);
}

.ev-option.wrong {
    background: var(--bs-danger-bg-subtle);
    border-color: var(--bs-danger);
}

.ev-review-item {
    padding: .4rem .6rem;
    border-left: 3px solid var(--bs-danger);
    background: var(--bs-tertiary-bg);
    border-radius: .25rem;
    margin-bottom: .4rem;
    font-size: .9rem;
}

/* ---------- print ----------
   The print view is the "free PDF" the page advertises: word table only, no
   navigation, no ads, no self-test. .ev-print-header is the only thing that
   appears in print and nowhere else. */
.ev-print-header {
    display: none;
}

@media print {
    .ev-no-print,
    .ev-filter-btn,
    #evSearch,
    #evCount {
        display: none !important;
    }

    .ev-print-header {
        display: block;
        margin-bottom: .75rem;
        font-size: 1.1rem;
    }

    .ev-table {
        font-size: 10pt;
    }

    .ev-audio-btn {
        display: none;
    }

    .card {
        border: 0 !important;
        box-shadow: none !important;
    }

    .card-body {
        padding: 0 !important;
    }

    .ev-section {
        break-inside: auto;
    }

    /* Never split a row across pages — a word without its meaning is useless. */
    .ev-table tr {
        break-inside: avoid;
    }
}
