:root {
  color-scheme: light;
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
  color: #25352c;
  background: #f8f6ef;
  --forest: #213a30;
  --accent: #375e49;
  --ink: #25352c;
  --muted: #5a665d;
  --rule: #e3e1d6;
  --paper: #fffef9;
  --serif: 'Noto Serif CJK SC', 'Songti SC', 'SimSun', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, textarea:focus-visible {
  outline: 2px solid #52745d;
  outline-offset: 3px;
}
button, a { -webkit-tap-highlight-color: transparent; }

.site-header { background: var(--forest); color: #faf8ed; }
.header-inner {
  max-width: 1150px;
  margin: auto;
  min-height: 70px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .08em;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border: 1px solid #849888;
  border-radius: 8px;
  display: grid;
  align-content: center;
  justify-content: start;
  padding-left: 7px;
  gap: 3px;
}
.brand-mark i { display: block; height: 2px; border-radius: 2px; width: 15px; background: #d6e0cb; }
.brand-mark i:nth-child(2) { width: 12px; }
.brand-mark i:nth-child(3) { width: 9px; }
.brand-separator { display: inline-block; width: 7px; }
.header-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 5px 13px;
  color: #f2f2e7;
  background: transparent;
  border: 1px solid #698073;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
}
.header-button:hover { background: #344d40; }
.header-button:focus-visible, .brand:focus-visible { outline-color: #d6e0cb; }
.review-icon { position: relative; width: 13px; height: 12px; border: 1px solid #bdcdbd; border-radius: 2px; }
.review-icon::after { content: ''; position: absolute; inset: 3px 2px; border-block: 1px solid #bdcdbd; }
.review-count { min-width: 17px; font-size: 11px; text-align: center; border-radius: 10px; color: #233b30; background: #e4e9d9; }

.shell { max-width: 1150px; margin: auto; padding: 0 30px; }
.intro { padding: 54px 0 35px; border-bottom: 1px solid #dcded0; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
  color: var(--accent);
}
.eyebrow span { width: 3px; height: 3px; border-radius: 50%; background: #7f927f; }
h1 { font: 800 clamp(44px, 5.6vw, 70px)/1.15 var(--serif); margin: 0; letter-spacing: .02em; color: #22392f; }
.heading-period { color: #82977a; margin-left: 4px; }
.intro-copy { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.workspace { display: grid; grid-template-columns: 229px minmax(0, 1fr); align-items: start; gap: 32px; padding: 28px 0 0; }
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 17px 13px 19px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #fbfaf4;
}
.sidebar-heading, .progress-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sidebar-heading { padding: 2px 7px 14px; }
.sidebar-heading h2, .progress-heading { margin: 0; font-size: 13px; font-weight: 700; }
.sidebar-heading > span { font-size: 12px; color: var(--muted); }
#sections { display: grid; gap: 5px; }
.section-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 12px;
  gap: 9px;
  align-items: center;
  text-align: left;
  width: 100%;
  min-height: 60px;
  padding: 7px 9px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
}
.section-button:hover { background: #f1f1e8; }
.section-button[aria-current] { background: #e8eddf; border-color: #d9e3d2; }
.section-number {
  display: grid;
  place-items: center;
  width: 29px;
  height: 31px;
  background: #f0efe7;
  border-radius: 6px;
  font-size: 11px;
  color: #526154;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.section-button[aria-current] .section-number { background: #3a5b47; color: #fffdf4; }
.section-words { display: grid; gap: 3px; }
.section-words strong { font-size: 14px; }
.section-words small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.section-arrow { color: #627665; font-size: 20px; text-align: right; }
.progress-block { margin: 16px 7px 0; padding-top: 16px; border-top: 1px solid var(--rule); }
.progress-heading { font-size: 12px; margin-bottom: 8px; }
#progress-count { color: var(--muted); font-variant-numeric: tabular-nums; }
progress { appearance: none; width: 100%; height: 6px; border: 0; border-radius: 4px; background: #e8e8df; overflow: hidden; display: block; }
progress::-webkit-progress-bar { background: #e8e8df; }
progress::-webkit-progress-value { background: #618169; }
progress::-moz-progress-bar { background: #618169; }

.practice { min-width: 0; }
.practice-heading, .answer-top, .answer-actions, .prompt-top, .detail-heading, .dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.practice-heading { margin-bottom: 12px; color: #485d50; font-size: 13px; font-weight: 700; }
.question-navigation { display: flex; align-items: center; gap: 10px; flex: none; }
#position { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.icon-button {
  width: 33px;
  height: 33px;
  padding: 0 0 2px;
  display: grid;
  place-content: center;
  color: #40584a;
  background: var(--paper);
  border: 1px solid #dadfd3;
  border-radius: 7px;
  font-size: 22px;
  line-height: 1;
}
.icon-button:hover:not(:disabled) { background: #e8eddf; }
.icon-button:disabled { color: #767e73; background: #f4f3eb; }
.prompt-card, .answer-card, .detail-card { border-radius: 12px; }
.prompt-card { padding: 18px 25px 23px; background: #eff1e7; border: 1px solid #e0e5d8; border-left: 3px solid #66826b; }
.prompt-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--accent); }
.prompt-card h2 { margin: 12px 0 0; font: 650 clamp(21px, 2.25vw, 26px)/1.65 var(--serif); color: #22382d; overflow-wrap: anywhere; text-wrap: pretty; }
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.secondary-button { color: var(--muted); }
.bookmark-button { white-space: nowrap; }
.bookmark-icon { width: 10px; height: 13px; border: 1px solid currentColor; border-radius: 2px 2px 4px 4px; }
.bookmark-button[aria-pressed='true'] .bookmark-icon { background: currentColor; }
.answer-card, .detail-card { margin-top: 14px; padding: 19px 25px; background: var(--paper); border: 1px solid var(--rule); }
.answer-top { margin-bottom: 8px; }
.answer-top label { font-size: 15px; font-weight: 700; }
.answer-tools { display: flex; align-items: center; gap: 15px; }
.hint-icon { display: inline-grid; place-content: center; border: 1px solid currentColor; border-radius: 50%; width: 14px; height: 14px; font-size: 10px; }
.hint { margin: 0 0 10px; border-radius: 5px; padding: 9px 12px; background: #f3f0e2; color: #5e5036; font-size: 13px; line-height: 1.6; }
textarea {
  display: block;
  width: 100%;
  min-height: 123px;
  resize: vertical;
  padding: 12px 14px;
  background: #fbfaf5;
  border: 1px solid #dedfd4;
  border-radius: 8px;
  color: var(--ink);
  font: 17px/1.65 Georgia, serif;
  overflow-wrap: break-word;
}
textarea::placeholder { color: #6f786f; }
textarea[aria-invalid='true'] { border-color: #ab5a48; }
.error { margin: 8px 0 0; color: #9b402f; font-size: 13px; }
.answer-actions { margin-top: 13px; }
.answer-links, .submit-action { display: flex; align-items: center; gap: 13px; }
.word-count, .shortcut { color: var(--muted); font-size: 12px; white-space: nowrap; }
.word-count { border-left: 1px solid #e0e0d7; padding-left: 13px; }
.shortcut { letter-spacing: .03em; }
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid #2d4939;
  border-radius: 7px;
  background: #2d4939;
  color: #fdfcf4;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.primary-button:hover { background: #3b5c48; }
.primary-button:disabled { background: #687a6c; border-color: #687a6c; }
.primary-button span { font-size: 17px; line-height: 1; }
.detail-heading h2, .dialog-heading h2 { margin: 0; font-size: 17px; line-height: 1.5; }
.result-count { background: #ecf0e5; color: #405e49; padding: 4px 9px; border-radius: 5px; font-size: 12px; flex: none; }
.codex-feedback { margin-top: 13px; padding: 11px 12px; background: #f2f5eb; border: 1px solid #dce4d7; border-radius: 7px; }
.codex-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; }
.detail-card .codex-heading h3 { margin: 0; }
.codex-feedback > p { margin: 0; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.codex-feedback ul { margin-top: 8px; }
.original-annotations, .codex-criteria { margin-block: 12px; }
.codex-feedback h4 { margin: 0 0 6px; font-size: 13px; }
#annotated-answer {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dfe5d8;
  border-radius: 6px;
  background: var(--paper);
  font: 17px/1.8 Georgia, serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.answer-mark {
  color: #682d20;
  background: #f9e2db;
  border-radius: 3px;
  padding: .04em .12em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.answer-mark[data-kind='suggestion'] { color: #5e471c; background: #f6ebcd; text-decoration-style: dotted; }
.answer-mark.annotation-active, .answer-mark:hover { outline: 1px solid currentColor; }
.answer-insertion { margin-inline: .15em; text-decoration: none; }
.answer-insertion::before { content: '+'; font: 700 .9em system-ui, sans-serif; }
.codex-criteria dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.codex-criteria dl > div { background: var(--paper); border: 1px solid #dfe5d8; border-radius: 6px; padding: 7px 9px; }
.codex-criteria dt { font-size: 12px; font-weight: 700; }
.codex-criteria dd { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.codex-issue { padding: 6px 8px; border-radius: 3px; }
.codex-issue.annotation-active { background: var(--paper); border-color: #9d6941; }
.issue-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 3px; }
.issue-kind { border-radius: 4px; padding: 1px 6px; color: #682d20; background: #f9e2db; font-size: 11px; }
.issue-kind[data-kind='suggestion'] { color: #5e471c; background: #f6ebcd; }
.issue-locate { margin-left: auto; min-height: 28px; }
.codex-correction { display: inline-block; margin-left: 7px; color: var(--accent); overflow-wrap: anywhere; }
.codex-correction::before { content: '→ '; }
.feedback-summary { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 9px 0 12px; }
.check-list, .suggestion-list { margin: 0; padding: 0; list-style: none; }
.check-list { display: grid; gap: 6px; }
.check-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: start; gap: 8px; border-radius: 6px; background: #f3f5ed; padding: 7px 9px; font-size: 13px; line-height: 1.6; }
.check-list li.needs-review { background: #f7f3e7; }
.point-icon { color: var(--accent); font-weight: 750; }
.needs-review .point-icon { color: #796139; }
.point-status { color: var(--muted); font-size: 12px; white-space: nowrap; }
.detail-card h3 { margin: 17px 0 9px; font-size: 13px; }
.suggestion-list { display: grid; gap: 9px; }
.suggestion { border-left: 2px solid #a58b57; padding-left: 9px; font-size: 13px; line-height: 1.65; }
.suggestion q { margin-left: 7px; overflow-wrap: anywhere; color: #6b5039; }
.suggestion p { margin: 1px 0 0; color: var(--muted); }
.issue-reference { padding-top: 3px; font-size: 12px; }
.feedback-actions { margin-top: 15px; display: flex; justify-content: space-between; gap: 10px; }
.reference-card { border-color: #dce4d7; background: #f2f5eb; }
.reference-text { margin: 9px 0 0; font: 17px/1.65 Georgia, serif; overflow-wrap: anywhere; }
.status { margin: 0; font-size: 13px; color: var(--muted); }
.status:not(:empty) { margin-top: 12px; }
#startup-status a { color: var(--accent); }
#revision-note { margin-bottom: 0; }
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 32px 0 0;
  padding: 10px 0 16px;
}

dialog { width: min(540px, calc(100% - 28px)); max-height: 80dvh; padding: 20px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #172b22a3; }
#review-empty { color: var(--muted); font-size: 14px; margin: 12px 0 4px; }
#reset-description { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 10px 0 15px; }
.reset-actions { display: flex; align-items: center; justify-content: flex-end; gap: 17px; }
#review-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
#review-list:not(:empty) { margin-top: 12px; }
.review-item { width: 100%; border: 1px solid #e1e6d9; border-radius: 7px; padding: 8px 10px; text-align: left; background: #f6f7ef; color: var(--ink); font-size: 14px; line-height: 1.55; }
.review-item:hover { background: #e8eddf; }
.review-item-title { display: block; color: var(--accent); font-size: 12px; font-weight: 700; margin-bottom: 3px; }

@media (max-width: 800px) {
  .workspace { grid-template-columns: 192px minmax(0, 1fr); gap: 18px; }
  .header-inner, .shell { padding-inline: 21px; }
  .prompt-card, .answer-card, .detail-card { padding-inline: 18px; }
}
@media (max-width: 640px) {
  .header-inner, .shell { padding-inline: 15px; }
  .header-inner { min-height: 58px; }
  .brand { font-size: 14px; gap: 8px; }
  .intro { padding: 24px 0 19px; }
  .intro-copy { margin-top: 9px; font-size: 14px; }
  .workspace { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding-top: 13px; }
  .sidebar { padding: 10px; }
  .sidebar-heading { padding: 2px 4px 8px; }
  #sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-button { min-height: 49px; }
  .progress-block { margin: 8px 4px 0; padding-top: 8px; }
  .prompt-card, .answer-card, .detail-card { padding-inline: 14px; }
  .prompt-card h2 { margin-top: 7px; }
  .codex-criteria dl { grid-template-columns: 1fr; }
  .shortcut { display: none; }
  footer { margin-top: 23px; }
}
@media (max-width: 360px) {
  .section-button { grid-template-columns: 27px minmax(0, 1fr); gap: 7px; }
  .section-arrow { display: none; }
  .answer-links { gap: 8px; }
  .word-count { padding-left: 8px; }
  .question-navigation { gap: 6px; }
}
