/* ---------------------------------------------------------------
   Tokens
   ----------------------------------------------------------------
   A card-catalog theme: deep pine-ink page, manila-paper cards,
   brass rules and labels, filenames set in mono like a typewriter
   catalog card.
------------------------------------------------------------------ */
:root {
  --ink-900: #0F0B08;
  --ink-800: #21140D;

  --paper-100: #F3D6A3;
  --paper-050: #FAF0DC;

  --brass-500: #D96A1E;
  --brass-700: #A94F1C;

  --text-900: #2A1A12;
  --text-on-ink: #F6D9A5;

  --line-300: #C9A875;
  --line-on-ink: #3A2113;

  --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --content-width: 640px;
  --radius: 3px;
}

:target {
  box-shadow: 0px 0px 5px 2px lightblue;
}

* { box-sizing: border-box; }

.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;
}

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text-on-ink);
  font-family: var(--font-mono);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px 96px;
}

a {
  color: var(--brass-500);
  text-decoration-color: var(--brass-700);
  text-underline-offset: 3px;
}

a:hover { color: var(--paper-050); }

a:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brass-500);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------
   Title banner
------------------------------------------------------------------ */
.title-banner-wrap {
  border-bottom: 3px solid var(--brass-500);
}

.title-banner {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

/* ---------------------------------------------------------------
   Section heading — a brass drawer-label plate
------------------------------------------------------------------ */
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 64px 0 20px;
}

.section-heading h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0;
  color: var(--paper-050);
}

.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-on-ink);
}

section:first-of-type .section-heading { margin-top: 40px; }

/* ---------------------------------------------------------------
   Catalog card — the paper surface used for the search box and
   for each archive folder group
------------------------------------------------------------------ */
.card {
  background: var(--paper-100);
  color: var(--text-900);
  border-top: 4px solid var(--brass-500);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 28px;
}

.card p.hint {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: #5b5346;
}

/* ---------------------------------------------------------------
   Subdirectory search
------------------------------------------------------------------ */
.search-row {
  display: flex;
  gap: 10px;
}

.search-row input[type="text"] {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--line-300);
  border-radius: var(--radius);
  background: var(--paper-050);
  color: var(--text-900);
}

.search-row input[type="text"]::placeholder { color: #8a806c; }

.search-row button {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 10px 18px;
  border: 1px solid var(--brass-700);
  border-radius: var(--radius);
  background: var(--brass-500);
  color: var(--ink-900);
  cursor: pointer;
}

.search-row button:hover { background: var(--brass-700); color: var(--paper-050); }

.result-list,
.hof-list,
.archive-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.result-list li,
.archive-list li {
  border-bottom: 1px solid var(--line-300);
  padding: 9px 0;
}

.result-list li:last-child,
.archive-list li:last-child { border-bottom: none; }

.result-list a,
.archive-list a { color: var(--brass-700); }
.result-list a:hover,
.archive-list a:hover { color: var(--text-900); }

.result-status {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: #5b5346;
}

.result-status[data-state="error"] { color: #9a3f2e; }

/* ---------------------------------------------------------------
   Hall of Fame — brass tabs rather than generic rounded cards
------------------------------------------------------------------ */
.hof-list li {
  border-left: 3px solid var(--brass-500);
  background: var(--ink-800);
  padding: 12px 16px;
  margin-bottom: 8px;
}

.hof-list a {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  display: block;
}

/* ---------------------------------------------------------------
   Archives entry point (on index.html)
------------------------------------------------------------------ */
.archives-link-card {
  display: block;
  margin-top: 64px;
  padding: 24px 28px;
  background: var(--ink-800);
  border: 1px solid var(--line-on-ink);
  border-radius: var(--radius);
  text-decoration: none;
}

.archives-link-card:hover { border-color: var(--brass-500); }

.archives-link-card .eyebrow {
  display: block;
  font-size: 0.85rem;
  color: var(--text-on-ink);
  opacity: 0.7;
  margin-bottom: 4px;
}

.archives-link-card .title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--paper-050);
}

/* ---------------------------------------------------------------
   Archive page — folder groups
------------------------------------------------------------------ */
.archive-group {
  margin-bottom: 22px;
}

.archive-group:last-child { margin-bottom: 0; }

.archive-group h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brass-700);
  margin: 0 0 6px;
}

.back-link { display: inline-block; margin-top: 48px; }

/* ---------------------------------------------------------------
   Misc
------------------------------------------------------------------ */
.page-intro {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-on-ink);
  margin: 28px 0 0;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 480px) {
  .search-row { flex-direction: column; }
  .card { padding: 20px; }
}
