/* deu-tables.css — ba trang tra cứu (SEO thương hiệu Đợt 3, 16/11/2026): /tu-vung-tieng-duc-a1, /danh-tu-tieng-duc-der-die-das,
   /dong-tu-bat-quy-tac-tieng-duc. Dùng chung khung .lv-page / .ddc-band / .ddl-* của deu-dict.css (nạp trước tệp này).
   Màu giống lấy token --color-gender-*; không icon trang trí, không chữ nhỏ viết hoa trên tiêu đề. */

.dtb-body { display: flex; flex-direction: column; gap: 14px; padding-bottom: 28px; }
.dtb-sec { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dtb-sec > h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--lv-ink); letter-spacing: -.01em; }
.dtb-sec > h2 small { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--lv-muted); letter-spacing: 0; }
.dtb-sec > p, .dtb-lead { margin: 0; font-size: 15px; line-height: 1.65; color: var(--lv-text); max-width: 72ch; }
.dtb-lead b { color: var(--lv-ink); }
.dtb-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.dtb-stats li { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--lv-sunken); font-size: 14px; color: var(--lv-text); }
.dtb-stats b { font-weight: 800; color: var(--lv-ink); font-variant-numeric: tabular-nums; }

/* Giống: chữ mạo từ tô màu như trang từ điển */
.dtb-g { font-weight: 700; }
.dtb-g--der { color: var(--color-gender-der-fg); }
.dtb-g--die { color: var(--color-gender-die-fg); }
.dtb-g--das { color: var(--color-gender-das-fg); }
/* Trang A1 dùng .ddl-group của deu-dict.css, nơi ".ddl-group a span" tô xám mọi span ⇒ nâng độ ưu tiên cho chữ mạo từ */
.ddl-group a span.dtb-g--der { color: var(--color-gender-der-fg); }
.ddl-group a span.dtb-g--die { color: var(--color-gender-die-fg); }
.ddl-group a span.dtb-g--das { color: var(--color-gender-das-fg); }
/* Bảng danh từ: mạo từ <b class="a"> tô theo data-g của dòng (đỡ lặp tên lớp trên 1.400 dòng) */
.dtb-table b.a { font-weight: 700; }
.dtb-table tr[data-g=der] b.a { color: var(--color-gender-der-fg); }
.dtb-table tr[data-g=die] b.a { color: var(--color-gender-die-fg); }
.dtb-table tr[data-g=das] b.a { color: var(--color-gender-das-fg); }

/* Mục lục chủ đề / trình độ */
.dtb-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dtb-toc a { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--lv-hair);
  font-size: 14px; font-weight: 600; color: var(--lv-ink); text-decoration: none; background: var(--lv-surface); }
.dtb-toc a small { font-weight: 600; color: var(--lv-muted); font-variant-numeric: tabular-nums; }
.dtb-toc a:hover { border-color: var(--lv-brand-fg); color: var(--lv-brand-fg); }
.dtb-toc a[aria-current] { background: var(--lv-ink); border-color: var(--lv-ink); color: var(--lv-surface); }
.dtb-toc a[aria-current] small { color: inherit; opacity: .75; }

/* Ô lọc */
.dtb-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dtb-filter input[type=search] { flex: 1 1 220px; min-width: 0; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--lv-hair);
  background: var(--lv-surface); color: var(--lv-ink); font: inherit; font-size: 15px; }
.dtb-filter input[type=search]:focus { outline: 2px solid var(--lv-brand-fg); outline-offset: 1px; border-color: transparent; }
.dtb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dtb-chips button { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--lv-hair); background: var(--lv-surface);
  font: inherit; font-size: 14px; font-weight: 700; color: var(--lv-ink); cursor: pointer; }
.dtb-chips button[aria-pressed="true"] { background: var(--lv-ink); border-color: var(--lv-ink); color: var(--lv-surface); }
.dtb-count { font-size: 13px; color: var(--lv-muted); font-variant-numeric: tabular-nums; }

/* Bảng */
.dtb-scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.dtb-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.dtb-table th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 12.5px; font-weight: 700; color: var(--lv-muted);
  background: var(--lv-surface); padding: 8px 10px; border-bottom: 1px solid var(--lv-hair); white-space: nowrap; }
