:root {
  --bg: #0f1419;
  --surface: #1a222d;
  --surface-hover: #222c3a;
  --border: #2d3a4d;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #5b9fd4;
  --accent-dim: #3d7ab8;
  --success: #3d9970;
  --warn-bg: rgba(212, 160, 60, 0.12);
  --warn-border: rgba(212, 160, 60, 0.45);
  --danger-bg: rgba(220, 90, 90, 0.1);
  --radius: 10px;
  --font: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(91, 159, 212, 0.15), transparent),
    var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.header__brand {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.1rem;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.header__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.header__api {
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}

.header__api:hover {
  background: var(--surface-hover);
  border-color: var(--accent-dim);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search {
  flex: 1 1 200px;
}

.search input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.search input:focus {
  outline: 2px solid var(--accent-dim);
  outline-offset: 1px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

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

.select-wrap__label {
  font-size: 0.8125rem;
  color: var(--muted);
}

.select-wrap select {
  padding: 0.45rem 0.6rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.toolbar__count {
  margin: 0 0 0 auto;
  font-size: 0.8125rem;
  color: var(--muted);
}

.alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.alert--error {
  color: #f5b4b4;
  background: var(--danger-bg);
  border: 1px solid rgba(220, 90, 90, 0.35);
}

.hidden {
  display: none !important;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th,
.table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.table tbody tr {
  transition: background 0.12s;
}

.table tbody tr:hover {
  background: var(--surface-hover);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.cell-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-title {
  max-width: 220px;
  font-weight: 500;
}

.cell-raw {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.8125rem;
  color: #c9b896;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 4px;
}

.badge--yes {
  color: #8fd4b0;
  background: rgba(61, 153, 112, 0.2);
}

.badge--no {
  color: var(--muted);
  background: rgba(139, 156, 179, 0.15);
}

.row-flag {
  box-shadow: inset 3px 0 0 var(--warn-border);
  background: var(--warn-bg);
}

.footer-note {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-note code {
  padding: 0.1rem 0.35rem;
  font-size: 0.75rem;
  background: var(--surface);
  border-radius: 4px;
}

@media (max-width: 768px) {
  .toolbar__count {
    margin-left: 0;
    width: 100%;
  }

  .table th:nth-child(n + 5),
  .table td:nth-child(n + 5) {
    display: none;
  }
}
