  /* ════════════════════════════════════════════════════════════
     SoloCogs · Hall of Lab Legends
     A digital art museum - minimalist, dark walls, ultra-slim
     glowing frames. Discovered legends fill in. Undiscovered
     ones tease as ?? mystery silhouettes so the hunt stays alive.
     ════════════════════════════════════════════════════════════ */

  /* ── Museum environment ── */
  body {
    background:
      radial-gradient(ellipse 1100px 600px at 50% -8%, rgba(45, 212, 191, 0.05) 0%, transparent 60%),
      radial-gradient(ellipse 800px 400px at 100% 100%, rgba(94, 234, 212, 0.04) 0%, transparent 60%),
      #08101F;
    color: #E2E8F0;
    overflow-x: hidden;
  }
  /* Subtle wall texture - diagonal scan line, very low opacity */
  body::before {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.012) 0,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 6px
    );
  }

  /* ── Header ── */
  .hol-hero {
    position: relative;
    background: rgba(8, 16, 31, 0.65);
    padding: 4rem 1.5rem 3rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  }
  .hol-hero-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
  /* Reset the global `nav { background: var(--solo-bg-elevated, #FFFFFF); ... }` rule from styles.css
     so our breadcrumb doesn't render as a sticky white bar across the dark
     museum hero (same fix the Atomic Vault uses). */
  .hol-breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-family: var(--solo-font-head);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.4rem;
    background: transparent;
    border: 0;
    padding: 0;
    position: static;
    height: auto;
    z-index: auto;
  }
  .hol-breadcrumb a { color: #5EEAD4; text-decoration: none; }
  .hol-breadcrumb a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .hol-breadcrumb-sep { color: rgba(255, 255, 255, 0.85); }
  .hol-breadcrumb-current { color: #FFFFFF; }

  .hol-eyebrow {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-family: var(--solo-font-head); font-size: 0.7rem; font-weight: 700;
    color: rgba(148, 163, 184, 0.85); letter-spacing: 0.14em; text-transform: uppercase;
    margin-bottom: 0.75rem;
  }
  .hol-eyebrow::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: #2DD4BF; box-shadow: 0 0 0 3px rgba(45,212,191,.25), 0 0 12px rgba(45,212,191,.6);
  }
  .hol-hero h1 {
    font-family: var(--solo-font-head); font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.05;
    letter-spacing: -0.02em; margin: 0 0 0.75rem;
    color: #F8FAFC;
  }
  .hol-hero-lede {
    font-family: var(--solo-font-body);
    font-size: clamp(0.98rem, 1.6vw, 1.08rem);
    line-height: 1.6; color: #CBD5E1; margin: 0;
    max-width: 60ch;
  }

  /* ── Counter strip ── */
  .hol-stats {
    display: flex; gap: 1.25rem; flex-wrap: wrap;
    margin: 1.6rem 0 0; padding: 1rem 1.2rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    align-items: center;
    backdrop-filter: blur(8px);
  }
  .hol-stat { display: flex; flex-direction: column; gap: 0.15rem; }
  .hol-stat-label { font-family: var(--solo-font-head); font-size: 0.62rem; font-weight: 700; color: rgba(148, 163, 184, 0.85); letter-spacing: 0.12em; text-transform: uppercase; }
  .hol-stat-value { font-family: var(--solo-font-head); font-size: 1.25rem; font-weight: 700; color: #F8FAFC; letter-spacing: -0.01em; }
  .hol-stat-value strong { color: #2DD4BF; text-shadow: 0 0 12px rgba(45, 212, 191, 0.6); }
  /* "/ Y total" suffix on the Discovered counter - quieter than the
     glowing teal "X" so the chase number reads as context, not weight. */
  .hol-stat-total {
    color: rgba(248, 250, 252, 0.55);
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 0.15rem;
  }
  .hol-stat-mystery {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: rgba(94, 234, 212, 0.85);
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(45, 212, 191, 0.5);
  }
  .hol-stat-divider { width: 1px; height: 36px; background: rgba(148, 163, 184, 0.18); flex-shrink: 0; }

  /* ── Wing chip navigator ──
     Per-wing breakdown that doubles as the carousel selector. Click a chip
     to jump directly to that wing. The active chip glows in its wing colour
     and pulses softly so the eye is drawn to the current selection. */
  .hol-wing-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
  }
  .hol-wing-chip {
    --chip-color: #2DD4BF;
    --chip-accent: #5EEAD4;
    --chip-glow: rgba(45, 212, 191, 0.55);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: var(--solo-font-head);
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.78);
    transition: border-color 0.2s ease, color 0.2s ease,
                background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  }
  .hol-wing-chip:hover {
    border-color: var(--chip-color);
    color: #F8FAFC;
    background: rgba(15, 23, 42, 0.78);
    transform: translateY(-1px);
  }
  .hol-wing-chip[aria-current="true"] {
    border-color: var(--chip-color);
    color: #F8FAFC;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(8, 16, 31, 0.85) 100%);
    box-shadow:
      0 0 0 1px var(--chip-color),
      0 0 18px var(--chip-glow);
    animation: hol-chip-pulse 2.4s ease-in-out infinite;
  }
  @keyframes hol-chip-pulse {
    0%, 100% { box-shadow: 0 0 0 1px var(--chip-color), 0 0 14px var(--chip-glow); }
    50%      { box-shadow: 0 0 0 1px var(--chip-color), 0 0 26px var(--chip-glow); }
  }
  @media (prefers-reduced-motion: reduce) {
    .hol-wing-chip[aria-current="true"] { animation: none; }
  }
  .hol-wing-chip-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--chip-color);
    box-shadow: 0 0 8px var(--chip-glow);
    flex-shrink: 0;
  }
  .hol-wing-chip-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem; font-weight: 700;
    color: var(--chip-accent);
  }
  .hol-wing-chip[aria-current="true"] .hol-wing-chip-count {
    color: #F8FAFC;
    text-shadow: 0 0 6px var(--chip-glow);
  }

  /* ── Carousel arrows + stage ──
     Wing card spans the full 1200px shell width to match the stats bar
     above (no inner gutter). Arrows float over the row of cards at the
     left + right edges, sitting in the gallery's gap area between cards. */
  .hol-stage-wrap {
    position: relative;
    padding: 0;
  }
  .hol-stage-nav-btn {
    position: absolute;
    /* Pin to the centre of the gallery row (not the whole wing - the wing
       header sits above and would otherwise pull the arrow up). */
    top: calc(50% + 60px);
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.20);
    color: #F8FAFC;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease,
                box-shadow 0.2s ease, transform 0.2s ease;
  }
  .hol-stage-nav-btn:hover {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(45, 212, 191, 0.55);
    color: #5EEAD4;
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.35);
  }
  .hol-stage-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
  }
  .hol-stage-nav-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
  /* Arrows sit just inside the wing's left/right edge, overlapping the
     first/last card by ~14px - so the wing fills the full 1200px shell
     yet the arrows are always visible regardless of viewport width. */
  .hol-stage-nav-prev { left: 8px; }
  .hol-stage-nav-next { right: 8px; }
  @media (max-width: 720px) {
    .hol-stage-nav-btn { width: 38px; height: 38px; }
  }
  @media (max-width: 480px) {
    /* Phone: hide the floating arrows. Chip strip + swipe gesture handle nav. */
    .hol-stage-nav-btn { display: none; }
  }

  /* Visually hidden helper for the ARIA live announcer that replaces the
     old "Wing N of 5" instruction strip. Off-screen but still read by
     screen readers. */
  .visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
  }

  /* ── Gallery ── */
  .hol-gallery-section {
    padding: 3rem 1.5rem 4rem;
    position: relative; z-index: 1;
  }
  .hol-gallery-shell { max-width: 1200px; margin: 0 auto; }
  .hol-gallery-eyebrow {
    font-family: var(--solo-font-head);
    font-size: 0.7rem; font-weight: 700;
    color: rgba(148, 163, 184, 0.85);
    letter-spacing: 0.16em; text-transform: uppercase;
    margin: 0 0 1.4rem;
  }

  /* Gallery - the 4-up codex grid. Above 4 entries the wing scrolls
     vertically; each row snaps so the next row clicks neatly into view
     like turning a page in a codex. */
  .hol-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem 1.5rem;
    /* Show ~1.6 rows of tiles so the second row is OBVIOUSLY there,
       not just a tiny peek. Combined with the staggered column offsets
       below, this makes "there are more scientists behind these"
       immediately legible. */
    max-height: 540px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-snap-type: y mandatory;
    scroll-padding-top: 0;
    /* extra padding-bottom so the staggered tiles in the last visible
       row don't clip against the gallery's bottom edge */
    padding: 12px 4px 60px;
    /* mask the bottom so it fades into a "more below" gradient */
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%);
    /* More visible custom scrollbar */
    scrollbar-width: auto;
    scrollbar-color: var(--wing-accent, rgba(94, 234, 212, 0.7)) rgba(15, 23, 42, 0.15);
    position: relative;
  }
  .hol-gallery::-webkit-scrollbar { width: 10px; }
  .hol-gallery::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.08); border-radius: 5px; }
  .hol-gallery::-webkit-scrollbar-thumb { background: var(--wing-accent, rgba(94, 234, 212, 0.7)); border-radius: 5px; }
  .hol-gallery::-webkit-scrollbar-thumb:hover { background: var(--wing-accent, rgba(94, 234, 212, 0.95)); }
  /* Scroll-snap target on each row's worth of frames. */
  .hol-gallery > .hol-frame { scroll-snap-align: start; }
  /* Staggered cascade: alternating columns offset vertically so the
     tiles peek from above + below each other, giving the feeling of a
     deeper collection - like a rolodex of cards behind the visible row.
     The 2nd + 4th columns sit lower; the 1st + 3rd sit higher. */
  .hol-gallery > .hol-frame:nth-child(4n+2),
  .hol-gallery > .hol-frame:nth-child(4n+4) {
    transform: translateY(36px);
  }
  /* When the wing is showing as a single row (≤4 scientists), don't
     stagger - it looks weird without a second row to play off. */
  .hol-gallery.is-single-row > .hol-frame { transform: none; }

  /* When the wing only has 4 or fewer scientists, the scroll/scrollbar
     are pointless - drop the height cap so the row sits flush. */
  .hol-gallery.is-single-row { max-height: none; overflow: visible; }

  /* Below 720px, drop to 2-up and let the page scroll normally. */
  @media (max-width: 720px) {
    .hol-gallery {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      max-height: none;
      overflow: visible;
    }
  }

  /* ── Wings - five themed sections ───────────────────────
     Carousel mode: only the wing with .is-active is visible. Switching
     wings triggers a slide animation in the chosen direction (left/right)
     so the museum feels alive rather than static.

     Each wing exposes its own ambient glow via --wing-glow,
     applied to the wing's frames and the No Signal shadows. */
  .hol-wing {
    --wing-glow: rgba(45, 212, 191, 0.55);
    --wing-color: #2DD4BF;
    --wing-accent: #5EEAD4;
    margin: 0;
    padding: 0;
    position: relative;
    display: none;
  }
  .hol-wing.is-active { display: block; }
  .hol-wing.is-entering-right { animation: hol-wing-slide-from-right 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
  .hol-wing.is-entering-left  { animation: hol-wing-slide-from-left  0.45s cubic-bezier(0.22, 1, 0.36, 1); }
  @keyframes hol-wing-slide-from-right {
    0%   { opacity: 0; transform: translateX(40px); }
    100% { opacity: 1; transform: translateX(0); }
  }
  @keyframes hol-wing-slide-from-left {
    0%   { opacity: 0; transform: translateX(-40px); }
    100% { opacity: 1; transform: translateX(0); }
  }
  @media (prefers-reduced-motion: reduce) {
    .hol-wing.is-entering-right,
    .hol-wing.is-entering-left { animation: none; }
  }
  .hol-wing-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.2rem;
    margin: 0 0 1.4rem;
    border-radius: 14px;
    background:
      linear-gradient(90deg, rgba(15, 23, 42, 0.65) 0%, rgba(8, 16, 31, 0.4) 100%);
    border: 1px solid rgba(148, 163, 184, 0.10);
    border-left: 3px solid var(--wing-color);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  }
  .hol-wing-headline {
    display: flex; flex-direction: column; gap: 0.18rem;
  }
  .hol-wing-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--wing-accent);
    text-shadow: 0 0 8px var(--wing-glow);
  }
  .hol-wing-title {
    font-family: var(--solo-font-head);
    font-size: 1.2rem; font-weight: 700;
    letter-spacing: -0.005em;
    color: #F8FAFC;
    margin: 0;
  }
  .hol-wing-blurb {
    font-family: var(--solo-font-body);
    font-size: 0.85rem; line-height: 1.5;
    color: rgba(203, 213, 225, 0.85);
    max-width: 50ch; margin: 0;
  }
  .hol-wing-counter {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem; font-weight: 700;
    color: var(--wing-accent);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--wing-color);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    text-shadow: 0 0 6px var(--wing-glow);
    flex-shrink: 0;
  }
  .hol-wing-counter strong { color: #F8FAFC; }

  /* Frame chrome inherits the wing's ambient colour */
  .hol-wing .hol-frame { --frame-glow: var(--wing-glow); }
  .hol-wing .hol-frame:hover { border-color: var(--wing-color); }
  .hol-wing .hol-frame:hover::before {
    box-shadow:
      inset 0 0 0 1px var(--wing-color),
      inset 0 0 22px var(--wing-glow);
  }
  .hol-wing .hol-frame.is-discovered {
    border-color: var(--wing-color);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6), 0 0 22px var(--wing-glow);
  }
  .hol-wing .hol-frame.is-discovered::before {
    box-shadow:
      inset 0 0 0 1px var(--wing-color),
      inset 0 0 20px var(--wing-glow);
  }
  .hol-wing .hol-frame.is-discovered .hol-frame-eyebrow { color: var(--wing-accent); }
  .hol-wing .hol-frame .hol-frame-mystery-tag {
    color: var(--wing-accent);
    border-color: var(--wing-color);
    text-shadow: 0 0 6px var(--wing-glow);
  }
  .hol-wing .hol-frame .hol-frame-img-wrap::after {
    background: linear-gradient(180deg, transparent 0%, var(--wing-glow) 50%, transparent 100%);
  }

  /* No Signal - locked frames render a pixelated static silhouette in the
     wing's colour. Multiple repeating-linear-gradients overlap to imitate
     low-fidelity scan static; the silhouette sits behind, masked in. */
  .hol-wing .hol-frame:not(.is-discovered) .hol-frame-img-wrap {
    background:
      repeating-linear-gradient(0deg,
        rgba(0, 0, 0, 0.18) 0,
        rgba(0, 0, 0, 0.18) 2px,
        transparent 2px,
        transparent 4px),
      repeating-linear-gradient(90deg,
        rgba(255, 255, 255, 0.02) 0,
        rgba(255, 255, 255, 0.02) 1px,
        transparent 1px,
        transparent 5px),
      radial-gradient(ellipse at 50% 30%, var(--wing-glow) 0%, transparent 65%),
      #060B17;
    background-blend-mode: normal, screen, normal, normal;
  }
  .hol-wing .hol-frame:not(.is-discovered) .hol-frame-silhouette {
    color: var(--wing-color);
    opacity: 0.22;
    filter:
      blur(0.4px)
      drop-shadow(2px 0 0 rgba(255, 255, 255, 0.06))
      drop-shadow(-2px 0 0 var(--wing-glow));
    animation: hol-static-jitter 0.18s steps(2, end) infinite;
  }
  @keyframes hol-static-jitter {
    0%   { transform: translate(0, 0); }
    50%  { transform: translate(0.5px, -0.5px); }
    100% { transform: translate(-0.5px, 0.5px); }
  }

  /* Wings respond to first-paint: discovered frames smoothly resolve
     ('Glitch-to-Glow') by the existing transition on .is-discovered. */

  /* ── Frame card ── */
  .hol-frame {
    --frame-glow: rgba(45, 212, 191, 0.55);
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8) 0%, rgba(8, 16, 31, 0.9) 100%);
    border: 1px solid rgba(148, 163, 184, 0.10);
    overflow: hidden;
    transition:
      transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 0.4s ease,
      border-color 0.4s ease;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
  }
  .hol-frame::before {
    /* Ultra-slim digital frame glow, sits on the inside edge */
    content: '';
    position: absolute; inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.15);
    transition: box-shadow 0.35s ease;
  }
  .hol-frame:hover {
    transform: translateY(-3px);
    border-color: rgba(45, 212, 191, 0.30);
    box-shadow:
      0 14px 30px rgba(0, 0, 0, 0.6),
      0 0 28px var(--frame-glow);
  }
  .hol-frame:hover::before {
    box-shadow:
      inset 0 0 0 1px rgba(45, 212, 191, 0.55),
      inset 0 0 22px rgba(45, 212, 191, 0.18);
  }

  /* ── Discovered state ──
     Adds a prominent left-rail in the wing's signature colour so a student
     can spot which wing a card belongs to at a glance, even when looking
     at it out of context. Same convention as Solo's other "left rail"
     cards (origin-card, contact-info-item, etc). */
  .hol-frame.is-discovered {
    border-color: rgba(45, 212, 191, 0.45);
    border-left: 4px solid var(--wing-color, #2DD4BF);
    box-shadow:
      0 8px 26px rgba(0, 0, 0, 0.6),
      0 0 22px var(--frame-glow);
  }
  .hol-frame.is-discovered::before {
    box-shadow:
      inset 0 0 0 1px rgba(45, 212, 191, 0.65),
      inset 0 0 20px rgba(45, 212, 191, 0.18);
  }
  .hol-frame.is-discovered .hol-frame-img {
    opacity: 1;
    filter: grayscale(0) saturate(1.05) brightness(1);
  }
  .hol-frame.is-discovered .hol-frame-name { color: #F8FAFC; }
  .hol-frame.is-discovered .hol-frame-eyebrow { color: #5EEAD4; }
  .hol-frame.is-discovered .hol-frame-meta { color: rgba(226, 232, 240, 0.65); }

  /* Image area */
  .hol-frame-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background:
      radial-gradient(ellipse at 50% 30%, rgba(45, 212, 191, 0.06) 0%, transparent 60%),
      #060B17;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  }
  .hol-frame-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: grayscale(0.4) brightness(0.85);
    transition: opacity 0.5s ease, filter 0.5s ease;
  }

  /* Mystery silhouette - shown when undiscovered */
  .hol-frame-silhouette {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: rgba(94, 234, 212, 0.18);
    transition: color 0.35s ease, transform 0.4s ease;
    pointer-events: none;
  }
  .hol-frame:hover .hol-frame-silhouette {
    color: rgba(94, 234, 212, 0.32);
    transform: scale(1.02);
  }
  .hol-frame.is-discovered .hol-frame-silhouette {
    opacity: 0;
    transform: scale(0.95);
  }
  .hol-frame-silhouette svg { width: 60%; height: 60%; opacity: 0.85; }
  .hol-frame-mystery-tag {
    position: absolute;
    top: 12px; left: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.18em;
    color: rgba(94, 234, 212, 0.75);
    background: rgba(8, 16, 31, 0.7);
    border: 1px solid rgba(45, 212, 191, 0.30);
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    text-shadow: 0 0 6px rgba(45, 212, 191, 0.5);
  }
  .hol-frame.is-discovered .hol-frame-mystery-tag { display: none; }

  /* Scan line that sweeps across undiscovered frames once on load */
  @keyframes hol-frame-scan {
    0%   { transform: translateY(-100%); opacity: 0; }
    20%  { opacity: 0.7; }
    100% { transform: translateY(100%); opacity: 0; }
  }
  .hol-frame-img-wrap::after {
    content: '';
    position: absolute; left: 0; right: 0; top: 0; height: 30%;
    background: linear-gradient(180deg, transparent 0%, rgba(45, 212, 191, 0.12) 50%, transparent 100%);
    pointer-events: none;
    animation: hol-frame-scan 5.5s ease-in-out infinite;
    animation-delay: var(--scan-delay, 0s);
  }
  .hol-frame.is-discovered .hol-frame-img-wrap::after { display: none; }

  /* Caption plate */
  .hol-frame-caption {
    padding: 0.95rem 1rem 1.1rem;
    display: flex; flex-direction: column; gap: 0.3rem;
  }
  .hol-frame-eyebrow {
    font-family: var(--solo-font-head);
    font-size: 0.6rem; font-weight: 700;
    color: rgba(148, 163, 184, 0.65);
    letter-spacing: 0.14em; text-transform: uppercase;
  }
  .hol-frame-name {
    font-family: var(--solo-font-head);
    font-size: 1rem; font-weight: 700;
    color: rgba(226, 232, 240, 0.45);
    letter-spacing: -0.01em;
    line-height: 1.2;
  }
  .hol-frame-meta {
    font-family: var(--solo-font-body);
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.55);
    line-height: 1.4;
  }

  /* Empty hint at the bottom of the gallery */
  .hol-empty {
    margin: 2rem auto 0;
    max-width: 720px;
    padding: 1.4rem 1.6rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px dashed rgba(45, 212, 191, 0.25);
    border-radius: 14px;
    text-align: center;
    color: rgba(203, 213, 225, 0.85);
    font-family: var(--solo-font-body);
    line-height: 1.55;
  }
  .hol-empty strong { color: #5EEAD4; }
  .hol-empty-icon {
    width: 48px; height: 48px;
    margin: 0 auto 0.6rem;
    display: inline-flex; align-items: center; justify-content: center;
    color: rgba(94, 234, 212, 0.6);
    border-radius: 12px;
    background: rgba(45, 212, 191, 0.08);
    border: 1px solid rgba(45, 212, 191, 0.18);
  }
  .hol-empty-icon svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* Discovered modal - the wing's colour rides on the left rail and the
     ambient glow so the modal feels like part of the wing it came from. */
  .hol-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(8, 16, 31, 0.78);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center; justify-content: center;
    z-index: 9000;
    padding: 1.5rem;
  }
  .hol-modal-backdrop.is-open { display: flex; }
  .hol-modal {
    --modal-wing-color: #2DD4BF;
    --modal-wing-glow:  rgba(45, 212, 191, 0.55);
    max-width: 540px; width: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(8, 16, 31, 0.96) 100%);
    border: 1px solid rgba(45, 212, 191, 0.30);
    border-left: 5px solid var(--modal-wing-color);
    border-radius: 18px;
    box-shadow:
      0 30px 60px rgba(0, 0, 0, 0.55),
      0 0 0 4px var(--modal-wing-glow),
      0 0 36px var(--modal-wing-glow);
    overflow: hidden;
  }
  .hol-modal-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #060B17;
    object-fit: cover;
    object-position: top center;     /* keep heads in frame; portraits sit in upper third */
    display: block;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  }
  .hol-modal-body { padding: 1.4rem 1.6rem 1.6rem; }
  .hol-modal-eyebrow {
    font-family: var(--solo-font-head);
    font-size: 0.62rem; font-weight: 700;
    color: rgba(94, 234, 212, 0.85);
    letter-spacing: 0.16em; text-transform: uppercase;
    margin: 0 0 0.4rem;
  }
  .hol-modal-name {
    font-family: var(--solo-font-head);
    font-size: 1.6rem; font-weight: 700;
    color: #F8FAFC;
    letter-spacing: -0.01em;
    margin: 0 0 0.35rem;
  }
  .hol-modal-meta {
    font-family: var(--solo-font-body);
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.85);
    margin: 0 0 0.95rem;
  }
  .hol-modal-lifespan {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: rgba(94, 234, 212, 0.85);
    letter-spacing: 0.04em;
    margin: 0 0 0.55rem;
  }
  .hol-modal-facts {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }
  .hol-modal-facts li {
    font-family: var(--solo-font-body);
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(226, 232, 240, 0.92);
    padding-left: 0.85rem;
    position: relative;
  }
  .hol-modal-facts li::before {
    content: '';
    position: absolute;
    left: 0; top: 0.55em;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: rgba(94, 234, 212, 0.7);
  }
  .hol-modal-collected {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(94, 234, 212, 0.85);
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
  }
  /* Cogs "did you know" note for crossover scientists - explains why their
     wing might be a surprise given where the student first found them. Tinted
     in the modal's wing colour so it sits naturally in the layout. */
  .hol-modal-cogs-note {
    background: rgba(45, 212, 191, 0.08);
    border: 1px solid var(--modal-wing-color, rgba(45, 212, 191, 0.5));
    border-left: 3px solid var(--modal-wing-color, #2DD4BF);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin: 0.4rem 0 1rem;
  }
  .hol-modal-cogs-note-eyebrow {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-family: 'Lexend', system-ui, sans-serif;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--modal-wing-color, #14B8A6);
    margin-bottom: 0.45rem;
  }
  .hol-modal-cogs-note-eyebrow svg { width: 14px; height: 14px; }
  .hol-modal-cogs-note-body {
    font-family: 'Lexend', system-ui, sans-serif;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #E2E8F0;
    margin: 0;
  }
  /* Saved-observation gallery inside a legend's modal. Each card shows
     the sketch on a graph-paper background so it reads as scientific work. */
  .hol-modal-obs {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding-top: 1rem;
    margin-top: 0.4rem;
  }
  .hol-modal-obs-title {
    font-family: var(--solo-font-head);
    font-size: 0.62rem; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: rgba(148, 163, 184, 0.85);
    margin: 0 0 0.6rem;
  }
  .hol-modal-obs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.6rem;
  }
  .hol-modal-obs-item {
    background-color: #FAFCFE;
    background-image:
      linear-gradient(rgba(15,23,42,0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(15,23,42,0.05) 1px, transparent 1px);
    background-size: 8px 8px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 8px;
    padding: 0.4rem;
    text-align: center;
  }
  .hol-modal-obs-item img {
    width: 100%; height: auto; display: block;
    border-radius: 4px;
  }
  .hol-modal-obs-item-meta {
    font-family: var(--solo-font-body);
    font-size: 0.7rem; color: #475569;
    margin-top: 0.3rem;
  }
  .hol-modal-close {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.30);
    color: #E2E8F0;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-family: var(--solo-font-head);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  .hol-modal-close:hover { background: rgba(45, 212, 191, 0.12); border-color: rgba(45, 212, 191, 0.45); }

  @media (max-width: 540px) {
    .hol-hero { padding: 3rem 1.25rem 2.4rem; }
    .hol-gallery { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.4rem 1rem; }
    .hol-frame-name { font-size: 0.92rem; }
    .hol-frame-meta { font-size: 0.72rem; }
  }

  /* ── SoloSight gate - public visitors see a blurred teaser ──
     Default: HIDDEN. Previously the gate defaulted to visible and was
     dismissed once JS added .auth-logged-in - which made the gate flash
     briefly on every page load for signed-in users. Inverted so we only
     SHOW the gate when .auth-logged-out is explicitly set; that way
     logged-in users never see the flicker, and the closed-beta admin
     gate redirects unauthenticated visitors before the gate would ever
     have appeared anyway. */
  .hol-gate-overlay {
    position: fixed; inset: 0;
    display: none;
    align-items: center; justify-content: center;
    background: radial-gradient(ellipse 800px 500px at 50% 40%, rgba(8, 16, 31, 0.55) 0%, rgba(8, 16, 31, 0.92) 80%);
    backdrop-filter: blur(14px) saturate(0.85);
    -webkit-backdrop-filter: blur(14px) saturate(0.85);
    z-index: 8500;
    padding: 2rem 1.25rem;
  }
  body.auth-logged-out .hol-gate-overlay { display: flex; }
  body.is-hall-preview .hol-gate-overlay { background: rgba(8, 16, 31, 0.18); backdrop-filter: blur(2px); display: flex; }
  body.is-hall-preview .hol-gate-card { display: none; }
  .hol-gate-card {
    max-width: 460px; width: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(8, 16, 31, 0.95) 100%);
    border: 1px solid rgba(45, 212, 191, 0.30);
    border-radius: 18px;
    padding: 2rem 1.75rem 1.75rem;
    text-align: center;
    box-shadow:
      0 30px 60px rgba(0, 0, 0, 0.55),
      0 0 0 4px rgba(45, 212, 191, 0.10),
      0 0 36px rgba(45, 212, 191, 0.18);
  }
  .hol-gate-icon {
    width: 56px; height: 56px;
    margin: 0 auto 1rem;
    border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(45, 212, 191, 0.10);
    border: 1px solid rgba(45, 212, 191, 0.25);
    color: #5EEAD4;
  }
  .hol-gate-icon svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .hol-gate-eyebrow {
    font-family: var(--solo-font-head);
    font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: rgba(94, 234, 212, 0.85);
    margin: 0 0 0.5rem;
  }
  .hol-gate-card h2 {
    font-family: var(--solo-font-head);
    font-size: 1.4rem; font-weight: 700;
    color: #F8FAFC;
    margin: 0 0 0.75rem;
  }
  .hol-gate-card p {
    font-family: var(--solo-font-body);
    font-size: 0.95rem; line-height: 1.55;
    color: #CBD5E1;
    margin: 0 0 1.4rem;
  }
  .hol-gate-actions { display: flex; flex-direction: column; gap: 0.55rem; }
  .hol-gate-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    font-family: var(--solo-font-head);
    font-size: 0.92rem; font-weight: 700;
    cursor: pointer; text-decoration: none;
    transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
  }
  .hol-gate-btn-primary {
    background: #2DD4BF; color: #1E293B;
    border: 1px solid #2DD4BF;
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.25);
  }
  .hol-gate-btn-primary:hover { background: #5EEAD4; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(45, 212, 191, 0.40); }
  .hol-gate-btn-ghost {
    background: transparent; color: #E2E8F0;
    border: 1px solid rgba(148, 163, 184, 0.35);
  }
  .hol-gate-btn-ghost:hover { border-color: rgba(45, 212, 191, 0.55); color: #5EEAD4; }
  .hol-gate-foot {
    font-family: var(--solo-font-body);
    font-size: 0.72rem;
    color: rgba(148, 163, 184, 0.7);
    margin: 1rem 0 0;
  }
  .hol-gate-foot a { color: #5EEAD4; text-decoration: none; }

  body.auth-logged-out .hol-hero,
  body.auth-logged-out .hol-gallery-section {
    filter: blur(2.5px) saturate(0.85);
    pointer-events: none;
    user-select: none;
  }
  body.is-hall-preview .hol-hero,
  body.is-hall-preview .hol-gallery-section {
    filter: blur(0.5px) saturate(0.95);
  }
