/* ============================================================
   Recursia Digital Art Archive — night-gallery theme
   Injected via nginx sub_filter over the stock Girder UI.
   Brand: black chrome, white starburst line-art, Philosopher.
   Iterate freely: this file is served live from
   /home/crary_lab/recursia_dsa/brand/ (no sudo, no restart).
   ============================================================ */

@import url('/recursia-brand/fonts/philosopher.css');

:root {
  --r-bg:        #0b0b0d;   /* gallery walls: near-black, slightly warm */
  --r-bg-raise:  #131316;   /* raised panels */
  --r-bg-hover:  #1a1a1f;
  --r-line:      #26262c;   /* hairline borders */
  --r-text:      #f2f0ea;   /* warm white */
  --r-muted:     #a09d94;
  --r-accent:    #ffffff;
  --r-serif:     'Philosopher', 'Georgia', serif;
}

/* ---------- global canvas ---------- */
html, body { background: var(--r-bg) !important; color: var(--r-text) !important; }
body { font-size: 14.5px; }

::selection { background: var(--r-text); color: var(--r-bg); }
* { scrollbar-width: thin; scrollbar-color: #33333a var(--r-bg); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #33333a; border-radius: 5px; }
*::-webkit-scrollbar-track { background: var(--r-bg); }

h1, h2, h3, h4, .g-app-title, .modal-title, legend {
  font-family: var(--r-serif) !important;
  letter-spacing: 0.02em;
  color: var(--r-text);
}

a { color: #d8d5cc; }
a:hover, a:focus { color: #ffffff; text-decoration: none; }

/* ---------- header: black chrome + starburst ---------- */
#g-app-header-container {
  background: #000 !important;
  border-bottom: 1px solid var(--r-line);
  box-shadow: 0 1px 18px rgba(0,0,0,.6);
}
#g-app-header-container .g-app-title {
  font-family: var(--r-serif) !important;
  font-size: 21px;
  letter-spacing: 0.14em;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
}
/* the starburst, breathing slowly — the archive is alive */
#g-app-header-container .g-app-title::before {
  content: '';
  display: inline-block;
  width: 34px; height: 34px;
  margin-right: 12px;
  background: url('/recursia-brand/starburst-white-360.png') center/contain no-repeat;
  animation: r-spin 90s linear infinite;
}
@keyframes r-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  #g-app-header-container .g-app-title::before { animation: none; }
}

/* header quick search */
#g-app-header-container input.g-quick-search {
  background: #141417 !important;
  border: 1px solid var(--r-line) !important;
  color: var(--r-text) !important;
  border-radius: 999px;
  padding-left: 14px;
}
#g-app-header-container .g-header-right a,
#g-app-header-container .g-header-right .g-current-user-wrapper {
  color: #cfcdc5 !important;
  letter-spacing: 0.06em;
}

/* ---------- left navigation: quiet, letterspaced ---------- */
#g-global-nav-container, .g-global-nav-main, ul.g-global-nav {
  background: #0e0e11 !important;          /* shorthand kills girder's gradient image */
  border-right-color: var(--r-line) !important;
  box-shadow: none !important;
}
#g-global-nav-container { border-right: 1px solid var(--r-line); }
#g-global-nav-container .g-global-nav-li .g-nav-link {
  color: #b9b6ad !important;
  font-family: var(--r-serif);
  letter-spacing: 0.1em;
  font-size: 13.5px;
  transition: color .18s ease, background .18s ease, padding-left .18s ease;
  border-left: 2px solid transparent;
}
#g-global-nav-container .g-global-nav-li .g-nav-link:hover {
  color: #fff !important;
  background: var(--r-bg-hover) !important;
  padding-left: 4px;
}
#g-global-nav-container .g-global-nav-li .g-active .g-nav-link,
#g-global-nav-container .g-global-nav-li.g-active .g-nav-link {
  color: #fff !important;
  border-left-color: #fff;
  background: var(--r-bg-raise) !important;
}

/* ---------- main body ---------- */
#g-app-body-container {
  background: var(--r-bg) !important;
  /* opacity-only fade: a transform here creates a containing block that can
     poison GeoJS's coordinate math during init */
  animation: r-fadein .5s ease both;
}
@keyframes r-fadein { from { opacity: 0; } to { opacity: 1; } }

/* the rotating starburst watermark on the gallery floor */
body::after {
  content: '';
  position: fixed;
  right: -140px; bottom: -140px;
  width: 460px; height: 460px;
  background: url('/recursia-brand/starburst-white-360.png') center/contain no-repeat;
  opacity: 0.045;
  pointer-events: none;
  animation: r-spin 240s linear infinite;
  z-index: 0;
}

