@font-face {
  font-family: "Gothic A1";
  src: url("/assets/GothicA1-Regular-3fac3619.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilda Display";
  src: url("/assets/GildaDisplay-Regular-9a03687b.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1d211c;
  --muted: #60675c;
  --paper: #fffcef;
  --panel: #fffdf6;
  --blue: #031673;
  --blue-soft: #e7eafb;
  --red: #b3261e;
  --line: #d8d2bd;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Gothic A1", "URW Gothic L", "Trebuchet MS", Verdana, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover { background: var(--blue); color: #f5f5f5; }

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

.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  flex: 1 1 420px;
  min-width: 0;
}

.brand:hover { background: transparent; color: var(--ink); }

.brand-logo {
  height: 52px;
  width: auto;
  flex: 0 0 auto;
}

.brand-name {
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.red { color: var(--red); }

.site-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-link {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--blue);
  font-size: 0.95rem;
}

.nav-link.active, .nav-link:hover {
  background: var(--blue);
  color: white;
}

.search-form {
  display: flex;
  gap: 0.35rem;
  flex: 1 1 260px;
  max-width: 360px;
}

.search-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-size: 0.95rem;
}

.search-form input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.search-form button, .button {
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  padding: 0.5rem 0.95rem;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.search-form button:hover, .button:hover {
  background: #071f9e;
  color: white;
}

.search-page-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.search-page-form input {
  flex: 1 1 220px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 0.55rem 0.9rem;
  font: inherit;
}

.search-page-form input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.searchable-select {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
}

.searchable-select input {
  width: 100%;
  padding-right: 2.3rem;
}

.searchable-select-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  padding: 0.35rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.searchable-select-toggle:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.searchable-select-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  max-height: 19rem;
  margin: 0;
  padding: 0.25rem 0;
  overflow-y: auto;
  list-style: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(29, 33, 28, 0.16);
}

.searchable-select-options[hidden] { display: none; }

.searchable-select-options [role="option"] {
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.searchable-select-options [role="option"]:hover,
.searchable-select-options [role="option"].is-active {
  background: var(--blue);
  color: white;
}

.searchable-select-options [role="option"][aria-selected="true"] {
  font-weight: 700;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.archive-intro {
  margin: 0 0 1.25rem;
  max-width: 80ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 0.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.hero h1 {
  color: var(--blue);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.08;
  margin: 0 0 0.55rem;
}

.hero p { margin: 0.35rem 0; max-width: 65ch; }

.hero-logo {
  width: min(290px, 36vw);
  height: auto;
}

.path {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.breadcrumbs a { text-decoration: none; }

.section-heading {
  color: var(--blue);
  font-size: 2rem;
  margin: 1.5rem 0 0.6rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--line);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.2rem 1.1rem;
}

.directory-grid a {
  display: block;
  padding: 0.18rem 0.3rem;
  border-radius: 4px;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.directory-grid a:hover { background: var(--blue); }

.notice {
  background: var(--blue-soft);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.7rem 0.9rem;
  margin: 0.8rem 0;
}

.motd ul { margin: 0.2rem 0 0.2rem 1.1rem; padding: 0; }
.motd li { margin: 0.25rem 0; }

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.file-list li {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.file-list li:last-child { border-bottom: 0; }

.file-list .file-name {
  min-width: 0;
  overflow-wrap: anywhere;
  flex: 1 1 auto;
}

.file-list .file-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.file-list .file-meta a { text-decoration: none; }

.preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0.75rem 0 1.25rem;
  overflow-x: auto;
}

.preview h3 {
  margin: 0 0 0.5rem;
  color: var(--blue);
  font-size: 1.05rem;
}

.preview pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 0.9rem;
}

.preview :is(p, ul, ol) { margin: 0.5rem 0; }

.contact-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 0.75rem;
}

.results { margin-top: 1rem; }

.result {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.result:last-child { border-bottom: 0; }
.result .result-title { font-weight: 600; }
.result .result-path { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.result .result-meta { color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }

.empty-state {
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  color: var(--muted);
}

.error-page { text-align: center; padding: 3rem 1rem; }
.error-page .brand-logo { height: 110px; margin-bottom: 1rem; }
.error-page h1 { color: var(--red); }

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer p { margin: 0.35rem 0; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
  .brand-logo { height: 42px; }
  .search-form { max-width: none; }
  .file-list li { flex-direction: column; gap: 0.15rem; }
  .file-list .file-meta { white-space: normal; }
}
