/* Homepage */
.home-page { padding-top: 38px; }
.hero-panel { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 64px; padding-block: 25px 52px; }
.hero-copy { min-width: 0; }
.hero-copy h1 { margin-block: 22px; font-size: clamp(2.6rem, 4.6vw, 3.8rem); line-height: 1.1; }
.hero-copy h1 em { color: var(--accent); font-style: normal; }
.hero-copy .lede { max-width: 45ch; font-size: 16px; }
.hero-copy .button-row { margin-top: 27px; }
.hero-note { display: flex; align-items: center; gap: 7px; margin-top: 17px; color: var(--muted); font-size: 11px; }
.archive-map {
  position: relative;
  width: 100%;
  aspect-ratio: 1.14;
  max-height: 370px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background-color: var(--tint);
  background-image: radial-gradient(#424e5e 1px, transparent 1px);
  background-size: 18px 18px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}
.map-caption { position: absolute; top: 22px; left: 22px; color: #9fb0c3; font: 10px var(--mono); letter-spacing: 0.1em; }
.map-caption.bottom { inset: auto 0 20px; text-align: center; font-size: 9px; letter-spacing: 0.07em; }
.map-orbit { position: absolute; width: 62%; aspect-ratio: 1; border: 1px dashed #495769; border-radius: 50%; left: 19%; top: 15%; }
.map-orbit::before { content: ""; position: absolute; inset: 22px; border: 1px solid #35404e; border-radius: 50%; }
.map-core { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 116px; height: 116px; border: 1px solid #485668; border-radius: 50%; background: var(--surface); transform: translate(-50%, -50%); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28); }
.map-core img { width: 78px; height: 78px; object-fit: contain; }
.map-node { display: flex; position: absolute; align-items: center; gap: 10px; padding: 10px 15px 10px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22); color: #c8d3e0; font: 10px var(--mono); }
.map-node .type-icon { width: 34px; height: 34px; font-size: 17px; border-radius: 8px; }
.node-text { top: 23%; left: 7%; transform: rotate(-5deg); }
.node-images { top: 23%; right: 5%; transform: rotate(5deg); }
.node-audio { bottom: 17%; left: 9%; transform: rotate(4deg); }
.node-meta { bottom: 17%; right: 5%; transform: rotate(-4deg); }
.archive-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding-block: 26px; border-block: 1px solid var(--line); }
.archive-stats > div { display: flex; flex-direction: column-reverse; gap: 5px; padding-inline: 30px; border-right: 1px solid var(--line); }
.archive-stats > div:first-child { padding-left: 0; }
.archive-stats > div:last-child { border: 0; }
.archive-stats dt { color: var(--muted); font-size: 12px; }
.archive-stats dd { margin: 0; font-size: 27px; font-weight: 600; line-height: 1.2; letter-spacing: -0.8px; font-variant-numeric: tabular-nums; }
.archive-stats dd span { font-size: 17px; font-weight: 450; }
.archive-stats dd .stat-value { font: inherit; }
.browse-types { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.browse-types > span { margin-right: 6px; color: var(--muted); font-size: 12px; }
.browse-types a { display: inline-flex; align-items: center; min-height: 38px; gap: 8px; padding: 5px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--body-copy); font-size: 12px; text-decoration: none; }
.browse-types a:hover { color: var(--ink); border-color: var(--accent); background: var(--surface-hover); }
.guide-panel { padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
.guide-panel .section-heading { margin-bottom: 30px; }
.guide-panel .section-heading > p { max-width: 32ch; }
.download-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px; padding: 0; margin: 0; list-style: none; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-bottom: 17px; border: 1px solid #526072; border-radius: 50%; background: var(--surface); font: 11px var(--mono); color: var(--gold); }
.download-steps h3 { margin-bottom: 10px; font-size: 15px; }
.download-steps p { color: var(--body-copy); font-size: 12px; line-height: 1.85; }
.guide-footnote { margin-top: 28px; padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

/* Progressively enhanced catalog controls */
.catalog-controls { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.search-row { display: grid; grid-template-columns: 1fr 220px; gap: 18px; }
.control-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.search-field { position: relative; }
.search-field > .icon { position: absolute; top: 15px; left: 15px; color: var(--muted); pointer-events: none; }
input[type="search"], select { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 8px; background-color: var(--surface); color: var(--ink); font-size: 13px; }
input[type="search"] { padding: 12px 14px 12px 45px; }
input[type="search"]::placeholder { color: var(--muted); opacity: 1; }
select { padding: 12px; background-color: var(--surface); color: var(--ink); }
.filter-types { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 0; padding: 0; border: 0; }
.filter-types label { position: relative; cursor: pointer; }
.filter-types label > span { display: inline-flex; min-height: 40px; align-items: center; gap: 10px; padding: 8px 15px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); font-size: 12px; }
.filter-types .filter-count { display: inline-grid; min-width: 19px; place-items: center; color: #b8c4d4; background: var(--tint); border-radius: 4px; font: 10px/1.7 var(--mono); font-variant-numeric: tabular-nums; }
.filter-types label:hover > span { background: var(--surface); color: var(--ink); }
.filter-types input:checked + span { border-color: #546478; background: #2f3946; color: var(--gold); font-weight: 600; }
.filter-types input:checked + span .filter-count { background: #202730; color: var(--gold); }
.filter-types input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 3px; }
.results-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: 69px; padding-block: 16px; }
.results-bar h2, .results-bar p { font-size: 12px; color: var(--muted); letter-spacing: 0; line-height: 1.6; font-weight: 400; }
.results-bar h2 { color: var(--ink); font-weight: 550; }
.reset-filters { min-height: 40px; padding: 7px 0; border: 0; background: none; color: var(--accent); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.reset-filters:hover { color: var(--accent-hover); }
.empty-state { padding: 60px 24px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--tint); text-align: center; }
.empty-state > .icon { width: 32px; height: 32px; margin: 0 auto 20px; color: var(--muted); }
.empty-state h2 { font-size: 24px; }
.empty-state p { margin: 12px 0 22px; color: var(--body-copy); font-size: 14px; }
.catalog-note { margin-top: 28px; color: var(--muted); font-size: 12px; }
.no-script-note { padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--tint); color: var(--body-copy); font-size: 13px; }

@media (max-width: 1000px) {
  .hero-panel { gap: 30px; }
  .map-node { padding: 8px; font-size: 9px; gap: 6px; }
  .map-core { width: 95px; height: 95px; }
  .map-core img { width: 65px; height: 65px; }
  .node-text { left: 3%; }
  .node-images { right: 3%; }
  .node-audio { left: 3%; }
  .node-meta { right: 3%; }
}
@media (max-width: 760px) {
  .hero-panel { grid-template-columns: 1fr; gap: 35px; padding-top: 5px; padding-bottom: 36px; }
  .hero-copy h1 { font-size: clamp(2.6rem, 8vw, 3.8rem); }
  .archive-map { max-height: none; aspect-ratio: 1.65; }
  .map-orbit { width: 43%; left: 28.5%; top: 14%; }
  .map-node { padding: 10px 15px 10px 10px; font-size: 10px; gap: 10px; }
  .node-text { top: 22%; left: 12%; }
  .node-images { top: 22%; right: 12%; }
  .node-audio { bottom: 17%; left: 12%; }
  .node-meta { bottom: 17%; right: 12%; }
  .archive-stats { padding-block: 22px; }
  .archive-stats > div { padding-inline: 17px; }
  .archive-stats dd { font-size: 24px; }
  .archive-stats dd span { font-size: 13px; }
  .archive-stats dt { font-size: 10px; }
  .guide-panel { padding: 26px; }
  .download-steps { gap: 22px; }
  .guide-panel .section-heading > p { max-width: 24ch; }
}
@media (max-width: 520px) {
  .archive-map { aspect-ratio: 1.35; }
  .map-caption { top: 16px; left: 16px; font-size: 9px; }
  .map-caption.bottom { bottom: 14px; font-size: 8px; }
  .map-orbit { width: 61%; left: 19.5%; top: 13%; }
  .map-core { width: 85px; height: 85px; }
  .map-core img { width: 57px; height: 57px; }
  .map-node { padding: 7px; gap: 6px; font-size: 8px; }
  .map-node .type-icon { width: 27px; height: 27px; font-size: 14px; }
  .node-text { top: 23%; left: 4%; }
  .node-images { top: 23%; right: 4%; }
  .node-audio { bottom: 18%; left: 6%; }
  .node-meta { bottom: 18%; right: 5%; }
  .archive-stats { grid-template-columns: repeat(2, 1fr); row-gap: 25px; }
  .archive-stats > div { padding-left: 20px; }
  .archive-stats > div:nth-child(odd) { padding-left: 0; }
  .archive-stats > div:nth-child(even) { border: 0; }
  .archive-stats dd { font-size: 26px; }
  .archive-stats dt { font-size: 12px; }
  .browse-types > span { width: 100%; }
  .download-steps { grid-template-columns: 1fr; gap: 24px; }
  .download-steps li { position: relative; padding-left: 45px; }
  .step-number { position: absolute; left: 0; top: -3px; }
  .guide-panel .section-heading > p { max-width: none; }
  .search-row { grid-template-columns: minmax(0, 1fr); }
  .filter-types { gap: 6px; }
  .filter-types label > span { padding-inline: 11px; }
}
