/* Pure black exhibition surfaces; color belongs to reflected metal and deliberate clicks. */
:root {
  color-scheme: dark;
  color: #fff;
  background: #000;
  --bg: #000;
  --panel: #000;
  --line: #252a30;
  --muted: #939ba5;
  --ice: #fff;
  --glass: #000;
  --glass-line: #252a30;
  --glass-shadow: none;
  --accent: #b8c0ca;
  --metal-spectrum: #e4e9ee, #d2b44b, #59a580, #06ccff, #477cbe, #6764ae, #a16ca8, #e4e9ee;
}
html, body { background: #000; color: #fff; }
::selection { background: #38414c; color: #fff; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
summary:focus-visible { outline: 2px solid #d9e1e9; outline-offset: 3px; }
.site-header { background: rgb(0 0 0 / 94%); border-color: var(--line); box-shadow: none; backdrop-filter: blur(16px); }
.brand, .footer .brand, .brand-mark, .brand-word,
.brand .brand-mark, .brand .brand-word {
  background: none; color: #fff; -webkit-text-fill-color: #fff;
}
h1, h2, h3, .hero h1, .section-head h2, .closing h2,
.card-main .card-title, .detail-body h2 { color: #fff; -webkit-text-fill-color: #fff; }
.desktop-nav, .footer, .footer a { color: #a0a8b2; }
.desktop-nav a:hover, .footer a:hover { color: #fff; }
.hero, .showcase.section-shell, .intro-band, .lab, .closing, .interlude {
  background: #000; color: #fff;
}
.search-trigger, .header-cta, .menu-trigger, .lang-trigger,
.button-light, .button-dark, .button-outline, .catalog-pagination button,
.dialog-close, .detail-close {
  color: #e0e5eb; background: #000; border: 1px solid #363c44; box-shadow: none;
}
.search-trigger:hover, .lang-trigger:hover, .button:hover, .header-cta:hover,
.catalog-pagination button:not(:disabled):hover { background: #13171c; color: #fff; transform: none; }
.search-trigger kbd { color: #a7afb9; border-color: #343a42; }
.menu-trigger span { background: #fff; }
.mobile-nav:not([hidden]) { color: #fff; background: #000; border-color: var(--line); }
.lang-menu { color: #fff; background: #000; border: 1px solid var(--line); box-shadow: 0 20px 70px #000; }
.lang-menu button { color: #d4dbe4; }
.lang-menu button:hover, .lang-menu button:focus-visible,
.lang-menu button[aria-checked="true"] { background: #171b20; color: #fff; }
.lang-check { color: #fff; }
.section-kicker, .showcase .section-kicker, .closing .section-kicker,
.catalog-search-label, .catalog-select-label, .chip-heading,
.catalog-summary, .catalog-summary span:last-child, .toolbar-count,
.facet-hint, .catalog-sidebar .facet-hint { color: var(--muted); }
.section-head > p, .closing p, .hero-copy > p { color: #a7b0ba; }
.catalog-summary, .showcase .catalog-summary, .showcase .toolbar,
.intro-band, .interlude, .footer { border-color: var(--line); }
.catalog-collection-progress { background: #000; color: #aab4bf; border: 1px solid var(--line); box-shadow: none; }
.showcase .catalog-tools input, .showcase .catalog-tools select,
.catalog-pagination input, .catalog-sidebar select, .classification-controls select,
.source-facets select {
  color: #e5eaf0; background: #000; border-color: #363c44; box-shadow: none;
}
.catalog-tools input::placeholder, .search-field input::placeholder { color: #89939e; }
.catalog-tools input:focus, .showcase .catalog-tools select:focus,
.catalog-pagination input:focus { border-color: #b8c0ca; }
.catalog-sidebar, .category-list { scrollbar-color: #4b525c #000; }
.sidebar-heading { background: #000; }
.sidebar-heading strong, .filter-section > summary { color: #fff; }
.filter-subsection > summary, .catalog-sidebar .filter-subsection > summary { color: #b8c0ca; }
.catalog-sidebar .filter-subsection { border-left-color: #363c44; }
.technical-details { margin-top: 0; padding-top: 13px; }
.technical-details summary { margin-bottom: 0; }
.catalog-sidebar .catalog-select-label, .catalog-sidebar .chip-heading,
.source-facets label, .classification-controls label { color: #a0a9b4; }
.showcase .filter, .catalog-sidebar .category-list .filter,
.catalog-sidebar .filter-list .filter, .catalog-sidebar #topic-list .filter {
  color: #b8c0ca; background: #000; border-color: var(--line); box-shadow: none;
}
.showcase .filter:hover, .catalog-sidebar .filter-list .filter:hover,
.catalog-sidebar #topic-list .filter:hover { color: #fff; background: #101419; border-color: #434b55; }
.showcase .filter.active, .catalog-sidebar .category-list .filter.active,
.catalog-sidebar .filter-list .filter.active {
  color: #fff; background: #171b20; border-color: #4a535e; box-shadow: none;
}
.catalog-sidebar .filter-list .filter span { color: #8e98a4; }
.catalog-sidebar .filter-list .filter.active span { color: #d2d9e2; }
.clear-filters, .empty-state, .search-empty { color: #b8c0ca; }
.source-list .filter.active::before, .cover-list .filter.active::before,
.catalog-sidebar .filter-list .filter.active::before { display: none; }
.study-card { color: #fff; background: #000; border: 1px solid #20252b; box-shadow: none; backdrop-filter: none; }
.study-card:hover { border-color: #4d5661; box-shadow: none; }
.study-card .card-image, .detail-cover, .search-mini { background-color: #000; }
.card-main .feed-card-top, .card-main .card-author, .card-main .card-excerpt { color: #a0a9b4; }
.card-main .card-technique { color: #dce2e9; }
.feed-source::before { background: #b8c0ca; }
.feed-card-bottom, .card-links {
  color: #a0a9b4; background: #000; border: 1px solid #20252b; box-shadow: none;
}
.feed-card-bottom span:first-child, .card-links .card-source-link,
.card-links .card-demo-link, .card-source-link, .card-demo-link { color: #e0e6ed; }
.card-source-link:hover, .card-demo-link:hover { color: #fff; }
.card-classification span { color: #b8c0ca; background: #000; border-color: #303741; }
.card-image.missing-cover, .detail-cover.missing-cover, .search-mini.missing-cover { background: #000; color: #dfe5ec; }
.missing-cover-domain { color: #9aa4b0; }
.catalog-pagination { color: #b8c0ca; }
.catalog-pagination button:disabled { color: #737c87; }
.overlay-backdrop { background: rgb(0 0 0 / 82%); backdrop-filter: blur(12px); }
.search-dialog, .detail-dialog { color: #fff; background: #000; border: 1px solid #3b434d; box-shadow: 0 25px 100px #000; }
.dialog-top, .dialog-footer, .search-summary, .search-field svg { color: #aab4bf; border-color: var(--line); }
.search-field input, .search-results button { color: #fff; }
.search-results button:hover { background: #151a20; }
.search-results small, .detail-fields dt { color: #a0a9b4; }
.search-results #show-all-results { color: #e0e6ed; border-color: #3b434d; }
.detail-body > p:not(.section-kicker), .detail-fields dd { color: #c3ccd6; }
.detail-fields, .detail-tags span { border-color: var(--line); }
.detail-tags span { color: #b8c0ca; }
.interlude-image { display: none; }
.interlude::after { display: none; }
.interlude-content p, .interlude-content > span:last-child { color: #fff; }
.closing-symbol { display: none; }
.hero h1, .hero-art-label, .hero-art-cross, .hero-bottom, .text-link,
.intro-band p, .intro-band-inner > span, .intro-star, .tiny-star { color: #d8e0e9; }

/* No spectrum at rest or on hover. Only explicit click history can create a rim. */
body :is(button:not(.card-main), .header-cta, .button, .card-arrow)::after {
  content: none; animation: none; background: none;
}
/* A default for bare controls; component-defined radii still win. */
body :where(button:not(.card-main), a.button, summary) { border-radius: 8px; }
body :is(button:not(.card-main), a.button, summary) { isolation: isolate; }
body :is(button:not(.card-main):not(.detail-close), a.button, summary) { position: relative; }
body :is(.rim-flash, .rim-selected, .rim-engaged[aria-expanded="true"],
  .rim-engaged[aria-checked="true"], .rim-engaged[aria-pressed="true"],
  details[open] > summary.rim-engaged)::after {
  content: ''; position: absolute; inset: -1px; padding: 1.5px;
  border-radius: inherit; background: conic-gradient(from var(--rainbow-angle), var(--metal-spectrum));
  animation: rainbow-rim 8s linear infinite; opacity: 1;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude; pointer-events: none;
}
body :is(button, .button):disabled::after { content: none; animation: none; }

/* Two restrained sculptures share one renderer, clipped strictly to these slots. */
#explore { scroll-margin-top: 84px; }
.showcase .section-head { position: relative; min-height: 0; padding-right: 0; }
.showcase .section-head > div:first-child { position: relative; z-index: 2; }
.showcase .section-head > p { position: relative; z-index: 2; max-width: 360px; }
.collection-metal { width: 200px; height: 114px; flex: 0 0 200px; margin: 0 14px; }
.closing { position: relative; overflow: hidden; }
.closing-inner { position: relative; z-index: 2; }
.closing-metal { position: absolute; right: 9%; top: 15%; width: min(36vw, 470px); height: 360px; }
#liquid-metal-layer {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3;
  pointer-events: none; touch-action: auto; cursor: default;
}
body.modal-open #liquid-metal-layer { visibility: hidden; }
.metal-unavailable .liquid-metal-slot { background: url('../assets/chrome-fold.jpg') center/contain no-repeat; }
@media (max-width: 1100px) {
  .collection-metal { width: 150px; flex-basis: 150px; margin: 0 4px; }
  .showcase .section-head > p { max-width: 280px; }
}
@media (max-width: 760px) {
  .showcase .section-head { min-height: 0; padding-right: 0; }
  .showcase .section-head > p { max-width: none; }
  .collection-metal { position: absolute; top: 0; right: 0; width: 100px; height: 92px; margin: 0; }
  .closing-metal { width: 200px; height: 190px; right: -35px; top: 5%; opacity: .65; }
  .closing-inner { padding-right: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  body :is(.rim-flash, .rim-selected, .rim-engaged)::after { animation: none; }
}

/* MANIFEST World: preserve the supplied logo in full on the black surface. */
.brand { gap: 10px; letter-spacing: 0; }
.brand-logo { display: block; width: 56px; height: 56px; object-fit: contain; flex: none; }
.brand-lockup { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.brand .brand-word { font-size: 20px; line-height: 1.1; letter-spacing: -.025em; font-weight: 600; color: #fff; -webkit-text-fill-color: #fff; background: none; }
.brand-slogan { font-size: 9px; line-height: 1.2; font-weight: 400; letter-spacing: .12em; color: #b8c0ca; }
.footer .brand-logo { width: 64px; height: 64px; }
@media (max-width: 760px) {
  .header-inner { gap: 12px; }
  .brand { gap: 7px; }
  .brand-logo { width: 42px; height: 42px; }
  .brand .brand-word { font-size: 16px; }
  .brand-slogan { font-size: 8px; letter-spacing: .08em; }
}
@media (max-width: 380px) {
  .header-inner { padding-inline: 3%; gap: 6px; }
  .brand .brand-word { font-size: 14px; }
  .brand-logo { width: 36px; height: 36px; }
}

/* Keep the supplied black-hole reference as the WebGL-loss fallback. */
.metal-unavailable .liquid-metal-slot[data-liquid-metal="black-hole"] {
  background-image: url('../assets/manifest-black-hole.png');
}

/* Quiet topic disclosure: retain a visible keyboard focus, without a color rim. */
#topic-heading::after { content: none !important; background: none !important; animation: none !important; }
#topic-heading:focus-visible { outline: 1px solid #aab4bf; outline-offset: 4px; }
.desktop-nav a[aria-current="page"], .mobile-nav a[aria-current="page"] { color: #fff; }
.showcase .catalog-collection-progress { border: 0; padding: 0; margin: 0 0 28px; max-width: 68ch; color: #939ba5; font-size: 13px; line-height: 1.65; }
.about-page { max-width: 1440px; margin-inline: auto; padding: 64px 4.4% 36px; min-height: calc(100vh - 170px); }
.about-page-intro { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 48px; min-height: 560px; }
.about-page-copy { position: relative; z-index: 4; }
.about-page-label { color: #939ba5; font-size: 13px; margin: 0 0 32px; }
.about-page h1 { color: #fff; font-size: clamp(46px, 5.4vw, 82px); font-weight: 500; line-height: 1.08; letter-spacing: -.055em; margin: 0 0 30px; }
.about-page h1:focus { outline: none; }
.about-page-lead { max-width: 54ch; color: #c1c8d0; font-size: 18px; line-height: 1.8; margin: 0 0 18px; }
.about-page-note { max-width: 54ch; color: #939ba5; font-size: 15px; line-height: 1.8; margin: 0 0 32px; }
.about-page-art { width: 100%; height: 380px; }
.about-page-action { display: inline-flex; width: fit-content; }
.about-page-signoff { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-top: 28px; margin-top: 38px; border-top: 1px solid #252a30; color: #939ba5; }
.about-page-signoff span { color: #fff; font-size: 16px; }
.about-page-signoff p { margin: 0; font-size: 13px; }
@media (max-width: 760px) {
  .about-page { padding: 36px 5% 30px; }
  .about-page-intro { grid-template-columns: 1fr; gap: 12px; min-height: 0; }
  .about-page h1 { font-size: clamp(42px, 9vw, 68px); }
  .about-page-lead { font-size: 16px; }
  .about-page-art { height: 260px; }
  .about-page-signoff { margin-top: 20px; flex-wrap: wrap; }
}

/* Major filter disclosures stay quiet; their child filter buttons keep click rims. */
.catalog-sidebar > .filter-section > summary::after {
  content: none !important; background: none !important; animation: none !important;
}
.catalog-sidebar > .filter-section > summary:focus-visible { outline: 1px solid #aab4bf; outline-offset: 4px; }
.showcase .toolbar { display: flex; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.gallery-display-controls { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.gallery-display-controls label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #939ba5; }
.gallery-display-controls select { max-width: 180px; min-height: 32px; border: 1px solid #363c44; border-radius: 8px; padding: 5px 8px; background: #000; color: #fff; font: inherit; cursor: pointer; color-scheme: dark; }
.gallery-display-controls select:focus-visible { outline: 1px solid #c1c8d0; outline-offset: 3px; }
#gallery { --gallery-columns: 3; }
#gallery[data-size="small"] { --gallery-columns: 4; }
#gallery[data-size="large"] { --gallery-columns: 2; }
.showcase #gallery { column-count: var(--gallery-columns); }
.missing-cover-symbol { display: none; }
#gallery:is([data-view="names"], [data-view="images"]) :is(.feed-card-top, .card-author, .card-technique, .card-excerpt, .card-classification, .feed-card-bottom, .card-links, .card-index, .missing-cover-name, .missing-cover-domain) { display: none; }
#gallery:is([data-view="names"], [data-view="images"]) .missing-cover-symbol { display: block; width: 28%; height: auto; stroke: #52606c; fill: none; stroke-width: 1.5; }
#gallery[data-view="names"] .study-card { padding: 0; }
#gallery[data-view="names"] .card-image { border-radius: 10px 10px 0 0; }
#gallery[data-view="names"] .card-title { margin: 0; padding: 11px 12px; font-size: 14px; line-height: 1.5; }
.showcase #gallery[data-view="images"] { display: grid; columns: auto; grid-template-columns: repeat(var(--gallery-columns), minmax(0, 1fr)); gap: 0; align-items: stretch; }
#gallery[data-view="images"] .study-card { display: block; width: auto; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; line-height: 0; }
#gallery[data-view="images"] .card-main { display: block; height: 100%; margin: 0; padding: 0; line-height: 0; }
#gallery[data-view="images"] .card-title { display: none; }
#gallery[data-view="images"] .card-image { display: flex; align-items: center; justify-content: center; width: 100%; height: auto; aspect-ratio: 16/9; padding: 0; border: 0; border-radius: 0; }
#gallery[data-view="images"] .card-image::after { content: none; }
#gallery[data-view="images"] .study-card:hover img { transform: none; }
#gallery[data-view="images"] .card-main:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
@media (max-width: 1100px) {
  #gallery { --gallery-columns: 2; }
  #gallery[data-size="small"] { --gallery-columns: 3; }
  #gallery[data-size="large"] { --gallery-columns: 1; }
}
@media (max-width: 560px) {
  #gallery { --gallery-columns: 1; }
  #gallery[data-size="small"] { --gallery-columns: 2; }
  #gallery[data-size="large"] { --gallery-columns: 1; }
  .gallery-control-label { display: none; }
  .gallery-display-controls { gap: 6px; }
  .gallery-display-controls select { max-width: 160px; font-size: 12px; }
}

/* Compact views create only their visible content. Long evidence stays collapsed. */
#detail-evidence { margin: 18px 0; padding: 14px 0; border-top: 1px solid #303740; color: #aab3bd; font-size: 13px; }
#detail-evidence summary { cursor: pointer; padding: 8px 0; }
#detail-evidence details { margin: 8px 0; }
#detail-evidence pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 var(--mono); }
#detail-evidence button { background: #000; color: #fff; border: 1px solid #39414a; border-radius: 8px; padding: 8px 12px; }
#gallery[data-view="images"] .study-card { aspect-ratio: 16/9; content-visibility: auto; }

.metal-pending .liquid-metal-slot { background: url('../assets/chrome-fold.jpg') center/contain no-repeat; }
.metal-pending .liquid-metal-slot[data-liquid-metal="black-hole"] { background-image: url('../assets/manifest-black-hole.png'); }
