/* OT 题库 (题库 V2 · Bento redesign by Zac + formulas page + focused answering view).
   Loaded only on /career/questions*. Uses the site's existing variables from styles.css/fuyo-web.css. */

.otb { --r: 20px; --gap: 24px; }
section.otb { padding-top: 40px; }
.otb .page-hero.compact { margin-bottom: 22px; }
.otb .ex-note {
  display: inline-flex; gap: 8px; align-items: center; font-size: 11px; font-weight: 600;
  color: var(--deep); background: var(--tint); border-radius: 999px; padding: 1px 7px;
  margin-left: 4px; vertical-align: middle;
}

/* ---- Bento card ---- */
.bcard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px 26px;
  min-width: 0;
}
.bcard .hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.bcard .hd h2, .bcard .hd h3 { font-size: 19px; font-weight: 600; margin: 0; }
.bcard .hd .sub { font-size: 13px; color: var(--grey); }

.otb .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--sand);
  color: var(--charcoal);
  white-space: nowrap;
}
.otb .chip.mute { color: var(--grey); }
.otb .chip.pine { background: var(--pine-tint); color: var(--pine-ink); }

/* ---- bank switcher (OT / 量化 / 第三) ---- */
.ot-banks { margin-top: 24px; }
/* Bound the focusable native radios locally; reset global form sizing to prevent viewport overflow. */
.ot-banks, .ot-body { position: relative; }
.ot-bank-r, .ot-type-r {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ot-bank-cards, .bank-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.bank, .ot-bank-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  cursor: pointer;
  background: rgba(255, 255, 255, .55);
  border: 1.5px dashed color-mix(in srgb, var(--grey) 35%, var(--cream));
  border-radius: var(--r);
}
.bank .bi {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.bank .bi svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--grey);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bank b, .ot-bank-name {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--soft);
}
.bank span {
  display: block;
  font-size: 13px;
  color: var(--grey);
  line-height: 1.5;
}
.bank .chip { margin-left: auto; }
.ot-bank-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.4; padding: 3px 10px; border-radius: 999px; background: var(--sand); color: var(--grey); white-space: nowrap; margin-left: auto; }
.ot-bank-tag.ph { font-style: normal; }
.ot-bank-panel { display: none; }

/* Native checked state drives both the visible panel and its current label, without JS/ARIA drift. */
.ot-bank-r.r0:checked ~ .ot-bank-cards .c0,
.ot-bank-r.r1:checked ~ .ot-bank-cards .c1,
.ot-bank-r.r2:checked ~ .ot-bank-cards .c2,
.bank.on {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: inset 0 4px 0 var(--pine);
}
.ot-bank-r.r0:checked ~ .ot-bank-cards .c0 b,
.ot-bank-r.r1:checked ~ .ot-bank-cards .c1 b,
.ot-bank-r.r2:checked ~ .ot-bank-cards .c2 b,
.bank.on b { color: var(--charcoal); }
.ot-bank-r.r0:checked ~ .ot-bank-cards .c0 .bi,
.ot-bank-r.r1:checked ~ .ot-bank-cards .c1 .bi,
.ot-bank-r.r2:checked ~ .ot-bank-cards .c2 .bi,
.bank.on .bi { background: var(--pine-tint); }
.ot-bank-r.r0:checked ~ .ot-bank-cards .c0 .bi svg,
.ot-bank-r.r1:checked ~ .ot-bank-cards .c1 .bi svg,
.ot-bank-r.r2:checked ~ .ot-bank-cards .c2 .bi svg,
.bank.on .bi svg { stroke: var(--pine); }

.ot-bank-r.r0:checked ~ .ot-bank-panel.p0 { display: block; }
.ot-bank-r.r1:checked ~ .ot-bank-panel.p1 { display: block; }
.ot-bank-r.r2:checked ~ .ot-bank-panel.p2 { display: block; }

/* ---- 15-type switcher (左类型 / 中成套试卷 / 右解释和技巧) ---- */
.ot-cols, .ws {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr) 300px;
  gap: var(--gap);
  align-items: start;
}
.ws > nav.bcard, .ws > .midcol, .ws > aside.ot-right, .ws > aside.bcard {
  margin-top: 0;
  align-self: start;
}
.ws > nav.bcard { padding: 22px 18px; }
.ws > nav.bcard .hd { padding: 0 8px; }
.ot-left { display: flex; flex-direction: column; }
.tlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tlist li, .ot-type-btn {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  white-space: nowrap;
  font-size: 14px;
  color: var(--soft);
  cursor: pointer;
}
.tlist li .en, .ot-type-btn .en {
  font-size: 11.5px;
  color: var(--grey);
  font-family: var(--font-en);
  overflow: hidden;
  text-overflow: ellipsis;
}
.tlist li .n, .ot-type-btn .n {
  margin-left: auto;
  font-size: 12px;
  color: var(--grey);
  font-variant-numeric: tabular-nums;
}
.ot-mid-panel, .ot-right-panel { display: none; }

