/* ============================================================
   辅翔教育 · 题库中心（官网版）
   在官网品牌体系内复用旧版刷题站的「题型导航 + 逐题作答」版式
   ============================================================ */

/* ---------- 基础 ---------- */
.tk-page { background: var(--bg); }
.tk-page p { margin: 0; }
.tk-page button { font: inherit; }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 999;
  padding: 10px 16px; border-radius: 8px;
  background: var(--navy-900); color: #fff; font-size: 13px;
  transition: top .18s;
}
.skip-link:focus { top: 12px; }

/* ---------- 页头 ---------- */
.tk-hero { padding-bottom: 78px; }
.tk-hero-inner { position: relative; z-index: 2; }
.tk-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  gap: 52px;
  align-items: end;
  margin-top: 4px;
}
.tk-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 2.2px;
  color: var(--gold-400);
}
.tk-eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--gold-500); display: block;
}
.tk-hero h1 {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1.15;
  letter-spacing: 1px;
  color: #fff;
}
.tk-hero-lead {
  margin-top: 7px !important;
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: .6px;
  color: var(--gold-400);
}
.tk-hero .ph-sub { max-width: 700px; margin-top: 15px; }
.tk-hero-stats {
  display: flex; gap: 34px; flex-wrap: wrap;
  margin-top: 28px;
}
.tk-hero-stats > div {
  position: relative;
  min-width: 64px;
}
.tk-hero-stats > div + div { padding-left: 34px; }
.tk-hero-stats > div + div::before {
  content: ""; position: absolute; left: 0; top: 5px; bottom: 5px;
  width: 1px; background: rgba(255, 255, 255, .16);
}
.tk-hero-stats b {
  display: block;
  font-family: var(--font-serif);
  font-size: 27px;
  line-height: 1.05;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.tk-hero-stats span {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .52);
  letter-spacing: .5px;
}

/* 继续练习卡 */
.tk-resume {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, .16);
  background:
    radial-gradient(circle at 100% 0, rgba(217, 164, 65, .16), transparent 46%),
    rgba(255, 255, 255, .065);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .55);
  backdrop-filter: blur(10px);
}
.tk-resume::before {
  content: ""; position: absolute; left: 0; top: 22px; bottom: 22px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-400), rgba(217, 164, 65, 0));
}
.tk-resume-top {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: rgba(255, 255, 255, .58);
  letter-spacing: .4px;
}
.tk-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 0 4px rgba(217, 164, 65, .14);
}
.tk-resume-tag {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .48);
  font-size: 10px;
}
.tk-resume h3 {
  margin: 14px 0 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.45;
}
.tk-resume p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .56);
}
.tk-resume-progress {
  height: 5px; margin-top: 17px;
  border-radius: 100px; overflow: hidden;
  background: rgba(255, 255, 255, .13);
}
.tk-resume-progress i {
  display: block; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-500));
  transition: width .4s ease;
}
.tk-resume-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 16px;
}
.tk-resume-foot span { font-size: 10.5px; color: rgba(255, 255, 255, .42); line-height: 1.5; }
.tk-resume-foot .btn { flex: none; }

/* ---------- 科目选择卡 ---------- */
.tk-body { padding: 0 0 76px; }
.tk-subject-card {
  position: relative; z-index: 3;
  margin-top: -35px;
  padding: 19px 22px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.tk-subject-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 13px;
}
.tk-subject-label { display: flex; align-items: baseline; gap: 10px; }
.tk-subject-label .eyebrow { margin-bottom: 0; font-size: 10.5px; letter-spacing: 1.8px; }
.tk-subject-label b { font-size: 14px; color: var(--navy-900); }
.tk-subject-tip { font-size: 11px; color: var(--ink-4); letter-spacing: .3px; }

