:root {
  --navy: #242424;
  --blue: #3d3d3d;
  --paper: #f4f4f3;
  --ink: #333;
  --muted: #696969;
  --line: #d6d6d4;
  --white: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}

button, a { font: inherit; }

.masthead {
  padding: 21px 20px 18px;
  text-align: center;
  background: linear-gradient(#fff, #f4f4f3);
  border-bottom: 1px solid var(--line);
}

h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.5rem, 7vw, 4.8rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 420px;
  margin: 8px auto 0;
  color: var(--blue);
}

.ornament span { height: 1px; flex: 1; background: var(--blue); }
.ornament b { font-size: 0.65rem; }

.archive-nav {
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 14px 16px;
  overflow-x: auto;
  background: linear-gradient(#f8f8f8, #d7d7d7);
  border-bottom: 1px solid #aaa;
}

.archive-nav button {
  padding: 8px 12px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 3px;
  color: #333;
  background: transparent;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

.archive-nav button:hover,
.archive-nav button:focus-visible { background: #eee; color: #111; }
.archive-nav button.active { color: #fff; background: linear-gradient(#656565, #262626); box-shadow: inset 0 1px rgba(255,255,255,.3); }

main { width: min(1000px, calc(100% - 32px)); min-height: 520px; margin: 55px auto 44px; }
.main-panel, .collection-panel { display: none; }
.main-panel.active, .collection-panel.active { display: block; }
.simple-home { max-width: 720px; margin-inline: auto; }
.bill-intro { min-height: 500px; }

.intro-card, .portrait-card, .list-panel {
  margin: 0;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}

h2 {
  margin: 0 0 22px;
  padding-bottom: 13px;
  color: #4a4a4a;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 400;
}

.archive-purpose { margin: 8px auto 48px; max-width: 540px; text-align: center; color: #555; font-size: 1.18rem; }
.work-note { margin-top: 70px; padding-top: 17px; text-align: center; border-top: 3px solid #eee; }
.work-note strong, .work-note span { display: block; }
.work-note span { margin-top: 2px; }

.cabinet-list, .plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.cabinet-list li, .plain-list li { border-bottom: 1px solid var(--line); }
.cabinet-list button, .plain-list li {
  display: block;
  width: 100%;
  padding: 13px 5px;
  color: #383838;
  text-align: left;
  background: transparent;
  border: 0;
}
.cabinet-list button { cursor: pointer; }
.cabinet-list button:hover, .cabinet-list button:focus-visible { text-decoration: underline; background: #faf9f6; }
.cabinet-list strong, .cabinet-list span { display: block; }
.cabinet-list span { margin-top: 2px; color: var(--muted); font-size: .9rem; }

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font: 700 .7rem Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.section-deck { margin: -10px 0 26px; color: var(--muted); font-size: 1.05rem; }
.resource-index { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.resource-index li { display: grid; grid-template-columns: minmax(190px, .8fr) 1.7fr; gap: 24px; padding: 15px 5px; border-bottom: 1px solid var(--line); }
.resource-index span { color: #333; font-weight: 700; }
.resource-index small { color: var(--muted); font-size: .92rem; }
.prototype-note { margin: 28px 0 0; color: var(--muted); font-style: italic; }

.collection-heading {
  padding: 20px 24px 16px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
}
.collection-heading p { margin: 0 0 2px; color: var(--muted); font: 700 .7rem Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.collection-heading h2 { margin: 0; padding: 0; border: 0; font-style: italic; }

.collection-nav {
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 10px;
  overflow-x: auto;
  background: #e2e2e2;
  border: 1px solid #bdbdbd;
}
.collection-nav button {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #333;
  background: transparent;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  font: 700 .76rem Arial, sans-serif;
}
.collection-nav button:hover, .collection-nav button:focus-visible { background: #f3f3f3; }
.collection-nav button.active { color: #fff; background: #444; }

.hank-home.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: stretch;
  margin-top: 28px;
}

.collection-panel.list-panel { margin-top: 28px; }
.collection-panel h3 {
  margin: 0 0 22px;
  padding-bottom: 13px;
  color: #4a4a4a;
  border-bottom: 1px solid var(--line);
  font-size: 1.9rem;
  font-weight: 400;
}

.portrait-card { text-align: center; }
.portrait-card img { display: block; width: 100%; height: 365px; object-fit: cover; object-position: center 20%; filter: grayscale(100%) sepia(12%); }
.portrait-card figcaption { padding-top: 14px; color: #704b3d; }

.year-group + .year-group { margin-top: 30px; }
.year-group h4 { margin: 0 0 4px; color: var(--navy); font: 700 0.88rem Arial, sans-serif; letter-spacing: 0.1em; }
.file-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.file-list li { border-bottom: 1px solid var(--line); }
.file-list a { display: block; padding: 12px 5px; color: #383838; text-decoration: none; }
.file-list a:hover, .file-list a:focus-visible { color: var(--navy); text-decoration: underline; background: #faf9f6; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.photo-grid a { color: var(--blue); text-decoration: none; }
.photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: 8px; }
.photo-grid span { text-decoration: underline; }
.empty { color: var(--muted); font-style: italic; }
.contact-link { color: var(--blue); }

footer {
  padding: 22px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #f7f7f6;
  font-size: 0.88rem;
}

.document-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #e5e5e3;
}

.document-viewer[hidden] { display: none; }

.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 10px 18px;
  color: #fff;
  background: #292929;
  font-family: Arial, sans-serif;
}

.viewer-toolbar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-toolbar button {
  flex: 0 0 auto;
  padding: 9px 14px;
  color: #222;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 700;
}

.viewer-toolbar button:hover,
.viewer-toolbar button:focus-visible { background: #ededed; }

#viewer-frame { width: 100%; height: 100%; border: 0; background: #fff; }
body.viewer-open { overflow: hidden; }

@media (max-width: 760px) {
  .archive-nav { justify-content: flex-start; }
  .collection-nav { justify-content: flex-start; }
  main { margin-top: 24px; }
  .hank-home.active { grid-template-columns: 1fr; }
  .portrait-card { max-width: 360px; }
  .intro-card, .portrait-card, .list-panel { padding: 23px; }
}

@media (max-width: 480px) {
  .archive-nav button { padding-inline: 10px; }
  .resource-index li { grid-template-columns: 1fr; gap: 2px; }
  .viewer-toolbar { align-items: flex-start; flex-direction: column-reverse; }
  .viewer-toolbar button { width: 100%; }
}
