/* Paper index for the article catalog. */
.catalog-facets {
  --bookmark: #765519;
  margin: -7px 0 21px; border-block: 1px solid var(--rule);
}
.catalog-facets button {
  border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
}
.catalog-facets [hidden] { display: none !important; }
.type-index, .series-index {
  display: grid; grid-template-columns: 64px minmax(0,1fr);
  column-gap: 12px; align-items: baseline;
}
.index-label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.type-index { padding: 8px 0 3px; }
.type-options { display: flex; flex-wrap: wrap; gap: 0 2px; }
.type-options button {
  position: relative; min-height: 44px; padding: 0 9px; isolation: isolate;
  font-size: 14px; white-space: nowrap;
}
.type-options button::before {
  content: ""; position: absolute; z-index: -1; inset: 7px 0;
  border-radius: 2px;
}
.type-options button:hover::before { background: #f6f5ef; }
.type-options button[aria-pressed=true] { color: #684710; font-weight: 650; }
.type-options button[aria-pressed=true]::before {
  background: #f8e8b4; border-bottom: 2px solid #c79732;
}
.series-index { grid-template-columns: 64px minmax(0,1fr) auto; align-items: center; padding-bottom: 3px; }
#series-toggle {
  display: inline-flex; align-items: center; justify-self: start; gap: 9px;
  min-height: 44px; padding: 0 9px; font-size: 14px; text-align: left; color: var(--accent);
}
#series-toggle i {
  flex: none; width: 7px; height: 7px; border: solid currentColor;
  border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg);
}
#series-toggle[aria-expanded=true] i { transform: translateY(2px) rotate(225deg); }
#article-series {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(194px,100%),1fr));
  gap: 0 20px; margin: 0 0 10px 76px; padding: 6px 12px;
  border-left: 2px solid #e7c76d; background: #faf9f3;
}
#article-series button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 2px; min-height: 44px; text-align: left; font-size: 14px;
}
#article-series button small { font: 11px ui-monospace,monospace; color: #647268; }
#article-series [aria-pressed=true] { font-weight: 650; color: var(--bookmark); }
.catalog-facets .reset-facets, .catalog-empty .reset-facets {
  min-height: 44px; border: 0; background: none; padding: 0 3px; color: var(--muted); font-size: 13px;
}
.catalog-facets button:focus-visible, #series-toggle:hover span, #article-series button:hover,
.reset-facets:hover, .reset-facets:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.edition-index .type-options { display: flex; }
.edition-heading {
  margin: 16px 0 0; padding: 7px 4px; border-bottom: 1px solid #dcc583;
  color: #765519; font: 650 15px/1.5 system-ui,sans-serif;
}
.catalog-empty { margin: 20px 0; color: var(--muted); }
.article-labels, .reader-tags { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; }
.article-labels { margin-top: 5px; color: #54625c; font: 13px/1.6 system-ui,sans-serif; }
.type-label, .reader-tags .tag-type { color: #735522; }
.series-label::before, .reader-tags .tag-series::before { content: ""; display: inline-block; width: 1px; height: .82em; margin-right: 10px; background: #c9cdc2; vertical-align: -.04em; }
.reader-layout { --accent: #896115; --gold: #b37d12; }
.reader-layout .return-link, .reader-layout .original { color: var(--accent); }
.reader-layout .arrow-link > [aria-hidden="true"],
.reader-layout .mobiletoc summary::after,
.reader-layout .prose a.linked-media-zoom { color: var(--gold); }
.reader-layout .arrow-link:is(:hover,:focus-visible,:active) > [aria-hidden="true"],
.reader-layout .prose a.linked-media-zoom:is(:hover,:focus-visible,:active) { color: var(--accent); }
.reader-tags { gap: 0 12px; margin: 2px 0 0; }
.reader-tags a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--accent); }
.reader-tags a:hover, .reader-tags a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.reader-tags + h1 { margin-top: 0; }
@media (max-width: 650px) {
  .top { flex-wrap: wrap; }
  .catalog-facets { margin: 0 0 12px; }
  .type-index { display: block; padding-top: 9px; }
  .type-index .index-label { display: block; margin-bottom: 2px; }
  .type-options { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0 2px; }
  .type-options button { padding: 0; font-size: 13px; }
  .type-options button::before { inset: 7px 0; }
  .series-index { grid-template-columns: max-content minmax(0,1fr) auto; gap: 8px; }
  #series-toggle { padding-inline: 0; }
  #article-series { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 14px; margin-left: 0; }
  #article-series button { overflow-wrap: anywhere; }
  .article-labels { font-size: 12px; }
}
@media (max-width: 365px) {
  .type-options { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
