:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --surface: #fff;
  --ink: #18243a;
  --muted: #627087;
  --line: #dfe5ef;
  --primary: #285dd6;
  --primary-dark: #1645aa;
  --blue: #eef4ff;
  --success: #16714c;
  --success-bg: #ecf8f1;
  --warn: #865a12;
  --warn-bg: #fff6df;
  --danger: #b83737;
  --danger-bg: #fff0f0;
  --radius: 16px;
  --shadow: 0 10px 32px #1c305808;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    15px/1.7 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #98b7ff;
  outline-offset: 3px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1040px;
  margin: auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-size: 21px;
}
.brand small {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 400;
}
.site-header nav {
  display: flex;
  gap: 24px;
  font-size: 13px;
}
.site-header nav a {
  color: var(--muted);
}
.container {
  max-width: 1000px;
  margin: auto;
  padding: 40px 24px 72px;
  min-height: 70vh;
}
.narrow {
  max-width: 680px;
  margin: auto;
}
.mode-banner {
  background: var(--warn-bg);
  color: #725117;
  padding: 9px 24px;
  text-align: center;
  font-size: 12px;
  border-bottom: 1px solid #eeddb5;
}
.mode-banner strong {
  margin-right: 8px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}
h2 {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 16px;
}
h3 {
  font-size: 16px;
  margin-bottom: 10px;
}
.lead {
  font-size: 16px;
  color: var(--muted);
  max-width: 600px;
  line-height: 1.9;
}
.hero {
  padding: 12px 0 36px;
}
.hero h1 {
  font-size: 42px;
  max-width: 650px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 9px;
  padding: 10px 18px;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
  white-space: normal;
}
.btn:hover {
  background: var(--primary-dark);
  color: white;
  text-decoration: none;
}
.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn.secondary:hover {
  border-color: #9fb6df;
  background: #fafcff;
}
.btn.small {
  min-height: 36px;
  font-size: 12px;
  padding: 7px 12px;
}
.btn.full {
  width: 100%;
}
.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
}
.text-button {
  border: 0;
  background: none;
  padding: 4px;
  color: var(--primary);
  text-decoration: underline;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card + .card,
.section {
  margin-top: 24px;
}
.grid-2 > .card,
.grid-3 > .card {
  margin-top: 0;
}
.service-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.service-letter {
  display: inline-grid;
  place-items: center;
  background: var(--blue);
  border: 1px solid #d9e5ff;
  border-radius: 7px;
  width: 27px;
  height: 27px;
}
.price {
  font-size: 30px;
  font-weight: 750;
  line-height: 1.1;
  margin: 20px 0;
}
.price small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px 0 36px;
}
.step {
  border-top: 2px solid var(--line);
  padding: 17px 0 0;
}
.step b {
  font-size: 12px;
  color: var(--primary);
  display: block;
  margin-bottom: 8px;
}
.step h3 {
  margin-bottom: 4px;
}
.step p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
}
.principles {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-top: 24px;
}
.principles span::before {
  content: "✓";
  color: var(--success);
  margin-right: 6px;
}
.page-heading {
  margin-bottom: 28px;
}
.back {
  display: inline-block;
  font-size: 13px;
  margin-bottom: 20px;
}
.notice {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--blue);
  border: 1px solid #d9e6ff;
  color: #345382;
  font-size: 13px;
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.notice.warning {
  background: var(--warn-bg);
  border-color: #f0e0b7;
  color: var(--warn);
}
.notice.error {
  background: var(--danger-bg);
  border-color: #f2cdcd;
  color: var(--danger);
}
.notice.success {
  background: var(--success-bg);
  border-color: #cae7d6;
  color: var(--success);
}
.notice > :last-child {
  margin-bottom: 0;
}
.notice[hidden],
[hidden] {
  display: none !important;
}
.field {
  margin-bottom: 19px;
}
.field label,
.field-label {
  display: block;
  font-weight: 650;
  font-size: 13px;
  margin-bottom: 7px;
}
.field label .optional {
  font-weight: 400;
  color: var(--muted);
}
input,
textarea,
select {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  line-height: 1.5;
}
input::placeholder,
textarea::placeholder {
  color: #8994a6;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
textarea.code {
  font:
    12px/1.7 Consolas,
    monospace;
  min-height: 400px;
  tab-size: 2;
}
input[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffafa;
}
.hint {
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 0;
  line-height: 1.6;
}
.field-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 5px;
}
.form-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
.form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.form-heading h2 {
  margin: 0;
}
details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
summary {
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
}
details[open] > summary {
  margin-bottom: 15px;
}
.input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.input-row > input,
.input-row > textarea {
  flex: 1;
  min-width: 0;
}
.candidate-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.candidate {
  display: flex;
  text-align: left;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  width: 100%;
  font-size: 13px;
}
.candidate:hover {
  border-color: var(--primary);
}
.candidate span {
  overflow-wrap: anywhere;
}
.candidate small {
  color: var(--primary);
  white-space: nowrap;
}
.status-pill {
  display: inline-block;
  border-radius: 20px;
  padding: 3px 9px;
  background: #edf1f7;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.status-pill.success {
  background: var(--success-bg);
  color: var(--success);
}
.status-pill.failed {
  background: var(--danger-bg);
  color: var(--danger);
}
.status-pill.warning {
  background: var(--warn-bg);
  color: var(--warn);
}
.status-pill.running {
  background: var(--blue);
  color: var(--primary);
}
.progress-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.spinner {
  height: 30px;
  width: 30px;
  border: 3px solid #dbe5f8;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.event-list li {
  position: relative;
  padding: 0 0 22px 28px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.event-list li:last-child {
  padding-bottom: 0;
}
.event-list li::before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  background: #74a4f1;
  border-radius: 50%;
  top: 7px;
  left: 1px;
}
.event-list li::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 4px;
  left: 5px;
  width: 1px;
  background: var(--line);
}
.event-list li:last-child::after {
  display: none;
}
.event-list li.error::before {
  background: var(--danger);
}
.event-list li.warning::before {
  background: #d7a131;
}
.event-list time {
  display: block;
  font-size: 11px;
  color: #8490a3;
  margin-top: 3px;
}
.result-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}
.qr {
  text-align: center;
}
.qr img {
  width: 210px;
  height: 210px;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.data-list {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 9px 14px;
  font-size: 13px;
  margin: 0;
}
.data-list dt {
  color: var(--muted);
}
.data-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.share-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font:
    11px/1.7 Consolas,
    monospace;
  word-break: break-all;
  max-height: 120px;
  overflow: auto;
}
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.check-list li {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.check-list li:first-child {
  padding-top: 0;
}
.check-list li:last-child {
  border: 0;
  padding-bottom: 0;
}
.check-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 5px;
}
.check-list p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.good {
  color: var(--success);
}
.warn {
  color: var(--warn);
}
.secret {
  font:
    20px/1.6 Consolas,
    monospace;
  letter-spacing: 0.04em;
  background: #fff;
  border: 1px dashed #d9ae62;
  border-radius: 8px;
  padding: 14px;
  overflow-wrap: anywhere;
  user-select: all;
}
.site-footer {
  max-width: 1000px;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #7a8699;
  font-size: 11px;
}
.site-footer div {
  display: flex;
  gap: 20px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 15px);
  background: #18243a;
  color: #fff;
  font-size: 13px;
  border-radius: 9px;
  padding: 11px 18px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s,
    transform 0.15s;
  z-index: 99;
  max-width: calc(100vw - 40px);
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  padding: 8px;
  background: #fff;
  z-index: 100;
}
.skip:focus {
  top: 8px;
}
.admin-nav {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 20px 0 26px;
}
.admin-nav a {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid transparent;
}
.admin-nav a.active {
  background: #fff;
  color: var(--primary);
  border-color: var(--line);
}
.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.admin-heading h1 {
  margin: 0;
  font-size: 27px;
}
.table-wrap {
  overflow-x: auto;
  margin: 18px -4px 0;
  padding: 0 4px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
}
th {
  white-space: nowrap;
  color: var(--muted);
  font-weight: 550;
  background: #f6f8fc;
}
td,
th {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td {
  overflow-wrap: anywhere;
}
code {
  font:
    12px/1.6 Consolas,
    monospace;
}
pre {
  background: #122039;
  color: #dbe6f9;
  padding: 22px;
  border-radius: 10px;
  overflow: auto;
  font:
    12px/1.8 Consolas,
    monospace;
  white-space: pre;
  max-height: 650px;
  margin-bottom: 0;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 34px 16px;
  font-size: 13px;
}
.loading {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.provider-card .data-list {
  margin: 20px 0;
}
.placeholder {
  background: var(--bg);
  border: 1px dashed #cad3e2;
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 18px;
}
.admin-output {
  min-height: 90px;
  font:
    12px/1.8 Consolas,
    monospace;
}
.inline-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.stat {
  font-size: 27px;
  font-weight: 750;
}
.row-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.row-title h2 {
  margin: 0;
}
.badge {
  background: var(--blue);
  color: var(--primary);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
}
.monospace {
  font-family: Consolas, monospace;
}
.script-heading {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.process-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.health-ip {
  font-size: 26px;
  font-weight: 750;
  overflow-wrap: anywhere;
  letter-spacing: -0.02em;
}
.health-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
  margin: 18px 0;
}
.checkbox input {
  width: 17px;
  min-width: 17px;
  height: 17px;
  margin-top: 3px;
}
.config-note {
  line-height: 1.8;
}
.file-input {
  padding: 8px;
  font-size: 12px;
}
@media (max-width: 700px) {
  .header-inner {
    padding: 16px 18px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 17px;
  }
  .brand small {
    font-size: 10px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
  }
  .site-header nav {
    gap: 17px;
    font-size: 12px;
  }
  .container {
    padding: 28px 18px 50px;
  }
  .hero {
    padding-top: 8px;
    padding-bottom: 25px;
  }
  .hero h1 {
    font-size: 32px;
    max-width: 360px;
  }
  .lead {
    font-size: 14px;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
  }
  .hero-actions .btn {
    padding: 13px;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .card {
    padding: 21px;
  }
  .card + .card,
  .section {
    margin-top: 18px;
  }
  .grid-2 > .card,
  .grid-3 > .card {
    margin-top: 0;
  }
  .steps {
    gap: 14px;
    margin: 24px 0;
  }
  .step h3 {
    font-size: 13px;
  }
  .step p {
    font-size: 11px;
  }
  .step b {
    font-size: 10px;
  }
  .principles {
    gap: 8px 16px;
    font-size: 11px;
  }
  h1 {
    font-size: 27px;
  }
  h2 {
    font-size: 18px;
  }
  .price {
    font-size: 28px;
    margin: 16px 0;
  }
  .mode-banner {
    font-size: 11px;
    text-align: left;
    padding: 9px 18px;
  }
  .result-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .qr img {
    width: 210px;
    height: 210px;
  }
  .result-layout .data-list {
    grid-template-columns: 80px 1fr;
  }
  .site-footer {
    display: block;
    padding: 20px 18px;
  }
  .site-footer div {
    margin-top: 10px;
  }
  .data-list {
    grid-template-columns: 80px 1fr;
  }
  .admin-heading {
    align-items: flex-start;
  }
  .admin-heading h1 {
    font-size: 24px;
  }
  .table-wrap {
    margin-right: -10px;
  }
  .input-row {
    flex-wrap: wrap;
  }
  .input-row .btn {
    flex: 1;
  }
  .input-row input {
    flex-basis: 65%;
  }
  .health-ip {
    font-size: 23px;
  }
  .field {
    margin-bottom: 17px;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .checkbox input {
    min-height: 17px;
  }
  .secret {
    font-size: 17px;
  }
  .notice {
    font-size: 12px;
  }
  .check-head {
    font-size: 13px;
  }
  .btn {
    min-height: 46px;
  }
  .admin-nav {
    gap: 3px;
  }
  .admin-nav a {
    padding: 7px 9px;
  }
}
.mt10 {
  margin-top: 10px;
}
.mt12 {
  margin-top: 12px;
}
.mt18 {
  margin-top: 18px;
}
.status-icon {
  font-size: 28px;
}
.progress-heading {
  margin: 0 0 4px;
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
  .toast {
    transition: none;
  }
}

/* 第二轮：合并表单、步骤条、体检 */
.toggle-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  margin: 4px 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--blue);
  cursor: pointer;
  font-size: 14px;
}
.toggle-row input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin-top: 3px;
}
.paste-box {
  margin-bottom: 16px;
}
.paste-box textarea {
  min-height: 88px;
}
.pw-row {
  display: flex;
  gap: 8px;
}
.pw-row input {
  flex: 1;
  min-width: 0;
}
.stepper {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.stepper li {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.stepper li.now {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.stepper li.done {
  border-color: transparent;
  background: var(--success-bg);
  color: var(--success);
}
.stepper li.done::after {
  content: " ✓";
}
.stepper li.bad {
  border-color: transparent;
  background: var(--danger-bg);
  color: var(--danger);
}
.total {
  margin: 4px 0 14px;
}
.total b {
  font-size: 20px;
}
.todo {
  padding-left: 20px;
  margin: 0 0 16px;
}
.todo li {
  margin-bottom: 10px;
}
.mini-steps {
  padding-left: 20px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.link-card {
  display: block;
  color: inherit;
}
.link-card:hover {
  border-color: var(--primary);
}
.link-card h3 {
  margin: 0 0 4px;
}
.health-score {
  margin: 8px 0 0;
  font-weight: 600;
}
.health-score.good {
  color: var(--success);
}
.health-score.warn {
  color: var(--warn);
}
.bad {
  color: var(--danger);
  font-weight: 600;
}
details.card > summary {
  cursor: pointer;
}
@media (max-width: 640px) {
  .site-header nav {
    gap: 12px;
  }
}