/* 15 selection rules (indices follow OT_TYPES order in src/domain/ot-bank-data.ts) */
.ot-type-r.r0:checked ~ .ot-cols .ot-left .t0,
.ot-type-r.r1:checked ~ .ot-cols .ot-left .t1,
.ot-type-r.r2:checked ~ .ot-cols .ot-left .t2,
.ot-type-r.r3:checked ~ .ot-cols .ot-left .t3,
.ot-type-r.r4:checked ~ .ot-cols .ot-left .t4,
.ot-type-r.r5:checked ~ .ot-cols .ot-left .t5,
.ot-type-r.r6:checked ~ .ot-cols .ot-left .t6,
.ot-type-r.r7:checked ~ .ot-cols .ot-left .t7,
.ot-type-r.r8:checked ~ .ot-cols .ot-left .t8,
.ot-type-r.r9:checked ~ .ot-cols .ot-left .t9,
.ot-type-r.r10:checked ~ .ot-cols .ot-left .t10,
.ot-type-r.r11:checked ~ .ot-cols .ot-left .t11,
.ot-type-r.r12:checked ~ .ot-cols .ot-left .t12,
.ot-type-r.r13:checked ~ .ot-cols .ot-left .t13,
.ot-type-r.r14:checked ~ .ot-cols .ot-left .t14,
.tlist li.on {
  background: var(--pine-tint);
  color: var(--charcoal);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--pine);
}
.ot-type-r.r0:checked ~ .ot-cols .ot-left .t0 .en,
.ot-type-r.r1:checked ~ .ot-cols .ot-left .t1 .en,
.ot-type-r.r2:checked ~ .ot-cols .ot-left .t2 .en,
.ot-type-r.r3:checked ~ .ot-cols .ot-left .t3 .en,
.ot-type-r.r4:checked ~ .ot-cols .ot-left .t4 .en,
.ot-type-r.r5:checked ~ .ot-cols .ot-left .t5 .en,
.ot-type-r.r6:checked ~ .ot-cols .ot-left .t6 .en,
.ot-type-r.r7:checked ~ .ot-cols .ot-left .t7 .en,
.ot-type-r.r8:checked ~ .ot-cols .ot-left .t8 .en,
.ot-type-r.r9:checked ~ .ot-cols .ot-left .t9 .en,
.ot-type-r.r10:checked ~ .ot-cols .ot-left .t10 .en,
.ot-type-r.r11:checked ~ .ot-cols .ot-left .t11 .en,
.ot-type-r.r12:checked ~ .ot-cols .ot-left .t12 .en,
.ot-type-r.r13:checked ~ .ot-cols .ot-left .t13 .en,
.ot-type-r.r14:checked ~ .ot-cols .ot-left .t14 .en,
.tlist li.on .en { color: var(--pine-ink); }

.ot-type-r.r0:checked ~ .ot-cols .ot-mid .m0, .ot-type-r.r0:checked ~ .ot-cols .ot-right .x0,
.ot-type-r.r1:checked ~ .ot-cols .ot-mid .m1, .ot-type-r.r1:checked ~ .ot-cols .ot-right .x1,
.ot-type-r.r2:checked ~ .ot-cols .ot-mid .m2, .ot-type-r.r2:checked ~ .ot-cols .ot-right .x2,
.ot-type-r.r3:checked ~ .ot-cols .ot-mid .m3, .ot-type-r.r3:checked ~ .ot-cols .ot-right .x3,
.ot-type-r.r4:checked ~ .ot-cols .ot-mid .m4, .ot-type-r.r4:checked ~ .ot-cols .ot-right .x4,
.ot-type-r.r5:checked ~ .ot-cols .ot-mid .m5, .ot-type-r.r5:checked ~ .ot-cols .ot-right .x5,
.ot-type-r.r6:checked ~ .ot-cols .ot-mid .m6, .ot-type-r.r6:checked ~ .ot-cols .ot-right .x6,
.ot-type-r.r7:checked ~ .ot-cols .ot-mid .m7, .ot-type-r.r7:checked ~ .ot-cols .ot-right .x7,
.ot-type-r.r8:checked ~ .ot-cols .ot-mid .m8, .ot-type-r.r8:checked ~ .ot-cols .ot-right .x8,
.ot-type-r.r9:checked ~ .ot-cols .ot-mid .m9, .ot-type-r.r9:checked ~ .ot-cols .ot-right .x9,
.ot-type-r.r10:checked ~ .ot-cols .ot-mid .m10, .ot-type-r.r10:checked ~ .ot-cols .ot-right .x10,
.ot-type-r.r11:checked ~ .ot-cols .ot-mid .m11, .ot-type-r.r11:checked ~ .ot-cols .ot-right .x11,
.ot-type-r.r12:checked ~ .ot-cols .ot-mid .m12, .ot-type-r.r12:checked ~ .ot-cols .ot-right .x12,
.ot-type-r.r13:checked ~ .ot-cols .ot-mid .m13, .ot-type-r.r13:checked ~ .ot-cols .ot-right .x13,
.ot-type-r.r14:checked ~ .ot-cols .ot-mid .m14, .ot-type-r.r14:checked ~ .ot-cols .ot-right .x14 { display: grid; gap: 16px; }

