/* Shared museum palette, based on the owner's October 2026 references. */
:root {
  --museum-dark: #191814;
  --museum-cream: #1c1b17;
  --museum-paper: #26241e;
  --museum-ink: #f4eee3;
  --museum-gold: #d1b17f;
  --museum-line: #51493b;
  --museum-muted: #c4baaa;
  --paper: var(--museum-paper);
  --ink: var(--museum-ink);
  --muted: var(--museum-muted);
  --gold: var(--museum-gold);
  --line: var(--museum-line);
  --wine: #d1b17f;
  --white: #302c24;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', Arial, sans-serif;
}
html { background: var(--museum-dark); color-scheme: dark; }
.museum {
  background: var(--museum-cream);
  color: var(--museum-ink);
  font-family: var(--sans);
  line-height: 1.65;
}
.museum [hidden] { display: none !important; }
.museum h1, .museum h2, .museum h3 { color: var(--museum-ink); }
.museum :focus-visible { outline: 2px solid #e7c790; outline-offset: 5px; }
.museum .overline, .museum .eyebrow, .museum .footer-kicker { color: var(--museum-gold); }
.museum .museum-header {
  background: #f7f3eb;
  color: #29251f;
  color-scheme: light;
  border-bottom-color: #cec0aa;
}
.museum-header .brand-text { font-family: var(--serif); }
.museum-header .brand-text small { color: #746654; }
.museum-header .museum-brand .brand-photo { background: #f7f3eb; }
.museum-header .museum-menu { color: #29251f; border-color: #a9997f; }
.museum .header-search { background: #fffdf8; border-color: #bbaa8d; }
.museum .header-search input { color: #29251f; }
.museum .header-search button { color: #5c4b34; }
.museum .header-search button { white-space: nowrap; overflow-wrap: normal; flex-shrink: 0; }
.museum .header-search { flex: 0 0 280px; width: 280px; min-width: 280px; max-width: 280px; height: 44px; }
.museum .header-search input { flex: 1 1 auto; width: 0; padding-inline: 12px; }
@media (min-width: 761px) and (max-width: 920px) {
  .museum .header-search { flex-basis: 260px; width: 260px; min-width: 260px; max-width: 260px; }
}
.museum .search-result span, .museum .site-search-page #search-status { font-size: 14px; }
.museum .museum-mobile:not([hidden]) {
  background: #f7f3eb;
  color: #29251f;
  border-bottom-color: #cec0aa;
}
.museum .museum-mobile a { color: #29251f; }
.museum .skip:focus, .museum .skip-link:focus { background: #f7f3eb; color: #29251f; }
.museum .museum-button,
.museum .button.primary,
.museum .primary {
  background: var(--museum-gold);
  border-color: var(--museum-gold);
  color: #211d17 !important;
  font-weight: 700;
}
.museum .museum-button:hover, .museum .button.primary:hover { background: #e1c492; }
.museum .museum-button.outline {
  background: transparent;
  border: 1px solid var(--museum-gold);
  color: var(--museum-gold) !important;
}
.museum .museum-button.outline:hover { background: #3b3326; }
.museum .museum-footer {
  background: #161511;
  border-top: 1px solid var(--museum-line);
  padding-top: 48px;
}
.museum .footer-base { color: var(--museum-muted); border-color: var(--museum-line); }

/* The Bible is the shared, quiet entry to the collection. */
.bible-landing { background: #1b1a16; }
.bible-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  padding: 30px clamp(24px, 6vw, 100px) 42px;
  min-height: 700px;
  background: radial-gradient(ellipse at 80% 45%, #3f3424 0%, #211e17 40%, #1b1a16 75%);
}
.bible-hero-rule {
  grid-column: 1 / -1;
  position: relative;
  z-index: 2;
  border-top: 1px solid #75664f;
  padding-top: 12px;
  font-size: 11px;
  letter-spacing: .16em;
  color: #c5beaf;
}
.bible-copy { position: relative; z-index: 2; padding-top: 66px; max-width: 630px; }
.bible-copy .overline { margin-bottom: 24px; font-size: 12px; letter-spacing: .19em; }
.bible-copy h1 {
  font: 400 clamp(76px, 8.5vw, 142px)/.95 var(--serif);
  letter-spacing: -.045em;
  margin: 0 0 30px;
  text-transform: uppercase;
}
.bible-copy h1 em { display: block; color: var(--museum-gold); }
.bible-copy h1::after {
  content: '';
  display: block;
  width: 56px;
  height: 2px;
  margin-top: 25px;
  background: var(--museum-gold);
}
.bible-highlights { list-style: none; padding: 0; margin: 0 0 30px; max-width: 460px; }
.bible-highlights li { display: flex; align-items: center; gap: 21px; margin: 22px 0; }
.bible-highlights svg {
  width: 33px;
  height: 36px;
  flex: 0 0 33px;
  stroke: var(--museum-gold);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bible-highlights span { padding-left: 21px; border-left: 1px solid #8e7958; line-height: 1.6; }
.bible-actions { display: grid; gap: 14px; max-width: 490px; }
.bible-actions .museum-button { min-width: 0; padding: 18px 24px; font-size: 12px; letter-spacing: .12em; }
.bible-actions .museum-button span { font-size: 25px; font-weight: 400; line-height: 1; }
.bible-art { position: relative; margin: 34px -100px -42px 12px; overflow: hidden; min-height: 620px; }
.bible-art img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: 51% 31%;
  transform: scale(1.55);
  filter: brightness(.8) sepia(.12);
}
.bible-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #1e1c16, transparent 25%), linear-gradient(0deg, #1b1a16 1%, transparent 35%);
  pointer-events: none;
}
.bible-art figcaption { position: absolute; z-index: 1; bottom: 25px; left: 35px; right: 80px; color: #e5d6be; font-size: 11px; }
.bible-collection {
  padding: 25px clamp(24px, 6vw, 100px) 38px;
  background: #1b1a16;
}
.bible-collection-heading { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: baseline; margin: 0 0 25px; }
.bible-collection-heading strong { font-size: 12px; letter-spacing: .12em; color: var(--museum-gold); }
.bible-collection-heading span { color: var(--museum-muted); font-size: 12px; }
.bible-collection-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; border-block: 1px solid var(--museum-line); padding: 25px 0; }
.bible-collection-grid a { display: block; min-width: 0; text-decoration: none; }
.bible-collection-grid a:focus-visible, .bible-collection-grid a:hover { color: var(--museum-gold); }
.bible-collection-grid img { width: 100%; height: 165px; object-fit: contain; background: #28251e; margin-bottom: 14px; }
.bible-collection-grid strong { display: block; font: 400 clamp(22px, 2.2vw, 32px)/1.2 var(--serif); }
.bible-collection-grid span { display: block; font-size: 11px; color: var(--museum-muted); margin-top: 6px; }
.bible-collection-more { display: block; width: fit-content; margin-top: 20px; font-size: 13px; }
.bible-home .museum-footer { margin-top: 0; }
.gallery-page #bible-landing { margin: 0; }
html[data-archive-entry=archive] #bible-landing { display: none; }
html[data-archive-entry=archive] #archive-browser[hidden] { display: block !important; }
.gallery-page .gallery-main { max-width: none; padding: 0; background: transparent; }
.gallery-page #archive-browser { max-width: 1280px; margin: auto; padding: 30px clamp(20px, 4vw, 56px) 64px; }
.archive-return { display: inline-block; font-size: 13px; margin-bottom: 28px; color: var(--museum-muted); }
.archive-heading { margin-bottom: 26px; }
.archive-heading h1 { font-size: clamp(32px, 4vw, 54px); margin: 8px 0 12px; }
.archive-heading p:last-child { max-width: 60ch; margin-bottom: 0; color: var(--museum-muted); }
.archive-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 22px; background: var(--museum-paper); border: 1px solid var(--museum-line); margin-bottom: 28px; }
.archive-field { min-width: 0; }
.archive-field label span { color: var(--museum-gold); margin-right: 7px; font-size: 12px; }
.gallery-page .collection-summary { padding: 0 0 24px; border-top: 0; }
.gallery-page .collection-summary > p { color: var(--museum-muted); }
.gallery-page .collection-summary dl { display: none; }
.gallery-page .collection-summary summary { cursor: pointer; color: var(--museum-gold); font-size: 14px; }
.gallery-page .collection-summary details[open] dl { display: grid; margin-top: 20px; }
.gallery-page .collection-replica { padding: 0 0 24px; margin-bottom: 24px; }
.gallery-page .browse-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-page .codex-book-form { grid-template-columns: minmax(0, 160px) auto; }
.gallery-page .codex-book-form label[for=sinaiticus-book], .gallery-page #sinaiticus-book { display: none; }
.gallery-page .codex-book-form label[for=sinaiticus-chapter] { grid-column: 1; }
.gallery-page #sinaiticus-chapter { grid-column: 1; }
.gallery-page .codex-book-form button { grid-column: 2; }

/* Dark reading surfaces on every existing public route. */
.museum :is(.intro-band, .timeline, .film-section, .related-section, .shop-intro, .museum-shop-products, .museum-shop-channels, .maker-section, .home-paths, .about-intro, .about-sources, .guide-paths, .timeline-outro, .page-tabs, .tab-controls, .p52-explore, .institutional-galleries, .preview-callout, .basket-summary, .shop-feedback, .buy-source, .buy-preview, .buy-preview-empty) {
  background: var(--museum-paper);
  color: var(--museum-ink);
  border-color: var(--museum-line);
}
.museum :is(.record-meta, .record-card p, .section-top > p, .intro-band p, .timeline-grid p, .timeline-key, .film-heading > p:last-child, .film-steps span, .archive-row small, .archive-date, .fact-grid small, .detail-body p, .channel-card p, .maker-copy > p:not(.overline), .product-breadcrumb, .product-breadcrumb strong, .product-description, .product-price span, .product-disclosure p, .product-image-note p, .product-options label small, .preview-callout p, .product-recommendation span, .basket-item-main small, .basket-item-main p, .basket-remove, .basket-summary > p:not(.overline), .basket-empty p, .home-path-grid p, .about-intro p:not(.overline), .about-sources p, .guide-paths p, .timeline-outro p:not(.overline), .site-breadcrumb, .search-result span, .search-more, .search-empty, .site-search-page #search-status, .p52-heading p:not(.overline), .p52-sides p, .p52-questions p, .p52-passage-head p:not(.overline), .p52-verse-columns p, .institutional-intro p:not(.overline), .institutional-card p, .institutional-note, .basket-scan-ref, .buy-field small, .buy-fine-print, .buy-photo-note, .scan-label-note, .collection-summary dt, .codex-source-note) {
  color: var(--museum-muted);
}
.museum :is(.record-image, .detail-image, .product-photo, .product-image, .basket-image, .product-recommendation img, .gallery-preview, .shop-hero-gallery figure, .shop-method-image, .maker-photo) { background: #302a21; }
.museum :is(.record-meta span, .product-passage, .product-image-note span, .p52-sides span, .p52-verse-columns b, .home-path-grid span, .guide-paths span) { color: var(--museum-gold); }
.museum :is(.timeline-grid a:hover, .archive-row:hover, .channel-card:hover, .home-path-grid a:hover, .guide-paths a:hover, .search-result:hover) { background: #373126; }
.museum :is(.archive-note, .search-result, .p52-sides article, .p52-passage, .institutional-card, .buy-controls, .buy-market, .p52-feature, .browse-controls, .scan-card, .sinaiticus-reader) { background: var(--museum-paper); border-color: var(--museum-line); color: var(--museum-ink); }
.museum :is(.gallery-main select, .gallery-main .codex-book-form input, .buy-field select, .product-options select, .basket-item-end input, .archive-controls input, .search-large-field) {
  background: #312d24;
  color: var(--museum-ink);
  border-color: #8b7757;
  color-scheme: dark;
}
.museum .buy-field select:disabled { background: #211f1a; color: #a79c8b; }
.museum .buy-market a[aria-disabled=true] { background: #3a352b; color: #b5a991 !important; }
.museum .buy-market:first-child { border-color: var(--museum-gold); }
.museum .buy-preview img { background: #332e24; }
.museum .search-large-field input { color: var(--museum-ink); }
.museum .search-large-field button { background: var(--museum-gold); color: #211d17; }
.museum :is(.filter, .circle-button, .product-type, .product-bottom small, .product-bottom a, .product-scan-link, .shop-smallprint) { color: var(--museum-muted); }
.museum :is(.filter.active, .tab-controls button[aria-selected=true]) { background: #51422d; color: var(--museum-ink); border-color: var(--museum-gold); }
.museum .tab-controls button { color: var(--museum-muted); }
.museum :is(.product-quick-add, .product-tag, .image-arrow) { background: #cdb084; color: #211d17; }
.museum .scan-dialog, .museum .viewer-footer, .museum .viewer-replica { background: #25231d; color: var(--museum-ink); border-color: var(--museum-line); }
.museum .viewer-control { background: #3b352a; color: var(--museum-ink); border-color: #74644d; }
.museum .viewer-control:enabled:hover, .museum .viewer-close:hover { background: var(--museum-gold); color: #211d17; }
.museum .viewer-footer p, .museum .viewer-footer #viewer-label-note { color: var(--museum-muted); }
.museum .scan-card-number { background: #242119e6; color: #e3ceb0; }
.museum .scan-expand { background: #242119; color: #e3ceb0; }
.museum .scan-thumbnail { background: #332e25; }
.museum .newsletter-popup { background: #2c281f; color: var(--museum-ink); border-color: var(--museum-gold); box-shadow: 0 12px 60px #0008; }
.museum .newsletter-popup input[type=email] { background: #1e1c17; color: var(--museum-ink); border-color: #9b815b; }
.museum .newsletter-close { color: var(--museum-ink); }
.museum :is(.collection-guide, .source-notes, .fact-grid, .detail-links, .product-real-buy, .product-options, .product-disclosure, .section-end, .timeline-grid, .timeline-grid a, .basket-item, .search-group, .home-path-grid a, .guide-paths a) { border-color: var(--museum-line); }
.museum .product-message { color: #baceaa; }
.museum .type-study { color: #d1b17f; background: radial-gradient(circle, #413628, #27231c); }

/* The existing presentation dashboard shares the same reading palette. */
.studio .studio-header { background: #f7f3eb; color: #29251f; }
.studio .demo-pill { background: #ebe0cb; color: #5b472d; }
.studio :is(.stat, .finance-card, .order-detail, .purchase-panel, .order-row, .product-line, .material-card, .empty-state, .overview-routes a, .demo-notice, .message-preview pre) { background: #29261f; color: var(--museum-ink); border-color: var(--museum-line); }
.studio :is(.studio-heading p:last-child, .stat span, .stat small, .section-label span, .order-row small, .order-detail dt, .detail-note, .finance-note, .purchase-panel p, .material-card p, .message-preview p) { color: var(--museum-muted); }
.studio :is(.toolbar input, .toolbar select, .order-detail select, .order-detail input) { background: #211f19; color: var(--museum-ink); border-color: #8b7757; }
.studio .studio-nav a[aria-current=page], .studio .studio-nav a:hover, .studio .order-row:hover, .studio .order-row.selected { background: #443825; color: var(--museum-ink); }
.studio .text-button, .studio .status { color: var(--museum-gold); }
.studio .low { color: #ecc18a !important; }
.studio .bar { background: #3b3428; }
.studio .bar i { background: var(--museum-gold); }

@media (max-width: 900px) {
  .bible-hero { min-height: 650px; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
  .bible-copy { padding-top: 46px; }
  .bible-copy h1 { font-size: clamp(68px, 12vw, 110px); }
  .bible-art { margin-right: -65px; margin-left: -40px; }
  .bible-collection-grid { gap: 16px; }
  .bible-collection-grid img { height: 135px; }
}
@media (max-width: 640px) {
  .bible-hero { display: block; min-height: 0; padding: 22px 24px 30px; }
  .bible-hero-rule { font-size: 9px; letter-spacing: .13em; }
  .bible-copy { padding-top: 45px; max-width: none; }
  .bible-copy .overline { font-size: 10px; line-height: 1.6; max-width: 80%; }
  .bible-copy h1 { font-size: clamp(66px, 19vw, 112px); max-width: 80%; margin-bottom: 25px; }
  .bible-highlights { max-width: 75%; margin-bottom: 30px; }
  .bible-highlights li { gap: 12px; font-size: 13px; margin: 19px 0; }
  .bible-highlights span { padding-left: 12px; }
  .bible-highlights svg { width: 25px; height: 30px; flex-basis: 25px; }
  .bible-actions { max-width: none; position: relative; z-index: 3; }
  .bible-actions .museum-button { font-size: 11px; padding: 16px 18px; letter-spacing: .09em; }
  .bible-art { position: absolute; z-index: 1; top: 160px; right: -15%; bottom: 210px; width: 50%; min-height: 0; margin: 0; opacity: .8; }
  .bible-art img { transform: scale(2); object-position: 50% 20%; }
  .bible-art::after { background: linear-gradient(90deg, #1d1b15 0%, transparent 30%), linear-gradient(0deg, #1b1a16, transparent 50%); }
  .bible-art figcaption { display: none; }
  .bible-collection { padding: 18px 24px 30px; }
  .bible-collection-heading span { font-size: 11px; }
  .bible-collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; padding-top: 20px; }
  .bible-collection-grid img { height: 100px; }
  .bible-collection-grid strong { font-size: 17px; }
  .bible-collection-grid span { font-size: 10px; line-height: 1.6; }
  .archive-controls, .gallery-page .browse-controls { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px; }
  .gallery-page #archive-browser { padding: 24px 20px 44px; }
  .gallery-page .p52-feature { padding: 18px; }
  .gallery-page .codex-book-form { grid-template-columns: minmax(0, 1fr); }
  .gallery-page .codex-book-form button { grid-column: 1; grid-row: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .museum *, .museum *::before, .museum *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (max-width: 359px) {
  .bible-collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bible-highlights { max-width: 90%; }
  .bible-art { opacity: .45; }
}
