/* 历史互动馆 · 本站专用样式 */

/* 打个比方 */
.analogy { background: #f5f1f0; border-radius: 18px; padding: 16px 18px; margin-top: 15px; color: #4f403b; }
.analogy h3 { font-size: 15px; margin: 0 0 6px; color: #583d34; display: flex; gap: 7px; align-items: center; }
.analogy h3 i { font-style: normal; font-size: 12px; background: #eae1de; border-radius: 8px; padding: 2px 7px; color: #583d34; }
.analogy p { font-size: 14px; line-height: 1.9; margin: 0; }

/* 步骤条：解方程、推理过程 */
.steps { display: flex; flex-wrap: wrap; gap: 5px 4px; margin-top: 12px; font-size: 13.5px; line-height: 1.5; }
.steps span { padding: 4px 8px; border-radius: 8px; background: #f3f0ef; color: #786e6b; transition: background .2s, color .2s; }
.steps span.on { background: #efe4e0; color: #7d4d3c; font-weight: 600; }
.steps span.done { background: #e7efe6; color: #43704f; }
.steps i { font-style: normal; color: #c3bab7; align-self: center; }

/* 分数：<span class="frac"><i>分子</i><i>分母</i></span> */
.frac {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;  /* 分数线对齐到小写字母中线，不受字体基线影响 */
  text-align: center;
  margin: 0 .12em;
  line-height: 1.12;
}
.frac > i {
  font-style: normal;
  padding: 0 .28em;
  font-size: .86em;
}
.frac > i:first-child { border-bottom: 1.2px solid currentColor; }

/* 根号：<span class="radical">√<span>被开方数</span></span> */
.radical > span {
  border-top: 1.2px solid currentColor;
  padding: 0 .18em 0 .1em;
  margin-left: -.06em;
}

/* 公式行：居中、可横向滚动，长式子在手机上不会撑破版面 */
.formula {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--surface-2, #f1f3ee);
  border-radius: 12px;
  font-size: 18px;
  line-height: 2.05;
  text-align: center;
  overflow-x: auto;
  color: var(--ink, #352a26);
}
.formula b { color: #7d4d3c; font-weight: 700; }
.formula em { font-style: italic; color: #9c5231; }
.formula .step { display: block; }
.formula .step + .step { margin-top: 2px; }
.formula .why {
  display: block;
  font-size: 14px;
  color: var(--muted, #6f6663);
  line-height: 1.5;
  margin-top: -2px;
}

/* 行内变量用斜体，和中文拉开距离 */
var, .v { font-style: italic; font-family: "Times New Roman", Georgia, serif; font-size: 1.06em; }

/* 坐标系文字不参与选中，拖动时不会误选 */
.ax-text { user-select: none; -webkit-user-select: none; }
svg .hit { fill: transparent; }
svg .pt { cursor: grab; }
svg .pt:focus { outline: none; }
svg .pt:focus-visible circle { stroke: #7d4d3c; stroke-width: 3; }

/* 数值表：步骤表、数据表 */
table.compare, table.steps {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-top: 10px;
}
table.compare th, table.compare td, table.steps th, table.steps td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line, #e2e5dd);
  text-align: left;
  vertical-align: top;
}
table.compare th, table.steps th {
  font-size: 13.5px;
  color: var(--muted, #6f6663);
  font-weight: 600;
  white-space: nowrap;
}
table.compare td.n, table.steps td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.steps tr.on td { background: #f9f3f0; }

/* 练习区：题号导航 */
.quiz-nav { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.quiz-nav .dot {
  width: 26px; height: 26px; padding: 0;
  border-radius: 8px; border: 1px solid var(--line, #e2e5dd);
  background: #fff; color: var(--muted, #6f6663);
  font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.quiz-nav .dot.on { border-color: #7d4d3c; color: #7d4d3c; font-weight: 700; box-shadow: 0 0 0 2px #f4ebe8; }
.quiz-nav .dot.ok { background: #e7efe6; border-color: #a9c6a4; color: #3d6b38; }
.quiz-nav .dot.bad { background: #fbeeea; border-color: #e0b6a6; color: #a4422c; }

/* 难度徽章 */
.lv {
  display: inline-block; margin-left: 7px; padding: 2px 8px;
  border-radius: 9px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
}
.lv-base { background: #e7efe6; color: #3d6b38; }
.lv-mid { background: #f4ebe8; color: #7d4d3c; }
.lv-trap { background: #fbeae2; color: #a4492b; }

/* 自测结果 */
.quiz-result {
  margin-top: 14px; padding: 12px 14px;
  background: #f5f1f0; border-radius: 13px;
}
.quiz-result h4 { margin: 0 0 5px; font-size: 15.5px; color: #583d34; }
.quiz-result p { margin: 0; font-size: 14.5px; line-height: 1.75; color: #554945; }
.quiz-result .weak { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.quiz-result .weak span {
  background: #fff; border-radius: 8px; padding: 3px 9px;
  font-size: 13.5px; color: #a4492b;
}

/* 中考怎么考 */
.exam-card { background: #fdf6ec; border-radius: 18px; padding: 16px 18px; margin-top: 15px; color: #6b4f2a; }
.exam-card h3 { font-size: 15px; margin: 0 0 8px; color: #8a5a22; display: flex; gap: 7px; align-items: center; }
.exam-card h3 i { font-style: normal; font-size: 12px; background: #f3e2c7; border-radius: 8px; padding: 2px 7px; color: #8a5a22; white-space: nowrap; flex: none; }
.exam-card ul { margin: 0; padding-left: 18px; }
.exam-card li { font-size: 14.5px; line-height: 1.85; margin: 4px 0; }
.exam-card b { color: #8a5a22; }
.exam-card .q {
  margin-top: 10px; padding: 10px 12px; background: #fff;
  border-radius: 11px; font-size: 14.5px; line-height: 1.8; color: #5a4a35;
}
.exam-card .q b { color: #a4492b; }

/* 首页覆盖统计 */
.cover-sum { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.cover-sum span { font-size: 14px; border-radius: 10px; padding: 5px 10px; background: #f5f1f0; }
#cover-table a { color: #7d4d3c; text-decoration: underline; text-underline-offset: 2px; }
#cover-table td:first-child { white-space: nowrap; color: var(--muted, #6f6663); }

/* 结论卡列表 */
.fact-list { margin: 8px 0 0; padding-left: 18px; }
.fact-list li { margin: 5px 0; line-height: 1.62; }
.fact-list b { color: #7d4d3c; }

/* 可点的步骤条 */
.steps span[role=button] { cursor: pointer; }
.steps span[role=button]:focus-visible { outline: 2px solid #7d4d3c; outline-offset: 2px; }

input[type=range] { width: 100%; }
.small-label output { font-variant-numeric: tabular-nums; }

/* 计算器式的大数字读数 */
.bignum {
  font-size: 23.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #7d4d3c;
}
.bignum small { font-size: 15px; font-weight: 500; color: var(--muted, #6f6663); margin-left: 2px; }

/* 判定条件清单：对/错用颜色区分 */
.cond-list { list-style: none; margin: 8px 0 0; padding: 0; }
.cond-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 9px;
  line-height: 1.55;
  font-size: 15.5px;
}
.cond-list li.yes { background: #eaf4ec; }
.cond-list li.no { background: #fbeeea; }
.cond-list li i { font-style: normal; font-weight: 700; }
.cond-list li.yes i { color: #2f6a4a; }
.cond-list li.no i { color: #a4422c; }

/* 摆放小方块的网格（展开图、三视图） */
.cube-grid {
  display: grid;
  gap: 3px;
  justify-content: center;
  margin-top: 10px;
}
.cube-grid button {
  width: 30px; height: 30px;
  border: 1px solid var(--line, #e2e5dd);
  border-radius: 5px;
  background: #fff;
  padding: 0;
  cursor: pointer;
}
.cube-grid button[aria-pressed=true] { background: #cdb3aa; border-color: #aa897d; }

p.part-info { font-size: 15px; line-height: 1.62; color: var(--ink, #352a26); margin: 8px 0 0; }


/* —— 数字、公式、图内文字统一用无衬线体（正文也已改为无衬线体，楷体在小字号下会显得发虚、和数字对不齐） —— */
.bignum, .stat strong, .frac, var, .v, .formula, .radical,
td.n, th, table.compare, table.steps,
input, output, select, textarea, button,
.quiz-nav .dot, .lv, .badge, .cover-sum,
svg text, svg tspan {
  font-family: var(--font-ui);
}
/* 想明白为什么 */
.derive-card { background: #f4eeec; border-radius: 18px; padding: 16px 18px; margin-top: 15px; color: #493b37; }
.derive-card h3 { font-size: 15px; margin: 0 0 8px; color: #503a32; display: flex; gap: 7px; align-items: center; }
.derive-card h3 i { font-style: normal; font-size: 12px; background: #e9deda; border-radius: 8px; padding: 2px 7px; color: #503a32; white-space: nowrap; flex: none; }
.derive-card .derive-lead { font-size: 14.5px; line-height: 1.85; margin: 0 0 11px; color: #5d4d48; }
.derive-card ol { margin: 0; padding: 0; list-style: none; counter-reset: dv; }
.derive-card ol > li { position: relative; padding-left: 27px; margin: 0 0 10px; counter-increment: dv; }
.derive-card ol > li::before {
  content: counter(dv); position: absolute; left: 0; top: 0;
  width: 19px; height: 19px; border-radius: 50%; background: #fff;
  color: #503a32; font-size: 13px; line-height: 19px; text-align: center;
  font-family: var(--font-ui);
}
.derive-card ol > li h4 { font-size: 14.5px; font-weight: 650; margin: 0 0 3px; color: #503a32; }
.derive-card ol > li p { font-size: 14.5px; line-height: 1.85; margin: 0; color: #5d4d48; }
.derive-card b { color: #503a32; font-weight: 650; }
.derive-card .derive-end {
  margin: 12px 0 0; padding: 10px 12px; background: #fff;
  border-radius: 11px; font-size: 14.5px; line-height: 1.8; color: #493b37;
}
.derive-card .derive-end > b:first-child {
  color: #a4492b; margin-right: 5px;
}
@media (max-width: 640px) {
  .derive-card { padding: 14px 15px; }
  .derive-card ol > li { padding-left: 25px; }
}

/* 公式块即使写成 <span class="formula"> 也按块级显示，避免背景框和下面的说明行被拆开 */
span.formula { display: block; }

/* —— 历史站补充 —— */
.ctl-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.ctl-row > span { font-size: 14px; color: var(--muted); min-width: 52px; }
table.compare tr.on td { background: var(--soft); color: var(--green); font-weight: 600; }
.big-btn { background: var(--green); color: #fff; border-radius: 11px; padding: 10px 16px; font-size: 15px; min-height: 42px; }
.ghost-btn { background: var(--soft); color: var(--green); border-radius: 11px; padding: 10px 14px; font-size: 14px; min-height: 42px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
/* 史料卡 */
.source-card { background: #fbf7f2; border: 1px solid #eadfd4; border-left: 4px solid #b88a6a; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.source-card p { margin: 0; font-size: 15px; line-height: 1.9; color: #4a3a32; }
.source-card cite { display: block; margin-top: 6px; font-size: 13px; color: #8a7a70; font-style: normal; }
/* 排序游戏 */
.order-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.order-list button { text-align: left; font-size: 14.5px; line-height: 1.6; padding: 10px 12px; border-radius: 11px; background: #f8f4f1; border: 1px solid #ece4de; color: #4a3a32; min-height: 44px; display: flex; gap: 10px; align-items: center; }
.order-list button .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid #d9c9be; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: var(--green); font-weight: 700; }
.order-list button.picked { background: var(--soft); border-color: #cdb3a4; }
.order-list button.picked .n { background: var(--green); color: #fff; border-color: var(--green); }
.order-list button.ok { background: #e8f1e6; border-color: #b9d3b0; }
.order-list button.bad { background: #fbeee6; border-color: #e9c9b3; }
.order-list button .yr { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-wrap svg { cursor: pointer; }

/* —— 对应新教材 —— */
.covers { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; flex-wrap: wrap; }
.covers-label { flex: none; font-size: 13px; font-weight: 700; color: var(--green); background: var(--soft); border-radius: 999px; padding: 4px 10px; }
.covers-list { display: flex; flex-wrap: wrap; gap: 6px; }
.covers-list span { font-size: 13px; color: #5a4a42; background: #fff; border: 1px solid #eadfd8; border-radius: 999px; padding: 3px 10px; }
/* —— 大题训练 —— */
.essay-card { background: #fff; border: 1px solid #eadfd8; border-radius: 18px; padding: 20px 22px; }
.essay-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.essay-head h2 { margin: 0; font-size: 21px; }
.essay-head h2 i { font-style: normal; font-size: 14px; color: #fff; background: var(--green); border-radius: 7px; padding: 2px 8px; margin-right: 6px; vertical-align: 2px; }
.essay-score { font-size: 14px; color: var(--muted); }
.essay-lead { font-size: 15px; color: #5a4a42; line-height: 1.8; margin: 8px 0 4px; }
.essay-part { border-top: 1px dashed #e6d8cf; margin-top: 16px; padding-top: 14px; }
.essay-ask { font-size: 16px; line-height: 1.8; color: #352a26; font-weight: 600; }
.essay-ask em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 14px; }
.essay-type { display: inline-block; font-size: 12.5px; font-weight: 700; color: #a4492b; background: #fbeee6; border-radius: 6px; padding: 1px 7px; margin-right: 8px; vertical-align: 2px; }
.essay-tipbtn, .essay-go { font-size: 14px; border-radius: 10px; padding: 7px 12px; margin-top: 8px; min-height: 38px; }
.essay-tipbtn { background: transparent; color: var(--green); border: 1px solid #d9c4b7; }
.essay-go { background: var(--green); color: #fff; margin-left: 6px; }
.essay-tip { font-size: 14.5px; line-height: 1.8; background: #fbf7f2; border-radius: 10px; padding: 9px 12px; margin: 8px 0 0; color: #5a4a42; }
.essay-input { display: block; width: 100%; box-sizing: border-box; margin-top: 10px; font: inherit; font-size: 15px; line-height: 1.7; border: 1px solid #e0d2c8; border-radius: 12px; padding: 10px 12px; background: #fffdfb; resize: vertical; }
.essay-input:focus { outline: 2px solid #d9b8a6; border-color: transparent; }
.essay-result { margin-top: 10px; }
.essay-warn { font-size: 13.5px; color: #a4492b; margin: 0 0 6px; }
.essay-points { display: flex; flex-direction: column; gap: 6px; }
.essay-point { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.7; padding: 8px 10px; border-radius: 10px; background: #f8f4f1; cursor: pointer; }
.essay-point input { margin-top: 5px; width: 17px; height: 17px; accent-color: #7d4d3c; flex: none; }
.essay-point em { font-style: normal; font-size: 13px; color: var(--muted); margin-left: 4px; }
.essay-point.on { background: #e8f1e6; }
.essay-model { margin-top: 10px; font-size: 15px; line-height: 1.85; background: #fbf7f2; border-left: 4px solid #b88a6a; border-radius: 10px; padding: 10px 12px; color: #4a3a32; }
.essay-sum { margin-top: 18px; font-size: 16px; color: #4a3a32; background: var(--soft); border-radius: 12px; padding: 10px 14px; }
.essay-sum b { font-size: 22px; color: var(--green); }

/* —— 课本逐课要点 —— */
.kp-table td:first-child { width: 34%; font-weight: 600; color: #4a3a32; }
.kp-table td { font-size: 14.5px; line-height: 1.75; vertical-align: top; }
.kp-no { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.kp-hide .kp-table td:last-child { color: transparent; background: repeating-linear-gradient(-45deg, #f3ebe6 0 6px, #f8f3ef 6px 12px); border-radius: 6px; }
.kp-hide .kp-table td:last-child * { color: transparent !important; }
@media (max-width: 560px) { .kp-table td:first-child { width: 40%; } }

/* —— 大题怎么答 —— */
.step-h { font-size: 16px; margin: 18px 0 8px; color: var(--green); }
.method-steps { margin: 0 0 10px; padding-left: 22px; font-size: 15px; line-height: 1.85; color: #4a3a32; }
.essay-head a { font-size: 14px; color: var(--green); text-decoration: none; border-bottom: 1px solid #d9c4b7; }
.method-entry { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid #eadfd8; border-left: 5px solid var(--green); border-radius: 16px; padding: 16px 20px; text-decoration: none; color: #352a26; }
.method-entry b { font-size: 18px; color: var(--green); }
.method-entry span { font-size: 14.5px; color: #5a4a42; line-height: 1.7; }
.method-entry em { font-style: normal; font-weight: 700; color: var(--green); white-space: nowrap; }
