:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #667085;
  --line: #d8dee8;
  --accent: #0f766e;
  --accent-dark: #0b5f58;
  --warn: #b45309;
  --good: #15803d;
  --bad: #b91c1c;
  --shadow: 0 12px 30px rgba(30, 41, 59, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

button:hover {
  border-color: #98a2b3;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

button.primary:hover {
  background: var(--accent-dark);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

input,
select {
  height: 38px;
  padding: 6px 10px;
}

textarea {
  min-height: 150px;
  margin-top: 12px;
  padding: 12px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.5;
}

.shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 30px 0 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.summary {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 120px);
  gap: 10px;
}

.hero-stats div {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: var(--shadow);
}

.hero-stats span {
  display: block;
  font-size: 28px;
  font-weight: 800;
}

.hero-stats small {
  color: var(--muted);
}

.panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  box-shadow: var(--shadow);
}

.controls {
  display: grid;
  grid-template-columns: 140px 150px 140px auto auto;
  gap: 12px;
  align-items: end;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

#readerHelp {
  margin-top: 16px;
}

#readerHelp summary {
  cursor: pointer;
  font-weight: 600;
}

#readerBookmark {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}


.progress {
  display: none;
  width: 180px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf2;
}

.progress.active {
  display: block;
}

.progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: progress-slide 1s ease-in-out infinite;
}

@keyframes progress-slide {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(250%);
  }
}
#statusText {
  color: var(--muted);
  font-size: 14px;
}


.table-toolbar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}


.filters {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 160px 130px;
  gap: 10px;
}

#resultInfo {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.table-wrap {
  max-height: 620px;
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #344054;
  font-weight: 700;
}

td {
  color: #344054;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 13px;
  font-weight: 700;
}

.badge.good {
  background: #dcfce7;
  color: var(--good);
}

.badge.bad {
  background: #fee2e2;
  color: var(--bad);
}

.badge.warn {
  background: #fef3c7;
  color: var(--warn);
}

.pager {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}
@media (max-width: 900px) {
  .hero,
  .grid,
  .table-toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-stats,
  .controls,
  .filters {
    grid-template-columns: 1fr;
  }

  .url-row {
    grid-template-columns: 1fr;
  }
}
