:root {
  color-scheme: light;
  --ink: #18231d;
  --muted: #65726b;
  --paper: #fffefa;
  --surface: #ffffff;
  --line: #dde5df;
  --green: #176b48;
  --green-dark: #0d5236;
  --green-soft: #e8f3ed;
  --gold: #c9953b;
  --danger: #9e342b;
  --danger-soft: #fff0ed;
  --shadow: 0 18px 50px rgba(31, 59, 44, 0.09);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 720px;
  min-height: 100%;
  background: #eef3ef;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "微软雅黑", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 8% 4%, rgba(201, 149, 59, 0.15), transparent 24rem),
    linear-gradient(180deg, #f5f7f3 0, #eef3ef 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1020px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 36px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 34px;
}

.eyebrow,
.status-kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.subtitle {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.version-label { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.secondary-button:disabled { opacity: .45; cursor: not-allowed; }
.action-row { flex-wrap: wrap; }

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 10px 14px;
  color: var(--green-dark);
  border: 1px solid #c8dbce;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.privacy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39a56e;
  box-shadow: 0 0 0 4px rgba(57, 165, 110, 0.13);
}

.workflow {
  display: grid;
  grid-template-columns: 1fr 44px 1fr 44px 1fr;
  align-items: center;
  margin-bottom: 22px;
  padding: 0 22px;
}

.workflow > div:not(.workflow-line) {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 11px;
  align-items: center;
}

.workflow span {
  grid-row: 1 / 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: var(--green);
  font-weight: 800;
}

.workflow strong {
  font-size: 14px;
}

.workflow small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.workflow-line {
  height: 1px;
  background: #cbd7cf;
}

.compose-card {
  padding: 24px;
}

.compose-head,
.rewrite-heading,
.fact-audit__head,
.draft-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.compose-head h2,
.rewrite-heading h2,
.fact-audit h3 {
  margin: 0;
}

.compose-head > div > p:last-child,
.fact-audit__head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.document-type {
  display: grid;
  flex: 0 0 210px;
  gap: 6px;
  color: #506057;
  font-size: 12px;
  font-weight: 800;
}

.document-type select,
.formal-title {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  border: 1px solid #ccd9d1;
  border-radius: 9px;
  background: white;
  outline: none;
}

.document-type select:focus,
.formal-title:focus,
.message-input:focus,
.draft-editor:focus {
  border-color: #5c9b78;
  box-shadow: 0 0 0 3px rgba(23, 107, 72, 0.09);
}

.message-label {
  display: block;
  margin: 21px 0 8px;
  font-size: 13px;
  font-weight: 800;
}

.message-input,
.draft-editor {
  width: 100%;
  padding: 14px 15px;
  color: var(--ink);
  border: 1px solid #ccd9d1;
  border-radius: 12px;
  background: #fff;
  outline: none;
  resize: vertical;
  line-height: 1.75;
}

.message-input {
  min-height: 170px;
  font-size: 14px;
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 13px;
}

.message-actions p {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: right;
}

.rewrite-workbench {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #dce5df;
}

.rewrite-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.rewrite-counts span {
  min-width: 92px;
  padding: 8px 10px;
  color: var(--muted);
  border: 1px solid #dce5df;
  border-radius: 10px;
  background: #f8faf8;
  font-size: 11px;
  text-align: center;
}

.rewrite-counts strong {
  margin-right: 4px;
  color: var(--green-dark);
  font-size: 18px;
}

.rewrite-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  margin-top: 17px;
}

.rewrite-pane {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d9e3dd;
  border-radius: 14px;
  background: #f8faf8;
}

.rewrite-pane--draft {
  background: #f1f7f3;
}

.rewrite-pane__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rewrite-pane__head strong {
  font-size: 14px;
}

.rewrite-pane__head span {
  color: var(--muted);
  font-size: 10px;
}

.source-preview {
  min-height: 420px;
  max-height: 640px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: #3c4b43;
  border: 1px solid #e0e6e2;
  border-radius: 10px;
  background: white;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 13px;
  line-height: 1.8;
}

.rewrite-pane--draft label {
  display: block;
  margin: 11px 0 6px;
  color: #46564d;
  font-size: 11px;
  font-weight: 800;
}

.formal-title {
  font-size: 15px;
  font-weight: 800;
}

.draft-editor {
  min-height: 338px;
  background: white;
  font-size: 13px;
}

.fact-audit {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d9e3dd;
  border-radius: 14px;
  background: white;
}

.fact-audit h3 {
  font-size: 15px;
}

.audit-state {
  padding: 5px 9px;
  color: #6e5a2a;
  border-radius: 999px;
  background: #fff2cf;
  font-size: 11px;
  font-weight: 800;
}

.audit-state.is-ready {
  color: #176b48;
  background: #e3f2e9;
}

.fact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.fact-item {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e1e8e3;
  border-radius: 9px;
  background: #f9fbf9;
}

.fact-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.fact-item__top strong {
  font-size: 11px;
}

.fact-item__top span {
  flex: none;
  padding: 2px 5px;
  border-radius: 999px;
  background: #e4efe8;
  font-size: 9px;
  font-weight: 800;
}

.fact-item p {
  margin: 7px 0 0;
  overflow: hidden;
  color: #415149;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.fact-item[data-status="review"] {
  border-color: #e5c87f;
  background: #fff9e9;
}

.fact-item[data-status="review"] .fact-item__top span {
  color: #785716;
  background: #ffedbd;
}

.fact-item[data-status="missing"] {
  border-color: #e6bcb7;
  background: #fff2f0;
}

.fact-item[data-status="missing"] .fact-item__top span {
  color: #8c3028;
  background: #f9dcd8;
}

.draft-warnings {
  margin-top: 12px;
  padding: 12px 14px;
  color: #7b3029;
  border: 1px solid #e9c1bc;
  border-radius: 10px;
  background: #fff3f1;
  font-size: 12px;
}

.draft-warnings ul {
  margin: 7px 0 0;
  padding-left: 19px;
  line-height: 1.65;
}

.change-details {
  margin-top: 12px;
  color: #536159;
  font-size: 12px;
}

.change-details summary {
  font-weight: 800;
  cursor: pointer;
}

.change-details ul {
  margin: 8px 0 0;
  padding-left: 20px;
  line-height: 1.7;
}

.draft-actions {
  align-items: center;
  margin-top: 17px;
}

.draft-actions > div {
  display: flex;
  gap: 9px;
}

.include-title-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
}

