:root {
  color-scheme: light;
  --ink: #1d2b35;
  --muted: #5d6b74;
  --green: #2f6651;
  --green-dark: #214a3a;
  --green-soft: #edf5f1;
  --line: #d8e0dc;
  --paper: #ffffff;
  --background: #f5f7f6;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  line-height: 1.55;
}

a { color: var(--green-dark); }

.shell, .record-page main {
  width: min(920px, calc(100% - 28px));
  margin: 0 auto;
  padding: 36px 0 52px;
}

.hero h1, .record-card h1 {
  margin: 4px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  color: var(--green-dark);
}

.eyebrow, .result-meta {
  margin: 0;
  color: var(--green);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.intro { max-width: 720px; color: var(--muted); font-size: 1.08rem; }

.search-panel, .record-card {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(31, 59, 47, .06);
}

label { display: block; margin-bottom: 7px; font-weight: 700; }

.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

input, select, button {
  min-height: 46px;
  border: 1px solid #aebbb4;
  border-radius: 8px;
  font: inherit;
}

input, select { padding: 10px 12px; background: #fff; color: var(--ink); }

button, .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: white;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

button:hover, .primary-button:hover { background: #153a2b; }

input:focus, select:focus, button:focus, a:focus {
  outline: 3px solid #efb73e;
  outline-offset: 2px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.controls label { margin: 0; }
.controls select { min-height: 38px; }
.stats { margin-left: auto; color: var(--muted); font-size: .9rem; }
.status { margin: 22px 2px 12px; color: var(--muted); }
.results { display: grid; gap: 12px; }

.result-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.result-card h2 { margin: 4px 0 8px; font-size: 1.15rem; }
.result-card h2 a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.excerpt { margin: 0 0 9px; color: #38464f; }
.excerpt mark { padding: 0 .12em; background: #fff0a8; color: inherit; }
.result-link { font-weight: 700; }

.disclaimer {
  margin-top: 28px;
  padding: 15px 17px;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
  color: #344b40;
  font-size: .92rem;
}

.back-link { display: inline-block; margin-bottom: 4px; font-weight: 700; }
.page-text { margin-top: 28px; }
.page-text p { margin: 0 0 1em; }
.record-card .disclaimer { margin: 20px 0; }

.sr-only {
  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: 620px) {
  .shell, .record-page main { width: min(100% - 20px, 920px); padding-top: 24px; }
  .search-row { grid-template-columns: 1fr; }
  .stats { width: 100%; margin-left: 0; }
  .search-panel, .record-card { padding: 17px; }
}