.tk-subject-tabs {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-2);
  scrollbar-width: none;
}
.tk-subject-tabs::-webkit-scrollbar { display: none; }
.tk-subject {
  flex: 1 0 128px;
  display: flex; align-items: center; gap: 9px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  color: var(--ink-2);
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s;
}
.tk-subject:hover { background: var(--blue-50); border-color: var(--blue-100); }
.tk-subject.is-active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(14, 43, 76, .7);
}
.tk-subject-ico {
  width: 29px; height: 29px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--blue-50);
  color: var(--blue-500);
}
.tk-subject-ico .ico { width: 16px; height: 16px; }
.tk-subject.is-active .tk-subject-ico { background: rgba(255, 255, 255, .12); color: var(--gold-400); }
.tk-subject-txt { min-width: 0; }
.tk-subject-name {
  display: block;
  font-size: 11.5px; font-weight: 600; line-height: 1.3;
  white-space: nowrap; letter-spacing: -.1px;
}
.tk-subject-meta {
  display: block;
  margin-top: 2px;
  font-size: 9.5px; line-height: 1.25;
  color: var(--ink-4);
  white-space: nowrap;
}
.tk-subject.is-active .tk-subject-meta { color: rgba(255, 255, 255, .56); }
.tk-subject.is-soon { opacity: .62; }
.tk-subject.is-soon .tk-subject-name { color: var(--ink-3); }

.tk-current {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding: 13px 0 15px;
}
.tk-current-left {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  min-width: 0;
}
.tk-current-left strong { font-size: 14.5px; color: var(--navy-900); }
.tk-current-left > span:last-child {
  font-size: 12px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tk-current-right {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--ink-4);
}
.tk-current-right .btn { height: 32px; padding: 0 12px; font-size: 12px; }

/* ---------- 工作台布局 ---------- */
.tk-shell {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
  scroll-margin-top: 88px;
}
.tk-shell.is-single { grid-template-columns: 1fr; }

/* ---------- 左栏 ---------- */
.tk-rail[hidden] { display: none !important; }
.tk-rail {
  position: sticky;
  top: 88px;
  display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding: 1px 2px 4px 1px;
  scrollbar-width: thin;
  scrollbar-color: #D7DFEA transparent;
}
.tk-rail::-webkit-scrollbar { width: 4px; }
.tk-rail::-webkit-scrollbar-thumb { background: #D7DFEA; border-radius: 4px; }
.tk-rail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 15px 14px;
  box-shadow: var(--shadow-xs);
}
.tk-rail-overview-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.tk-rail-kicker {
  display: block;
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.3px;
  color: var(--gold-600);
}
.tk-rail-overview h3 { margin: 3px 0 0; font-size: 19px; color: var(--navy-900); }
.tk-rail-icon {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--blue-50);
  color: var(--blue-500);
}
.tk-rail-icon .ico { width: 18px; height: 18px; }
.tk-rail-overview > p {
  margin-top: 4px;
  font-size: 10.5px; line-height: 1.55; color: var(--ink-4);
}
.tk-overall { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line-2); }
.tk-overall-row {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 11px; color: var(--ink-3);
}
.tk-overall-row b { font-size: 12px; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.tk-progress {
  height: 6px; margin-top: 8px;
  border-radius: 100px; overflow: hidden;
  background: #EDF2F8;
}
.tk-progress > i {
  display: block; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-500), var(--gold-500));
  transition: width .35s ease;
}
.tk-overall-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 7px;
  font-size: 10px; color: var(--ink-4);
}

