:root {
  --bg: #eef1f3;
  --panel: #ffffff;
  --border: #d3dae0;
  --text: #1b2430;
  --muted: #5b6b7a;
  --accent: #2a6f97;
  --accent-dark: #1e526f;

  --status-not_built: #8a97a3;
  --status-built: #2a6f97;
  --status-tested: #2f8f5b;
  --status-error: #c1443c;
  --status-in_progress: #c97a2b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

header.topbar {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

header.topbar .brand {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
}

header.topbar .brand::before {
  content: "//";
  color: var(--accent);
  margin-right: 6px;
}

header.topbar a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
header.topbar a:hover { color: var(--accent); }

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px;
}

h1 { font-size: 22px; margin: 0 0 4px 0; }
h2 { font-size: 16px; margin: 32px 0 10px 0; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }

.subtle { color: var(--muted); font-size: 13px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

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

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f6f9fb; }

a.row-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
a.row-link:hover { color: var(--accent); text-decoration: underline; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px 3px 6px;
  border-radius: 3px;
  border: 1px solid currentColor;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill.not_built { color: var(--status-not_built); }
.pill.built { color: var(--status-built); }
.pill.tested { color: var(--status-tested); }
.pill.error { color: var(--status-error); }
.pill.in_progress { color: var(--status-in_progress); }

form.inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px;
}

input, select, textarea {
  font-family: inherit;
  font-size: 13.5px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
}

textarea { resize: vertical; }

button {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
button.secondary {
  background: transparent;
  color: var(--accent);
}
button.secondary:hover { background: #f6f9fb; }

.empty {
  padding: 24px 14px;
  color: var(--muted);
  font-size: 13.5px;
}

.error-msg {
  color: var(--status-error);
  font-size: 13px;
  padding: 0 14px 10px 14px;
}

.log-entry {
  display: flex;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}
.log-entry:last-child { border-bottom: none; }
.log-entry .ts { color: var(--muted); white-space: nowrap; }
.log-entry .ev { font-weight: 600; text-transform: uppercase; font-size: 11.5px; }
.log-entry .note { color: var(--muted); }