.include-title-option input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--green);
}

.include-title-option span {
  display: grid;
  gap: 2px;
}

.include-title-option strong {
  font-size: 12px;
}

.include-title-option small {
  color: var(--muted);
  font-size: 10px;
}

.formal-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.formal-status.is-error {
  color: var(--danger);
}

.card {
  border: 1px solid rgba(204, 216, 207, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.upload-card {
  padding: 18px;
}

.drop-zone {
  display: flex;
  align-items: center;
  min-height: 150px;
  gap: 18px;
  padding: 28px;
  border: 1.5px dashed #9eb8a7;
  border-radius: 17px;
  background: linear-gradient(135deg, #fbfcf9, #f4f8f4);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--green);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-mark {
  display: grid;
  flex: 0 0 60px;
  height: 70px;
  place-items: center;
  color: white;
  border-radius: 12px 12px 12px 4px;
  background: linear-gradient(150deg, #1a7450, #0d5036);
  box-shadow: 0 12px 22px rgba(23, 107, 72, 0.22);
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 800;
}

.drop-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.drop-copy strong {
  font-size: 17px;
}

.drop-copy small {
  color: var(--muted);
  line-height: 1.6;
}

.choose-button,
.secondary-button,
.text-button {
  border: 0;
}

.choose-button {
  padding: 10px 16px;
  color: var(--green-dark);
  border: 1px solid #b8d1c1;
  border-radius: 10px;
  background: white;
  font-size: 14px;
  font-weight: 800;
}

.status-panel {
  padding: 26px 12px 8px;
}

.status-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.status-heading h2 {
  max-width: 760px;
  margin: 0;
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-button {
  padding: 6px 0;
  color: var(--green);
  background: transparent;
  font-weight: 700;
}

.progress-track {
  height: 7px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ece8;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #4ca875);
  transition: width 240ms ease;
}

.status-message {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.metrics div {
  padding: 16px;
  border: 1px solid #e4eae5;
  border-radius: 13px;
  background: #fbfcfa;
}

.metrics strong {
  display: block;
  margin-bottom: 4px;
  color: var(--green-dark);
  font-size: 24px;
}

.metrics span {
  color: var(--muted);
  font-size: 12px;
}

.title-option {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 13px;
  background: #f5f8f5;
}

.title-option label {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
}

.title-option input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--green);
}

.title-option span {
  display: grid;
  gap: 4px;
}

.title-option small {
  max-width: 760px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-box {
  margin-top: 14px;
  padding: 14px 17px;
  color: #765318;
  border: 1px solid #ecd497;
  border-radius: 13px;
  background: #fff9e8;
}

.warning-box[data-kind="error"] {
  color: #74251f;
  border-color: #f0c4be;
  background: var(--danger-soft);
}

.warning-box ul {
  margin: 8px 0 0;
  padding-left: 20px;
  line-height: 1.7;
}

.docx-preview {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #cddbd2;
  border-radius: 16px;
  background: #f4f8f5;
}

.docx-preview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.docx-preview__head h3 {
  margin: 0;
  font-size: 18px;
}

.docx-preview__head > div:first-child > p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.docx-preview__summary {
  display: grid;
  flex: none;
  gap: 3px;
  padding: 9px 12px;
  color: var(--green-dark);
  border: 1px solid #bfd5c6;
  border-radius: 10px;
  background: white;
  text-align: right;
}

.docx-preview__summary strong {
  font-size: 11px;
}

.docx-preview__summary span {
  color: var(--muted);
  font-size: 10px;
}

.docx-preview__frame {
  max-height: 680px;
  overflow: auto;
  border: 1px solid #d5ded8;
  border-radius: 12px;
  background: #e9eeeb;
  box-shadow: inset 0 1px 8px rgba(40, 62, 49, 0.05);
}

.docx-preview__frame:focus {
  outline: 3px solid rgba(23, 107, 72, 0.14);
  outline-offset: 2px;
}

.docx-preview__surface {
  width: min(100% - 32px, 820px);
  min-height: 420px;
  margin: 16px auto;
  padding: 42px 48px;
  overflow-wrap: anywhere;
  color: #202621;
  border: 1px solid #e2e5e2;
  background: white;
  box-shadow: 0 8px 24px rgba(37, 52, 43, 0.08);
}

.docx-preview__surface img {
  max-width: 100%;
  height: auto !important;
}

.docx-preview__surface[contenteditable="true"] { cursor: text; outline: 2px solid transparent; }
.docx-preview__surface[contenteditable="true"]:focus { outline-color: #88b49e; }
.docx-preview__surface [contenteditable="false"] { cursor: default; }
.editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 16px 24px 0; }
.editor-toolbar button:disabled { opacity: .45; cursor: not-allowed; }
.edit-status { margin: 12px 24px; color: #285b43; font-size: 14px; line-height: 1.6; }
.edit-status[data-kind="error"] { color: #a12c20; background: #fff1ef; padding: 10px 14px; border-radius: 8px; }
.confirm-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: #14281dcc; }
.confirm-card { width: min(100%, 520px); padding: 28px; background: #fff; border-radius: 20px; box-shadow: 0 20px 70px #0005; }
.confirm-card h2 { margin: 0 0 16px; font-size: 22px; }
.confirm-card p { line-height: 1.8; }
.confirm-card .editor-toolbar { padding: 16px 0 0; }

.docx-preview__surface table {
  max-width: 100%;
}

.docx-preview__surface [data-boda-tail="1"] {
  display: none;
}

.docx-preview__note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
}

.primary-button {
  min-width: 220px;
  padding: 14px 22px;
  color: white;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--green), var(--green-dark));
  box-shadow: 0 12px 22px rgba(23, 107, 72, 0.2);
  font-weight: 800;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.action-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

kbd {
  display: inline-block;
  min-width: 25px;
  padding: 2px 6px;
  color: #445048;
  border: 1px solid #ccd5ce;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: white;
  text-align: center;
  font-size: 11px;
}

.result-banner {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 18px 22px;
  color: #174c34;
  border: 1px solid #bcd8c6;
  border-radius: 18px;
  background: #eaf6ee;
}

.result-banner.is-error {
  color: #75271f;
  border-color: #efc2bc;
  background: var(--danger-soft);
}

.result-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: var(--green);
  font-size: 21px;
  font-weight: 900;
}

.is-error .result-icon {
  background: var(--danger);
}

.result-banner p {
  margin: 5px 0 0;
  font-size: 13px;
}

.secondary-button {
  padding: 9px 14px;
  color: inherit;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 800;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.compatibility-button {
  color: #6d4c13;
  border: 1px solid rgba(174, 127, 44, 0.28);
  background: #fff9e8;
}

.details-card {
  margin-top: 18px;
  overflow: hidden;
  box-shadow: none;
}

.details-card summary {
  padding: 18px 22px;
  font-weight: 800;
  cursor: pointer;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 0 22px 22px;
  border-top: 1px solid #edf0ed;
}

.details-grid h3 {
  margin: 20px 0 10px;
  font-size: 15px;
}

.details-grid ul {
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
  line-height: 1.9;
  font-size: 13px;
}

footer {
  padding: 20px 0 0;
  color: #7a857e;
  text-align: center;
  font-size: 12px;
}

.native-copy-surface {
  position: fixed;
  left: -100000px;
  top: 0;
  width: 900px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 800px) {
  html {
    min-width: 0;
  }

  .shell {
    width: min(100% - 24px, 680px);
    padding-top: 28px;
  }

  .hero,
  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0;
  }

  .workflow-line {
    display: none;
  }

  .drop-zone {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .choose-button {
    margin-left: 78px;
  }

  .metrics,
  .details-grid {
    grid-template-columns: 1fr 1fr;
  }

  .result-banner {
    grid-template-columns: 42px 1fr;
  }

  .result-banner .result-actions {
    grid-column: 2;
    justify-self: start;
  }

  .rewrite-grid {
    grid-template-columns: 1fr;
  }

  .compose-head,
  .rewrite-heading,
  .fact-audit__head,
  .docx-preview__head,
  .draft-actions,
  .message-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .document-type {
    flex-basis: auto;
  }

  .message-actions p {
    margin-left: 0;
    text-align: left;
  }

  .rewrite-counts {
    justify-content: flex-start;
  }

  .fact-list {
    grid-template-columns: 1fr 1fr;
  }

  .draft-actions > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .docx-preview__summary {
    text-align: left;
  }

  .docx-preview__surface {
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 24px 20px;
  }
}

.site-registration{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:12px 24px;margin:18px 0}.site-registration a{display:inline-flex;align-items:center;gap:6px;color:inherit;text-decoration:none}.site-registration a:hover{text-decoration:underline}.site-registration img{width:20px;height:20px;object-fit:contain}
