body {
  font-family: Arial, sans-serif;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px;
  color: #1f2933;
  background: #f7f8fa;
}

h1 {
  margin-bottom: 16px;
}

.filters {
  background: #fff;
  border: 1px solid #d7dde5;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

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

.filters-title {
  font-weight: 700;
}

.filters-subtitle {
  font-size: 0.85rem;
  color: #52606d;
}

.filter-actions,
.filter-options,
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-action-btn,
.expand-btn {
  background: none;
  border: none;
  color: #0b63c8;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 0;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d7dde5;
  background: #f7f8fa;
  font-size: 0.9rem;
}

.card {
  border: 1px solid #d7dde5;
  margin: 10px 0;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

h2 {
  cursor: pointer;
  margin: 0;
  font-size: 1rem;
  display: grid;
  grid-template-columns: minmax(110px, 140px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

h2:hover .header-title {
  color: #0b63c8;
}

.header-id {
  font-weight: 700;
  color: #52606d;
}

.header-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header-title {
  font-weight: 700;
  line-height: 1.35;
}

.header-city {
  font-size: 0.85rem;
  color: #52606d;
  margin-top: 3px;
}

.badge {
  font-size: 0.75rem;
  background: #e9eef5;
  border-radius: 999px;
  padding: 3px 8px;
  color: #35506b;
}

.badge-state {
  text-transform: capitalize;
}

.card-body {
  display: none;
  margin-top: 14px;
}

.card-body.open {
  display: block;
}

.info-section {
  margin-bottom: 14px;
}

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

.info-item {
  background: #f7f8fa;
  border-radius: 8px;
  padding: 10px 12px;
}

.info-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7b8794;
  margin-bottom: 4px;
}

.info-value {
  display: block;
  font-size: 0.92rem;
  word-break: break-word;
}

.meta a {
  display: block;
  font-size: 0.85rem;
  color: #0b63c8;
  margin-bottom: 4px;
  word-break: break-all;
}

.section-title {
  font-weight: 700;
  margin: 14px 0 6px;
}

pre {
  white-space: pre-wrap;
  background: #f7f8fa;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  max-height: 220px;
  overflow: hidden;
}

pre.expanded {
  max-height: none;
}

ul {
  margin: 4px 0;
  padding-left: 20px;
}

li {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.winner {
  font-weight: 700;
  color: #18794e;
}

.arrow {
  cursor: pointer;
  user-select: none;
}

.flag-btn {
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.4;
  transition: opacity 0.15s;
}

.flag-btn:hover {
  opacity: 1;
}

.flag-btn input[type=checkbox] {
  display: none;
}

.card.state-broken .broken-btn,
.card.state-delete .delete-btn {
  opacity: 1;
}

.card.state-broken h2 {
  background: #eef2f6;
  color: #52606d;
  margin: -12px -12px 0;
  padding: 12px;
  border-radius: 9px 9px 0 0;
}

.card.state-delete h2 {
  background: #fee2e2;
  color: #b42318;
  margin: -12px -12px 0;
  padding: 12px;
  border-radius: 9px 9px 0 0;
}

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

  .header-right {
    justify-content: flex-start;
  }

  .filters-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
