/* 网站笔试题库（12-02）：只管 web/qb.js 画出来的节点（qb- 开头），颜色、圆角沿用 site.css 的变量 */
.qb { padding: 22px 0 8px; }
.qb-h { margin: 0; font-size: 22px; line-height: 1.4; color: var(--fg); }
.qb a:focus-visible, .qb button:focus-visible, .qb summary:focus-visible, .qb-tbl:focus-visible, .qb input:focus-visible, .qb textarea:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* 按钮 */
.qb-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 22px; border: 1.5px solid var(--green); border-radius: 999px; background: var(--green); color: #fff; font-size: 14.5px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.qb-btn:hover { background: var(--green-d); border-color: var(--green-d); }
.qb-btn-line { background: #fff; color: var(--green); }
.qb-btn-line:hover { background: var(--pick-bg); color: var(--green-d); }
.qb-btn:disabled { opacity: .45; cursor: default; }

/* 首页 */
.qb-quick { display: flex; gap: 10px; margin: 16px 0 18px; }
.qb-qk { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; background: var(--card); border-radius: 999px; box-shadow: var(--shadow); color: var(--fg); text-decoration: none; font-size: 14.5px; }
.qb-qk:hover { color: var(--green); }
.qb-n { min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--tag-bg); color: var(--tag); font-size: 12.5px; text-align: center; line-height: 20px; }
.qb-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.qb-cat { display: flex; flex-direction: column; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.qb-cat-h { display: flex; align-items: center; gap: 10px; }
.qb-cat-t { flex: 1; margin: 0; font-size: 18px; }
.qb-note-b { flex: none; border: 0; background: none; padding: 4px 2px; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.qb-note-b:hover, .qb-note-b[aria-expanded="true"] { color: var(--green); }
.qb-cat-n { margin: 6px 0 0; font-size: 14.5px; }
.qb-cat-s { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.qb-cat-st { margin: 6px 0 0; font-size: 13px; color: var(--green); }
.qb-note { margin-top: 12px; padding: 12px 14px; background: var(--bg); border-radius: 10px; font-size: 13.5px; }
.qb-note .qb-p { margin: 0 0 6px; }
.qb-note .qb-p:last-child { margin-bottom: 0; }
.qb-cat-a { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }
.qb-tip { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.qb-tip:first-of-type { margin-top: 26px; }

/* 逐题练习 */
.qb-top { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.qb-back { color: var(--muted); text-decoration: none; font-size: 14px; }
.qb-back:hover { color: var(--green); }
.qb-count { margin-left: auto; color: var(--muted); font-size: 14px; }
.qb-chips { position: relative; display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 16px; }
.qb-chip { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--fg); font-size: 13.5px; text-decoration: none; white-space: nowrap; flex: none; }
.qb-chip:hover { border-color: #c9d2cc; }
.qb-chip[aria-current="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.qb-card:focus { outline: none; }   /* 换题后程序把焦点挪到题目卡片上（键盘接着往下走），卡片本身不画焦点框 */
.qb-card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 20px 24px 22px; min-width: 0; }
.qb-meta { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.qb-sec { flex: 1; }
.qb-id { font-size: 12px; color: #9aa39f; font-family: Consolas, "Courier New", monospace; }
.qb-body { min-width: 0; }
.qb-main { min-width: 0; }
.qb-p { margin: 0 0 8px; overflow-wrap: anywhere; white-space: pre-wrap; }
.qb-stem .qb-p { font-size: 16px; }
.qb-mat { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbf8; }
.qb-mat summary { padding: 10px 14px; cursor: pointer; color: var(--green); font-size: 14px; font-weight: 700; }
.qb-mat-t { padding: 0 14px 6px; font-size: 14.5px; }
.qb-tbl { max-width: 100%; overflow-x: auto; margin: 4px 0 12px; }
.qb-tbl table { border-collapse: collapse; font-size: 14px; }
.qb-tbl th, .qb-tbl td { border: 1px solid var(--line); padding: 6px 12px; text-align: left; white-space: nowrap; }
.qb-tbl th { background: var(--tag-bg); font-weight: 700; }
.qb-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.qb-opt { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 11px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--fg); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; transition: border-color .15s, background-color .15s; }
.qb-opt:hover:not(:disabled) { border-color: var(--teal); }
.qb-opt[aria-pressed="true"] { border-color: var(--green); background: var(--pick-bg); }
.qb-opt:disabled { cursor: default; }
.qb-opt.is-ok { border-color: #2f9a62; background: #eaf6ee; }
.qb-opt.is-bad { border-color: #cf5b4c; background: #fcefed; }
/* 选项字母做成小方块；作答时选中变深绿，答完后答对绿、选错红，右边再出 ✓ / ✕ */
.qb-L { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 1.5px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--muted); font-size: 13.5px; font-weight: 700; line-height: 1; }
.qb-ot { flex: 1; min-width: 0; padding-top: 1px; }
.qb-opt[aria-pressed="true"] .qb-L { background: var(--green); border-color: var(--green); color: #fff; }
.qb-opt.is-ok .qb-L { background: #2f9a62; border-color: #2f9a62; color: #fff; }
.qb-opt.is-bad .qb-L { background: #cf5b4c; border-color: #cf5b4c; color: #fff; }
.qb-mk { flex: none; margin-left: auto; padding-top: 1px; font-weight: 700; font-size: 16px; }
.qb-opt.is-ok .qb-mk { color: #24804f; }
.qb-opt.is-bad .qb-mk { color: #b84536; }
.qb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.qb-act > .qb-btn { margin-top: 14px; }
.qb-in, .qb-ta { display: block; width: 100%; margin-top: 14px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; color: var(--fg); background: #fff; }
.qb-ta { resize: vertical; min-height: 110px; }
.qb-res { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.qb-verdict { margin: 0 0 8px; font-weight: 700; }
.qb-verdict.is-ok { color: #24804f; }
.qb-verdict.is-bad { color: #b84536; }
.qb-lab { margin: 10px 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.qb-key .qb-p { font-weight: 700; }
.qb-ex .qb-p { font-size: 14.5px; }
.qb-ref { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.qb-self { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.qb-empty { margin: 20px 0 0; padding: 40px 20px; text-align: center; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); color: var(--muted); }
.qb-nav { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.qb-nl { display: inline-flex; align-items: center; height: 40px; padding: 0 20px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--green); text-decoration: none; font-size: 14.5px; font-weight: 700; }
.qb-nl:hover { background: var(--pick-bg); }
.qb-nl.is-off { color: #b9c1bd; box-shadow: none; background: transparent; }
.qb-nl:last-child { margin-left: auto; }
.qb-fav { height: 40px; padding: 0 16px; border: 0; background: none; color: var(--muted); font-size: 14.5px; }
.qb-fav[aria-pressed="true"] { color: var(--gold); }

/* 错题本、收藏 */
.qb-list-a { margin: 14px 0 0; }
.qb-group { margin-top: 18px; }
.qb-group-h { margin: 0 0 8px; font-size: 15px; color: var(--muted); font-weight: 700; }
.qb-items { margin: 0; padding: 0; list-style: none; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.qb-items li + li { border-top: 1px solid var(--line); }
.qb-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 18px; color: var(--fg); text-decoration: none; }
.qb-item:hover { background: var(--pick-bg); }
.qb-item-m { display: flex; gap: 12px; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.qb-item-t { font-size: 14.5px; overflow-wrap: anywhere; }
.qb-toast { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--pick-bg); color: var(--green-d); font-size: 13.5px; }
.qb-rm:disabled { opacity: .45; cursor: default; }

/* 整套模拟 */
.qb-start { margin-top: 16px; }
.qb-start-n { margin: 0; font-size: 18px; font-weight: 700; }
.qb-start-s { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.qb-start-t { margin: 12px 0 16px; font-size: 13.5px; color: var(--muted); }
.qb-empty-t { margin: 0; color: var(--muted); }
.qb-top-x { position: sticky; top: 64px; z-index: 3; margin: -8px 0 0; padding: 8px 0; background: var(--bg); }
.qb-timer { margin-left: auto; padding: 4px 14px; border-radius: 999px; background: #fbf3df; color: #8a6a1f; font-weight: 700; font-variant-numeric: tabular-nums; }
.qb-nav button.qb-nl { border: 0; }
.qb-nl:disabled { color: #b9c1bd; box-shadow: none; background: transparent; cursor: default; }
.qb-submit { display: flex; justify-content: center; margin-top: 22px; }
.qb-sheet .qb-submit { margin-top: 14px; }
.qb-sheet .qb-submit > .qb-btn { width: 100%; }
.qb-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.qb-confirm-t { flex-basis: 100%; margin: 0 0 2px; }

/* 结果页 */
.qb-score { margin-top: 16px; }
.qb-score-n { margin: 0; font-size: 22px; font-weight: 700; color: var(--green-d); }
.qb-score-t { margin: 2px 0 14px; color: var(--muted); font-size: 14px; }
.qb-bars { display: grid; gap: 8px; }
.qb-bar { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) 54px; align-items: center; gap: 12px; font-size: 13.5px; }
.qb-bar-t { height: 8px; border-radius: 999px; background: var(--tag-bg); overflow: hidden; }
.qb-bar-f { display: block; height: 100%; border-radius: 999px; background: var(--teal); }
.qb-bar-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.qb-rows { margin-top: 16px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.qb-row + .qb-row { border-top: 1px solid var(--line); }
.qb-row summary { display: flex; align-items: center; gap: 12px; padding: 12px 18px; cursor: pointer; font-size: 14px; }
.qb-row-k { width: 22px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qb-row-s { flex: 1; min-width: 0; }
.qb-row-v { width: 36px; text-align: right; font-weight: 700; }
.qb-row.is-ok .qb-row-v { color: #24804f; }
.qb-row.is-bad .qb-row-v { color: #b84536; }
.qb-row-b { padding: 4px 18px 16px 52px; font-size: 14.5px; }
.qb-row-o { margin: 0 0 4px; color: var(--muted); }
.qb-code { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.qb-code-i { flex: none; width: 120px; height: 120px; border-radius: 10px; }
.qb-code-h { margin: 0; font-size: 17px; font-weight: 700; }
.qb-code-p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.qb-result .qb-cat-a { margin-top: 16px; }

/* 答题卡（12-02 照用户给的两张参考图）：电脑上题目在左、答题卡在右并吸顶；手机上收成一行，点开才展开 */
.qb-lay { display: flex; flex-direction: column; margin-top: 14px; }
.qb-left { min-width: 0; }
.qb-sheet { order: -1; margin-bottom: 12px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.qb-sheet-tg { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 46px; padding: 0 18px; border: 0; border-radius: 16px; background: none; color: var(--fg); font-size: 14.5px; font-weight: 700; }
.qb-sheet-tg::after { content: "›"; color: var(--muted); font-size: 20px; transform: rotate(90deg); transition: transform .15s; }
.qb-sheet.is-open .qb-sheet-tg::after { transform: rotate(-90deg); }
.qb-sheet-b { display: none; padding: 0 18px 18px; }
.qb-sheet.is-open .qb-sheet-b { display: block; }
.qb-sheet-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.qb-sheet-t { display: none; flex: none; margin: 0; font-size: 16px; }   /* 手机上开关那一行已写“答题卡”，不重复 */
.qb-sheet-n { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; }
.qb-mock .qb-sheet-h { display: none; }   /* 手机上“共 M”已在开关那一行 */
.qb-sheet-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 8px; }
.qb-cell { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 38px; border: 1.5px solid transparent; border-radius: 9px; background: #eef0ec; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; text-decoration: none; }
.qb-cell:hover { border-color: #c9d2cc; }
.qb-cell.is-ok { background: #dff1e5; color: #1f6e44; }
.qb-cell.is-bad { background: #fbe3df; color: #a83f31; }
.qb-cell.is-done { background: var(--green); color: #fff; }
.qb-cell.is-cur { background: #fff; border-color: var(--green); color: var(--green-d); font-weight: 700; }
.qb-cell.is-cur.is-ok { background: #dff1e5; }
.qb-cell.is-cur.is-bad { background: #fbe3df; }
.qb-cell.is-flag::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.qb-sheet-st { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.qb-ring { --p: 0; position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(#2f9a62 calc(var(--p) * 1%), #eef0ec 0); }
.qb-ring::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--card); }
.qb-sheet-l { display: flex; flex-direction: column; margin-top: 10px; }
.qb-sheet-a { display: flex; align-items: center; height: 38px; color: var(--fg); text-decoration: none; font-size: 14px; border-top: 1px solid var(--line); }
.qb-sheet-a:hover { color: var(--green); }
.qb-sheet-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.qb-num { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: var(--bg); }
.qb-num-l { font-size: 12.5px; color: var(--muted); }
.qb-num-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.qb-num.is-done .qb-num-n { color: var(--green-d); }
.qb-num.is-flag .qb-num-n { color: #8a6a1f; }
.qb-sheet-time { display: none; margin-top: 14px; text-align: center; }
.qb-sheet-time .qb-timer { display: inline-block; margin: 0; }
.qb-sheet .qb-submit { display: none; }
@media (min-width: 900px) {
  .qb-lay { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
  .qb-sheet { order: 0; margin: 0; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
  .qb-sheet-tg { display: none; }
  .qb-sheet-b, .qb-sheet.is-open .qb-sheet-b { display: block; padding: 18px 20px 20px; }
  .qb-sheet-g { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .qb-sheet-t { display: block; }
  .qb-sheet-n { text-align: right; }
  .qb-mock .qb-sheet-h { display: flex; }
  .qb-sheet-time { display: block; }
  .qb-sheet .qb-submit { display: flex; }
  .qb-left > .qb-submit { display: none; }
  .qb-top-x { position: static; margin: 0; padding: 0; background: none; }   /* 剩余时间在答题卡里，页头不再吸顶重复 */
  .qb-top-x > .qb-timer { display: none; }
}
/* 手机：板块横滑，上一题 / 下一题贴在屏幕底部 */
@media (max-width: 720px) {
  .qb { padding-top: 16px; }
  .qb-h { font-size: 19px; }
  .qb-cats { grid-template-columns: minmax(0, 1fr); }
  .qb-cat { padding: 18px; }
  .qb-chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .qb-chips::-webkit-scrollbar { display: none; }
  .qb-card { padding: 16px 16px 18px; }
  .qb-row-b { padding-left: 18px; }
  .qb-top-x { top: 52px; }
  .jobs-on .qb-top-x { top: 100px; }
  .qb-bar { grid-template-columns: 104px minmax(0, 1fr) 40px; gap: 8px; }
  .qb-code-i { width: 96px; height: 96px; }
  .qb-nav { position: sticky; bottom: 0; z-index: 3; margin: 12px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(245, 246, 241, .96); border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .qb-opt, .qb-sheet-tg::after { transition: none; }
}
