:root {
  --bg: #f6f6f4;
  --panel: #ffffff;
  --ink: #131313;
  --muted: #5f5f5f;
  --accent: #005bbb;
  --danger: #b51d2a;
  --border: #dddddd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f6f6f4 0%, #ececec 100%);
  color: var(--ink);
}

.container {
  width: min(980px, 92vw);
  margin: 40px auto;
}

h1 {
  margin: 0 0 6px;
  font-size: 2rem;
}

.subtitle {
  margin: 0 0 18px;
  color: var(--muted);
}

.card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 8px 0;
  color: #2b2b2b;
}

.field input {
  padding: 10px 12px;
  border: 1px solid #bdbdbd;
  border-radius: 8px;
  font: inherit;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 220px));
  gap: 16px;
}

button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 11px 14px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.status {
  margin-top: 18px;
  min-height: 24px;
  font-weight: 600;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e6e6e6;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #005bbb 0%, #00a0ff 100%);
  transition: width 0.5s ease;
}

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

.status.ok {
  color: #186a3b;
}

.results-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

.stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fafafa;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.92rem;
}

th,
td {
  border: 1px solid #e0e0e0;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f3f3f3;
}

.table-shell {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  background: #fff;
}

.preview-table {
  margin-top: 0;
  min-width: 1180px;
  width: 100%;
}

.preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #efefef;
}

.preview-table th,
.preview-table td {
  line-height: 1.38;
}

.url-cell {
  min-width: 260px;
  max-width: 360px;
}

.url-link {
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
}

.url-link:hover {
  text-decoration: underline;
}

.suggestion-cell {
  min-width: 270px;
}

.suggestion-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tag-fail {
  background: #ffe7ea;
  color: #921928;
}

.tag-warn {
  background: #fff4dc;
  color: #8f5f00;
}

.tag-info {
  background: #e8f2ff;
  color: #004594;
}

.tag-ok {
  background: #e8f8ef;
  color: #1d7a46;
}

.muted-cell {
  color: var(--muted);
}

.downloads a {
  margin-right: 12px;
}

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