:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #142033;
  --muted: #5c6b80;
  --line: #e2e7f0;
  --accent: #0f6e6b;
  --accent-dark: #0b5552;
  --ok: #157a3a;
  --warn: #9a6700;
  --bad: #b42318;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 28px rgba(16, 24, 40, 0.05);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  min-height: 100%;
}

body::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--accent);
}

h1, h2, p { margin: 0; }

button, input, select { font: inherit; color: inherit; }

a { color: var(--accent-dark); }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  padding: 8px 12px;
  z-index: 5;
}

.skip:focus { top: 8px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.top { padding: 16px 0 8px; }

.top-inner, .brand, .actions, .toolbar, .downloads, .options {
  display: flex;
  gap: 12px;
  align-items: center;
}

.downloads { flex-wrap: wrap; }

.top-inner, .toolbar { justify-content: space-between; }

.brand { align-items: flex-start; min-width: 0; }

.mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: -0.04em;
  flex: none;
}

h1 { font-size: 22px; letter-spacing: -0.03em; line-height: 1.15; }

h2 { font-size: 16px; letter-spacing: -0.02em; }

.tagline, .hint, .muted, .lead { color: var(--muted); }

.tagline { margin-top: 2px; font-size: 14px; }

.portfolio { font-weight: 650; text-decoration: none; font-size: 14px; }

.portfolio:hover { text-decoration: underline; }

.lead { margin: 8px 0 16px; max-width: 46rem; }

.panel, .summary, .table-wrap, .progress {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.panel { padding: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.field label, .toolbar label { font-size: 13px; font-weight: 650; }

input[type="url"], input[type="number"], select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
  width: 100%;
}

input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.options { flex-wrap: wrap; margin-top: 12px; align-items: end; }

.options .field { width: 140px; }

.check { display: flex; gap: 8px; align-items: center; font-size: 14px; padding-bottom: 8px; }

.actions { margin-top: 14px; align-items: center; flex-wrap: wrap; }

button, .btn {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  padding: 9px 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: not-allowed; }

.btn.ghost, a.btn.ghost {
  background: #fff;
  color: var(--accent-dark);
  border: 1px solid var(--line);
}

.hint { margin: 12px 0 0; font-size: 13px; }

.alert {
  margin: 0;
  color: var(--bad);
  background: #fef3f2;
  border-radius: 10px;
  padding: 8px 10px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  margin: 16px 0 28px;
  align-items: start;
}

.progress, .summary { padding: 12px 14px; margin-bottom: 12px; }

.bar {
  height: 8px;
  background: #e7eef0;
  border-radius: 99px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

#progress-text { margin-top: 8px; font-size: 14px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.card {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px;
}

.card strong { display: block; font-size: 20px; letter-spacing: -0.03em; }

.card span, .slow li, .issue-list li { color: var(--muted); font-size: 13px; }

.issue-list, .slow { margin: 8px 0 0; padding-left: 18px; }

.toolbar { margin: 4px 0 8px; gap: 10px; flex-wrap: wrap; }

.toolbar label { display: flex; flex-direction: column; gap: 6px; min-width: 220px; }

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; min-width: 720px; }

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
}

th { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.url { word-break: break-all; }

.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

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

.pill {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fef3f2;
  color: var(--bad);
  font-size: 12px;
  font-weight: 650;
}

.pill.ok { background: #e9f8ef; color: var(--ok); }

.status-ok { color: var(--ok); font-weight: 700; }

.status-bad { color: var(--bad); font-weight: 700; }

.recent ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }

.recent button {
  width: 100%;
  text-align: left;
  background: var(--bg);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 10px;
}

.recent button small, .recent .muted { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }

.foot { padding: 8px 0 28px; font-size: 14px; color: var(--muted); }

.foot p + p { margin-top: 4px; }

@media (max-width: 860px) {
  .layout, .cards { grid-template-columns: 1fr; }
  .top-inner { align-items: flex-start; }
  .options .field { width: calc(50% - 8px); }
}