.tk-rail-title {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
  font-size: 11.5px; font-weight: 700; color: var(--ink-2);
}
.tk-rail-title span:last-child { font-size: 9.5px; font-weight: 500; color: var(--ink-4); }
.tk-section-nav { display: flex; flex-direction: column; gap: 2px; }
.tk-sec-link {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; width: 100%;
  padding: 7px 8px;
  border: 0; border-radius: 6px;
  background: transparent;
  text-align: left;
  font-size: 11.5px; color: var(--ink-3);
  transition: background .15s, color .15s;
}
.tk-sec-link:hover { background: var(--blue-50); color: var(--blue-500); }
.tk-sec-link.is-active { background: var(--navy-800); color: #fff; }
.tk-sec-link .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-sec-link .cnt { flex: none; font-size: 9.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.tk-sec-link.is-active .cnt { color: rgba(255, 255, 255, .6); }
.tk-sec-link.is-sub .cnt { color: var(--gold-600); }

.tk-answer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}
.tk-answer-grid button {
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink-3);
  font-size: 10.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: .15s;
}
.tk-answer-grid button:hover { border-color: var(--blue-500); color: var(--blue-500); }
.tk-answer-grid button.is-right { background: var(--green-bg); border-color: #CFEBDD; color: var(--green); }
.tk-answer-grid button.is-wrong { background: var(--red-bg); border-color: #F2D6D6; color: var(--red); }
.tk-answer-grid button.is-current { box-shadow: 0 0 0 2px var(--navy-700); }
.tk-answer-empty {
  padding: 10px; border: 1px dashed var(--line); border-radius: 6px;
  font-size: 10.5px; line-height: 1.6; color: var(--ink-4); text-align: center;
}
.tk-answer-legend {
  display: flex; gap: 10px; margin-top: 9px;
  font-size: 9.5px; color: var(--ink-4);
}
.tk-answer-legend span { display: inline-flex; align-items: center; gap: 4px; }
.tk-answer-legend span::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--line);
}
.tk-answer-legend .ok::before { background: #CFEBDD; }
.tk-answer-legend .bad::before { background: #F2D6D6; }
.tk-answer-legend .cur::before { background: var(--navy-700); }
.tk-answer-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px; margin-top: 11px; padding-top: 10px;
  border-top: 1px solid var(--line-2);
}
.tk-answer-stats div { text-align: center; }
.tk-answer-stats b {
  display: block; font-size: 14px; color: var(--navy-800);
  font-family: var(--font-serif); line-height: 1.1;
}
.tk-answer-stats span { font-size: 9px; color: var(--ink-4); }

.tk-rail-links { display: flex; flex-direction: column; }
.tk-rail-links button,
.tk-rail-links a {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; width: 100%;
  padding: 8px 2px;
  border: 0; border-bottom: 1px solid var(--line-2);
  background: transparent;
  text-align: left;
  font-size: 11.5px; color: var(--ink-3);
}
.tk-rail-links button:last-child,
.tk-rail-links a:last-child { border-bottom: 0; }
.tk-rail-links button:hover,
.tk-rail-links a:hover { color: var(--blue-500); }
.tk-rail-links b {
  min-width: 19px; height: 18px; padding: 0 5px;
  display: inline-grid; place-items: center;
  border-radius: 100px;
  background: var(--red-bg); color: var(--red);
  font-size: 9.5px; font-weight: 700;
}

/* ---------- 主区 ---------- */
.tk-main {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.tk-loading { padding: 70px 24px; text-align: center; font-size: 13px; color: var(--ink-4); }

.tk-sec-head {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line-2);
}
.tk-sec-crumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11px; color: var(--ink-4);
}
.tk-sec-title-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; margin-top: 7px;
}
.tk-sec-title {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-serif);
  font-size: 25px; line-height: 1.35;
  color: var(--navy-900);
}
.tk-sec-desc {
  max-width: 760px; margin-top: 8px !important;
  font-size: 12.5px; line-height: 1.8;
  color: var(--ink-3);
}
.tk-sec-actions { display: flex; gap: 8px; flex: none; }
.tk-sec-actions [data-action="redo-section"][disabled] { display: none; }
.tk-only-sm { display: none !important; }
.tk-sec-actions .btn { height: 34px; padding: 0 13px; font-size: 12px; }

.tk-sec-progress {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line-2);
  background: #FCFDFF;
}
.tk-sec-progress .tk-progress { flex: 1; margin: 0; height: 5px; }
.tk-sec-progress > span {
  flex: none; font-size: 11px; color: var(--ink-3);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

.tk-tabs {
  display: flex; gap: 7px; flex-wrap: wrap;
  overflow-x: auto;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line-2);
  scrollbar-width: none;
}
.tk-tabs::-webkit-scrollbar { display: none; }
.tk-tab {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #fff;
  color: var(--ink-3);
  font-size: 11px; font-weight: 500;
  white-space: nowrap;
  transition: .15s;
}
.tk-tab:hover { border-color: var(--blue-400); color: var(--blue-500); }
.tk-tab.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.tk-tab .cnt { font-size: 9.5px; opacity: .6; font-variant-numeric: tabular-nums; }

