:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #586475;
  --line: #cdd6e1;
  --accent: #0b6f85;
  --accent-strong: #064f60;
  --focus: #b03a2e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

.app-header {
  background: #12343f;
  color: #fff;
  padding: 24px clamp(16px, 4vw, 40px);
}

.app-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: #c8ecf2;
  font-weight: 700;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 40px;
}

.search-panel,
.results-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.search-form label {
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 6px;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #9da8b5;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

button:disabled {
  background: #8a99a6;
  cursor: wait;
}

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

.status,
.summary {
  margin: 12px 0 0;
  color: var(--muted);
}

.results-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
}

.toggle input {
  width: 20px;
  min-height: 20px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #e8f0f3;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  width: 46%;
  font-weight: 650;
}

td:last-child {
  width: 54%;
  overflow-wrap: anywhere;
}

a {
  color: #075c70;
}

.empty-cell {
  color: #7b8794;
  font-weight: 400;
}

@media (max-width: 720px) {
  main {
    width: min(100% - 20px, 1180px);
    margin-top: 16px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .results-header {
    display: block;
  }

  .toggle {
    margin-top: 12px;
  }

  th,
  td {
    padding: 8px;
  }
}