/* ---- 中栏：按系列拆成独立 Bento 卡 ---- */
.midcol, .ot-mid { min-width: 0; }
.midcol > .bcard:first-child, .ot-mid-panel > .bcard:first-child { margin-top: 0; }
.bcard.sc { padding: 20px 22px; overflow-x: auto; }
.sc-hd { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sc-t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sc-t h4 { margin: 0; font-size: 16px; font-weight: 600; font-family: var(--font-en); color: var(--charcoal); line-height: 1.4; }
.bcard.sc .tt { margin-top: 14px; }
.sc-empty {
  margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; background: var(--cream); border: 1px dashed var(--line);
  font-size: 13px; color: var(--grey); flex-wrap: wrap;
}
.sc-empty .cols { font-size: 12px; }

/* ---- 成套试卷 table (.tt / .ot-test-table) ---- */
.tt, .ot-test-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tt th, .ot-test-table th {
  font-size: 13px; font-weight: 600; color: var(--grey); text-align: left;
  padding: 0 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tt td, .ot-test-table td {
  padding: 13px 6px; border-bottom: 1px solid var(--line); vertical-align: middle;
  color: var(--charcoal); white-space: nowrap;
}
.bcard.sc .tt tr:last-child td { border-bottom: 0; }
.tt th:first-child, .tt td:first-child { padding-left: 0; }
.tt th:last-child, .tt td:last-child { padding-right: 0; text-align: right; }
.tt td.name { font-weight: 600; font-family: var(--font-en); }
.tt .muted { color: var(--grey); }
.tt .low, .ot-score.is-low { color: #9b2226; font-weight: 600; }
.tt .lownote, .ot-low-note { font-size: 12px; color: #9b2226; margin-left: 6px; font-weight: 600; }

.prog { display: flex; align-items: center; gap: 8px; min-width: 104px; }
.tt .prog { flex-wrap: nowrap; width: 112px; min-width: 112px; }
.prog .bar { flex: 1 1 auto; height: 6px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.prog .bar i { display: block; height: 100%; border-radius: 999px; width: 0%; }
.prog .bar i[data-w="100"] { width: 100%; }
.prog .bar i[data-w="50"] { width: 50%; }
.prog .bar i[data-w="42"] { width: 42%; }
.prog .bar i[data-w="0"] { width: 0%; }
.prog .pct { flex: 0 0 38px; width: 38px; text-align: right; font-size: 13px; font-weight: 600; font-family: var(--font-en); white-space: nowrap; }
.prog.done .bar i { background: var(--pine); width: 100%; }
.prog.done .pct { color: var(--pine-ink); }
.prog.mid .bar i { background: var(--olive); width: 50%; }
.prog.mid .pct { color: var(--olive-ink); }
.prog.zero .pct { color: var(--grey); font-weight: 500; }

.btn.btn-xs { min-height: 32px; padding: 7px 16px; font-size: 13px; border-radius: 8px; }
.btn.btn-xs.ghost2 { background: var(--white); border-color: var(--line); color: var(--charcoal); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.legend {
  display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 12px;
  border-top: 1px solid var(--line); margin-top: 4px; font-size: 12px; color: var(--grey);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 6px; border-radius: 999px; display: inline-block; }
.legend i.lg-pine { background: var(--pine); }
.legend i.lg-olive { background: var(--olive); }
.legend i.lg-sand { background: var(--sand); }

/* ---- 右栏：相关资源 + 解释和技巧（两端对齐） ---- */
.ot-type-content { display: grid; gap: 16px; }
.ot-res-card { padding: 18px 22px; }
.ot-res-card .hd { margin-bottom: 10px; }
.ot-res-card .hd h3 { font-size: 15px; }
.ot-res-link {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 12px; background: var(--cream); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--deep); text-decoration: none;
}
.ot-res-link:hover { background: var(--pine-tint); border-color: var(--pine); color: var(--pine-ink); }

.exp h3.tn { font-size: 19px; margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.exp h3.tn .en, .ot-type-content .ot-type-en { font-size: 13px; font-weight: 500; color: var(--grey); font-family: var(--font-en); }
.exp p, .exp li { text-align: justify; font-size: 14px; line-height: 1.8; color: var(--soft); hyphens: auto; }
.exp p { margin: 12px 0 0; }
.exp .tips { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.exp .tips summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; font-weight: 600; color: var(--deep); cursor: pointer;
}
.exp h4 { font-size: 13px; font-weight: 600; color: var(--charcoal); margin: 14px 0 6px; letter-spacing: .02em; }
.exp ul { margin: 0; padding-left: 18px; }
.exp li { margin: 0 0 6px; }
.exp li::marker { color: var(--pine); }
.ot-overlap-note { margin-top: 12px; font-size: 13px; color: var(--grey); border-top: 1px dashed var(--line); padding-top: 10px; }

.foot-hints { display: flex; justify-content: space-between; margin-top: 22px; font-size: 13px; color: var(--grey); flex-wrap: wrap; gap: 8px; }
.foot-hints a { color: var(--deep); font-weight: 600; text-decoration: none; }

/* ---- 开始说明页 ---- */
.st-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: stretch; }
.st-hero {
  grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; box-shadow: inset 0 4px 0 var(--pine); flex-wrap: wrap;
}
.st-hero .eyebrow { color: var(--pine-ink); margin: 0; }
.st-hero h1 { font-size: 30px; line-height: 1.35; margin: 8px 0 0; font-family: var(--font-en); }
.st-hero .meta { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.st-hero .src { font-size: 13px; color: var(--grey); text-align: right; line-height: 1.6; max-width: 420px; }
.rules { list-style: none; margin: 0; padding: 0; counter-reset: r; display: grid; gap: 12px; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: 15px; line-height: 1.8; color: var(--soft); }
.rules li p { margin: 0; text-align: justify; }
.rules li::before {
  content: counter(r); width: 26px; height: 26px; margin-top: 2px; border-radius: 50%;
  background: var(--pine-tint); color: var(--pine-ink); font-weight: 600; font-size: 13px;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-en);
}
.st-ctas { display: flex; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.st-ctas form { margin: 0; }
.st-ctas .btn { min-height: 44px; padding: 12px 22px; font-size: 15px; }
.st-ctas .btn.ghost2 { background: var(--white); border-color: var(--line); color: var(--charcoal); }
.st-ctas .note { margin-left: auto; align-self: center; font-size: 13px; color: var(--grey); }
.kpis { display: grid; gap: 12px; }
.kpi { background: var(--cream); border-radius: 14px; padding: 14px 16px; }
.kpi span { display: block; font-size: 13px; color: var(--grey); }
.kpi b { display: block; font-size: 24px; font-weight: 600; font-family: var(--font-en); margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi b.low { color: #9b2226; }
.kpi b small { font-size: 12px; font-weight: 600; margin-left: 6px; }
.kpi .prog { margin-top: 8px; min-width: 0; }
.hist { grid-column: 1 / -1; overflow-x: auto; }
.ht { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ht th { font-size: 13px; font-weight: 600; color: var(--grey); text-align: left; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
.ht td { padding: 13px 12px; border-bottom: 1px solid var(--line); color: var(--charcoal); font-family: var(--font-en); }
.ht tr:last-child td { border-bottom: 0; }
.ht th:first-child, .ht td:first-child { padding-left: 0; }
.ht th:last-child, .ht td:last-child { padding-right: 0; text-align: right; }
.ht .low { color: #9b2226; font-weight: 600; }
.ht .ln { font-size: 12px; font-family: var(--font-sans); margin-left: 6px; color: #9b2226; }
.ht a { color: var(--deep); font-weight: 600; text-decoration: none; font-family: var(--font-sans); }
.back { display: inline-block; margin-top: 22px; color: var(--deep); font-weight: 600; font-size: 14px; text-decoration: none; }

/* ---- 交卷后一页报告 + 页内单题详情弹窗 ---- */
.otb-result { padding-top: 40px; }
.otb-result > .wrap { display: grid; gap: var(--gap); }
.res-score { display: flex; flex-direction: column; gap: 14px; }
.res-score.is-low { border: 2px solid #9b2226; }
.res-score .rs-top .eyebrow { margin: 0; color: var(--pine-ink); }
.res-score .rs-top h1 { margin: 6px 0 0; font-size: 24px; display: flex; align-items: center; gap: 10px; }
.rs-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.rs-score { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 28px; border-radius: 16px; background: var(--cream); }
.rs-score .rs-num { font-family: var(--font-en); font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--charcoal); }
.rs-score .rs-num.low { color: #9b2226; }
.rs-score .rs-num small { font-size: 16px; font-weight: 600; color: var(--grey); margin-left: 2px; }
.rs-score .rs-label { font-size: 12px; color: var(--grey); }
.rs-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.res-score .ot-low-note { margin: 0; color: #9b2226; font-weight: 600; font-size: 14px; }

.res-grid .legend-row { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--grey); }
.res-grid .legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.res-grid .legend-row i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }
.res-grid .legend-row i.lg-correct { border: 1.5px solid var(--pine); background: var(--pine-tint); }
.res-grid .legend-row i.lg-wrong { border: 1.5px dashed #9b2226; background: var(--coral-tint); }
.res-grid .legend-row i.lg-blank { border: 1.5px solid var(--line); background: var(--white); }
.res-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin-top: 4px; }
.res-col { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.res-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; background: var(--cream); }
.res-row .rq { font-family: var(--font-en); font-weight: 700; font-size: 13px; width: 28px; flex: 0 0 auto; color: var(--soft); }
.res-row .ropts { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.res-row .ro {
  width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-en); font-size: 12px; font-weight: 700; color: var(--grey);
  border: 1.5px solid transparent; background: var(--white);
}
.res-row .ro.ro-c { border-color: var(--pine); background: var(--pine-tint); color: var(--pine-ink); }
.res-row .ro.ro-w { border-style: dashed; border-color: #9b2226; background: var(--coral-tint); color: #9b2226; }
.res-row .btn.btn-xs { flex: 0 0 auto; cursor: pointer; }

/* 页内单题详情弹窗：checkbox hack，无 JS 也能开合 */
.qm-toggle { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; clip-path: inset(50%); }
.qm-backdrop { display: none; position: fixed; inset: 0; z-index: 50; }
.qm-toggle:checked + .qm-backdrop { display: flex; align-items: center; justify-content: center; padding: 24px; }
.qm-overlay { position: absolute; inset: 0; background: rgba(39, 30, 20, .45); cursor: pointer; }
.qm-card { position: relative; z-index: 1; max-width: 860px; width: 100%; max-height: 86vh; overflow: auto; padding: 28px 30px; }
.qm-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 999px;
  background: var(--cream); display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1; color: var(--soft); cursor: pointer;
}
.qm-head { display: flex; gap: 10px; align-items: baseline; padding-right: 40px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.qm-head .qm-num { font-family: var(--font-en); font-weight: 700; color: var(--pine-ink); }
.qm-head h3 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.5; font-family: var(--font-en); }
.qm-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; align-items: start; }
.qm-body.is-solo { grid-template-columns: 1fr; }
.qm-stim .st-title { font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--charcoal); }
.qm-stim svg.ot-linechart { width: 100%; height: auto; margin: 6px 0; }
.qm-stim img { max-width: 100%; height: auto; border-radius: 8px; }
.qm-stim .ax { stroke: var(--line); stroke-width: 1; }
.qm-stim .ax-l { font-size: 9px; fill: var(--grey); font-family: var(--font-en); }
.qm-stim table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.qm-stim th, .qm-stim td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.qm-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--grey); list-style: none; padding: 0; }
.qm-opts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.qm-opts li { font-size: 14px; color: var(--soft); padding: 5px 0; }
.qm-opts li b { font-family: var(--font-en); margin-right: 4px; }
.qm-opts li.qo-correct { color: var(--pine-ink); font-weight: 600; text-decoration: none; background: var(--pine-tint); border: 1px solid var(--pine); border-radius: 14px; }
.qm-opts li.qo-wrong { color: #9b2226; font-weight: 600; text-decoration: none; background: #fff0ef; border: 1px solid #9b2226; border-radius: 14px; }
.qm-blank-note { font-size: 13px; color: var(--grey); margin: 0 0 12px; }
.qm-steps h4 { font-size: 13px; font-weight: 600; color: var(--charcoal); margin: 0 0 8px; letter-spacing: .02em; }
.qm-step { font-size: 14px; line-height: 1.75; color: var(--soft); margin: 0 0 8px; text-align: justify; }

/* ---- Numerical Reasoning 公式页面 (.nf-*) ---- */
.nf-stack { display: grid; gap: var(--gap); }
.nf-intro { margin: 0 0 16px; font-size: 15px; line-height: 1.8; color: var(--soft); }
.nf-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.nf-nav-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: 12px; background: var(--cream); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--charcoal); text-decoration: none;
}
.nf-nav-link:hover { border-color: var(--pine); background: var(--pine-tint); color: var(--pine-ink); }
.nf-nav-idx {
  width: 26px; height: 26px; border-radius: 50%; background: var(--pine-tint); color: var(--pine-ink);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-en);
  font-size: 13px; font-weight: 700; flex: 0 0 auto;
}
.nf-items { display: grid; gap: 24px; }
.nf-item { padding-top: 20px; border-top: 1px solid var(--line); }
.nf-item:first-child { padding-top: 0; border-top: 0; }
.nf-item h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: var(--charcoal); }
.nf-exp { margin: 0 0 12px; font-size: 14px; line-height: 1.8; color: var(--soft); }
.nf-formula-box {
  background: var(--cream); border-left: 4px solid var(--pine);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 14px;
}
.nf-formula { margin: 0; font-size: 16px; font-weight: 700; color: var(--charcoal); }
.nf-formula-note { margin: 6px 0 0; font-size: 13px; color: var(--grey); line-height: 1.7; }
.nf-examples { display: grid; gap: 12px; }
.nf-example { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.nf-ex-hd { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.nf-ex-q { margin: 0; font-size: 14px; font-weight: 600; color: var(--charcoal); line-height: 1.7; }
.nf-trap {
  margin: 0 0 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--coral-tint); color: #9b2226; font-size: 13px; line-height: 1.7;
}
.nf-steps { display: grid; gap: 6px; margin-bottom: 8px; }
.nf-step { margin: 0; font-size: 14px; color: var(--soft); line-height: 1.75; }
.nf-answer { margin: 0; font-size: 14px; color: var(--pine-ink); }

.nf-calc {
  margin-top: 24px; padding: 20px 22px; border-radius: 16px;
  background: var(--cream); border: 1px solid var(--line);
}
.nf-calc .hd { margin-bottom: 8px; }
.nf-calc-inst { margin: 0 0 16px; font-size: 14px; color: var(--soft); line-height: 1.7; }
.nf-calc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.nf-calc-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--charcoal); }
.nf-calc-field input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--white); font-size: 14px; font-family: var(--font-en);
}
.nf-calc-actions { display: flex; gap: 12px; align-items: center; }
.nf-calc-output { margin: 12px 0 0; font-size: 14px; font-weight: 600; min-height: 22px; }
.nf-calc-output.is-error { color: #9b2226; }
.nf-calc-output.is-ok { color: var(--pine-ink); }

/* ---- stimulus (chart / table / image) ---- */
.ot-stim { margin: 10px 0 16px; padding: 12px; background: var(--cream); border-radius: 10px; overflow-x: auto; }
.ot-stim-title { font-weight: 600; margin-bottom: 8px; }
.ot-stim table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ot-stim th, .ot-stim td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.ot-stim img { max-width: 100%; height: auto; display: block; border-radius: 6px; }
.ot-linechart { width: 100%; max-width: 480px; height: auto; }
.ot-axis { stroke: var(--line); stroke-width: 1; }
.ot-axis-label { font-size: 10px; fill: var(--grey); }
.ot-linechart-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--soft); list-style: none; padding: 0; }
.ot-linechart-legend li { display: flex; align-items: center; gap: 4px; }
.ot-legend-dot { width: 10px; height: 10px; }

/* ---- 专注答题视图 (bare page, no site header/footer) ---- */
.ot-focus-body { margin: 0; background: var(--cream); font-family: var(--font-sans); color: var(--ink); }
.ot-focus-head { background: var(--white); border-bottom: 1px solid var(--line); padding: 14px 0; position: sticky; top: 0; z-index: 10; }
.ot-focus-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ot-focus-head h1 { font-size: 18px; margin: 0; min-width: 0; flex: 1 1 160px; overflow-wrap: anywhere; }
.ot-focus-head-row > .ot-timer, .ot-focus-head-row > .ot-badge { flex: 0 0 auto; white-space: nowrap; }
.ot-timer { font-family: var(--font-en); font-size: 20px; font-weight: 800; color: var(--deep); font-variant-numeric: tabular-nums; }
.ot-timer.is-low { color: #9b2226; }
.ot-badge { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--charcoal); }
.ot-focus-main { padding: 24px 0 60px; max-width: 760px; }
.ot-result { padding: 16px; background: var(--white); border-radius: 10px; margin-bottom: 20px; }
.ot-result.is-low { border: 2px solid #9b2226; }
.ot-result-score { font-size: 22px; font-weight: 800; }
.ot-q-list { list-style: none; padding: 0; margin: 0; }
.ot-q { background: var(--white); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.ot-q-prompt { font-weight: 600; margin-bottom: 10px; }
.ot-q-opts { display: flex; flex-direction: column; gap: 6px; }
.ot-opt { display: flex; align-items: flex-start; gap: 8px; min-width: 0; padding: 10px 8px; border-radius: 8px; cursor: pointer; }
/* Override global text-input sizing while retaining the native radio and its focus/disabled state. */
.ot-opt-input {
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  max-width: 20px;
  padding: 0;
  margin: 2px 0 0;
  flex: 0 0 20px;
  border: 0;
  border-radius: 50%;
}
.ot-opt > span { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.ot-focus-main, .ot-q-list, .ot-q, .ot-q-opts, .ot-stim { min-width: 0; max-width: 100%; }
.ot-q-prompt, .ot-explain, .ot-stim-title { overflow-wrap: anywhere; }
.ot-opt.is-correct { background: var(--pine-tint); }
.ot-opt.is-wrong { background: var(--coral-tint); }
.ot-explain { margin-top: 10px; }
.ot-explain summary { cursor: pointer; color: var(--deep); font-weight: 600; }
.ot-explain-step { margin: 6px 0; font-size: 14px; color: var(--soft); }
#ot-submit { margin-top: 12px; }

.ot-bank-r:focus-visible ~ .ot-bank-cards, .ot-type-r:focus-visible ~ .ot-cols .ot-left { outline: 2px solid var(--deep); outline-offset: 3px; }

@media (max-width: 960px) {
  .ot-cols, .ws { grid-template-columns: 1fr; }
  .st-grid { grid-template-columns: 1fr; }
  .st-hero .src { text-align: left; }
}

@media (max-width: 760px) {
  .ot-bank-cards, .bank-row { grid-template-columns: 1fr; }
  .nf-calc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .res-cols { grid-template-columns: 1fr; }
  .qm-body { grid-template-columns: 1fr; }
}

.qm-stim .ot-legend-dot, .ot-legend-dot { width: 10px; height: 10px; flex: 0 0 10px; margin: 0; display: inline-block; }
.ot-q { scroll-margin-top: 84px; }
.nf-section, .nf-item, .nf-calc { scroll-margin-top: 112px; }
@media (max-width: 1100px) {
  .nf-section, .nf-item, .nf-calc { scroll-margin-top: 84px; }
}

/* Numeric option tables retain native radio keyboard navigation at any width. */
.ot-q-opts.is-grid, .qm-opts.is-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 6px;
}
.qm-opts.is-grid li { min-width: 0; overflow-wrap: anywhere; padding: 8px; }
.res-row .ropts { min-width: 0; }
.res-value { font-size: 13px; overflow-wrap: anywhere; }
.res-value.is-correct { color: var(--pine-ink); }
.res-value.is-wrong { color: #9b2226; }

.ot-axis-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ot-axis-pair label, .ot-axis-pair select { min-width: 0; max-width: 100%; }
.ot-axis-pair label > span { display: block; margin-bottom: 6px; }

/* NR / NCR single-question cards. All additions are scoped to the bare attempt page. */
.ot-card-body [hidden] { display: none !important; }
.ot-card-body .ot-focus-head { padding: 8px 0; }
.ot-card-body .wrap { width: min(1000px, calc(100% - 2 * var(--gutter))); }
.ot-card-body .ot-focus-main { max-width: 1000px; padding: 12px 0 24px; }
.ot-card-body #ot-save-status { margin: 6px 0; min-height: 20px; font-size: 12px; color: var(--soft); }
.ot-card-body .ot-material, .ot-card-body .ot-q {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 14px 20px; margin: 0;
}
.ot-card-body .ot-material-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ot-card-body .ot-material-head h2 { font-size: 16px; margin: 0; overflow-wrap: anywhere; }
.ot-card-body .ot-zoom-button { background: transparent; border: 1px solid var(--line); border-radius: 8px; color: var(--deep); min-height: 44px; padding: 6px 12px; flex-shrink: 0; cursor: pointer; }
.ot-card-body .ot-image-button { display: block; width: 100%; padding: 0; margin-top: 10px; border: 0; background: transparent; cursor: zoom-in; }
.ot-card-body .ot-image-button img { display: block; width: auto; height: auto; max-width: 100%; max-height: 300px; margin: auto; }
.ot-card-body .ot-material .ot-stim { margin: 0; padding: 0; background: transparent; }
.ot-card-body .ot-material .ot-linechart { display: block; width: min(100%, 520px); height: auto; margin: auto; }
.ot-card-body .ot-material table { font-variant-numeric: tabular-nums; }
.ot-card-body .ot-material th, .ot-card-body .ot-material td { padding: 7px 10px; }
.ot-card-body .ot-q-prompt { margin: 0 0 12px; font-size: 16.5px; line-height: 1.5; }
.ot-card-body .ot-q-opts:not(.is-grid) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ot-card-body .ot-opt { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); line-height: 1.45; }
.ot-card-body .ot-opt-input { accent-color: var(--pine); }
.ot-card-body .ot-opt:has(input:checked) { border-color: var(--pine); background: var(--pine-tint); }
.ot-card-body .ot-opt.is-wrong { background: var(--coral-tint); border-color: #9b2226; }
.ot-card-body .ot-opt:focus-within { outline: 2px solid var(--deep); outline-offset: 2px; }
.ot-card-body .cx-q-solo { width: min(760px, 100%); margin: 8px auto 0; padding: 24px 26px; }
.ot-card-body .cx-q-solo .ot-q-opts:not(.is-grid) { grid-template-columns: 1fr; }
.ot-card-body .ot-explain { padding: 12px 14px; border: 1px solid var(--line); background: var(--cream); border-radius: var(--radius-ctl); }
.ot-card-body .ot-question-nav { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.ot-card-body .ot-question-nav .btn { min-height: 44px; min-width: 140px; margin: 0; }
.ot-card-body .btn-primary { background: var(--pine); border-color: var(--pine); color: var(--white); }
.ot-card-body button:disabled { opacity: .45; cursor: not-allowed; }
.ot-card-body .ot-axis-pair select { min-height: 44px; }
.ot-card-body .ot-attempt-dialog { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 22px; width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; color: var(--ink); }
.ot-card-body .ot-attempt-dialog::backdrop { background: rgb(47 36 26 / .5); }
.ot-card-body .ot-attempt-dialog h2 { font-size: 20px; }
.ot-card-body .ot-dialog-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ot-card-body .ot-dialog-actions .btn { min-height: 44px; flex: 1; }
.ot-card-body #ot-submit-error { color: #9b2226; }
.ot-card-body .ot-zoom-dialog { width: min(1200px, calc(100% - 24px)); }
.ot-card-body #ot-zoom-close { display: block; margin-left: auto; min-height: 44px; }
.ot-card-body .ot-zoom-scroll { overflow: auto; max-height: 75dvh; }
.ot-card-body .ot-zoom-scroll img { display: block; max-width: none; height: auto; }
@media (max-width: 640px) {
  .ot-card-body .ot-focus-main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .ot-card-body .ot-material, .ot-card-body .ot-q { padding: 14px; }
  .ot-card-body .ot-focus-head h1 { font-size: 16px; }
  .ot-card-body .ot-image-button img { max-height: none; width: 100%; }
  .ot-card-body .ot-q-prompt { font-size: 15.5px; }
  .ot-card-body .ot-q-opts:not(.is-grid) { grid-template-columns: 1fr; }
  .ot-card-body .ot-question-nav { position: fixed; inset: auto 0 0; z-index: 15; background: var(--white); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .ot-card-body .ot-question-nav .btn { flex: 1; min-width: 0; max-width: 220px; }
}

/* Shared attempt header actions, including Cut-e. */
.ot-card-body .ot-focus-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; white-space: nowrap; }
.ot-card-body .ot-focus-actions .ot-exit-btn { min-height: 44px; padding: 8px 16px; margin: 0; }
.ot-card-body .ot-question-nav .btn { border-radius: 10px; font-weight: 600; }
.ot-card-body .ot-question-nav .btn:disabled { opacity: .45; }
