:root {
  --paper: #f7f8f5;
  --paper-deep: #eef1ed;
  --ink: #1f292c;
  --ink-soft: #526268;
  --muted: #7a898b;
  --line: #d9e0dc;
  --line-strong: #c7d0ca;
  --blue: #789dbf;
  --blue-dark: #577d9f;
  --blue-pale: #e7eef4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { background: var(--paper); scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 22%, rgba(120, 157, 191, .16) 0 1px, transparent 1.5px),
    radial-gradient(circle at 18% 74%, rgba(120, 157, 191, .14) 0 1px, transparent 1.5px),
    radial-gradient(circle at 34% 11%, rgba(116, 132, 116, .13) 0 1px, transparent 1.5px),
    radial-gradient(circle at 56% 24%, rgba(120, 157, 191, .14) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 15%, rgba(116, 132, 116, .13) 0 1px, transparent 1.5px),
    radial-gradient(circle at 92% 70%, rgba(120, 157, 191, .14) 0 1px, transparent 1.5px),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body:not(.has-query):not(.show-browse) { height: 100svh; overflow: hidden; }
body.has-query, body.show-browse { min-height: 100svh; overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.page-shell { min-height: 100svh; display: flex; flex-direction: column; position: relative; }

.page-shell::before, .page-shell::after {
  content: ""; position: fixed; width: 5px; height: 5px; border: 1px solid rgba(120, 157, 191, .25); transform: rotate(45deg); pointer-events: none;
}
.page-shell::before { top: 22%; left: 5.2%; }
.page-shell::after { right: 7.4%; top: 17%; }

.site-header {
  height: 78px; padding: 0 clamp(24px, 5.2vw, 88px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto;
}

.header-brand, .header-actions, .footer-lockup, .footer-links, .header-name { display: flex; align-items: center; }
.header-brand { gap: 10px; }
.header-brand img { display: block; }
.header-name { font-size: 22px; letter-spacing: -.045em; font-weight: 700; }
.header-year { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; margin-left: 4px; }
.header-actions { gap: clamp(20px, 3vw, 48px); color: var(--ink-soft); font-size: 13px; }
.index-status { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #7fa48b; box-shadow: 0 0 0 3px rgba(127,164,139,.12); }
.about-menu { position: relative; }
.about-trigger { border: 0; background: none; cursor: pointer; color: var(--ink); padding: 12px 0; display: flex; gap: 9px; align-items: center; }
.about-trigger span { font-size: 16px; line-height: 1; color: var(--muted); transform: translateY(-1px); }
.about-panel { position: absolute; z-index: 4; right: -18px; top: 48px; width: 260px; background: rgba(247,248,245,.98); border: 1px solid var(--line-strong); box-shadow: 0 18px 46px rgba(31,41,44,.11); padding: 20px 22px 18px; }
.about-panel p { margin: 0 0 16px; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.about-panel .panel-kicker { margin-bottom: 11px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .16em; }
.about-panel a { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding: 12px 0 0; margin-top: 10px; font-size: 12px; color: var(--ink); }
.about-panel a span { color: var(--blue-dark); }

main { flex: 1 0 auto; display: flex; flex-direction: column; }
.hero { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 24px 24px; text-align: center; }
.hero-eyebrow { width: min(860px, 100%); display: flex; justify-content: space-between; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .19em; }
.hero-eyebrow span:last-child { color: var(--blue-dark); }
.hero-lockup { display: flex; align-items: center; gap: 18px; margin: clamp(30px, 6vh, 60px) 0 8px; }
.hero-lockup img { width: clamp(68px, 7vw, 96px); height: clamp(68px, 7vw, 96px); object-fit: contain; }
.hero-lockup span { color: var(--ink); font-size: clamp(64px, 8.4vw, 118px); line-height: .82; letter-spacing: -.075em; font-weight: 700; }
.hero-subtitle { margin: 22px 0 0; color: var(--ink-soft); font-size: clamp(16px, 1.55vw, 21px); letter-spacing: -.02em; }
.hero-support { margin: 9px 0 27px; color: var(--muted); font-family: var(--serif); font-size: clamp(14px, 1.25vw, 17px); font-style: italic; }
.search-form { width: min(740px, 100%); height: 68px; display: flex; align-items: center; gap: 13px; padding: 7px 8px 7px 22px; border: 1px solid var(--line-strong); border-radius: 13px; background: rgba(255,255,253,.72); box-shadow: 0 8px 26px rgba(31,41,44,.05); transition: border-color .2s ease, box-shadow .2s ease; }
.search-form:focus-within { border-color: var(--blue); box-shadow: 0 9px 28px rgba(87,125,159,.15); }
.search-icon { width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 50%; position: relative; flex: 0 0 auto; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--muted); right: -5px; bottom: -2px; transform: rotate(47deg); border-radius: 2px; }
.search-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.search-form input::placeholder { color: #9aa5a5; }
.search-shortcut { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); border-radius: 5px; font-family: var(--mono); font-size: 11px; }
.search-form button { height: 54px; padding: 0 22px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; cursor: pointer; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 18px; transition: background .2s ease, transform .2s ease; }
.search-form button:hover { background: #314045; transform: translateY(-1px); }
.search-form button span { color: #b9d0e1; font-size: 18px; line-height: 1; }
.search-note { width: min(740px, 100%); display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-top: 10px; letter-spacing: .02em; }
.browse-link { margin-top: 24px; color: var(--blue-dark); font-family: var(--serif); font-size: 15px; border-bottom: 1px solid rgba(87,125,159,.38); padding-bottom: 3px; transition: color .2s ease, border-color .2s ease; }
.browse-link span { display: inline-block; margin-left: 9px; transition: transform .2s ease; }
.browse-link:hover { color: var(--ink); border-color: var(--ink); }
.browse-link:hover span { transform: translateX(4px); }

.results { width: min(1000px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 72px; }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-kicker { margin: 0 0 11px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .19em; }
.results h2, .about-section h2 { margin: 0; font-family: var(--serif); font-size: clamp(30px, 4vw, 52px); font-weight: 400; letter-spacing: -.04em; }
.heading-period { color: var(--blue-dark); }
.results-count { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 5px; }
.results-rule { border-top: 1px solid var(--line-strong); margin: 23px 0 0; }
.result-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 1px; }
.result-card { background: rgba(255,255,253,.55); padding: 23px 24px 21px; min-height: 212px; transition: background .2s ease, box-shadow .2s ease; }
.result-card:hover { background: #fff; box-shadow: 0 7px 22px rgba(31,41,44,.08); position: relative; z-index: 1; }
.result-card-top, .result-meta { display: flex; align-items: center; gap: 10px; }
.record-id { color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .14em; }
.record-state { margin-left: auto; color: #6d917a; font-family: var(--mono); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.record-state i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #7fa48b; margin-right: 5px; vertical-align: 1px; }
.result-card h3 { margin: 28px 0 9px; font-family: var(--serif); font-size: 25px; line-height: 1.08; font-weight: 400; letter-spacing: -.025em; }
.result-summary { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; max-width: 48ch; }
.result-meta { margin-top: 19px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.meta-arrow { margin-left: auto; color: var(--blue-dark); font-size: 16px; }
.no-results { grid-column: 1 / -1; margin: 0; padding: 42px 24px; text-align: center; color: var(--muted); font-family: var(--serif); font-size: 19px; }
.about-section { width: min(760px, calc(100% - 48px)); margin: 0 auto; padding: 38px 0 84px; }
.about-section > p:last-child { color: var(--ink-soft); font-size: 16px; line-height: 1.65; max-width: 58ch; margin-top: 24px; }

.site-footer { flex: 0 0 auto; min-height: 126px; border-top: 1px solid var(--line); padding: 22px clamp(24px, 5.2vw, 88px) 19px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px; align-items: end; }
.footer-lockup { gap: 9px; }
.footer-lockup span { font-weight: 700; letter-spacing: -.04em; font-size: 18px; }
.footer-brand p { margin: 10px 0 0; color: var(--muted); font-size: 11px; max-width: 250px; line-height: 1.4; }
.footer-links { align-items: flex-start; flex-direction: column; gap: 7px; font-size: 12px; color: var(--ink-soft); }
.footer-links a span { color: var(--blue-dark); margin-left: 7px; }
.footer-note { color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .04em; margin-top: 5px; }
.footer-motto { justify-self: end; text-align: left; font-family: var(--serif); font-size: clamp(19px, 1.8vw, 26px); line-height: 1.08; letter-spacing: -.035em; }
.footer-motto em { display: block; color: var(--muted); font-style: italic; }

body.has-query .hero, body.show-browse .hero { align-items: stretch; justify-content: flex-start; text-align: left; width: min(1000px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 26px; }
body.has-query .hero-eyebrow, body.show-browse .hero-eyebrow { width: 100%; }
body.has-query .hero-lockup, body.show-browse .hero-lockup { margin: 27px 0 0; gap: 11px; }
body.has-query .hero-lockup img, body.show-browse .hero-lockup img { width: 40px; height: 40px; }
body.has-query .hero-lockup span, body.show-browse .hero-lockup span { font-size: 42px; }
body.has-query .hero-subtitle, body.show-browse .hero-subtitle { margin: 12px 0 0; font-size: 15px; }
body.has-query .hero-support, body.show-browse .hero-support { display: none; }
body.has-query .search-form, body.show-browse .search-form { width: 100%; margin-top: 24px; height: 62px; }
body.has-query .search-form button, body.show-browse .search-form button { height: 48px; }
body.has-query .search-note, body.show-browse .search-note { width: 100%; }
body.has-query .browse-link, body.show-browse .browse-link { display: none; }

[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .site-header { height: 68px; padding-inline: 20px; }
  .header-name { font-size: 19px; }
  .index-status { display: none; }
  .hero { padding-inline: 20px; }
  .hero-eyebrow { font-size: 8px; letter-spacing: .14em; }
  .hero-lockup { gap: 11px; margin-top: 34px; }
  .hero-lockup span { font-size: clamp(48px, 15vw, 76px); }
  .hero-subtitle { max-width: 340px; line-height: 1.35; }
  .hero-support { margin-bottom: 22px; }
  .search-form { height: 61px; padding-left: 16px; gap: 9px; }
  .search-form button { padding-inline: 15px; gap: 9px; }
  .search-form button { font-size: 0; }
  .search-form button span { font-size: 21px; }
  .search-note { font-size: 9px; gap: 12px; }
  .search-note span:last-child { display: none; }
  .site-footer { min-height: 108px; padding: 17px 20px; grid-template-columns: 1fr 1fr; gap: 15px; }
  .footer-brand p, .footer-links { font-size: 10px; }
  .footer-motto { display: none; }
  .results, .about-section, body.has-query .hero, body.show-browse .hero { width: calc(100% - 40px); }
  .result-list { grid-template-columns: 1fr; }
  .results-heading { align-items: flex-start; flex-direction: column; }
  .results-count { margin: 0; }
  body.has-query .hero, body.show-browse .hero { padding-top: 18px; }
}

@media (max-height: 700px) and (min-width: 761px) {
  .hero-lockup { margin-top: 25px; }
  .hero-subtitle { margin-top: 16px; }
  .hero-support { margin-bottom: 19px; }
  .site-footer { min-height: 112px; }
}
