@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500;1,600&display=swap");

:root {
  color-scheme: light;
  --paper: #f4f2ec;
  --ink: #202721;
  --muted: #737870;
  --rule: #d8d8ce;
  --green: #315a43;
  --red: #bd523e;
  --mono: "DM Mono", "Courier New", monospace;
  --sans: "DM Sans", "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(#3442330c 0.65px, transparent 0.65px);
  background-size: 7px 7px;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 80px, 1440px);
  margin: 0 auto;
}

.site-header {
  min-height: 86px;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.wordmark i, .site-footer i { color: var(--red); font-style: normal; }

.wordmark-seal {
  display: grid;
  width: 36px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--green);
  border-radius: 50%;
  color: var(--green);
  font-family: var(--serif);
  font-size: 20px;
}

.header-note, .eyebrow, .search-hint, .result-count, .site-footer {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0;
}

.header-note { color: var(--muted); }
.header-note span { margin: 0 7px; color: var(--red); }

main {
  width: min(100% - 48px, 920px);
  min-height: calc(100vh - 146px);
  margin: 0 auto;
}

.search-intro {
  padding: clamp(72px, 12vh, 132px) 0 70px;
  animation: arrive 550ms ease-out both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--green);
  font-weight: 500;
}

.eyebrow-rule { width: 28px; height: 1px; background: var(--red); }
.eyebrow-year { margin-left: 8px; color: var(--muted); }

h1 {
  margin: 28px 0 16px;
  font-family: var(--serif);
  font-size: 78px;
  font-weight: 500;
  line-height: 1.02;
}

h1 em { color: var(--green); font-weight: 500; }
.intro-copy { max-width: 450px; margin: 0; color: #565d56; font-size: 16px; line-height: 1.65; }

.search-form {
  display: flex;
  min-height: 66px;
  margin-top: 38px;
  border: 1px solid #bfc4b9;
  background: #fbfaf6;
  box-shadow: 0 5px 20px #2636290b;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.search-form:focus-within { border-color: var(--green); box-shadow: 0 5px 22px #26362916; }
.search-form input { flex: 1; width: 0; min-width: 0; padding: 0 22px; border: 0; outline: 0; color: var(--ink); background: transparent; font: 15px var(--sans); }
.search-form input::placeholder { color: #93978f; opacity: 1; }
.search-form button { display: flex; align-items: center; justify-content: center; gap: 18px; min-width: 132px; margin: 5px; padding: 0 18px; border: 0; color: #fff; background: var(--green); font: 600 13px var(--sans); cursor: pointer; }
.search-form button:hover { background: #244832; }
.search-form button:disabled { cursor: wait; opacity: 0.72; }
.submit-arrow { color: #e5c28b; font-size: 18px; }
.search-hint { margin: 13px 0 0; color: var(--muted); }

.search-output { padding: 4px 0 74px; animation: arrive 380ms ease-out both; }
.results-heading { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--rule); }
.result-count { color: var(--muted); }
.search-status { margin: 0 0 18px; color: #6d726c; font-size: 14px; }

.answer-block { padding: 22px 26px; border-left: 2px solid var(--red); background: #ebece4; }
.answer-block h2 { margin: 0 0 8px; color: var(--green); font: 600 11px var(--mono); text-transform: uppercase; }
.answer-block p { margin: 0; font-size: 15px; line-height: 1.7; white-space: pre-line; }

.result-list { margin-top: 28px; border-top: 1px solid var(--rule); }
.result-item { display: grid; grid-template-columns: 1fr auto; gap: 12px 28px; padding: 24px 2px; border-bottom: 1px solid var(--rule); }
.result-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font: 10px var(--mono); }
.result-meta span + span::before { padding-right: 14px; color: var(--red); content: "/"; }
.result-item h2 { margin: 0; font: 600 17px var(--sans); line-height: 1.4; }
.result-item p { grid-column: 1; margin: 0; color: #565d56; font-size: 14px; line-height: 1.7; }
.result-link { grid-column: 2; grid-row: 2 / span 2; align-self: center; color: var(--green); font: 500 11px var(--mono); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.result-link:hover { color: var(--red); }
.result-link[aria-disabled="true"] { color: var(--muted); text-decoration: none; }

.site-footer { min-height: 60px; border-top: 1px solid var(--rule); color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .site-header, .site-footer { width: calc(100% - 36px); }
  .site-header { min-height: 72px; }
  .header-note { font-size: 8px; }
  main { width: calc(100% - 36px); }
  .search-intro { padding: 82px 0 54px; }
  h1 { font-size: 48px; }
  .search-form { min-height: 60px; }
  .search-form input { padding: 0 12px; font-size: 14px; }
  .search-form button { min-width: 96px; gap: 8px; padding: 0 10px; }
  .result-item { grid-template-columns: 1fr; gap: 10px; }
  .result-meta, .result-item p, .result-link { grid-column: 1; }
  .result-link { grid-row: auto; justify-self: start; margin-top: 5px; }
  .site-footer { gap: 14px; font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}