:root {
  color-scheme: light;
  --ink: #172e29;
  --green: #154e40;
  --mint: #e7eee7;
  --gold: #e8c47e;
  --cream: #f7f6f0;
  --line: #dbdfd5;
  --muted: #55665d;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
a {
  color: var(--green);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #bf8134;
  outline-offset: 3px;
}
input,
textarea,
select {
  background: #fffefa;
  border: 1px solid #a3b0a5;
  color: var(--ink);
  border-radius: 5px;
  min-height: 42px;
  padding: 9px 11px;
  max-width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #3b7660;
  outline-offset: 1px;
}
input[type="radio"],
input[type="checkbox"] {
  min-height: 0;
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}
.skip {
  position: fixed;
  top: -60px;
  left: 12px;
  background: white;
  padding: 12px;
  z-index: 20;
}
.skip:focus {
  top: 8px;
}
.reference-return { margin: 0 0 18px; }
.mast {
  height: 75px;
  background: #fcfbf5;
  border-bottom: 1px solid var(--line);
}
.mast-inner,
main,
footer {
  max-width: 1200px;
  margin: auto;
  padding-left: 38px;
  padding-right: 38px;
}
.mast-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: transparent;
  font-weight: 750;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: 0.04em;
  padding: 0;
}
.symbol {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  transform: skewY(-12deg);
  width: 29px;
  height: 28px;
}
.symbol i {
  display: block;
  width: 7px;
  background: var(--green);
}
.symbol i:first-child {
  height: 16px;
}
.symbol i:nth-child(2) {
  height: 24px;
}
.symbol i:last-child {
  height: 28px;
  background: #99945f;
}
.mast nav {
  display: flex;
  height: 100%;
  gap: 28px;
}
.mast nav button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 3px 1px 0;
}
.mast nav button.active {
  color: var(--green);
  border-color: var(--green);
  font-weight: 700;
}
main {
  min-height: 72vh;
  padding-top: 36px;
  padding-bottom: 50px;
}
main:focus {
  outline: none;
}
footer {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.hero {
  background: #173e34;
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  padding: 46px 52px;
  color: #fffdf0;
  border-radius: 10px;
  overflow: hidden;
  min-height: 375px;
}
.hero-copy {
  z-index: 1;
}
.issue {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #d5dfca;
}
.issue b {
  font:
    italic 29px Georgia,
    serif;
  color: var(--gold);
  border: 1px solid #68836e;
  border-radius: 4px;
  padding: 2px 8px;
}
.issue span {
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.09em;
}
.hero h1 {
  font-family: "Songti SC", "SimSun", serif;
  font-size: clamp(37px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: 0.035em;
  margin: 24px 0 15px;
  font-weight: 700;
}
.hero-copy > p {
  max-width: 480px;
  color: #d6e1d3;
  line-height: 1.8;
  margin: 0 0 26px;
}
.actions,
.case-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #adbaad;
  border-radius: 5px;
  min-height: 40px;
  padding: 8px 16px;
  background: #fffef9;
  color: var(--ink);
  font-weight: 550;
  line-height: 1.45;
}
.button:hover:not(:disabled) {
  background: var(--mint);
  border-color: var(--green);
}
.button.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.button.primary:hover:not(:disabled) {
  background: #0b3b2e;
}
.button.light {
  background: #f2dfad;
  border-color: #f2dfad;
  color: #233a2d;
}
.button.ghost-light {
  border-color: #78948a;
  color: #faffed;
  background: transparent;
}
.button.ghost-light:hover {
  color: var(--ink);
}
.example-link {
  display: inline-block;
  margin-top: 16px;
  color: #f2dfad;
  text-underline-offset: 4px;
}
.paper-art {
  position: relative;
  min-height: 245px;
  display: grid;
  place-items: center;
}
.paper {
  position: absolute;
  width: 57%;
  max-width: 245px;
  height: 88%;
  max-height: 290px;
  border-radius: 1px;
  box-shadow: 7px 14px 27px #0a271e5c;
}
.pback {
  transform: rotate(-13deg) translate(-9%, 4%);
  background: #b8bf9d;
}
.pfront {
  transform: rotate(10deg) translate(6%, -1%);
  background: #eeeadd;
  color: #365143;
  padding: 9% 6.5% 7%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.paper-top {
  width: 27%;
  height: 3px;
  background: #8c947c;
  margin-bottom: 14px;
}
.pfront span {
  font:
    600 clamp(12px, 1.5vw, 19px) "SimSun",
    serif;
  white-space: nowrap;
}
.pfront b {
  width: 80%;
  border-top: 1px solid #a5ad96;
  margin: 12px;
}
.paper-table {
  width: 100%;
  flex: 1;
  border: 1px solid #a2ac97;
  background:
    repeating-linear-gradient(to bottom, transparent 0 14px, #a2ac97 14px 15px),
    linear-gradient(
      to right,
      transparent 0 33%,
      #a2ac97 33% 34%,
      transparent 34% 100%
    );
}
.pfront small {
  align-self: flex-end;
  margin-top: 10px;
  font-size: 9px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
}
.section-title > span,
.muted,
.resource > span:not(.resource-count),
small,
.source {
  color: var(--muted);
}
.section-title > span {
  font-size: 12px;
}
.section-title h2 {
  margin: 30px 0 16px;
}
.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.resource {
  background: #fbfaf4;
  padding: 22px 27px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
  color: var(--ink);
  display: grid;
  grid-template-columns: 78px 1fr 19px;
  column-gap: 13px;
  row-gap: 5px;
  align-items: center;
}
.resource:hover {
  border-color: #718b79;
}
.resource-count {
  grid-row: span 2;
  font:
    37px Georgia,
    serif;
  color: var(--green);
}
.resource-count small {
  font: 12px sans-serif;
}
.resource strong {
  font-size: 18px;
}
.resource > span:not(.resource-count) {
  grid-row: 2;
  grid-column: 2;
  font-size: 13px;
}
.resource i {
  grid-column: 3;
  grid-row: 1 / span 2;
  font-style: normal;
  font-size: 20px;
}
.case-tools {
  margin-top: 18px;
}
.page-heading {
  margin: 20px 0 24px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--green);
  font-weight: 650;
}
.page-heading h1,
.qtitle {
  font-family: "Songti SC", "SimSun", serif;
  font-size: clamp(26px, 3.3vw, 40px);
  line-height: 1.32;
  margin: 10px 0 8px;
}
.page-heading p,
p.muted {
  color: var(--muted);
  line-height: 1.75;
  margin: 5px 0 15px;
}
.steps {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  gap: 0;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #67756b;
  font-size: 13px;
  flex: 1;
  padding: 10px 0;
  border-bottom: 2px solid var(--line);
}
.steps li span {
  font:
    14px Georgia,
    serif;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
}
.steps .current,
.steps .done {
  color: var(--green);
  border-color: #729281;
}
.steps .current {
  font-weight: 700;
  border-color: var(--green);
}
.steps .current span {
  background: var(--green);
  color: white;
}
.flow-layout,
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.panel,
.source-list,
.catalog-list {
  background: #fffef9;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 25px;
}
.panel h2,
.section-title h2,
.source-list strong {
  font-size: 21px;
}
.panel h2 {
  margin: 0 0 12px;
}
.panel h3 {
  margin: 16px 0 5px;
  font-size: 16px;
}
.panel ul,
.notice ul {
  padding-left: 1.4em;
  line-height: 1.72;
}
.qtitle {
  font-size: clamp(23px, 2.6vw, 31px);
  margin: 14px 0 18px;
}
.choices {
  display: grid;
  gap: 9px;
  margin: 12px 0;
}
.choice-hint { margin: 0; color: var(--muted); font-size: 14px; }
.question-basis { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.question-basis summary { cursor: pointer; }
.question-basis p { margin: 6px 0; }
.choice-hint span { display: none; }
.choice-hint:has(+ .choices :focus-visible) span { display: inline; }
.choice:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.choice {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 14px 12px;
  cursor: pointer;
}
.choice:has(:checked) {
  border-color: var(--green);
  background: #edf3e9;
}
.choice small {
  display: block;
}
.spaced {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 25px;
}
.text-answer,
.evidence label,
.filter-label {
  display: grid;
  gap: 8px;
}
.text-answer > span,
.filter-label {
  font-size: 13px;
  color: var(--muted);
}
textarea {
  resize: vertical;
}
.history {
  padding: 0;
  list-style: none;
  max-height: 47vh;
  overflow: auto;
}
.history li {
  border-bottom: 1px solid var(--line);
}
.history button {
  display: grid;
  gap: 3px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 0;
  color: var(--ink);
  width: 100%;
  overflow-wrap: anywhere;
}
.side p,
.side dd,
.side li {
  font-size: 14px;
}
.side dt {
  font-size: 12px;
  color: var(--muted);
}
.side dd {
  margin: 4px 0 16px;
}
.side .actions {
  margin-top: 20px;
}
.notice {
  background: #fbf3d9;
  border-left: 4px solid #b88a3b;
  padding: 13px 17px;
  margin: 12px 0 20px;
  border-radius: 3px;
  color: #5d4b28;
  line-height: 1.65;
}
.notice p {
  margin: 3px 0;
}
.toolbar,
.tabs,
.links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar {
  justify-content: space-between;
  margin: 16px 0;
}
.tabs .button {
  font-size: 13px;
  min-height: 34px;
  padding: 6px 12px;
}
.selected {
  background: var(--mint);
  border-color: #688872;
}
.catalog-list,
.source-list {
  padding: 0 20px;
}
.catalog-list article,
.download-list article,
.source-list a {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.catalog-list article:last-child,
.source-list a:last-child {
  border: 0;
}
.item-id {
  font:
    26px Georgia,
    serif;
  color: #687967;
  min-width: 32px;
}
.catalog-list article div,
.download-list article div,
.source-list a span {
  flex: 1;
}
.catalog-list h3,
.download-list h3 {
  font-size: 16px;
  margin: 0 0 5px;
}
.source-list a {
  text-decoration: none;
}
.source-list small,
.source-list strong {
  display: block;
}
.source-list strong {
  font-size: 17px;
  margin-bottom: 6px;
}
.source {
  font-size: 13px;
}
.group {
  margin-bottom: 16px;
}
.group .eyebrow {
  margin-bottom: 9px;
}
.group > .primary {
  margin-top: 16px;
}
.form-picks > label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.form-picks label span {
  flex: 1;
}
.form-picks small {
  font-size: 11px;
}
.group details {
  font-size: 14px;
  padding: 11px 0;
}
.group summary,
.field-section > summary,
.evidence summary {
  cursor: pointer;
}
.links {
  margin-top: 12px;
}
.editor-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}
.preview {
  position: sticky;
  top: 12px;
  padding: 14px;
}
.preview .section-title h2 {
  margin: 2px 0 12px;
  font-size: 16px;
}
.preview iframe {
  width: 100%;
  height: 68vh;
  border: 1px solid var(--line);
  background: #fff;
}
.editor {
  padding: 20px;
}
.editor h2 {
  margin-top: 8px;
}
.filter-label {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin: 14px 0;
}
.field-section {
  border-top: 1px solid var(--line);
}
.field-section > summary {
  padding: 13px 0;
  font-weight: 650;
}
.field-section > summary small {
  float: right;
  font-weight: 400;
}
.field-row {
  border-top: 1px dashed var(--line);
  padding: 12px 0;
  overflow-wrap: anywhere;
}
.field-row > input,
.field-row > textarea,
.field-row > select,
.evidence input {
  display: block;
  width: 100%;
}
.field-label,
.field-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0 7px;
}
.field-label strong {
  flex: 1;
  font-size: 14px;
}
.status {
  font-size: 11px;
  color: #4e6554;
  background: #edf0e6;
  padding: 2px 5px;
  border-radius: 3px;
}
.field-meta {
  justify-content: space-between;
  margin-top: 6px;
}
.field-meta small,
.evidence small,
.reserved {
  font-size: 12px;
  color: var(--muted);
}
.mini {
  font-size: 12px;
  min-height: 28px;
  padding: 3px 7px;
}
.evidence {
  font-size: 12px;
  color: var(--muted);
}
.evidence label {
  margin-top: 6px;
}
.conflict,
.error {
  font-size: 12px;
  color: #8d502f;
}
.conflict button {
  margin-left: 4px;
}
.dock {
  margin-top: 22px;
  justify-content: space-between;
}
.download-list {
  margin: 0 0 20px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 430px;
  color: var(--ink);
  padding: 22px;
}
dialog::backdrop {
  background: #162c2580;
}
#status {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #173e34;
  color: white;
  border-radius: 5px;
  max-width: 92vw;
  padding: 11px 16px;
  z-index: 9;
  opacity: 0;
  pointer-events: none;
}
#status.visible {
  opacity: 1;
}
@media (max-width: 800px) {
  .mast-inner,
  main,
  footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .hero {
    padding: 30px;
    grid-template-columns: 1.3fr 0.8fr;
  }
  .pfront {
    width: 78%;
    height: 68%;
  }
  .pback {
    width: 78%;
    height: 68%;
  }
  .flow-layout,
  .editor-grid {
    grid-template-columns: 1fr;
  }
  .preview {
    position: static;
  }
  .resource {
    grid-template-columns: 1fr 20px;
    padding: 17px;
  }
  .resource-count {
    grid-column: 1;
    grid-row: 1;
  }
  .resource strong {
    grid-row: 2;
  }
  .resource > span:not(.resource-count) {
    grid-row: 3;
    grid-column: 1;
  }
  .resource i {
    grid-column: 2;
  }
  .side {
    order: 2;
  }
}
@media (max-width: 550px) {
  main {
    padding-top: 18px;
  }
  .mast {
    height: auto;
  }
  .mast-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 12px;
    gap: 8px;
  }
  .brand {
    font-size: 17px;
  }
  .mast nav {
    gap: 22px;
  }
  .mast nav button {
    font-size: 13px;
    padding: 6px 0 9px;
  }
  .hero {
    padding: 25px 20px;
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .paper-art {
    display: none;
  }
  .hero h1 {
    font-size: 39px;
  }
  .hero-copy > p {
    font-size: 14px;
  }
  .resource-grid {
    gap: 10px;
  }
  .resource-count {
    font-size: 28px;
  }
  .resource strong {
    font-size: 15px;
  }
  .resource > span:not(.resource-count) {
    font-size: 12px;
  }
  .section-title {
    align-items: baseline;
  }
  .section-title > span {
    font-size: 10px;
  }
  .steps li {
    font-size: 11px;
    gap: 4px;
  }
  .steps li span {
    width: 18px;
    height: 18px;
    font-size: 12px;
  }
  .panel {
    padding: 16px;
  }
  .catalog-list article,
  .download-list article {
    gap: 8px;
  }
  .download-list .button {
    padding: 6px;
  }
  .tabs,
  .actions {
    gap: 6px;
  }
  .page-heading {
    margin: 14px 0;
  }
  .preview iframe {
    height: 420px;
  }
  footer {
    gap: 10px;
    font-size: 10px;
  }
  .flow-layout {
    gap: 12px;
  }
  .toolbar label {
    font-size: 12px;
  }
  .editor .field-meta {
    flex-wrap: wrap;
  }
  .section-title h2 {
    font-size: 18px;
  }
  .actions .button {
    font-size: 13px;
  }
  .qtitle {
    font-size: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.answer-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.answer-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 15px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  min-width: 0;
}
.answer-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}
.answer-row legend,
.answer-index summary {
  font-size: 13px;
  color: var(--green);
}
.answer-row button {
  justify-self: start;
}
@media (max-width: 550px) {
  .answer-row {
    grid-template-columns: 1fr;
  }
}
.narrative-trigger {
  justify-self: start;
  margin-block: 0.25rem;
}
.narrative-dialog {
  width: min(42rem, calc(100vw - 2rem));
  max-height: 88vh;
  overflow: auto;
}
.narrative-dialog fieldset {
  min-width: 0;
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid #c5cec5;
  border-radius: 0.45rem;
}
.narrative-dialog fieldset legend {
  padding: 0 0.3rem;
  font-weight: 650;
}
.narrative-dialog label {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
}
.narrative-dialog textarea,
.narrative-dialog input:not([type="checkbox"]) {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 0.55rem;
  font: inherit;
  color: inherit;
  border: 1px solid #9ba89e;
  border-radius: 0.3rem;
}
.narrative-dialog .fact-check {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0;
}
.narrative-dialog .fact-check input {
  width: 1.05rem;
  height: 1.05rem;
}
.narrative-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #eff4ed;
  padding: 0.85rem 1rem;
  border-radius: 0.3rem;
}
.receipt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.4rem;
}
.receipt label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
}