.tk-callout {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 16px 28px 0;
  padding: 11px 13px;
  border: 1px solid #F3E2BF;
  border-radius: 8px;
  background: var(--gold-100);
  color: #74551E;
  font-size: 11.5px; line-height: 1.72;
}
.tk-callout .ico { width: 15px; height: 15px; margin-top: 2px; color: var(--gold-600); }
.tk-callout.is-info {
  background: var(--blue-50);
  border-color: var(--blue-100);
  color: var(--ink-2);
}
.tk-callout.is-info .ico { color: var(--blue-500); }

.tk-groups { padding: 4px 28px 0; }
.tk-group { padding: 16px 0 8px; border-top: 1px solid var(--line-2); }
.tk-group:first-child { border-top: 0; }
.tk-group-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; width: 100%;
  padding: 0; border: 0; background: transparent;
  text-align: left;
}
.tk-group-head h3 {
  font-size: 14px; color: var(--navy-900);
  line-height: 1.5;
}
.tk-group-meta {
  display: flex; align-items: center; gap: 9px; flex: none;
  font-size: 10.5px; color: var(--ink-4);
}
.tk-group-meta .gh-arrow {
  width: 7px; height: 7px;
  margin: -3px 2px 0 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: var(--ink-4);
  transform: rotate(45deg);
  transition: transform .18s;
}
.tk-group.is-fold .gh-arrow { transform: rotate(-45deg); margin-top: 1px; }
.tk-group.is-fold .tk-group-body { display: none; }
.tk-group-body { margin-top: 13px; }

/* 材料 / 选项库 */
.tk-passage {
  margin-bottom: 16px;
  padding: 15px 17px;
  border: 1px dashed #D9E2EE;
  border-radius: 9px;
  background: #FAFBFD;
}
.tk-passage-label {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 9px;
  font-size: 10px; font-weight: 700; letter-spacing: .6px;
  color: var(--ink-4);
}
.tk-passage-label .ico { width: 12px; height: 12px; }
.tk-passage p {
  margin: 0 0 9px;
  font-size: 13.5px; line-height: 1.95;
  color: var(--ink-2);
}
.tk-passage p:last-child { margin-bottom: 0; }
.tk-blank {
  display: inline-block;
  min-width: 30px; padding: 0 3px;
  border-bottom: 1px solid var(--blue-100);
  color: var(--blue-500); font-weight: 700;
}
.tk-bank {
  margin-bottom: 15px;
  padding: 13px 15px;
  border: 1px solid var(--blue-100);
  border-radius: 8px;
  background: var(--blue-50);
}
.tk-bank-label {
  margin-bottom: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .6px;
  color: var(--blue-500);
}
.tk-bank ul { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 16px; }
.tk-bank li { font-size: 12px; line-height: 1.7; color: var(--ink-2); }
.tk-bank li b { color: var(--navy-800); margin-right: 3px; }
.tk-bank ul.phrases { grid-template-columns: 1fr; }