.dtb-table td { padding: 7px 10px; border-bottom: 1px solid var(--lv-hair); vertical-align: top; color: var(--lv-text); }
.dtb-table td:first-child, .dtb-table th:first-child { padding-left: 0; }
.dtb-table tr:last-child td { border-bottom: 0; }
.dtb-table a { color: var(--lv-ink); font-weight: 600; text-decoration: none; }
.dtb-table a:hover { color: var(--lv-brand-fg); text-decoration: underline; text-underline-offset: 3px; }
.dtb-table [lang=de] { white-space: nowrap; }
.dtb-table .dtb-lv { width: 1%; white-space: nowrap; font-size: 12.5px; font-weight: 700; color: var(--lv-muted); text-align: right; padding-right: 0; }
.dtb-table .dtb-tag { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--lv-muted); white-space: nowrap; }
.dtb-table tr[hidden] { display: none; }
.dtb-empty { margin: 0; padding: 14px 0 4px; color: var(--lv-muted); font-size: 14px; }

/* Bảng đoán giống theo đuôi */
.dtb-end td:nth-child(2), .dtb-end td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dtb-bar { display: inline-block; width: 56px; height: 6px; border-radius: 3px; background: var(--lv-sunken); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.dtb-bar i { display: block; height: 100%; border-radius: inherit; }
.dtb-bar--der i { background: var(--color-gender-der-fg); }
.dtb-bar--die i { background: var(--color-gender-die-fg); }
.dtb-bar--das i { background: var(--color-gender-das-fg); }

/* Danh sách từ theo chủ đề (trang A1) dùng .ddl-group của deu-dict.css; chỉ thêm dòng phụ và link học bộ */
.dtb-topic { scroll-margin-top: calc(var(--lv-top-h, 64px) + 16px); }
.dtb-topic__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 10px; }
.dtb-topic__head h2 { margin: 0; }
.dtb-topic__head p { margin: 2px 0 0; font-size: 13.5px; color: var(--lv-muted); }
.dtb-topic__go { font-size: 14px; font-weight: 700; color: var(--lv-brand-fg); text-decoration: none; white-space: nowrap; }
.dtb-topic__go:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Hỏi đáp và link liên quan */
.dtb-faq { display: flex; flex-direction: column; gap: 14px; }
.dtb-faq h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--lv-ink); }
.dtb-faq p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--lv-text); max-width: 72ch; }
.dtb-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.dtb-links a { display: block; padding: 7px 0; font-size: 14.5px; font-weight: 600; color: var(--lv-ink); text-decoration: none; border-bottom: 1px solid var(--lv-hair); }
.dtb-links a:hover { color: var(--lv-brand-fg); }
.dtb-links small { display: block; font-weight: 500; font-size: 12.5px; color: var(--lv-muted); }

/* Bảng động từ (6 cột): cột động từ dính bên trái khi cuộn ngang */
.dtb-verbs td:first-child, .dtb-verbs th:first-child { position: sticky; left: 0; z-index: 2; background: var(--lv-surface); }
.dtb-verbs th:first-child { z-index: 3; }

@media (max-width: 640px) {
  .dtb-sec { padding: 16px 16px 18px; }
  .dtb-scroll { margin: 0 -16px; padding: 0 16px; }
  .dtb-sec > h2 { font-size: 18px; }
  .dtb-table { font-size: 14px; }
  .dtb-hide-sm { display: none; }
  /* Bảng danh từ 3 cột: cho chữ Đức xuống dòng để cột nghĩa đủ rộng */
  .dtb-nouns [lang=de] { white-space: normal; }
  .dtb-nouns td:last-child { min-width: 34%; }
  /* Bảng động từ: giữ mỗi dòng một hàng, cuộn ngang */
  .dtb-verbs { min-width: 620px; }
  .dtb-verbs td:nth-child(5) { min-width: 150px; }
  /* Mục lục chủ đề: một dải cuộn ngang thay vì 28 dòng */
  .dtb-toc { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .dtb-toc::-webkit-scrollbar { display: none; }
  .dtb-toc a { white-space: nowrap; }
}
