:root {
  --bg: #f4f4f1;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --text: #101010;
  --muted: #767671;
  --line: rgba(16, 16, 16, 0.11);
  --line-strong: rgba(16, 16, 16, 0.72);
  --shadow: 0 22px 70px rgba(16, 16, 16, 0.07);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --success: #0f8a39;
  --warning: #975f00;
  --error: #b11c1c;
  --font-sans: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(0, 0, 0, 0.05), transparent 26%),
    linear-gradient(180deg, #fafaf8 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(16, 16, 16, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 16, 16, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 58%, transparent 100%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

code {
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.92em;
}

.page-shell {
  width: min(1280px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 22px 0 54px;
}

.topbar,
.site-footer,
.hero,
.workspace {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 999px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark,
.footer-brand img,
.notice-card::before {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.brand-mark {
  padding: 8px;
}

.brand-copy,
.footer-brand div {
  display: grid;
  gap: 3px;
}

.brand-copy strong,
.footer-brand strong {
  font-size: 1rem;
}

.brand-copy small,
.workspace-note,
.field-hint,
.panel-heading p,
.status-display p,
.timeline p,
.site-footer p,
.inline-stat small,
.steps-inline p,
.notice-card p,
.summary-hint {
  color: var(--muted);
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.topnav a,
.header-cta,
.text-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #000;
  border-radius: 999px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.topnav a:hover,
.header-cta:hover,
.text-links a:hover,
.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.topnav a:hover,
.text-links a:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.header-cta {
  border-color: #000;
  background: #101010;
  color: #fff;
}

main {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.hero,
.workspace {
  padding: 20px;
  border-radius: var(--radius-xl);
}

.section-heading,
.panel-heading,
.account-card__header,
.site-footer,
.batch-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-heading {
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

h2,
.modal-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.45rem);
  letter-spacing: -0.04em;
}

.steps-section {
  position: relative;
}

.steps-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps-inline li,
.panel,
.account-card,
.task-card,
.notice-card,
.modal-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.steps-inline li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 108px;
  padding: 18px;
}

.steps-inline span,
.timeline-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.steps-inline strong,
.panel-heading h3,
.status-display h4,
.timeline strong {
  display: block;
  margin: 0;
  font-size: 1.04rem;
}

.steps-inline p {
  margin: 6px 0 0;
  line-height: 1.6;
}

.text-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.text-links a {
  background: #101010;
  color: #fff;
}

.text-links a:hover {
  border-color: #000;
  background: #101010;
  color: #fff;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
  gap: 32px;
}

.compact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.82fr);
  gap: 20px;
  align-items: start;
}

.panel {
  padding: 22px;
}

.form-panel {
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.04);
}

.result-panel {
  border: none;
  background: transparent;
  padding: 0 10px;
}

.panel-heading.compact {
  margin-bottom: 18px;
}

.panel-heading h3 {
  margin-bottom: 6px;
}

form,
.batch-panel {
  display: grid;
  gap: 18px;
}

.field-group {
  display: grid;
  gap: 10px;
}

label {
  font-weight: 600;
  font-size: 1.34rem;
  letter-spacing: -0.02em;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(16, 16, 16, 0.18);
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input {
  height: 58px;
  padding: 0 18px;
  font-size: 1.02rem;
}

textarea {
  resize: vertical;
  min-height: 184px;
  padding: 16px 18px;
  line-height: 1.7;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(16, 16, 16, 0.46);
  box-shadow: 0 0 0 6px rgba(16, 16, 16, 0.05);
}

.field-inline,
.cta-row,
.textarea-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.field-inline input {
  flex: 1;
}

.textarea-toolbar {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.95rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

.primary-button {
  border: 1px solid #000;
  background: #101010;
  color: #fff;
}

.ghost-button {
  border: 1px solid rgba(16, 16, 16, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.stacked-mobile {
  align-items: stretch;
}

.commit-note {
  margin: -2px 0 0;
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--muted);
}

.inline-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feedback {
  min-height: 24px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.feedback[data-tone="success"] {
  color: var(--success);
}

.feedback[data-tone="warning"] {
  color: var(--warning);
}

.feedback[data-tone="error"] {
  color: var(--error);
}

.status-display,
.account-card,
.task-card,
.notice-card {
  padding: 18px;
}

.status-display {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 246, 243, 0.88));
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

.status-pill.is-idle {
  color: var(--muted);
}

.status-pill.is-processing {
  color: var(--warning);
  border-color: rgba(151, 95, 0, 0.32);
  background: rgba(151, 95, 0, 0.08);
}

.status-pill.is-success {
  color: var(--success);
  border-color: rgba(15, 138, 57, 0.32);
  background: rgba(15, 138, 57, 0.08);
}

.status-pill.is-error {
  color: var(--error);
  border-color: rgba(177, 28, 28, 0.3);
  background: rgba(177, 28, 28, 0.08);
}

.status-display h4 {
  margin: 14px 0 8px;
  font-size: 1.22rem;
}

.account-card {
  margin-top: 16px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 14px 0 0;
}

.account-grid div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.account-grid dt,
.task-label {
  margin-bottom: 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.account-grid dd,
.task-card strong {
  margin: 0;
  line-height: 1.55;
  word-break: break-word;
}

.timeline {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.timeline.compact {
  margin-bottom: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-item span {
  position: relative;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 4px;
  border-color: rgba(16, 16, 16, 0.24);
  background: rgba(255, 255, 255, 0.8);
}

.timeline-item span::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: transparent;
  transition: background 180ms ease;
}

.timeline-item.is-active span {
  border-color: rgba(151, 95, 0, 0.48);
}

.timeline-item.is-active span::after {
  background: rgba(151, 95, 0, 0.75);
}

.timeline-item.is-done span {
  border-color: rgba(15, 138, 57, 0.48);
}

.timeline-item.is-done span::after {
  background: rgba(15, 138, 57, 0.85);
}

.timeline strong {
  margin-bottom: 4px;
}

.timeline p {
  margin: 0;
  line-height: 1.55;
}

.task-card.subtle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  display: grid;
  gap: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.task-card.subtle.is-empty {
  display: none;
}

.notice-card {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.notice-card p {
  margin: 0;
  line-height: 1.65;
}

.batch-disclosure {
  border: 0;
}

.batch-disclosure summary {
  cursor: pointer;
  list-style: none;
  padding: 0;
}

.batch-disclosure summary::-webkit-details-marker {
  display: none;
}

.summary-hint {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
}

.batch-disclosure[open] .summary-hint {
  content: "收起";
}

.compact-grid {
  margin-top: 18px;
}

.inline-stat {
  display: inline-grid;
  gap: 4px;
}

.inline-stat span {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
}

.batch-result-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  align-self: start;
}

.table-shell {
  overflow: auto;
  max-height: clamp(320px, 52vh, 620px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.96);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-row td {
  color: var(--muted);
  text-align: center;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
}

.status-chip[data-status="0"] {
  color: var(--success);
  border-color: rgba(15, 138, 57, 0.26);
}

.status-chip[data-status="1"] {
  color: var(--warning);
  border-color: rgba(151, 95, 0, 0.3);
}

.status-chip[data-status="2"],
.status-chip[data-status="3"] {
  color: var(--error);
  border-color: rgba(177, 28, 28, 0.28);
}

.site-footer {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 999px;
}

.site-footer small {
  color: var(--muted);
  font-size: 0.92rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 16, 16, 0.32);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal-backdrop[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(560px, 100%);
  padding: 28px;
  box-shadow: var(--shadow);
}

.modal-card p {
  line-height: 1.75;
}

.result-modal-pill {
  margin-bottom: 12px;
}

#result-modal-meta {
  margin-top: 14px;
}

#result-modal .cta-row {
  margin-top: 18px;
  justify-content: flex-end;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .workspace-grid,
  .compact-grid,
  .steps-inline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100vw - 20px, 1280px);
    padding-top: 14px;
  }

  .topbar,
  .section-heading,
  .steps-bar__header,
  .workspace-header,
  .panel-heading,
  .site-footer,
  .task-card.subtle,
  .cta-row,
  .field-inline,
  .textarea-toolbar,
  .batch-disclosure summary {
    flex-direction: column;
    align-items: stretch;
  }

  .topnav {
    display: none;
  }

  .header-cta {
    width: 100%;
  }

  .hero,
  .workspace {
    padding: 16px;
  }

  .panel,
  .modal-card {
    padding: 18px;
  }

  .table-shell {
    max-height: 420px;
  }

  .steps-inline li {
    min-height: auto;
  }

  .account-grid,
  .task-card.subtle {
    grid-template-columns: 1fr;
  }

  .text-links a,
  .primary-button,
  .ghost-button,
  .summary-hint {
    width: 100%;
  }
}
