:root {
  --teal-950: #123b39;
  --teal-800: #225c57;
  --teal-100: #dce9e3;
  --ivory-50: #fbf7ed;
  --ivory-100: #f3ecdd;
  --ink: #253430;
  --muted: #68736d;
  --coral: #cf6d5a;
  --coral-soft: #f8dfd6;
  --line: rgba(18, 59, 57, .19);
  --paper-shadow: 0 24px 70px rgba(20, 48, 43, .12);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: var(--ivory-100);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 9% 8%, rgba(207, 109, 90, .10), transparent 28rem),
    linear-gradient(115deg, rgba(18, 59, 57, .045) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--ivory-100);
}

button,
input { font: inherit; }

a { color: inherit; }

.folio-shell {
  width: min(100% - 28px, 760px);
  margin: clamp(18px, 5vw, 54px) auto;
  padding: clamp(26px, 6vw, 64px);
  overflow: hidden;
  background: var(--ivory-50);
  border: 1px solid rgba(18, 59, 57, .13);
  border-radius: 6px 32px 8px 22px;
  box-shadow: var(--paper-shadow);
  position: relative;
}

.folio-shell::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(18, 59, 57, .06);
  border-radius: 3px 24px 4px 16px;
  pointer-events: none;
}

.folio-header { position: relative; padding-right: 92px; }
.folio-header.compact { padding-bottom: 4px; }

.folio-kicker,
.eyebrow {
  margin: 0 0 13px;
  color: var(--teal-800);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.folio-kicker span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  place-items: center;
  color: var(--ivory-50);
  background: var(--coral);
  border-radius: 50% 46% 52% 43%;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--teal-950);
  font-family: STSong, "Songti SC", SimSun, serif;
  font-weight: 700;
}

h1 {
  max-width: 580px;
  margin-bottom: 13px;
  font-size: clamp(2rem, 7vw, 3.65rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}

h2 { margin-bottom: 9px; font-size: clamp(1.55rem, 5vw, 2.25rem); line-height: 1.22; }
h3 { margin-bottom: 6px; font-size: 1.25rem; }

.folio-intro,
.field-hint,
.manager-note p {
  color: var(--muted);
  line-height: 1.75;
}

.folio-intro { margin: 0; }

.koala-accent {
  position: absolute;
  top: -8px;
  right: -8px;
  width: clamp(72px, 15vw, 104px);
  height: auto;
  object-fit: contain;
  filter: saturate(.78) contrast(.96);
}

.progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: clamp(34px, 7vw, 58px) 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.progress li {
  min-width: 0;
  padding: 15px 8px 0 0;
  color: var(--muted);
  font-size: clamp(.68rem, 2.5vw, .82rem);
  line-height: 1.45;
  position: relative;
}

.progress li::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--ivory-50);
  border: 2px solid #91a29a;
  border-radius: 50%;
}

.progress span { display: block; margin-bottom: 3px; font-family: Georgia, serif; font-size: .72rem; }

.progress .is-active { color: var(--teal-950); font-weight: 700; }
.progress .is-active::before { background: var(--coral); border-color: var(--coral); box-shadow: 0 0 0 5px var(--coral-soft); }
.progress .is-complete::before { background: var(--teal-800); border-color: var(--teal-800); }

.folio-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: clamp(14px, 4vw, 30px);
  padding: clamp(24px, 5vw, 42px);
  background: rgba(255, 255, 255, .52);
  border: 1px solid var(--line);
  border-radius: 3px 25px 4px 18px;
}

.section-number {
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
}

.section-copy { min-width: 0; }

.official-boundary {
  margin: 0 0 28px;
  padding: 17px 18px;
  color: #4b3934;
  background: var(--coral-soft);
  border-left: 4px solid var(--coral);
  border-radius: 2px 12px 2px 8px;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.72;
}

form { margin-top: 24px; }
label { display: block; margin-bottom: 9px; font-size: .88rem; font-weight: 700; }

input[type="text"] {
  width: 100%;
  min-height: 54px;
  padding: 12px 15px;
  color: var(--teal-950);
  background: #fffdf8;
  border: 1px solid #879990;
  border-radius: 3px 12px 3px 9px;
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

button,
.button-link {
  display: inline-flex;
  min-height: 52px;
  margin-top: 18px;
  padding: 0 22px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--ivory-50);
  background: var(--teal-950);
  border: 2px solid var(--teal-950);
  border-radius: 3px 15px 3px 10px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease;
}

button:hover,
.button-link:hover { background: var(--teal-800); transform: translateY(-1px); }

.button-link.secondary { color: var(--teal-950); background: transparent; }

.manager-actions {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.manager-action {
  display: grid;
  min-height: 82px;
  padding: 15px 16px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  color: var(--teal-950);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 3px 16px 3px 11px;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.manager-action:hover {
  transform: translateY(-1px);
  border-color: var(--teal-800);
  background: #fff;
}

.manager-action.is-primary {
  color: var(--ivory-50);
  background: var(--teal-950);
  border-color: var(--teal-950);
}

.manager-action-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--ivory-50);
  background: var(--coral);
  border-radius: 50% 45% 52% 44%;
  font-family: STSong, "Songti SC", SimSun, serif;
  font-weight: 700;
}

