/* deu-telc-board.css — bảng ôn /luyen-thi-telc-b1 (public/deu/uebung/telc.php, nâng cấp giao diện telc Đợt 3, 16/11/2026).
   Dùng chung khung danh sách luyện lẻ (deu-uebung.css: dải đầu, ô Làm tiếp, thanh lọc, đầu nhóm); thêm ô từng phần của đề và bảng bài.
   Chỉ token màu (tự lật chế độ tối). */
.tb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Ô từng phần của đề ───────────────────────────────────────────────────────────────────────────── */
.tb-parts { display: flex; flex-direction: column; gap: 10px; margin-top: 4px !important; }
.tb-parts__h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.tb-parts__h h2 { margin: 0 !important; font-size: 17px; font-weight: 700; color: var(--lv-ink); }
.tb-parts__h p { margin: 0 !important; font-size: 13.5px; color: var(--lv-muted); }
.tb-parts__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }   /* 12 phần: 4 / 3 / 2 ô một hàng, hàng nào cũng đủ */
@media (max-width: 1100px) { .tb-parts__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tb-part { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 13px 15px 14px; border-radius: 14px; border: 1px solid var(--lv-hair);
    border-top: 3px solid var(--color-primary); background: var(--lv-surface); color: var(--lv-text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.tb-part:hover { border-color: color-mix(in srgb, var(--color-primary) 35%, var(--lv-hair)); box-shadow: var(--lv-sh-1, 0 2px 8px rgba(0, 0, 0, .06)); }
.tb-part:focus-visible { outline: 2px solid var(--du-link); outline-offset: 2px; }
/* màu dải trên theo phần thi: Đọc + Sprachbausteine đỏ đô, Nghe vàng, Viết + Nói chữ đậm */
.tb-part--hoeren { border-top-color: var(--color-brand-gold); }
.tb-part--schreiben, .tb-part--sprechen { border-top-color: var(--lv-ink); }
.tb-part__k { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--du-link); }
.tb-part__k em { font-style: normal; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--du-no-soft); color: var(--du-no-fg); }
.tb-part b { font-size: 14.5px; font-weight: 700; line-height: 1.3; color: var(--lv-ink); }
.tb-part__m { font-size: 12.5px; color: var(--lv-muted); }
.tb-part__row { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 500; color: var(--lv-ink); }
.tb-part__top { font-size: 12.5px; color: var(--lv-muted); }
.tb-part.is-weak { border-color: color-mix(in srgb, var(--du-no-fg) 45%, var(--lv-hair)); border-top-color: var(--du-no-fg); }

/* ── Bảng bài từng phần ───────────────────────────────────────────────────────────────────────────── */
.tb-group { scroll-margin-top: calc(var(--nav-h, 64px) + 14px); }
.tb-tbl { border: 1px solid var(--lv-hair); border-radius: 14px; background: var(--lv-surface); overflow: hidden; }
.tb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tb-table th { padding: 9px 12px; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--lv-muted); background: var(--lv-sunken); white-space: nowrap; }
.tb-table td { padding: 11px 12px; border-top: 1px solid var(--lv-hair); vertical-align: middle; color: var(--lv-text); }
.tb-table tr[hidden] { display: none; }
.tb-c-no { width: 44px; text-align: right !important; color: var(--lv-faint, var(--lv-muted)); font-variant-numeric: tabular-nums; }
.tb-c-t { min-width: 0; }
.tb-c-t a { font-weight: 600; color: var(--lv-ink); text-decoration: none; }
.tb-c-t a:hover { color: var(--du-link); text-decoration: underline; text-underline-offset: 2px; }
.tb-c-t small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--lv-muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tb-c-n { width: 80px; text-align: right !important; }
.tb-c-b { width: 170px; white-space: nowrap; }
.tb-c-b em { font-style: normal; margin-left: 6px; font-size: 12.5px; font-weight: 600; color: var(--du-no-fg); }
.tb-row.is-ok .tb-c-b em { color: var(--du-ok-fg); }
.tb-wait { font-size: 13px; color: var(--lv-muted); }
.tb-c-d { width: 96px; white-space: nowrap; color: var(--lv-muted); }
.tb-c-go { width: 92px; text-align: right !important; }
.tb-go { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; height: 34px; padding: 0 12px; border-radius: 10px;
    border: 1px solid var(--lv-hair); background: var(--lv-surface); font-size: 13.5px; font-weight: 600; color: var(--lv-ink); text-decoration: none; }
.tb-go.is-new { border-color: color-mix(in srgb, var(--color-primary) 45%, var(--lv-hair)); color: var(--du-link); }
.tb-row:hover td { background: color-mix(in srgb, var(--color-primary) 4%, transparent); }
.tb-row:hover .tb-go { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-dark); }
.tb-mob { display: none; }
.tb-row.is-ok .tb-c-no { color: var(--du-ok-fg); }

/* Điện thoại: mỗi bài một dòng hai tầng (tên bài + một dòng số liệu), nút mở bài bên phải */
@media (max-width: 640px) {
    .tb-parts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .tb-part { padding: 11px 12px 12px; }
    .tb-part b { font-size: 13.5px; }
    .tb-table thead { display: none; }
    .tb-table, .tb-table tbody { display: block; }
    .tb-table tr { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 0 10px; padding: 11px 12px; border-top: 1px solid var(--lv-hair); }
    .tb-table tbody tr:first-child { border-top: 0; }
    .tb-table td { padding: 0; border: 0; }
    .tb-c-no { width: auto; text-align: left !important; font-size: 13px; }
    .tb-c-n, .tb-table:not(.tb-table--guest) .tb-c-b, .tb-c-d { display: none; }
    .tb-table--guest .tb-c-b { grid-column: 2; grid-row: 2; margin-top: 4px; }
    .tb-c-go { width: auto; grid-column: 3; grid-row: 1 / span 2; }
    .tb-go { min-width: 0; height: 32px; padding: 0 10px; font-size: 13px; }
    .tb-mob { display: block; margin-top: 3px; font-size: 12.5px; color: var(--lv-text); }
    .tb-row:hover td { background: none; }
    /* sáu phần thi + bốn trạng thái: xuống hai hàng thay vì tràn ngang (deu-uebung.css ép một hàng cho trang Viết – Nói ít nút) */
    .tb .du-seg { flex-wrap: wrap; }
    .tb .du-seg button { flex: 1 1 auto; }
}
@media (max-width: 360px) { .tb-parts__grid { grid-template-columns: 1fr; } }
