:root {
  --paper: #efe3c8;
  --paper-dark: #d8c49b;
  --ink: #182433;
  --muted: #5f594d;
  --navy: #101a2b;
  --brass: #9b7a32;
  --line: #2b2b2b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.35), transparent 35%),
    linear-gradient(135deg, #d8c49b, #f3ead8 45%, #cdb98d);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

.site-header {
  background: var(--navy);
  color: var(--paper);
  border-bottom: 6px solid var(--brass);
  padding: 24px 7%;
}

.brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.mark {
  width: 90px;
  height: 90px;
  flex: 0 0 90px;
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: 50%;
  background: transparent;
}

.mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

@media (max-width: 600px) {
  .mark {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }
}
h1,
h2,
h3 {
  margin: 0 0 10px;
  line-height: 1.1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.site-header p {
  margin: 0;
  color: #d8c49b;
}

nav {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

nav a,
button {
  background: var(--brass);
  color: #111;
  border: 2px solid #111;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
}

nav a:hover,
button:hover {
  transform: translateY(-1px);
}

main {
  max-width: 1100px;
  margin: 34px auto;
  padding: 0 18px;
}

.hero,
.card {
  background: rgba(239,227,200,.92);
  border: 2px solid var(--line);
  box-shadow: 8px 8px 0 rgba(16,26,43,.25);
  padding: 28px;
  margin-bottom: 28px;
  position: relative;
}

.hero::before,
.card::before {
  content: "CASE FILE";
  position: absolute;
  top: -14px;
  left: 22px;
  background: var(--navy);
  color: var(--paper);
  border: 2px solid var(--line);
  padding: 2px 10px;
  font-size: .75rem;
  letter-spacing: .12em;
  font-weight: bold;
}

.eyebrow {
  color: var(--brass);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.result {
  margin-top: 18px;
  border: 2px dashed var(--line);
  background: #fbf5e8;
  padding: 18px;
  font-family: "Courier New", monospace;
}

.hidden {
  display: none;
}

.warning {
  border-left: 6px solid var(--brass);
  padding-left: 14px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.field-notes-section {
  margin-bottom: 30px;
}

.field-notes-section > h2 {
  margin-bottom: 0.35rem;
}

.field-notes-section > p {
  max-width: 760px;
  margin: 0 0 1.25rem;
  color: var(--muted);
}

footer {
  text-align: center;
  padding: 30px;
  color: var(--paper);
  background: var(--navy);
  border-top: 6px solid var(--brass);
}

.footer-brand {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1rem;
  margin-top: 0.85rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-links svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.lookup-box {
  width: min(100%, 820px);
  margin: 2rem auto 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-sizing: border-box;

  text-align: left;
  background: #f6f0e4;
  border: 1px solid rgba(25, 40, 52, 0.22);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(25, 40, 52, 0.08);
}

.lookup-intro {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(25, 40, 52, 0.18);
}

.lookup-intro h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.lookup-intro p {
  margin: 0;
  line-height: 1.5;
}

.lookup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-weight: 700;
  font-size: 0.95rem;
}

.form-field select,
.form-field input {
  flex: 0 0 auto;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.85rem;
  box-sizing: border-box;

  font: inherit;
  color: #182934;
  background: #ffffff;
  border: 1px solid rgba(25, 40, 52, 0.35);
  border-radius: 6px;
}

.model-autocomplete {
  position: relative;
}

.model-autocomplete input {
  display: block;
}

.model-suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid rgba(25, 40, 52, 0.35);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(25, 40, 52, 0.16);
}

.model-suggestion {
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  color: #182934;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid rgba(25, 40, 52, 0.12);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.model-suggestion:last-child {
  border-bottom: 0;
}

.model-suggestion:hover,
.model-suggestion:focus-visible,
.model-suggestion.is-active {
  color: #ffffff;
  background: #19394b;
  outline: 0;
}

.model-taxonomy {
  margin-top: 0.25rem;
}

.taxonomy-label {
  margin: 0 0 0.45rem;
  color: #5b646a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.taxonomy-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.taxonomy-option {
  padding: 0.4rem 0.55rem;
  color: #19394b;
  background: transparent;
  border: 1px solid rgba(25, 57, 75, 0.35);
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.taxonomy-option:hover,
.taxonomy-option:focus-visible,
.taxonomy-option.is-active {
  color: #ffffff;
  background: #19394b;
  border-color: #19394b;
  outline: 0;
}

.form-field select:focus,
.form-field input:focus {
  outline: 3px solid rgba(25, 57, 75, 0.18);
  border-color: #19394b;
}

.field-help {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #5b646a;
}

.model-selection {
  margin: 0;
  padding: 0.5rem 0.65rem;
  color: #173b4d;
  background: rgba(197, 164, 91, 0.2);
  border-left: 3px solid var(--brass);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.model-selection--pending {
  color: #5b4632;
  background: rgba(155, 122, 50, 0.12);
}

.model-field-note {
  margin-top: -0.1rem;
}

.model-field-note a {
  color: #173b4d;
  font-weight: 700;
}

#searchButton {
  width: 100%;
  min-height: 50px;
  margin-top: 1.5rem;
  padding: 0.8rem 1.25rem;

  font: inherit;
  font-weight: 700;
  color: #ffffff;
  background: #19394b;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

#searchButton:hover {
  background: #102b3a;
}

#searchButton:focus-visible {
  outline: 3px solid rgba(25, 57, 75, 0.3);
  outline-offset: 3px;
}

.lookup-box .result {
  margin-top: 1.5rem;
}

.record-results {
  display: grid;
  gap: 0.9rem;
}

.record-card {
  padding: 1rem;
  border: 1px solid rgba(25, 40, 52, 0.2);
  border-radius: 6px;
}

.record-card p {
  margin: 0 0 0.9rem;
}

.record-card p:last-of-type {
  margin-bottom: 0;
}

.registered-magnum-details {
  margin: 0 0 1rem;
  padding: 0.9rem;
  border-left: 3px solid var(--brass);
  background: rgba(155, 122, 50, 0.08);
}

.registered-magnum-details p:last-child {
  margin-bottom: 0;
}

.registered-magnum-note {
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

.record-report-link {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.45rem 0.7rem;
  color: #19394b;
  border: 1px solid rgba(25, 57, 75, 0.45);
  border-radius: 4px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.record-report-link:hover,
.record-report-link:focus-visible {
  color: #ffffff;
  background: #19394b;
  border-color: #19394b;
  outline: 0;
}

.record-card--exact {
  background: #fff8e6;
  border: 2px solid var(--brass);
}

.record-card--supporting {
  background: rgba(255, 255, 255, 0.46);
}

.record-card--best {
  background: #fff8e6;
  border: 2px solid rgba(155, 122, 50, 0.75);
}

.suggested-family-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.suggested-family {
  padding: 0.55rem 0.7rem;
  color: #19394b;
  background: #ffffff;
  border: 1px solid rgba(25, 57, 75, 0.45);
  border-radius: 4px;
  box-shadow: none;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

.suggested-family:hover,
.suggested-family:focus-visible {
  color: #ffffff;
  background: #19394b;
  border-color: #19394b;
  outline: 0;
}

.record-share {
  margin: 1rem 0;
  color: #5b646a;
  font-size: 0.9rem;
  line-height: 1.45;
}

.lookup-disclaimer {
  width: min(100%, 820px);
  margin: 1rem auto 0;
  padding: 0.9rem 1rem;
  box-sizing: border-box;

  text-align: left;
  font-size: 0.88rem;
  line-height: 1.5;
  background: rgba(246, 240, 228, 0.65);
  border-left: 4px solid #19394b;
}

@media (max-width: 700px) {
  .lookup-grid {
    grid-template-columns: 1fr;
  }

  .lookup-box {
    padding: 1.15rem;
  }
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
}

.serial-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fbf5e8;
  border: 2px solid var(--line);
}

.serial-table th,
.serial-table td {
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(24, 36, 51, 0.35);
  text-align: left;
  vertical-align: top;
}

.serial-table th {
  background: var(--navy);
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.serial-table td {
  font-size: 0.95rem;
}