.manager-action strong,
.manager-action small { display: block; }
.manager-action strong { font-size: 1rem; }
.manager-action small { margin-top: 5px; color: var(--muted); line-height: 1.45; }
.manager-action.is-primary small { color: var(--teal-100); }
.manager-action-arrow { color: var(--coral); font-size: 1.35rem; font-weight: 700; }
.manager-logout { margin-top: 12px; }

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.form-message,
.status-panel {
  margin: 20px 0;
  padding: 17px 18px;
  border-radius: 2px 12px 2px 8px;
  font-weight: 700;
  line-height: 1.7;
}

.form-message,
.status-panel.is-coral { color: #5b3932; background: var(--coral-soft); border-left: 4px solid var(--coral); }
.status-panel.is-teal { color: var(--teal-950); background: var(--teal-100); border-left: 4px solid var(--teal-800); }

.choice-grid { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }

.choice-card {
  display: grid;
  min-height: 68px;
  margin: 0;
  padding: 14px 16px;
  grid-template-columns: 24px 1fr;
  gap: 13px;
  align-items: center;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 3px 13px 3px 9px;
  cursor: pointer;
}

.choice-card:has(input:focus-visible) { outline: 3px solid var(--coral); outline-offset: 3px; }
.choice-card:has(input:checked) { background: var(--teal-100); border-color: var(--teal-800); }
.choice-card input { width: 22px; height: 22px; margin: 0; accent-color: var(--teal-800); }
.choice-card strong,
.choice-card small { display: block; }
.choice-card small { margin-top: 4px; color: var(--muted); font-weight: 400; }

.ocr-form,
.details-form { display: grid; gap: 18px; margin-top: 22px; }
.ocr-form legend { margin-bottom: 10px; font-weight: 700; }
.file-field,
.consent-card { display: grid; gap: 10px; padding: 16px; background: #fffdf8; border: 1px solid var(--line); border-radius: 3px 13px 3px 9px; }
.file-field input { width: 100%; }
.consent-card { grid-template-columns: 24px 1fr; line-height: 1.7; }
.consent-card input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--teal-800); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.manual-link { margin-top: 18px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-grid label { display: grid; gap: 7px; font-weight: 700; }
.field-grid input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 3px 10px 3px 8px; background: #fffdf8; color: var(--ink); font: inherit; }
.review-list { display: grid; gap: 0; margin: 24px 0; border-top: 1px solid var(--line); }
.review-list div { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr); gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.review-list dt { color: var(--muted); font-size: .85rem; }
.review-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.signature-form { display: grid; gap: 18px; }
.declaration-box,
.signature-box { padding: 20px; background: #fffdf8; border: 1px solid var(--line); border-radius: 3px 15px 3px 10px; }
.declaration-box > p { line-height: 1.9; }
.signature-heading-row { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.signature-heading-row h3,
.signature-heading-row p { margin: 0; }
.signature-box canvas { display: block; width: 100%; height: auto; margin-top: 14px; background: white; border: 2px dashed var(--teal-800); border-radius: 3px 12px 3px 9px; cursor: crosshair; }
.text-button { min-height: 42px; padding: 8px 12px; color: var(--teal-950); background: transparent; }

.admin-watermark {
  width: min(1180px, calc(100% - 28px));
  margin: 10px auto;
  overflow: hidden;
  color: rgba(12, 45, 42, .38);
  font-size: .68rem;
  letter-spacing: .09em;
  text-align: center;
  white-space: nowrap;
}

.record-card { margin-top: 16px; }
.record-card .section-copy { min-inline-size: 0; }
.record-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 22px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.record-row + .record-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.record-row p { margin: 0; overflow-wrap: anywhere; line-height: 1.65; }
.copy-source {
  position: fixed;
  inset-inline-start: -10000px;
  width: 2px;
  height: 2px;
  opacity: .01;
}

.manager-note {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  margin-top: 38px;
  padding-top: 28px;
  align-items: center;
  border-top: 1px dashed var(--line);
}

.manager-note p { margin: 0; }
.manager-note img { width: 136px; max-width: 100%; height: auto; padding: 7px; background: white; border: 1px solid var(--line); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

footer {
  margin-top: 32px;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .08em;
  text-align: center;
}

.reveal { animation: folio-enter 520ms cubic-bezier(.2, .7, .2, 1) both; }
.reveal-delay { animation-delay: 80ms; }
.reveal-late { animation-delay: 150ms; }

@keyframes folio-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .folio-shell { width: calc(100% - 16px); margin: 8px auto; padding: 28px 20px; border-radius: 4px 20px 5px 15px; }
  .folio-header { padding-right: 58px; }
  .koala-accent { right: -11px; width: 72px; }
  .folio-card { grid-template-columns: 1fr; padding: 24px 18px; }
  .section-number { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .progress li { padding-right: 5px; }
  .manager-note { grid-template-columns: 1fr; }
  .manager-note img { width: 120px; }
  .field-grid { grid-template-columns: 1fr; }
  .review-list div { grid-template-columns: 1fr; gap: 4px; }
  .record-row,
  .record-row + .record-row { grid-template-columns: 1fr; gap: 7px; }
  .record-card [data-copy-button] { margin-top: 14px; }
  button,
  .button-link { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
