:root {
  color-scheme: light;
  --ink: #1c302f;
  --muted: #647773;
  --line: #dce5df;
  --paper: #fff;
  --canvas: #f6f7f2;
  --green: #285e53;
  --green2: #1e4e45;
  --mint: #e7f2ec;
  --gold: #ba8441;
  --sand: #faf3e7;
  --red: #a84237;
  --shadow: 0 12px 36px rgba(37, 66, 54, 0.065);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.65;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 8;
  backdrop-filter: blur(12px);
}
.topbar-inner {
  max-width: 1180px;
  margin: auto;
  min-height: 70px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  line-height: 1.25;
}
.brand:hover {
  text-decoration: none;
}
.brand b {
  font-size: 15px;
  display: block;
  letter-spacing: 0.02em;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-top: 3px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--green);
  color: #fff;
  border-radius: 12px;
  font-family: serif;
  font-size: 21px;
}
.shell {
  max-width: 1180px;
  padding: 36px 24px 90px;
  margin: 0 auto;
}
.narrow {
  max-width: 610px;
  margin: 24px auto;
}
.hero {
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 12px;
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero h1 {
  font-family: Georgia, 'Songti SC', 'STSong', serif;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  font-size: clamp(28px, 4vw, 43px);
  margin: 9px 0 12px;
}
.hero p {
  color: var(--muted);
  margin: 0;
  max-width: 720px;
}
.intro {
  padding: 14px 18px;
  background: var(--mint);
  border-radius: 12px;
  color: #315d50;
  font-size: 14px;
  margin: 18px 0;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 16px 0;
}
.card > h2:first-child,
.card > h3:first-child {
  margin-top: 0;
}
.card h2,
.card h3 {
  line-height: 1.35;
}
.card h2 {
  font-size: 21px;
}
.card h3 {
  font-size: 17px;
}
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2,
.section-head h3 {
  margin: 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.tiny {
  font-size: 12px;
}
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--mint);
  color: #326755;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.gold {
  background: var(--sand);
  color: #926427;
}
.badge.gray {
  background: #eef1ef;
  color: #65736d;
}
.badge.red {
  background: #fbeee9;
  color: #a34d3e;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.field {
  display: block;
  margin: 0 0 16px;
}
.form-grid .field {
  margin: 0;
}
.field > span {
  display: block;
  font-weight: 650;
  font-size: 14px;
  margin-bottom: 6px;
}
.field small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
  line-height: 1.5;
}
.field input,
.field select,
.field textarea,
input.control,
select.control {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd9d0;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  outline: none;
  line-height: 1.45;
}
.field textarea {
  min-height: 100px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
select.control:focus {
  border-color: #5b9482;
  box-shadow: 0 0 0 3px rgba(65, 128, 105, 0.12);
}
.field :disabled {
  background: #f5f7f5;
  color: #566762;
  opacity: 1;
}
.buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.btn {
  border: 1px solid transparent;
  background: var(--green);
  color: white;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  min-height: 42px;
}
.btn:hover {
  background: var(--green2);
  text-decoration: none;
}
.btn.secondary {
  background: #fff;
  color: var(--green);
  border-color: #b9cec2;
}
.btn.secondary:hover {
  background: #f2f8f4;
}
.btn.quiet {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn.quiet:hover {
  background: #edf3ef;
  color: var(--green);
}
.btn.smallbtn {
  padding: 7px 11px;
  min-height: 36px;
  font-size: 13px;
}
.hint {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0;
}
.callout {
  padding: 14px 16px;
  border-radius: 11px;
  background: var(--sand);
  color: #6d5739;
  font-size: 14px;
  margin: 14px 0;
}
.error {
  color: var(--red);
  font-size: 14px;
  margin: 12px 0;
}
.lead {
  text-wrap: pretty;
}
.steps {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 8px;
  margin: 16px 0 24px;
}
.step {
  flex: 1;
  min-width: 125px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}
.step b {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.step.active {
  border-color: #a6ccbb;
  background: var(--mint);
}
.step .num {
  font-size: 10px;
  letter-spacing: 0.1em;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(250px, 0.8fr);
  gap: 20px;
  align-items: start;
}
.split > .card {
  margin-top: 0;
}
.material-list details,
.teacher-notes details {
  border: 1px solid var(--line);
  border-radius: 13px;
  margin: 12px 0;
  background: #fff;
  overflow: hidden;
}
.material-list summary,
.teacher-notes summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.material-list summary:after,
.teacher-notes summary:after {
  content: '＋';
  margin-left: auto;
  color: var(--muted);
}
.material-list details[open] summary:after,
.teacher-notes details[open] summary:after {
  content: '−';
}
.material-body {
  padding: 2px 16px 16px;
  border-top: 1px solid #edf1ee;
}
.source {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0;
}
.material-no {
  background: var(--mint);
  color: var(--green);
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}
.clause {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f0;
  font-size: 14px;
}
.clause:last-child {
  border-bottom: 0;
}
.clause b {
  color: #507568;
  font-size: 13px;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 10px;
}
.table-wrap table {
  border-collapse: collapse;
  min-width: 580px;
  width: 100%;
  font-size: 13px;
  text-align: left;
}
.table-wrap th,
.table-wrap td {
  vertical-align: top;
  padding: 9px 10px;
  border-bottom: 1px solid #e9eeea;
  line-height: 1.5;
}
.table-wrap tr:last-child td {
  border-bottom: 0;
}
.table-wrap th {
  background: #f2f7f3;
  white-space: nowrap;
}
.draft-dl {
  margin: 0;
}
.draft-dl div {
  padding: 10px 0;
  border-bottom: 1px solid #edf1ee;
}
.draft-dl div:last-child {
  border: 0;
}
.draft-dl dt {
  font-weight: 700;
  font-size: 13px;
  color: var(--green);
  margin-bottom: 3px;
}
.draft-dl dd {
  margin: 0;
  font-size: 14px;
}
.claim {
  border-left: 3px solid var(--gold);
  background: #fbf8f0;
  padding: 14px 16px;
  margin: 14px 0;
  border-radius: 0 9px 9px 0;
}
.locked {
  border: 1px dashed #cfdcd3;
  background: #f8faf8;
  color: var(--muted);
  border-radius: 12px;
  padding: 17px;
  margin: 14px 0;
}
.answer-card {
  scroll-margin-top: 85px;
}
.statusline {
  font-size: 12px;
  color: var(--muted);
  min-height: 22px;
}
.response {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.response-list {
  display: grid;
  gap: 12px;
}
.response-item {
  background: #f8faf8;
  border-radius: 10px;
  padding: 12px 14px;
}
.response-item b {
  display: block;
  font-size: 12px;
  color: var(--green);
  margin-bottom: 4px;
}
.response-item div {
  font-size: 14px;
}
.team-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}
.team {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
}
.team h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.team .metrics {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.team .field {
  margin: 12px 0 0;
}
.team .field select {
  padding: 8px;
  font-size: 13px;
}
.people-list {
  display: grid;
  gap: 8px;
}
.person-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.recursive {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.recursive dt {
  font-weight: 700;
  color: var(--green);
  margin-top: 14px;
}
.recursive dd {
  margin: 3px 0 0 12px;
}
.recursive ul,
.recursive ol {
  padding-left: 21px;
}
.recursive li {
  margin: 6px 0;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #173c34;
  color: white;
  padding: 10px 17px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 20;
  box-shadow: var(--shadow);
  max-width: 90vw;
}
.toast.bad {
  background: #9b3b31;
}
.loading {
  text-align: center;
  color: var(--muted);
  padding: 80px 0;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.check input {
  width: 18px;
  height: 18px;
}
.footer-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 24px;
}
.answer-card form {
  margin-top: 12px;
}
.number-box {
  max-width: 180px;
}
.top-actions {
  display: flex;
  gap: 6px;
}
.inline-code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.08em;
}
.no-wrap {
  white-space: nowrap;
}
@media (max-width: 700px) {
  .topbar-inner {
    padding: 10px 16px;
    min-height: 62px;
  }
  .brand b {
    font-size: 13px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  .shell {
    padding: 25px 15px 70px;
  }
  .narrow {
    margin: 10px auto;
  }
  .card {
    padding: 18px;
    border-radius: 15px;
  }
  .hero h1 {
    font-size: 29px;
  }
  .split {
    display: block;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .team-list {
    grid-template-columns: 1fr;
  }
  .clause {
    grid-template-columns: 65px minmax(0, 1fr);
    gap: 7px;
  }
  .btn {
    min-height: 44px;
  }
  .section-head {
    flex-wrap: wrap;
  }
  .steps {
    margin-left: -1px;
    margin-right: -1px;
  }
  .step {
    min-width: 116px;
  }
  .top-actions .btn {
    font-size: 12px;
    padding: 7px;
  }
  .recursive dd {
    margin-left: 7px;
  }
}
