body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background: #f5f7fa;
  color: #1f2933;
}

* {
  box-sizing: border-box;
}

.page-header {
  margin-bottom: 12px;
}

.page-header h2 {
  margin: 0 0 4px;
}

.page-header p {
  margin: 0;
  color: #52606d;
  font-size: 14px;
}

.info-bar {
  background: #fff3cd;
  padding: 10px;
  border: 1px solid #ffeeba;
  margin-bottom: 12px;
  line-height: 1.35;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

input,
select,
button {
  padding: 6px;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
th:focus-visible {
  outline: 3px solid #f0b429;
  outline-offset: 2px;
}

.filters input,
.filters select,
.filters button {
  margin: 0;
}

.filters input[type="text"] {
  min-width: 230px;
}

.filters input[type="number"] {
  width: 130px;
}

.active-filters {
  margin: 8px 0 10px;
  color: #52606d;
  font-size: 13px;
}

.counter {
  margin: 10px 0;
  font-weight: bold;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap[hidden],
.empty-state[hidden] {
  display: none;
}

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

th,
td {
  border: 1px solid #ccc;
  padding: 6px;
  text-align: center;
}

th {
  background: #2c5aa0;
  color: white;
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

td:first-child,
th:first-child {
  text-align: left;
}

tr:nth-child(even) {
  background: #eef3fb;
}

tbody tr:hover {
  background: #dfeaf8;
}

.sort-arrow {
  display: inline-block;
  min-width: 12px;
  margin-left: 4px;
}

th.sorted {
  background: #244f91;
}

.copy-header {
  cursor: default;
  width: 72px;
}

.description-cell {
  min-width: 260px;
}

.copy-cell {
  width: 72px;
  text-align: center;
}

.copy-button {
  min-width: 38px;
  min-height: 30px;
  border: 1px solid #b8c4d6;
  background: #ffffff;
  color: #244f91;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  padding: 5px 8px;
  font-size: 14px;
  font-weight: bold;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.copy-button:hover {
  border-color: #2c5aa0;
  background: #eef3fb;
}

.copy-button.copied {
  border-color: #1f6f43;
  background: #e7f5ee;
  color: #1f6f43;
}

.copy-button.copy-error {
  border-color: #b42318;
  background: #fff1f0;
  color: #b42318;
}

.empty-state {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #d7dee8;
  background: #ffffff;
  color: #1f2933;
  text-align: center;
  line-height: 1.45;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state span {
  margin-top: 4px;
  color: #52606d;
  font-size: 13px;
}

.footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #d7dee8;
  color: #52606d;
  font-size: 12px;
  text-align: center;
  line-height: 1.5;
}

.footer a {
  color: #2c5aa0;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.legal-content {
  max-width: 860px;
  background: #ffffff;
  border: 1px solid #d7dee8;
  padding: 18px;
  line-height: 1.55;
}

.legal-content h3 {
  margin-top: 0;
}

.legal-content p {
  margin: 0 0 12px;
}

.legal-content ul {
  margin: 0 0 12px 20px;
  padding: 0;
}

.back-link {
  display: inline-block;
  margin-top: 14px;
  color: #2c5aa0;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  body {
    padding: 12px;
  }

  .filters {
    align-items: stretch;
  }

  .filters input,
  .filters select,
  .filters button {
    flex: 1 1 150px;
    min-width: 0;
  }

  .filters input[type="text"] {
    min-width: 100%;
  }
}
