:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --border: #d8e1ec;
  --ink: #132238;
  --muted: #52637a;
  --primary: #0f4c81;
  --primary-dark: #0a365c;
  --danger: #b42318;
  --warn: #b54708;
  --ok: #067647;
  --ns-primary: #0f4c81;
  --ns-accent: #0f4c81;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.topbar {
  background: #0d2137;
  color: #fff;
  padding: 1.5rem 0;
  border-bottom: 3px solid var(--primary);
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9dc2e6;
}

.topbar h1 { margin: 0; font-size: 1.75rem; }
.subtitle { margin: 0.25rem 0 0; color: #d6e4f2; font-size: 0.95rem; }

.badges { display: flex; gap: 0.6rem; align-items: center; }

.badge {
  background: var(--primary);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

.badge[data-bump="MAJOR"] { background: var(--danger); }
.badge[data-bump="MINOR"] { background: #175cd3; }
.badge[data-bump="PATCH"], .badge[data-bump="NONE"] { background: var(--ok); }
.badge-muted { background: #1e3a5f; }

.layout {
  display: grid;
  gap: 1.25rem;
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.toolbar h2 { margin: 0; font-size: 1.25rem; }
.muted { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.9rem; }

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

select, input[type="url"], textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  background: #fbfdff;
  color: var(--ink);
}

select { font-family: inherit; }

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.52rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.88rem;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #eef4fa; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { background: #e1ebf5; }

.peer-loader {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #f8fafd;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.peer-loader label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.peer-row { display: flex; gap: 0.5rem; }
.peer-row input { flex: 1; }

.status-line {
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
  color: var(--primary-dark);
  font-weight: 500;
}

.editors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.editor-col label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.35rem; }
.editor-col textarea { width: 100%; resize: vertical; }

.results-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

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

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { padding: 0.55rem 0.65rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #f3f7fc; font-weight: 600; }

.checklist { margin: 0.5rem 0 1rem; padding-left: 1.2rem; font-size: 0.88rem; }
.checklist li { margin-bottom: 0.4rem; }

.export-box { display: grid; gap: 0.5rem; }
.export-box textarea { width: 100%; }

.assistant-note { font-size: 0.86rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.footer { padding-bottom: 2rem; color: var(--muted); font-size: 0.85rem; }
.footer a { color: var(--primary); }
