* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #222;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

h1 {
  margin: 0;
  font-size: 28px;
}

h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

h3 {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.subtitle,
.meta,
.hint {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.panel {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.filters-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

input,
select,
button {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
  font-family: inherit;
  font-size: 14px;
}

button {
  cursor: pointer;
  background: #0b6d6d;
  color: #fff;
}

button.secondary {
  background: #f0f0f0;
  color: #222;
}

.stats-grid article {
  background: #f7f7f7;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  padding: 10px;
}

.metric {
  margin: 8px 0;
  font-size: 30px;
  font-weight: bold;
}

.histogram {
  min-height: 150px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  align-items: end;
}

.bar {
  background: #0b6d6d;
  border-radius: 4px 4px 0 0;
  position: relative;
}

.bar .count {
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: #666;
}

.bar-label {
  margin-top: 4px;
  text-align: center;
  font-size: 11px;
  color: #666;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

th {
  cursor: pointer;
  color: #555;
}

tbody tr:hover {
  background: #f9f9f9;
}

a {
  color: #0b6d6d;
}

.changes-feed {
  display: grid;
  gap: 10px;
}

.change-item {
  border: 1px solid #ddd;
  border-left: 4px solid #0b6d6d;
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.change-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 14px;
  font-size: 12px;
  background: #e6f4f4;
  color: #0b6d6d;
}

.badge.removed {
  background: #ffe9e3;
  color: #a6462a;
}

.change-diff {
  margin: 6px 0;
  padding-left: 18px;
}

.change-diff li {
  margin-bottom: 3px;
  font-size: 13px;
}

@media (max-width: 700px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .histogram {
    grid-template-columns: repeat(3, 1fr);
  }

  button {
    width: 100%;
  }
}