/* 题目 */
.tk-q {
  padding: 15px 0 16px;
  border-top: 1px solid var(--line-2);
  scroll-margin-top: 90px;
}
.tk-group-body > .tk-q:first-of-type { border-top: 0; padding-top: 2px; }
.tk-q-head { display: flex; gap: 11px; }
.tk-q-no {
  width: 27px; height: 27px; flex: none;
  display: grid; place-items: center;
  margin-top: 1px;
  border-radius: 7px;
  background: var(--blue-50);
  color: var(--blue-500);
  font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tk-q-body { flex: 1; min-width: 0; }
.tk-q-stem {
  font-size: 13.5px; line-height: 1.8;
  color: var(--ink); font-weight: 500;
}
.tk-q-stem u { text-decoration-color: var(--gold-500); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tk-q-hint { margin-top: 4px; font-size: 11px; line-height: 1.6; color: var(--ink-4); }
.tk-options { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.tk-opt {
  display: flex; align-items: flex-start; gap: 9px;
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  text-align: left;
  font-size: 12.5px; line-height: 1.65;
  color: var(--ink-2);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.tk-opt:hover:not(.is-locked) {
  border-color: var(--blue-500);
  background: var(--blue-50);
  box-shadow: 0 4px 12px -8px rgba(37, 99, 168, .5);
}
.tk-opt .k {
  width: 21px; height: 21px; flex: none;
  display: grid; place-items: center;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 10.5px; font-weight: 700;
  color: var(--ink-3);
}
.tk-opt.is-right { border-color: #9AD4B7; background: var(--green-bg); }
.tk-opt.is-right .k { background: var(--green); border-color: var(--green); color: #fff; }
.tk-opt.is-wrong { border-color: #EBB7B7; background: var(--red-bg); }
.tk-opt.is-wrong .k { background: var(--red); border-color: var(--red); color: #fff; }
.tk-opt.is-locked { cursor: default; }

.tk-feedback {
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 11.5px; line-height: 1.8;
  animation: tkFade .25s ease;
}
.tk-feedback.is-ok { background: var(--green-bg); border-color: #CFEBDD; }
.tk-feedback.is-bad { background: var(--red-bg); border-color: #F2D6D6; }
.tk-fb-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 3px;
  font-weight: 700;
}
.tk-fb-head .ico { width: 14px; height: 14px; }
.tk-feedback.is-ok .tk-fb-head { color: var(--green); }
.tk-feedback.is-bad .tk-fb-head { color: var(--red); }
.tk-fb-head .ans {
  margin-left: auto;
  font-size: 10.5px; font-weight: 600;
  color: var(--ink-3);
}
.tk-feedback p { color: var(--ink-2); }

/* 主观题 */
.tk-subjective { margin-top: 11px; }
.tk-textarea {
  width: 100%; min-height: 92px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FCFDFF;
  font-size: 12.5px; line-height: 1.75;
  color: var(--ink);
  resize: vertical;
}
.tk-textarea:focus {
  outline: none; border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 168, .1);
}
.tk-textarea::placeholder { color: var(--ink-4); }
.tk-subjective-actions { margin-top: 8px; }
.tk-subjective-actions .btn { height: 32px; padding: 0 12px; font-size: 11.5px; }
.tk-ref {
  margin-top: 11px;
  padding: 13px 14px;
  border: 1px solid var(--blue-100);
  border-radius: 8px;
  background: var(--blue-50);
  font-size: 12px; line-height: 1.85;
  color: var(--ink-2);
  animation: tkFade .25s ease;
}
.tk-ref-block + .tk-ref-block { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--blue-100); }
.tk-ref-block .lbl {
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 4px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px;
  color: var(--blue-500);
}

/* 完成条 / 章节底部 */
.tk-finish {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin: 2px 28px 18px;
  padding: 15px 17px;
  border: 1px solid #CFEBDD;
  border-radius: 9px;
  background: linear-gradient(135deg, #F1FAF5, #E8F6EF);
}
.tk-finish.is-perfect { border-color: #F3E2BF; background: linear-gradient(135deg, #FDF8EC, var(--gold-100)); }
.tk-finish b { display: block; font-size: 13px; color: var(--navy-900); }
.tk-finish p { margin-top: 3px; font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.tk-finish .btn { flex: none; height: 34px; padding: 0 14px; font-size: 12px; }

.tk-sec-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 15px 28px;
  border-top: 1px solid var(--line-2);
  background: #FCFDFF;
}
.tk-sec-footer .btn { height: 34px; padding: 0 13px; font-size: 11.5px; }
.tk-nav-hint { font-size: 10.5px; color: var(--ink-4); }

/* 空状态 */
.tk-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 420px;
  padding: 56px 28px;
  text-align: center;
}
.tk-empty-ico {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: var(--blue-50);
  color: var(--blue-500);
}
.tk-empty-ico .ico { width: 30px; height: 30px; }
.tk-empty h3 { margin: 16px 0 6px; font-size: 18px; color: var(--navy-900); }
.tk-empty p { max-width: 460px; font-size: 12.5px; line-height: 1.8; color: var(--ink-3); }
.tk-empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }

/* ---------- 抽屉 ---------- */
.tk-drawer-mask {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(10, 31, 56, .46);
  opacity: 0; visibility: hidden;
  transition: opacity .24s, visibility .24s;
}
.tk-drawer-mask.open { opacity: 1; visibility: visible; }
.tk-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  z-index: 121;
  width: 580px; max-width: 96vw;
  display: flex; flex-direction: column;
  background: #fff;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.tk-drawer.open { transform: translateX(0); }
.tk-drawer:focus { outline: none; }
.tk-drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 17px;
  border-bottom: 1px solid var(--line);
}
.tk-drawer-eyebrow {
  display: block;
  font-size: 9.5px; font-weight: 700; letter-spacing: 2px;
  color: var(--gold-600);
}
.tk-drawer-head h3 { margin: 4px 0 0; font-size: 21px; color: var(--navy-900); }
.tk-icon-btn {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: #F2F5F9;
  color: var(--ink-3);
}
.tk-icon-btn:hover { background: var(--line); color: var(--ink); }
.tk-drawer-body {
  flex: 1; overflow-y: auto;
  padding: 20px 24px 32px;
}

/* 错题本 */
.tk-drawer-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.tk-filter-tabs { display: flex; gap: 5px; }
.tk-filter-tabs button {
  height: 30px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 100px;
  background: #fff; color: var(--ink-3);
  font-size: 11.5px;
}
.tk-filter-tabs button.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.tk-toolbar-note { font-size: 10.5px; color: var(--ink-4); }
.tk-wrong-item {
  margin-bottom: 11px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.tk-wrong-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-bottom: 7px;
  font-size: 9.5px; color: var(--ink-4);
}
.tk-wrong-meta b { color: var(--navy-800); font-weight: 600; }
.tk-wrong-stem { font-size: 12px; line-height: 1.7; color: var(--ink); }
.tk-wrong-options {
  display: flex; flex-wrap: wrap; gap: 3px 14px;
  margin-top: 6px;
  font-size: 10.5px; line-height: 1.7; color: var(--ink-3);
}
.tk-wrong-answer {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 7px;
  font-size: 10.5px;
}
.tk-wrong-answer .mine { color: var(--red); }
.tk-wrong-answer .right { color: var(--green); font-weight: 600; }
.tk-wrong-exp {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line-2);
  font-size: 10.5px; line-height: 1.75;
  color: var(--ink-3);
}
.tk-wrong-actions { display: flex; justify-content: flex-end; margin-top: 9px; }
.tk-wrong-actions .btn { height: 29px; padding: 0 11px; font-size: 10.5px; }
.tk-empty-mini {
  padding: 44px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
  font-size: 12px; color: var(--ink-4); line-height: 1.8;
}
.tk-drawer-foot {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--line-2);
  font-size: 10.5px; line-height: 1.7; color: var(--ink-4);
}

/* 答题卡抽屉 */
.tk-answer-sheet { display: flex; flex-direction: column; gap: 12px; }
.tk-answer-section {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.tk-answer-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 9px;
  font-size: 11.5px;
}
.tk-answer-section-head b { color: var(--navy-900); font-weight: 600; }
.tk-answer-section-head span { color: var(--ink-4); font-size: 10.5px; }
.tk-answer-section .tk-answer-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.tk-answer-section .tk-answer-grid button { height: 29px; }

/* 学习报告 */
.tk-report-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.tk-report-head p { font-size: 11px; color: var(--ink-4); }
.tk-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tk-kpi {
  padding: 12px 12px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.tk-kpi b {
  display: block;
  font-family: var(--font-serif);
  font-size: 23px; line-height: 1.1;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
}
.tk-kpi span { display: block; margin-top: 4px; font-size: 9.5px; color: var(--ink-4); }
.tk-report-block { margin-top: 20px; }
.tk-report-block h4 {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
  font-size: 12.5px; color: var(--navy-900);
}
.tk-report-block h4 span { font-size: 9.5px; font-weight: 500; color: var(--ink-4); }
.tk-activity {
  display: flex; align-items: flex-end; gap: 4px;
  height: 72px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
}
.tk-activity i {
  flex: 1; min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: var(--blue-100);
}
.tk-activity i.has { background: var(--blue-500); }
.tk-activity i.is-today { background: var(--gold-500); }
.tk-activity-labels {
  display: flex; justify-content: space-between;
  margin-top: 5px;
  font-size: 8.5px; color: var(--ink-4);
}
.tk-bar-row {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) 48px;
  gap: 9px; align-items: center;
  margin-bottom: 8px;
  font-size: 10.5px; color: var(--ink-3);
}
.tk-bar-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-bar-row .bar { height: 5px; border-radius: 100px; background: #EDF2F8; overflow: hidden; }
.tk-bar-row .bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-500), var(--gold-500)); }
.tk-bar-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-4); }
.tk-weak-list { display: flex; flex-direction: column; gap: 7px; }
.tk-weak-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px; color: var(--ink-2);
}
.tk-weak-item b { color: var(--red); font-size: 11.5px; }
.tk-report-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-size: 11px; line-height: 1.7; color: var(--ink-4);
  text-align: center;
}
.tk-report-note {
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--blue-50);
  font-size: 10px; line-height: 1.7; color: var(--ink-3);
}

