:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: #23292b;
  background: #f7f8f8;
  font-size: 16px;
  line-height: 1.65;
  --accent: #17675b;
  --line: #dce2e1;
  --muted: #667071;
  --red: #b33c46;
  --yellow: #e4b652;
}
* {
  box-sizing: border-box;
  letter-spacing: 0;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  padding: 0.48rem 0.95rem;
  color: inherit;
}
button:hover {
  border-color: var(--accent);
  background: #f2f7f5;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
button.text {
  border-color: transparent;
  background: transparent;
  padding: 0.3rem 0.45rem;
  color: var(--accent);
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin: 0 0 1rem;
}
h1 {
  font-size: 1.85rem;
  line-height: 1.35;
}
h2 {
  font-size: 1.3rem;
  line-height: 1.45;
}
h3 {
  font-size: 1.06rem;
}
small,
.small {
  font-size: 0.85rem;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
header {
  height: 66px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand strong {
  font-size: 1.2rem;
}
.brand span {
  font-size: 0.85rem;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  max-width: 1680px;
  margin: auto;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 30px 18px;
  position: sticky;
  top: 66px;
  height: calc(100vh - 66px);
  overflow: auto;
  background: #fff;
}
.sidebar .eyebrow {
  padding: 0 12px 14px;
  color: var(--muted);
  font-size: 0.8rem;
}
.module-btn {
  display: flex;
  width: 100%;
  gap: 10px;
  text-align: left;
  border: 0;
  border-radius: 5px;
  padding: 12px 10px;
  margin-bottom: 7px;
  background: transparent;
  align-items: flex-start;
}
.module-btn.active {
  background: #eaf3f0;
  color: var(--accent);
}
.module-num {
  font-size: 0.78rem;
  line-height: 26px;
  width: 25px;
  flex-shrink: 0;
  color: var(--muted);
}
.module-btn strong {
  display: block;
  font-size: 0.93rem;
  line-height: 1.45;
  font-weight: 600;
}
.module-btn small {
  display: block;
  margin-top: 5px;
  font-size: 0.78rem;
}
.sidebar-footer {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding: 18px 10px;
}
.sidebar-footer progress {
  width: 100%;
  height: 6px;
  accent-color: var(--accent);
}
main.content {
  padding: 36px 48px 72px;
  max-width: 1240px;
  min-width: 0;
  width: 100%;
  margin: 0 auto;
}
.kicker {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 650;
  margin-bottom: 9px;
}
.chapter-en {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 14px;
}
.chapter-intro {
  max-width: 760px;
}
.chapter-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 18px 0;
}
.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin: 22px 0 28px;
}
.tabs button {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 12px 0;
  position: relative;
  color: var(--muted);
}
.tabs button.active {
  color: var(--accent);
  font-weight: 650;
}
.tabs button.active:after {
  content: "";
  height: 3px;
  background: var(--accent);
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
}
.notes-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.notes-index a {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
  display: flex;
  gap: 10px;
}
.notes-index a span {
  color: #9aa4a2;
  font-size: 0.85rem;
}
.topic {
  padding: 30px 0 36px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.topic-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.topic-heading h2 {
  max-width: 710px;
}
.topic-number {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 650;
  display: block;
  margin-bottom: 9px;
}
.topic p {
  line-height: 1.85;
}
.topic .plain {
  font-size: 1.04rem;
}
.example {
  border-left: 3px solid var(--yellow);
  padding: 0 0 0 18px;
  margin: 24px 0;
}
.example strong,
.formula strong,
.trap strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 8px;
  color: var(--muted);
}
.formula {
  background: #eef2f2;
  padding: 18px 22px;
  border-radius: 4px;
  line-height: 1.95;
  margin: 22px 0;
  overflow-wrap: anywhere;
}
.trap {
  padding: 16px 0;
}
.trap strong {
  color: #9b4750;
}
.takeaway {
  font-weight: 600;
  color: var(--accent);
  padding: 16px 0;
  margin: 0;
}
.topic-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.check-label input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}
.qrefs {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 12px;
}
.charts {
  margin: 24px 0;
}
.charts figure {
  margin: 24px 0;
}
.charts figcaption {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 12px 0;
}
.charts img {
  max-width: 100%;
  height: auto;
  display: block;
  max-height: 570px;
  object-fit: contain;
  object-position: left;
  background: white;
  border: 1px solid var(--line);
}
.chart-read {
  font-size: 0.94rem;
  margin-top: 12px;
}
.los {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.los summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
}
.los p {
  margin: 14px 0;
  font-size: 0.94rem;
}
.cheats {
  padding: 30px 0;
  overflow: auto;
}
table {
  border-collapse: collapse;
  max-width: 100%;
  width: 100%;
  margin: 18px 0;
  font-size: 0.94rem;
}
th,
td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
th {
  background: #f0f4f3;
  font-weight: 600;
}
td p,
th p {
  margin: 0;
}
.cheats th:first-child {
  width: 33%;
}
.setup {
  max-width: 680px;
}
.segmented {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin: 16px 0;
}
.segmented button {
  border-radius: 0;
  margin-left: -1px;
}
.segmented button:first-child {
  border-radius: 5px 0 0 5px;
  margin-left: 0;
}
.segmented button:last-child {
  border-radius: 0 5px 5px 0;
}
.segmented .active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.form-row select {
  width: 210px;
  max-width: 56%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 10px;
}
.setup .primary {
  margin: 24px 0;
}
.history {
  margin-top: 20px;
}
.history-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  align-items: center;
}
.run-top {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.run-title {
  font-size: 1.3rem;
}
.run-top .count {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.run-progress {
  height: 5px;
  background: #e0e7e4;
  margin: 20px 0 26px;
  border-radius: 2px;
  overflow: hidden;
}
.run-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.question-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 28px;
}
.question-panel {
  min-width: 0;
}
.question-text {
  font-size: 1.06rem;
  line-height: 1.8;
  margin-bottom: 22px;
  overflow-wrap: anywhere;
}
.question-text img,
.vignette img,
.feedback img {
  max-width: 100%;
  height: auto;
}
.question-text table,
.vignette table {
  font-size: 0.85rem;
}
.question-text p:last-child {
  margin-bottom: 0;
}
.vignette {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 18px 0 25px;
  padding: 12px 0;
  overflow-x: auto;
}
.vignette summary {
  cursor: pointer;
  font-weight: 600;
}
.vignette > div {
  padding-top: 18px;
  font-size: 0.94rem;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.option {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #cdd5d3;
  border-radius: 5px;
  padding: 16px 18px;
  cursor: pointer;
  line-height: 1.6;
}
.option input {
  margin: 6px 0 0;
  accent-color: var(--accent);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.option.selected {
  border-color: var(--accent);
  background: #eff7f4;
}
.option.correct {
  border: 2px solid var(--accent);
  background: #eff8f3;
  padding: 15px 17px;
}
.option.wrong {
  border: 2px solid var(--red);
  background: #fff2f3;
  padding: 15px 17px;
}
.option p {
  margin: 0;
}
.option > div {
  flex: 1;
  min-width: 0;
}
.option .answer-tag {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}
.option.wrong .answer-tag {
  color: var(--red);
}
.question-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 25px 0;
  flex-wrap: wrap;
}
.question-nav {
  display: flex;
  gap: 8px;
}
.question-map {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  gap: 6px;
  align-content: start;
}
.question-map button {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 0.85rem;
  border-radius: 4px;
}
.question-map button.answered {
  background: #e9efed;
}
.question-map button.current {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.question-map button.correct {
  background: #e4f1e9;
  color: var(--accent);
}
.question-map button.wrong {
  background: #f8e7e9;
  color: var(--red);
}
.question-map-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 4px 0 12px;
}
.feedback {
  border-top: 2px solid var(--accent);
  margin-top: 26px;
  padding-top: 20px;
}
.feedback.wrong {
  border-color: var(--red);
}
.feedback .verdict {
  font-weight: 650;
}
.feedback details {
  margin: 14px 0;
  font-size: 0.9rem;
}
.feedback summary {
  cursor: pointer;
}
.feedback details > div {
  padding-top: 12px;
  line-height: 1.8;
}
.feedback .topic-link {
  display: inline-block;
  margin-top: 8px;
}
.results {
  padding: 20px 0;
}
.result-stats {
  display: flex;
  gap: 36px;
  border-block: 1px solid var(--line);
  padding: 22px 0;
  margin: 20px 0;
}
.result-stats strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 650;
  line-height: 1.3;
}
.result-stats span {
  font-size: 0.85rem;
  color: var(--muted);
}
.review-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.review-item h3 {
  margin-bottom: 12px;
}
.review-options {
  margin: 15px 0;
}
.review-option {
  padding: 7px 12px;
  border-left: 3px solid transparent;
  line-height: 1.75;
}
.review-option.correct {
  border-color: var(--accent);
  background: #eef7f2;
}
.review-option.wrong {
  border-color: var(--red);
  background: #fff0f2;
}
.review-option p {
  margin: 0;
}
.review-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pill {
  font-size: 0.78rem;
  border-radius: 3px;
  padding: 3px 7px;
  background: #edf2f0;
  color: var(--muted);
}
.pill.wrong {
  background: #fae8eb;
  color: var(--red);
}
.empty {
  padding: 50px 0;
  color: var(--muted);
}
.login {
  max-width: 420px;
  margin: 12vh auto;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.login h1 {
  font-size: 1.55rem;
}
.login label {
  display: block;
  font-size: 0.88rem;
  margin: 20px 0 6px;
}
.login input {
  width: 100%;
  border: 1px solid #bcc8c4;
  border-radius: 4px;
  padding: 10px 12px;
}
.login .primary {
  width: 100%;
  margin-top: 26px;
}
.login .error {
  color: var(--red);
  font-size: 0.9rem;
  margin: 15px 0 0;
}
.loading {
  margin: 20vh auto;
  text-align: center;
  color: var(--muted);
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #253735;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 50;
  font-size: 0.9rem;
  display: none;
  max-width: 90vw;
}
.mobile-chapter {
  display: none;
}
.review-pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
}
.source {
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.8rem;
}
.lang-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 20px;
}
.lang-controls .segmented {
  margin: 0;
}
.lang-controls button {
  font-size: 0.85rem;
  padding: 5px 10px;
}
math {
  font-size: 1.08em;
}
p,
td,
th,
button {
  overflow-wrap: break-word;
}
@media (min-width: 1400px) {
  main.content {
    padding-inline: 66px;
  }
  .question-layout {
    gap: 40px;
  }
}
@media (max-width: 1050px) {
  main.content {
    padding: 28px;
  }
  .layout {
    grid-template-columns: 218px minmax(0, 1fr);
  }
  .question-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .question-map {
    grid-template-columns: repeat(auto-fill, 36px);
    max-height: 150px;
    overflow: auto;
  }
  .question-map-area {
    border-top: 1px solid var(--line);
    padding-top: 20px;
  }
  .notes-index {
    grid-template-columns: 1fr;
  }
  .header-right small {
    display: none;
  }
}
@media (max-width: 700px) {
  header {
    height: 58px;
    padding: 0 16px;
  }
  .brand span {
    display: none;
  }
  .brand strong {
    font-size: 1.05rem;
  }
  .layout {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .mobile-chapter {
    display: block;
    margin-bottom: 24px;
    width: 100%;
    background: white;
    border: 1px solid var(--line);
    padding: 10px;
    border-radius: 4px;
    font-size: 0.92rem;
  }
  .header-right {
    gap: 4px;
  }
  .header-right button {
    font-size: 0.8rem;
  }
  .content,
  main.content {
    padding: 22px 18px 50px;
  }
  h1 {
    font-size: 1.5rem;
  }
  .tabs {
    gap: 24px;
    margin: 18px 0;
  }
  .tabs button {
    font-size: 0.92rem;
  }
  .topic-heading {
    display: block;
  }
  .topic {
    padding: 26px 0;
  }
  .topic .plain {
    font-size: 1rem;
  }
  .topic p {
    line-height: 1.9;
  }
  .formula {
    padding: 16px;
  }
  .topic-actions button {
    font-size: 0.88rem;
  }
  .question-text {
    font-size: 1rem;
  }
  .option {
    padding: 14px 12px;
  }
  .option.correct,
  .option.wrong {
    padding: 13px 11px;
  }
  .question-actions button {
    font-size: 0.9rem;
  }
  .login {
    margin: 9vh 18px;
  }
  .run-top {
    align-items: flex-start;
  }
  .run-title {
    font-size: 1.13rem;
  }
  .result-stats {
    gap: 24px;
  }
  .charts img {
    max-height: none;
  }
  .form-row {
    font-size: 0.94rem;
  }
  .chapter-meta {
    gap: 10px;
  }
  .history-row {
    align-items: flex-start;
  }
  .topic-number {
    margin-bottom: 7px;
  }
}
@media print {
  header,
  .sidebar,
  .tabs,
  .topic-actions,
  .mobile-chapter,
  .review-toolbar {
    display: none;
  }
  .layout {
    display: block;
  }
  main.content {
    padding: 0;
  }
  .topic {
    break-inside: avoid;
  }
  .charts img {
    max-height: 400px;
  }
}
.timer-status{font-size:.78rem;margin-top:12px;color:var(--accent)}
.notes-index a.active{background:#eaf3f0;font-weight:600;border-left:3px solid var(--accent);padding-left:5px}
.knowledge-test-title{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}
.comparison-table{overflow-x:auto}.comparison-table table{font-size:.9rem;min-width:460px}
.daily-chart{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:18px;margin:34px 0;padding:0 12px}
.day-bar{text-align:center;min-width:0;font-size:.82rem;color:var(--muted)}
.day-bar small{display:block;white-space:nowrap}.bar-track{height:150px;display:flex;align-items:flex-end;justify-content:center;margin:8px 0;border-bottom:1px solid var(--line)}
.bar-track div{width:65%;max-width:52px;min-height:2px;background:var(--accent);border-radius:3px 3px 0 0}
@media(max-width:700px){.tabs{gap:18px;overflow:auto;white-space:nowrap}.tabs button{flex-shrink:0}.daily-chart{gap:8px;padding:0}.result-stats{flex-wrap:wrap}.history-row{flex-wrap:wrap}}