/* ---------- panels, lists, cards ---------- */
.g-list-entry, .g-collection-list-entry, .g-folder-list-entry, .g-item-list-entry {
  background: transparent !important;    /* girder default is near-white */
  border-bottom: 1px solid var(--r-line) !important;
  transition: background .18s ease, transform .18s ease;
  padding: 10px 8px;
}
/* private resources: a whispered amber edge, not girder's beige slab */
.g-collection-list-entry[public="false"], .g-list-entry[public="false"],
.g-folder-list-entry[public="false"], .g-item-list-entry[public="false"] {
  background: rgba(214, 178, 106, .05) !important;
  border-left: 2px solid #6b5a2e !important;
}
.g-collection-list-entry .g-collection-created,
.g-collection-list-entry .g-collection-size,
.g-collection-right-column { color: #8f8c84 !important; }
.g-collection-list-entry i, .g-list-entry i { color: #8a877e !important; }
.g-list-entry:hover, .g-collection-list-entry:hover,
.g-folder-list-entry:hover, .g-item-list-entry:hover {
  background: var(--r-bg-hover) !important;
  transform: translateX(4px);
}
.g-collection-link, .g-folder-list-link, .g-item-list-link,
a.g-collection-link:visited, a.g-folder-list-link:visited, a.g-item-list-link:visited {
  font-family: var(--r-serif);
  font-size: 19px;
  letter-spacing: 0.06em;
  color: #f2f0ea !important;
}
.g-collection-link:hover, .g-folder-list-link:hover, .g-item-list-link:hover {
  color: #fff !important; text-shadow: 0 0 22px rgba(255,255,255,.25);
}
/* the browse pages read as a gallery index: contained, unhurried */
.g-collection-list-container, .g-folder-list-container, .g-item-list-container,
.g-collections-search-container, .g-collection-list-header {
  max-width: 1080px; margin-left: auto !important; margin-right: auto !important;
}
.g-collection-list-entry { padding: 26px 20px !important; }
.g-folder-list-entry, .g-item-list-entry { padding: 16px 14px !important; }
.g-collection-list-entry .g-show-description {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #77746c !important;
}
.g-collection-list-entry .g-collection-description,
.g-list-entry .g-show-description { color: var(--r-muted) !important; }
/* collections page meta column */
.g-collection-list-entry .g-collection-record-info,
.g-list-entry small, .g-list-entry .g-info-list { color: #8f8c84 !important; }

.panel, .g-collection-header, .well {
  background: var(--r-bg-raise) !important;
  border: 1px solid var(--r-line) !important;
  color: var(--r-text) !important;
  border-radius: 10px;
}
.panel-heading { background: transparent !important; border-color: var(--r-line) !important; color: var(--r-text) !important; }

/* breadcrumbs */
.breadcrumb { background: transparent !important; }
.breadcrumb > li, .breadcrumb > li a { color: var(--r-muted) !important; font-family: var(--r-serif); letter-spacing: .05em; }
.breadcrumb > .active { color: var(--r-text) !important; }

/* ---------- buttons ---------- */
.btn {
  border-radius: 999px !important;
  letter-spacing: 0.08em;
  transition: all .18s ease;
}
.btn-default, .btn-primary, .btn-success, .btn-info {
  background: transparent !important;
  border: 1px solid #5a5a63 !important;
  color: #e8e6df !important;
}
.btn-default:hover, .btn-primary:hover, .btn-success:hover, .btn-info:hover {
  background: #fff !important;
  border-color: #fff !important;
  color: #000 !important;
  box-shadow: 0 0 22px rgba(255,255,255,.15);
}
.btn-danger { background: transparent !important; border: 1px solid #7a3b3b !important; color: #d9a0a0 !important; }
.btn-danger:hover { background: #a33 !important; color: #fff !important; }

/* ---------- forms, inputs, dropdowns, modals ---------- */
input.form-control, textarea.form-control, select.form-control {
  background: #121215 !important;
  border: 1px solid var(--r-line) !important;
  color: var(--r-text) !important;
  border-radius: 8px;
}
input.form-control:focus, textarea.form-control:focus {
  border-color: #6a6a74 !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,.06) !important;
}
label, .control-label { color: var(--r-muted) !important; letter-spacing: .04em; }

.dropdown-menu {
  background: #121215 !important;
  border: 1px solid var(--r-line) !important;
  box-shadow: 0 14px 40px rgba(0,0,0,.7) !important;
}
.dropdown-menu > li > a { color: #d5d2ca !important; }
.dropdown-menu > li > a:hover { background: var(--r-bg-hover) !important; color: #fff !important; }

.modal-content {
  background: #121215 !important;
  border: 1px solid var(--r-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.8) !important;
  color: var(--r-text);
}
.modal-header, .modal-footer { border-color: var(--r-line) !important; }
.modal-backdrop.in { opacity: .75 !important; }
.close { color: #fff !important; opacity: .6; text-shadow: none !important; }

/* tables */
.table > thead > tr > th { border-color: var(--r-line) !important; color: var(--r-muted) !important; font-family: var(--r-serif); letter-spacing: .06em; }
.table > tbody > tr > td { border-color: var(--r-line) !important; }
.table-hover > tbody > tr:hover { background: var(--r-bg-hover) !important; }

/* alerts / wells */
.alert-info { background: #14181d !important; border-color: #24303a !important; color: #bcd3e2 !important; }
.alert-warning { background: #1d1812 !important; border-color: #3a3124 !important; color: #e2d3bc !important; }

/* pagination */
.pagination > li > a, .pagination > li > span {
  background: transparent !important; border-color: var(--r-line) !important; color: var(--r-muted) !important;
}
.pagination > .active > a { background: #fff !important; border-color: #fff !important; color: #000 !important; }

/* ---------- the homepage: gallery foyer ---------- */
.g-frontpage-body, .g-homepage-container { position: relative; z-index: 1; }
.g-frontpage-body .g-markdown-text h1,
.g-homepage-container h1 {
  font-size: 46px;
  letter-spacing: 0.16em;
  text-align: center;
  margin: 44px 0 6px;
  font-weight: 400;
}
.g-frontpage-body .g-markdown-text h2,
.g-homepage-container h2 {
  font-size: 17px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-align: center;
  color: var(--r-muted);
  font-weight: 400;
  margin: 0 0 34px;
}
.g-frontpage-body .g-markdown-text hr,
.g-homepage-container hr {
  border: 0; height: 1px; width: 220px; margin: 22px auto;
  background: linear-gradient(90deg, transparent, #57575f, transparent);
}
.g-frontpage-body .g-markdown-text p,
.g-homepage-container p {
  max-width: 640px; margin: 0 auto 14px; text-align: center;
  color: #c9c6bd; font-size: 16px; line-height: 1.75;
}

/* footer quieting */
#g-app-footer-container { background: var(--r-bg) !important; border-top: 1px solid var(--r-line); color: #6d6a63; }
#g-app-footer-container a { color: #8a877e; }

/* ============================================================
   THE FOYER  (#r-foyer — built by archive.js on the frontpage)
   ============================================================ */

/* Full takeover: the homepage markdown renders as direct children of
   #g-app-body-container in this build — hide every sibling of the foyer,
   drop the side nav + stock footer, and go full-bleed. */
body.r-foyer-active #g-app-body-container > :not(#r-foyer) { display: none !important; }
body.r-foyer-active #g-global-nav-container { display: none !important; }
body.r-foyer-active #g-app-footer-container { display: none !important; }
body.r-foyer-active #g-app-body-container { padding: 0 !important; margin: 0 !important; width: 100% !important; }
body.r-foyer-active::after { display: none; }               /* foyer has its own starburst; no watermark doubling */

#r-foyer { opacity: 0; transition: opacity .8s ease; position: relative; z-index: 1; }
#r-foyer.r-in { opacity: 1; }

/* ---- hero ---- */
.r-hero {
  position: relative;
  min-height: calc(100vh - 52px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: #000;
}
.r-hero-art {
  position: absolute; inset: -6%;
  background: url('/recursia-brand/art/hero-1280.jpg') center/cover no-repeat;
  animation: r-kenburns 55s ease-in-out infinite alternate;
  will-change: transform;
}
@media (min-width: 1100px) {
  .r-hero-art { background-image: url('/recursia-brand/art/hero-2560.jpg'); }
}
@keyframes r-kenburns {
  from { transform: scale(1.02) translate3d(0,0,0); }
  to   { transform: scale(1.13) translate3d(0,-1.5%,0); }
}
.r-hero-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,.18) 0%, rgba(0,0,0,.62) 78%, rgba(0,0,0,.9) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 60%, #0b0b0d 98%);
}
.r-hero-inner { position: relative; text-align: center; padding: 0 24px; }
.r-kicker {
  font-family: var(--r-serif);
  font-size: 13px; letter-spacing: .42em; text-transform: uppercase;
  color: #b9b6ad; margin-bottom: 26px;
}
.r-hero-title {
  font-family: var(--r-serif) !important;
  font-size: clamp(54px, 9vw, 118px);
  font-weight: 400;
  letter-spacing: .22em; text-indent: .22em;   /* optically center the tracking */
  color: #fff; margin: 0;
  text-shadow: 0 2px 60px rgba(0,0,0,.85);
}
.r-hero-sub {
  font-family: var(--r-serif);
  font-size: clamp(15px, 2vw, 21px);
  letter-spacing: .52em; text-indent: .52em; text-transform: uppercase;
  color: #d8d5cc; margin-top: 10px;
}
.r-hero-line {
  width: 210px; height: 1px; margin: 30px auto;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
}
.r-hero-lede {
  max-width: 560px; margin: 0 auto;
  color: #c2bfb6; font-size: 16.5px; line-height: 1.8; letter-spacing: .02em;
}
.r-scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: #8a877e; font-size: 18px;
  animation: r-cue 2.6s ease-in-out infinite;
}
@keyframes r-cue { 0%,100% { transform: translate(-50%,0); opacity:.55; } 50% { transform: translate(-50%,8px); opacity:1; } }

/* ---- shared section rhythm ---- */
#r-foyer section { padding: 110px 24px; }

/* ---- epigraph ---- */
.r-epigraph { text-align: center; background: var(--r-bg); }
.r-quote {
  font-family: var(--r-serif);
  font-size: clamp(20px, 3vw, 30px);
  font-style: italic; font-weight: 400;
  color: #e6e3da; line-height: 1.65;
  max-width: 760px; margin: 0 auto; border: 0; padding: 0;
}
.r-quote-attr {
  margin-top: 26px; color: #8a877e;
  font-family: var(--r-serif); letter-spacing: .28em; text-transform: uppercase; font-size: 12.5px;
}

/* ---- the starburst moment ---- */
.r-starburst {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 70px; background: #08080a;
}
.r-starburst-mark { width: min(430px, 78vw); color: #fff; }
.r-starburst-mark svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 0 26px rgba(255,255,255,.10)); }
.r-starburst-mark .r-ring {
  stroke-dasharray: 4200; stroke-dashoffset: 4200;
}
.r-starburst.r-drawn .r-ring {
  animation: r-draw 2.8s cubic-bezier(.4,0,.2,1) forwards;
}
.r-starburst.r-drawn .r-ring:nth-child(2)  { animation-delay: .15s; }
.r-starburst.r-drawn .r-ring:nth-child(3)  { animation-delay: .3s; }
.r-starburst.r-drawn .r-ring:nth-child(4)  { animation-delay: .45s; }
.r-starburst.r-drawn .r-ring:nth-child(5)  { animation-delay: .6s; }
.r-starburst.r-drawn .r-ring:nth-child(6)  { animation-delay: .75s; }
.r-starburst.r-drawn .r-ring:nth-child(7)  { animation-delay: .9s; }
.r-starburst.r-drawn .r-ring:nth-child(8)  { animation-delay: 1.05s; }
.r-starburst.r-drawn .r-ring:nth-child(9)  { animation-delay: 1.2s; }
.r-starburst.r-drawn .r-ring:nth-child(10) { animation-delay: 1.35s; }
.r-starburst.r-drawn .r-ring:nth-child(11) { animation-delay: 1.5s; }
.r-starburst.r-drawn .r-ring:nth-child(12) { animation-delay: 1.65s; }
@keyframes r-draw { to { stroke-dashoffset: 0; } }
.r-starburst-mark .r-glyph { opacity: 0; transition: opacity 1.4s ease 2.2s; }
.r-starburst.r-drawn .r-glyph { opacity: 1; }
.r-placard { max-width: 380px; }
.r-placard-title {
  font-family: var(--r-serif) !important;
  font-size: 24px; letter-spacing: .06em; color: #fff; margin: 0 0 16px;
}
.r-placard-text { color: #b5b2a9; font-size: 15.5px; line-height: 1.8; }
.r-placard-cite {
  display: inline-block; margin-top: 18px;
  font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase;
  color: #8a877e !important; border-bottom: 1px solid #3a3a41; padding-bottom: 3px;
}
.r-placard-cite:hover { color: #fff !important; border-color: #fff; }

/* ---- current exhibition ---- */
.r-exhibition { background: var(--r-bg); max-width: 1280px; margin: 0 auto; }
.r-exh-head { text-align: center; margin-bottom: 56px; }
.r-exh-title {
  font-family: var(--r-serif) !important;
  font-size: clamp(26px, 4vw, 40px); font-weight: 400;
  letter-spacing: .06em; color: #fff; margin: 14px 0 0;
}
.r-exh-grid {
  display: grid; gap: 42px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.r-card {
  display: block; text-decoration: none;
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.r-exh-in .r-card { opacity: 1; transform: none; }
.r-card-frame {
  background: #000;
  border: 1px solid #222228;
  padding: 18px;                       /* the mat */
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.r-card:hover .r-card-frame {
  border-color: #4a4a52;
  box-shadow: 0 18px 60px rgba(0,0,0,.65), 0 0 40px rgba(255,255,255,.05);
  transform: translateY(-6px);
}
.r-card-frame img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block;
  filter: saturate(1.02);
}
.r-card-placard { padding: 16px 4px 0; text-align: center; }
.r-card-title {
  font-family: var(--r-serif); font-size: 17px; letter-spacing: .1em;
  color: #eceae3;
}
.r-card-desc { margin-top: 6px; font-size: 13px; line-height: 1.6; color: #8f8c84; }

/* ---- typeset line choreography (Pretext-powered) ----
   .r-typeset elements are rebuilt as exact browser-identical lines;
   each line rises into view in sequence. Progressive: without JS/Pretext
   the plain text renders identically (same width, same breaks). */
.r-typeset .r-line { display: block; overflow: hidden; }
.r-typeset .r-line-inner {
  display: inline-block;
  transform: translateY(112%);
  opacity: 0;
  transition: transform .85s cubic-bezier(.22,.9,.24,1), opacity .7s ease;
}
.r-typeset.r-revealed .r-line-inner { transform: none; opacity: 1; }

/* museum light-sweep: once a line lands, a spotlight glides across it */
.r-typeset.r-revealed .r-line-inner {
  /* 300%-wide gradient: at BOTH endpoints the element is fully covered by
     currentColor; the white stripe crosses the text only mid-animation. */
  background: linear-gradient(100deg, currentColor 44%, #ffffff 50%, currentColor 56%) 100% 0 / 300% 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: inherit;
  -webkit-text-fill-color: transparent;
  animation: r-sweep 1.5s ease-out forwards;   /* delay set inline by JS */
}
@keyframes r-sweep { from { background-position: 100% 0; } to { background-position: 0% 0; } }

/* shaped typesetting: the mark the text wraps around */
.r-shaped-mark {
  position: absolute;
  opacity: 0;
  transform: scale(.92) rotate(-8deg);
  transition: opacity 1.6s ease .5s, transform 1.6s ease .5s;
  filter: drop-shadow(0 0 30px rgba(255,255,255,.08));
  pointer-events: none;
}
.r-typeset.r-revealed .r-shaped-mark { opacity: .9; transform: none; }
.r-shaped .r-line { white-space: nowrap; }
p.r-prose-p.r-shaped { max-width: none; width: min(920px, 100%); margin-left: auto; margin-right: auto; }

/* gaze rays: the visitor's cursor lights the illusion wall */
.r-starburst { position: relative; }
.r-starburst::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%),
              rgba(255,255,255,.075), transparent 65%);
  opacity: 0; transition: opacity .5s ease;
}
.r-starburst.r-gazing::before { opacity: 1; }
.r-starburst.r-gazing .r-starburst-mark svg {
  filter: drop-shadow(0 0 34px rgba(255,255,255,.16));
  transition: filter .6s ease;
}

/* ---- hero nav ---- */
.r-hero-nav { margin-top: 34px; display: flex; gap: 42px; justify-content: center; }
.r-hero-nav a {
  font-size: 12.5px; letter-spacing: .26em; text-transform: uppercase;
  color: #cfcdc5 !important; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.22); padding-bottom: 4px;
  transition: color .2s ease, border-color .2s ease;
}
.r-hero-nav a:hover { color: #fff !important; border-color: #fff; }

/* ---- the About room ---- */
.r-about-hero { text-align: center; padding-top: 130px !important; background: var(--r-bg); }
.r-about-title {
  font-family: var(--r-serif) !important;
  font-size: clamp(34px, 5.4vw, 62px); font-weight: 400; font-style: italic;
  letter-spacing: .04em; color: #fff; margin: 18px auto 22px;
}
.r-prose { background: var(--r-bg); text-align: center; }
.r-prose-title {
  font-family: var(--r-serif) !important;
  font-size: clamp(24px, 3.4vw, 36px); font-weight: 400;
  letter-spacing: .05em; color: #fff; margin: 14px auto 30px;
}
.r-prose-p {
  max-width: 620px; margin: 0 auto 22px;
  color: #c2bfb6; font-size: 16.5px; line-height: 1.85; text-align: left;
}
.r-litany { background: #08080a; text-align: center; }
.r-litany-text {
  font-family: var(--r-serif); font-style: italic;
  font-size: clamp(17px, 2.4vw, 23px); line-height: 2.0;
  color: #d8d5cc; max-width: 680px; margin: 22px auto 0;
}
/* ---- shared room nav ---- */
.r-room-nav {
  display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center;
  padding: 22px 20px 0; background: var(--r-bg);
}
.r-room-nav a {
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: #8a877e !important; text-decoration: none; padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.r-room-nav a:hover { color: #fff !important; }
.r-room-nav a.r-room-nav-active { color: #f2f0ea !important; border-color: #6a6a74; }

/* ---- services: how-it-works steps ---- */
.r-steps { text-align: center; background: #08080a; }
.r-steps-grid {
  max-width: 1080px; margin: 44px auto 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px;
}
.r-step {
  border: 1px solid var(--r-line); border-radius: 12px; padding: 26px 22px;
  background: var(--r-bg-raise); text-align: left;
  transition: transform .2s ease, border-color .2s ease;
}
.r-step:hover { transform: translateY(-4px); border-color: #4a4a52; }
.r-step-n { font-family: var(--r-serif); font-size: 30px; color: #57575f; }
.r-step-t { font-family: var(--r-serif); font-size: 18px; letter-spacing: .06em; color: #fff; margin: 8px 0 8px; }
.r-step-d { font-size: 13.5px; line-height: 1.7; color: #a09d94; }

/* ---- portfolio wings + marketplace collections ---- */
.r-wing-list {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px;
}
.r-wing {
  display: block; border: 1px solid var(--r-line); border-radius: 12px;
  padding: 30px 28px; background: var(--r-bg-raise); text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.r-wing:hover { transform: translateY(-5px); border-color: #4a4a52; box-shadow: 0 16px 50px rgba(0,0,0,.5); }
.r-wing-title { font-family: var(--r-serif) !important; font-size: 21px; letter-spacing: .06em; color: #fff; margin: 0 0 12px; font-weight: 400; }
.r-wing-desc { font-size: 14px; line-height: 1.75; color: #a09d94; margin: 0; }
a.r-wing-link .r-wing-title::after { content: ' ↗'; color: #57575f; font-size: 15px; }

/* ---- FAQ + contact ---- */
.r-faq-q { font-family: var(--r-serif) !important; font-size: 20px; letter-spacing: .04em; color: #fff; margin: 44px auto 14px; max-width: 620px; font-weight: 400; }
.r-contact { text-align: center; background: var(--r-bg); }
.r-contact-row { display: flex; gap: 26px; justify-content: center; align-items: baseline; margin-bottom: 18px; flex-wrap: wrap; }
.r-contact-label { font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: #77746c; min-width: 140px; text-align: right; }
.r-contact-mail { font-family: var(--r-serif); font-size: 18px; color: #e8e6df !important; text-decoration: none; border-bottom: 1px solid #2c2c33; }
.r-contact-mail:hover { color: #fff !important; border-color: #fff; }
.r-read-outlet { font-family: var(--r-serif); letter-spacing: .1em; color: #f2f0ea; }
@media (max-width: 640px) { .r-contact-label { text-align: center; min-width: 0; } }

/* ---- the Press & Recognition room ---- */
.r-honor { text-align: center; background: #08080a; }
.r-press-wall { text-align: center; background: var(--r-bg); }
.r-press-grid {
  max-width: 900px; margin: 44px auto 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 34px 26px;
}
.r-press-name {
  font-family: var(--r-serif);
  font-size: 19px; letter-spacing: .14em; text-transform: uppercase;
  color: #b9b6ad;
  opacity: 0; transform: translateY(10px);
  transition: opacity .7s ease, transform .7s ease, color .3s ease;
}
.r-press-wall.r-revealed .r-press-name { opacity: 1; transform: none; }
a.r-press-linked { text-decoration: none; color: #d5d2ca !important; border-bottom: 1px solid #2c2c33; padding-bottom: 6px; }
a.r-press-linked:hover { color: #fff !important; border-color: #fff; text-shadow: 0 0 18px rgba(255,255,255,.25); }
div.r-press-name { color: #77746c; }   /* unlinked mentions sit quieter */
.r-press-reads { text-align: center; background: var(--r-bg); padding-top: 0 !important; }
.r-read-link {
  display: block; max-width: 560px; margin: 0 auto 16px;
  font-family: var(--r-serif); font-size: 16px; letter-spacing: .05em;
  color: #d8d5cc !important; text-decoration: none;
  border-bottom: 1px solid #2c2c33; padding-bottom: 14px;
}
.r-read-link:hover { color: #fff !important; border-color: #6a6a74; }

/* the Light Gem exhibit: recursion made visible */
.r-gem { margin: 70px auto 0; max-width: 640px; text-align: center; opacity: 0; transform: scale(.97); transition: opacity 1.4s ease, transform 1.4s ease; }
.r-gem.r-revealed { opacity: 1; transform: none; }
.r-gem img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 0 34px rgba(255,255,255,.06));
  transition: filter 1s ease, transform 6s ease;
}
.r-gem:hover img { filter: drop-shadow(0 0 48px rgba(255,255,255,.12)); transform: scale(1.015); }
.r-gem-caption {
  margin-top: 22px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: #6d6a63; font-family: var(--r-serif);
}

.r-about-cta { text-align: center; background: var(--r-bg); display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.r-cta-btn {
  display: inline-block; padding: 13px 34px;
  border: 1px solid #5a5a63; border-radius: 999px;
  font-family: var(--r-serif); font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: #e8e6df !important; text-decoration: none;
  transition: all .2s ease;
}
.r-cta-btn:hover { background: #fff; border-color: #fff; color: #000 !important; box-shadow: 0 0 26px rgba(255,255,255,.16); }

/* ---- foyer footer ---- */
.r-foyer-footer {
  text-align: center; padding: 100px 24px 70px;
  background: linear-gradient(to bottom, var(--r-bg), #060607);
  border-top: 1px solid var(--r-line);
}
.r-motto {
  font-family: var(--r-serif); font-style: italic;
  font-size: clamp(20px, 3vw, 27px); color: #d8d5cc; letter-spacing: .08em;
}
.r-mission { max-width: 520px; margin: 22px auto 0; color: #8a877e; font-size: 14px; line-height: 1.8; }
.r-foot-links { margin-top: 34px; display: flex; gap: 34px; justify-content: center; flex-wrap: wrap; }
.r-foot-links a {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: #9a978f !important; text-decoration: none;
}
.r-foot-links a:hover { color: #fff !important; }
.r-foot-copy { margin-top: 44px; font-size: 12px; color: #55534d; letter-spacing: .06em; }

/* ============================================================
   DEPTH PASS — the rest of the museum
   ============================================================ */

/* auth modals */
.g-validation-failed-message { color: #e2a5a5 !important; background: transparent; }
.modal .g-bottom-message a { color: #b9b6ad; }

/* item page: the viewing room */
.g-item-header .g-item-name { font-family: var(--r-serif); font-size: 26px; letter-spacing: .04em; color: #fff; }
/* info/viewer section header bars + rows (stock: light gray on white) */
.g-item-info-header, .g-item-image-viewer-select .g-item-info-header,
.g-item-files-header, .g-item-metadata-header {
  background: var(--r-bg-raise) !important;
  color: var(--r-text) !important;
  border: 1px solid var(--r-line) !important;
  font-family: var(--r-serif); letter-spacing: .06em;
}
.g-item-info li, .g-item-info .g-item-info-line, .g-file-list li,
.g-item-info, .g-item-description {
  background: transparent !important;
  color: #c9c6bd !important;
  border-color: var(--r-line) !important;
}
/* item Info rows are .g-info-list-entry divs painted white by girder */
.g-info-list-entry {
  background: transparent !important;
  border-color: var(--r-line) !important;
  color: #c9c6bd !important;
}
/* girder rings each collection row with an inset white glow + light border */
.g-collection-list-entry, .g-list-entry {
  box-shadow: none !important;
  border: 1px solid var(--r-line) !important;
  border-radius: 10px;
  margin-bottom: 14px;
}
/* long-name fade overlay is hardcoded to fade into WHITE — refit for night */
.g-text-fade {
  background: linear-gradient(90deg, rgba(11,11,13,0), var(--r-bg)) !important;
}
.g-collection-description { background: transparent !important; color: var(--r-muted) !important; }

/* bootstrap list-groups everywhere (item info rows, access lists): the
   white-striped look on dark comes from these */
.list-group-item {
  background: transparent !important;
  border-color: var(--r-line) !important;
  color: #c9c6bd !important;
}
.list-group-item i { color: #8a877e !important; }
/* native selects (viewer chooser, control mode, presets) */
#g-app-body-container select, select.form-control {
  background: #121215 !important;
  color: var(--r-text) !important;
  border: 1px solid var(--r-line) !important;
  border-radius: 8px;
  padding: 4px 10px;
}
select option { background: #121215; color: #f2f0ea; }
.g-item-image-viewer-select label, .g-item-view label, .g-item-info label {
  color: var(--r-muted) !important; font-weight: 400; letter-spacing: .04em;
}
.g-item-info li a, .g-file-list li a { color: #d8d5cc !important; }
/* stray white icon buttons (breadcrumb 'up', header actions) */
.g-item-breadcrumb-backlink, a.btn.btn-default, button.btn.btn-default,
.g-upload-into-folder, .g-folder-header-buttons .btn {
  background: transparent !important;
  border-color: #5a5a63 !important;
  color: #d8d5cc !important;
}
.g-item-image-viewer-select { background: var(--r-bg-raise) !important; border: 1px solid var(--r-line) !important; border-radius: 10px; }
.g-item-image-viewer-select .g-item-info-header { color: var(--r-muted) !important; }
/* HANDS OFF THE VIEWERS. GeoJS/Histomics stack layered divs + canvases and
   any background/overlay styling from us can curtain the rendered artwork
   (it did — 2026-07-09). The viewer interior stays 100% stock. */
.g-widget-metadata-header { font-family: var(--r-serif); letter-spacing: .08em; color: var(--r-muted) !important; }
.g-widget-metadata-row { border-color: var(--r-line) !important; background: transparent !important; }

/* upload: receiving dock */
.g-drop-zone {
  border: 1.5px dashed #4a4a52 !important;
  background: rgba(255,255,255,.015) !important;
  color: var(--r-muted) !important;
  border-radius: 12px;
}
.g-drop-zone.g-dropzone-show:hover { border-color: #fff !important; color: #fff !important; }
.progress { background: #121215 !important; border-radius: 999px; box-shadow: none !important; }
.progress-bar { background: #e8e6df !important; color: #000 !important; box-shadow: 0 0 18px rgba(255,255,255,.25) !important; }

/* admin console readability */
.g-plugin-list-item { border-color: var(--r-line) !important; }
.g-plugin-list-item .g-plugin-name { color: var(--r-text) !important; }
pre, code, .g-job-log-container pre {
  background: #121215 !important; color: #d5d2ca !important;
  border: 1px solid var(--r-line) !important; border-radius: 8px;
}
.bootstrap-switch { border-color: var(--r-line) !important; background: #121215 !important; }
.bootstrap-switch .bootstrap-switch-label { background: #26262c !important; }

/* quick search results */
.g-quick-search-container .dropdown-menu { min-width: 320px; }
.g-quick-search-container .dropdown-menu > li > a i { color: #8a877e; }

/* jobs: status must stay legible on dark */
.g-job-status-badge { border-radius: 999px; }
.g-jobs-list-table td { border-color: var(--r-line) !important; }

/* bootstrap odds and ends */
.tooltip-inner { background: #f2f0ea !important; color: #0b0b0d !important; font-size: 12px; }
.tooltip .tooltip-arrow { border-top-color: #f2f0ea !important; }
.popover { background: #121215 !important; border: 1px solid var(--r-line) !important; color: var(--r-text) !important; }
.popover-title { background: #1a1a1f !important; border-color: var(--r-line) !important; color: var(--r-text) !important; }
.nav-tabs { border-color: var(--r-line) !important; }
.nav-tabs > li > a { color: var(--r-muted) !important; border-radius: 8px 8px 0 0; }
.nav-tabs > li.active > a, .nav-tabs > li > a:hover {
  background: var(--r-bg-raise) !important; color: #fff !important; border-color: var(--r-line) !important;
}
.label-default { background: #33333a !important; }
#g-alerts-container .alert {
  background: rgba(18,18,21,.92) !important; border: 1px solid var(--r-line) !important;
  color: var(--r-text) !important; border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0,0,0,.6); backdrop-filter: blur(6px);
}

/* focus + accessibility */
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible {
  outline: 2px solid #fff !important; outline-offset: 2px;
}

/* ============================================================
   HISTOMICS — the study room (same injected file at /histomics)
   ============================================================ */
/* Histomics viewer + panels: STOCK. Only the header text gets the serif. */
.h-branding-text, #g-app-header-container .h-brand-name { font-family: var(--r-serif) !important; }

/* ============================================================
   MOTION DISCIPLINE — reduced motion kills every animation
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .r-hero-art, .r-scroll-cue, #g-app-header-container .g-app-title::before,
  body::after { animation: none !important; }
  .r-starburst .r-ring { stroke-dashoffset: 0 !important; animation: none !important; }
  .r-starburst-mark .r-glyph { opacity: 1 !important; transition: none !important; }
  .r-card, #r-foyer { transition: none !important; opacity: 1 !important; transform: none !important; }
  .r-typeset .r-line-inner { transform: none !important; opacity: 1 !important; transition: none !important; }
}

/* print: every reveal is visible, no motion */
@media print {
  .r-typeset .r-line-inner { transform: none !important; opacity: 1 !important; }
}

/* small screens: rhythm tightens */
@media (max-width: 640px) {
  #r-foyer section { padding: 70px 18px; }
  .r-starburst { gap: 40px; }
  .r-exh-grid { gap: 28px; }
}