/* ---------- 确认弹窗 ---------- */
.tk-modal-mask {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(10, 31, 56, .5);
  backdrop-filter: blur(3px);
}
.tk-modal-mask[hidden] { display: none; }
.tk-modal {
  width: 100%; max-width: 430px;
  padding: 23px 23px 20px;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: tkModalIn .2s ease;
}
.tk-modal h3 { margin: 0 0 8px; font-size: 17px; color: var(--navy-900); }
.tk-modal p { font-size: 12.5px; line-height: 1.8; color: var(--ink-3); }
.tk-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.tk-modal-actions .btn { height: 36px; padding: 0 15px; font-size: 12px; }

/* ---------- 动画 ---------- */
@keyframes tkFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes tkModalIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- 响应式 ---------- */
/* 官网导航在 1024–1180 区间会偏挤：题库中心页先收热线与导航内边距，
   980 以下提前切到汉堡菜单，避免横向溢出（其它页面可后续统一调整）。 */
@media (max-width: 1180px) {
  body[data-page="bank"] .hotline { display: none; }
  body[data-page="bank"] .header-inner { gap: 18px; }
  body[data-page="bank"] .nav-link { padding-left: 9px; padding-right: 9px; }
}
@media (max-width: 1040px) {
  body[data-page="bank"] .nav-link { font-size: 13.5px; padding-left: 7px; padding-right: 7px; }
  body[data-page="bank"] .header-cta { gap: 6px; }
  body[data-page="bank"] .header-cta .btn-gold { padding: 0 12px; }
}
@media (max-width: 980px) {
  body[data-page="bank"] .topbar { display: none; }
  body[data-page="bank"] .nav { display: none; }
  body[data-page="bank"] .burger { display: flex; }
  body[data-page="bank"] .header-inner { justify-content: space-between; }
}

