:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --ink: #1c2b39;
  --muted: #5d6b7a;
  --line: #d5dee7;
  --line-strong: #c3ced9;
  --header: #0b2a43;
  --header-ink: #ffffff;
  --accent: #0b6bcb;
  --accent-hover: #095aa9;
  --accent-ink: #ffffff;
  --accent-soft: #e7f2fb;
  --warn-bg: #fff7e6;
  --warn-ink: #6a4b00;
  --warn-line: #edd9a8;
  --error-bg: #fdeeee;
  --error-ink: #8a1f1b;
  --error-line: #efc4c1;
  --focus: #0b6bcb;
  --row-alt: #f7f9fb;
  --row-hover: #edf5fc;
  --thead: #f4f7fa;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 38, 64, 0.06), 0 8px 24px rgba(16, 38, 64, 0.06);
  color-scheme: light;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}

.wrap {
  width: min(1440px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  z-index: 20;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

.site-header {
  background: var(--header);
  color: var(--header-ink);
  border-bottom: 3px solid #0b6bcb;
  padding: 1.1rem 0;
}

.header-row {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.site-header h1 {
  margin: 0.1rem 0 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: #9eb6c9;
  font-weight: 600;
}

.meta {
  margin: 0;
  color: #c5d4e0;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3dbe72;
  display: inline-block;
}

main {
  padding: 1.25rem 0 3rem;
}

.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 0.95rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

legend {
  font-weight: 650;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

select,
input[type="date"] {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  min-height: 2.4rem;
}

select:hover,
input[type="date"]:hover {
  border-color: #9eb0c0;
}

select:focus,
input:focus,
button:focus,
a:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.95rem 0 0;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.4rem 0.95rem;
  border-radius: 6px;
  border: 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

button {
  background: var(--accent);
  color: var(--accent-ink);
}

button:hover {
  background: var(--accent-hover);
}

.button-link {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.button-link:hover {
  background: var(--accent-soft);
  border-color: #9dc2e4;
}

.banner {
  padding: 0.75rem 0;
  font-size: 0.92rem;
}

.banner-warning {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-bottom: 1px solid var(--warn-line);
}

.banner-error {
  background: var(--error-bg);
  color: var(--error-ink);
  border: 1px solid var(--error-line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.result-meta p {
  margin: 0;
}

.pager {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.pager a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

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

.pager span[aria-disabled="true"] {
  color: #98a4b1;
}

.table-wrap {
  overflow: auto;
  max-height: min(72vh, 820px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 720px;
}

th,
td {
  text-align: left;
  padding: 0.58rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.875rem;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--thead);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4b5b6b;
  font-weight: 700;
  border-bottom: 1px solid var(--line-strong);
}

tbody tr:nth-child(even) {
  background: var(--row-alt);
}

tbody tr:hover {
  background: var(--row-hover);
}

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

@media (max-width: 720px) {
  .wrap {
    width: calc(100% - 1.25rem);
  }

  .result-meta,
  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
