:root {
  --background: #ffffff;
  --surface: #f5f7fb;
  --surface-strong: #e6edf7;
  --text: #1f2933;
  --muted: #4b5563;
  --border: #6b7280;
  --border-light: #cbd5e1;
  --accent: #0b2f5b;
  --accent-dark: #08213f;
  --focus: #f59e0b;
  --review: #fff4cc;
  --heading-font: Georgia, "Times New Roman", serif;
  --body-font: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 1.05rem;
  line-height: 1.55;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(-200%);
  background: var(--text);
  color: #ffffff;
  padding: .7rem 1rem;
  border-radius: .25rem;
  z-index: 20;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.site-header {
  border-bottom: 1px solid var(--border-light);
  background: var(--accent);
  color: #ffffff;
}

.site-header h1,
.site-header .prototype-label,
.site-header .intro,
.site-header .source-note,
.site-header .contact-note {
  color: #ffffff;
}

.header-inner,
.layout,
.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.header-inner { padding: 2.5rem 0 2rem; }

.prototype-label {
  margin: 0 0 .5rem;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

h1, h2 {
  font-family: var(--heading-font);
  line-height: 1.2;
  color: var(--text);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: .01em;
}

h2 {
  margin-top: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.intro {
  max-width: 820px;
  margin: 1rem 0 0;
  font-size: 1.2rem;
}

.source-note,
.contact-note {
  max-width: 920px;
  margin: 1rem 0 0;
}

.layout { padding: 1.5rem 0 2rem; }

.panel,
.results-section {
  border: 1px solid var(--border-light);
  background: #ffffff;
  border-radius: .35rem;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.search-row { display: grid; gap: .4rem; }

label { font-weight: 700; }

.search-actions {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) auto;
  gap: .75rem;
  align-items: center;
}

input[type="search"] {
  min-height: 2.75rem;
  width: 100%;
  border: 2px solid var(--border);
  border-radius: .25rem;
  padding: .55rem .7rem;
  color: var(--text);
  background: #ffffff;
  font: inherit;
}

button {
  min-height: 2.75rem;
  border: 2px solid var(--accent-dark);
  border-radius: .25rem;
  padding: .55rem .85rem;
  color: #ffffff;
  background: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

.secondary-button {
  color: var(--accent);
  background: #ffffff;
}

.secondary-button:hover {
  color: #ffffff;
  background: var(--accent-dark);
}

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

.hint { margin: 0; color: var(--muted); }

.browse-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}

.status-message {
  margin: 1.25rem 0 0;
  padding: .75rem;
  background: var(--surface);
  border-left: .35rem solid var(--accent);
  font-weight: 700;
}

.section-heading-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: baseline;
  justify-content: space-between;
}

.record-count {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: .25rem;
}

table {
  width: 100%;
  min-width: 1300px;
  border-collapse: collapse;
  font-size: .98rem;
}

caption {
  text-align: left;
  padding: .75rem;
  color: var(--muted);
  background: var(--surface);
  font-weight: 700;
}

th, td {
  border: 1px solid var(--border-light);
  padding: .55rem .65rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 700;
}

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


.site-footer {
  padding: 0 0 2rem;
  color: var(--muted);
}

code {
  background: var(--surface-strong);
  color: var(--text);
  padding: .08rem .25rem;
  border-radius: .2rem;
}

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .search-actions { grid-template-columns: 1fr; }
  .browse-actions { display: grid; }
  button { width: 100%; }
}