@media (max-width: 1120px) {
  .tk-hero-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; }
  .tk-shell { grid-template-columns: 238px minmax(0, 1fr); gap: 18px; }
  .tk-sec-head { padding: 22px 24px 18px; }
  .tk-sec-progress, .tk-tabs { padding-left: 24px; padding-right: 24px; }
  .tk-callout { margin-left: 24px; margin-right: 24px; }
  .tk-groups { padding-left: 24px; padding-right: 24px; }
  .tk-sec-footer { padding-left: 24px; padding-right: 24px; }
  .tk-finish { margin-left: 24px; margin-right: 24px; }
}

@media (max-width: 980px) {
  .tk-only-sm { display: inline-flex !important; }
  .tk-hero { padding-bottom: 72px; }
  .tk-hero-grid { grid-template-columns: 1fr; gap: 24px; align-items: stretch; }
  .tk-resume { max-width: 560px; }
  .tk-hero h1 { font-size: 40px; }
  .tk-hero-stats { margin-top: 22px; }

  .tk-shell { grid-template-columns: 1fr; gap: 16px; }
  .tk-main { order: 1; }
  .tk-rail {
    order: 2;
    position: static;
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .tk-rail-overview { grid-column: 1; }
  .tk-rail-nav { grid-column: 2; }
  .tk-rail-answer { grid-column: 1; }
  .tk-rail-links { grid-column: 2; }
  .tk-rail-links { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 14px; }
}

@media (max-width: 760px) {
  .tk-hero h1 { font-size: 34px; }
  .tk-hero-lead { font-size: 16.5px; }
  .tk-hero-stats { gap: 18px; }
  .tk-hero-stats > div + div { padding-left: 18px; }
  .tk-hero-stats b { font-size: 23px; }
  .tk-subject-card { margin-top: -28px; padding: 16px 16px 0; }
  .tk-subject-tabs { padding-bottom: 13px; }
  .tk-subject { flex: 0 0 132px; }
  .tk-current { align-items: flex-start; flex-direction: column; gap: 9px; padding: 11px 0 13px; }
  .tk-current-right { width: 100%; justify-content: space-between; }
  .tk-sec-head { padding: 20px 18px 16px; }
  .tk-sec-title { font-size: 21px; }
  .tk-sec-title-row { flex-direction: column; gap: 10px; }
  .tk-sec-actions { width: 100%; }
  .tk-sec-actions .btn { flex: 1; }
  .tk-sec-progress, .tk-tabs { padding-left: 18px; padding-right: 18px; }
  .tk-tabs { flex-wrap: nowrap; }
  .tk-callout { margin-left: 18px; margin-right: 18px; }
  .tk-groups { padding-left: 18px; padding-right: 18px; }
  .tk-sec-footer { padding-left: 18px; padding-right: 18px; }
  .tk-finish { margin-left: 18px; margin-right: 18px; }
  .tk-q-head { gap: 9px; }
  .tk-q-stem { font-size: 13px; }
  .tk-opt { padding: 9px 10px; font-size: 12px; }
  .tk-bank ul { grid-template-columns: 1fr; }
  .tk-rail { grid-template-columns: 1fr; }
  .tk-rail-overview, .tk-rail-nav, .tk-rail-answer, .tk-rail-links { grid-column: 1; }
  .tk-rail-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .tk-rail-links a { grid-column: 1 / -1; }
  .tk-drawer { width: 100%; max-width: 100%; }
  .tk-drawer-head { padding: 18px 18px 15px; }
  .tk-drawer-body { padding: 18px 18px 28px; }
  .tk-kpis { grid-template-columns: 1fr 1fr; }
  .tk-activity { height: 60px; }
  .tk-answer-section .tk-answer-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .tk-hero h1 { font-size: 30px; }
  .tk-hero .ph-meta { display: none; }
  .tk-hero-stats { gap: 14px; }
  .tk-hero-stats > div + div { padding-left: 14px; }
  .tk-hero-stats b { font-size: 21px; }
  .tk-hero-stats span { font-size: 10px; }
  .tk-resume { padding: 18px; }
  .tk-resume-foot { align-items: flex-start; flex-direction: column; }
  .tk-resume-foot .btn { width: 100%; }
  .tk-subject { flex: 0 0 124px; }
  .tk-subject-name { font-size: 11px; }
  .tk-sec-progress { align-items: flex-start; flex-direction: column; gap: 6px; }
  .tk-sec-progress > span { white-space: normal; }
  .tk-sec-footer { align-items: stretch; flex-direction: column; }
  .tk-sec-footer .btn { width: 100%; }
  .tk-nav-hint { text-align: center; }
  .tk-finish { flex-direction: column; align-items: stretch; }
  .tk-finish .btn { width: 100%; }
  .tk-fb-head { align-items: flex-start; flex-wrap: wrap; }
  .tk-fb-head .ans { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tk-page *, .tk-page *::before, .tk-page *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
