/* Thanh trên cùng chung cho Lab, Lý thuyết, Bài tập (sinh bởi build.py).
   Logo luôn về trang chủ thayquyenmath.online; ba mục Lab · Lý thuyết · Bài tập; trang đang đứng gạch chân bút dạ vàng. */
.tqm-top { --tt-ink: #123524; --tt-soft: #3E5247; --tt-deep: #0A6A3B; --tt-yellow: #F2C94C;
  max-width: var(--tt-w, 1140px); margin: 0 auto 16px; border-bottom: 2px solid var(--tt-ink);
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif; }
.tqm-top-in { display: flex; align-items: center; gap: 8px 18px; min-height: 60px; padding: 6px 0; }
.tqm-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--tt-ink); text-decoration: none; min-height: 44px; flex: none; }
.tqm-logo img { width: 38px; height: 38px; display: block; background: #fff; border-radius: 9px; }
.tqm-logo span { font-family: "Barlow Condensed", "Be Vietnam Pro", "Arial Narrow", sans-serif; font-weight: 800; font-size: 1.28rem;
  line-height: 1; text-transform: uppercase; letter-spacing: .02em; }
.tqm-logo small { display: block; font-family: "Be Vietnam Pro", system-ui, sans-serif; font-weight: 600; font-size: .7rem;
  text-transform: none; letter-spacing: 0; color: var(--tt-soft); margin-top: 3px; }
.tqm-links { display: flex; gap: 4px; margin-left: auto; }
.tqm-links a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--tt-soft);
  font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.tqm-links a:hover { color: var(--tt-ink); }
.tqm-links a::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 9px; height: 9px; background: var(--tt-yellow);
  opacity: 0; transform: scaleX(.3); transform-origin: left; transition: transform .25s, opacity .25s; z-index: -1; }
.tqm-links a { z-index: 0; isolation: isolate; }
.tqm-links a:hover::after { opacity: .45; transform: none; }
.tqm-links a[aria-current="page"] { color: var(--tt-ink); }
.tqm-links a[aria-current="page"]::after { opacity: 1; transform: none; }
.tqm-links a:focus-visible, .tqm-logo:focus-visible { outline: 3px solid var(--tt-yellow); outline-offset: 2px; }
.tqm-slot { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tqm-slot:empty { display: none; }
@media (max-width: 640px) {
  .tqm-top-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding-bottom: 0; }
  .tqm-logo span { font-size: 1.1rem; }
  .tqm-links { grid-column: 1 / -1; grid-row: 2; margin: 0 -4px; justify-content: space-between; border-top: 1px dashed rgba(18, 53, 36, .25); }
  .tqm-links a { flex: 1; justify-content: center; padding: 0 6px; font-size: .92rem; }
  .tqm-slot { grid-column: 2; grid-row: 1; }
}
@media print { .tqm-top { display: none; } }
