:root {
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: #18202a;
  background: #eef2f7;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(860px, 100%);
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid #d8e0ea;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 60px rgb(31 47 68 / 12%);
}

.eyebrow {
  margin: 0 0 8px;
  color: #1769aa;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 46px);
}

.intro {
  margin: 14px 0 28px;
  color: #5a6675;
  line-height: 1.7;
}

.panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #e0e6ee;
  border-radius: 16px;
}

h2 {
  margin: 0 0 18px;
  font-size: 20px;
}

.status-panel {
  padding: 22px;
  border-radius: 14px;
  background: #f4f7fb;
  text-align: center;
}

.elapsed {
  display: block;
  font: 700 42px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  color: #4c5968;
}

.status.error {
  color: #b42318;
}

.processing-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  color: #4c5968;
  font-variant-numeric: tabular-nums;
}

.processing-progress[hidden] {
  display: none;
}

.processing-progress progress {
  width: 100%;
  height: 14px;
  accent-color: #1769aa;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.processing-actions {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 14px;
}

button,
.download {
  min-height: 46px;
  border: 1px solid #bac5d2;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
}

button {
  padding: 0 18px;
  color: #25313f;
  background: #fff;
  cursor: pointer;
}

button.primary {
  border-color: #1769aa;
  color: #fff;
  background: #1769aa;
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

button:focus-visible,
.download:focus-visible,
textarea:focus-visible {
  outline: 3px solid #87bff0;
  outline-offset: 2px;
}

.download {
  display: grid;
  place-items: center;
  color: #fff;
  background: #18794e;
  text-decoration: none;
}

.download[hidden] {
  display: none;
}

.capability {
  margin: 0 0 18px;
  color: #4c5968;
}

.capability.error {
  color: #b42318;
}

.field {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  font-weight: 700;
}

.field[hidden] {
  display: none;
}

textarea {
  width: 100%;
  border: 1px solid #bac5d2;
  border-radius: 10px;
  padding: 12px;
  color: inherit;
  background: #fff;
  font: inherit;
  font-weight: 400;
}

textarea {
  min-height: 240px;
  resize: vertical;
  line-height: 1.65;
}

aside {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e2e7ee;
  color: #4c5968;
  line-height: 1.7;
}

aside ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

@media (max-width: 560px) {
  .actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color: #f1f5f9;
    background: #10151c;
  }

  .card,
  button,
  textarea {
    border-color: #3a4655;
    background: #18202a;
    color: #f1f5f9;
  }

  .intro,
  .processing-progress,
  .status,
  aside {
    color: #b8c2ce;
  }

  .status-panel {
    background: #111821;
  }

  .panel {
    border-color: #303b49;
  }
}
