    :root {
      --font-sans: Barlow, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen,
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
      --ink: #1a2332;
      --muted: #5c6b7a;
      --cream: #faf8f4;
      --paper: #ffffff;
      --nav-bg: #243b53;
      --nav-border: #1e3247;
      --accent: #c4703a;
      --accent-hover: #a85a2e;
      --error: #b42318;
      --link: #2c5282;
      --card-shadow: 0 2px 12px rgba(36, 59, 83, 0.08);
      /* Full-viewport dash layouts: reserve space for taller header + logo. */
      --cryo-dash-below-nav: 9.5rem;
      --cryo-dash-below-nav-tall: 13.75rem;
      /* Viewport-fixed bottom fade on dash pages with scrollable menu columns. */
      --cryo-dash-menu-scroll-fade-h: 1.35rem;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      min-height: 100vh;
      font-family: var(--font-sans);
      font-size: 1.05rem;
      line-height: 1.55;
      color: var(--ink);
      background: var(--cream);
    }
    .nav {
      background: var(--nav-bg);
      color: #e8eef4;
      border-bottom: 3px solid var(--accent);
      padding: 0.4rem 1.15rem;
      /* auto | 1fr | auto — middle column fills remaining width so its start edge
         stays fixed for a given viewport; output-folder control stays pinned at left of middle. */
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 0.28rem 1rem;
    }
    .nav-left {
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
      gap: 0.3rem 0.65rem;
      min-width: 0;
      justify-self: start;
    }
    .nav-title-sep {
      font-weight: 700;
      color: #e8eef4;
      opacity: 0.55;
      letter-spacing: 0.02em;
      margin: 0 0.15rem;
      user-select: none;
      white-space: nowrap;
    }
    .nav-page-title {
      font-family: var(--font-sans);
      font-size: calc(0.98rem * 1.15);
      font-weight: 700;
      color: #e8eef4;
      letter-spacing: 0.02em;
      margin: 0;
      line-height: 1.2;
      padding-left: 0;
      border-left: 0;
      white-space: nowrap;
    }
    .nav a {
      color: #e8eef4;
      text-decoration: none;
      font-weight: 600;
    }
    .nav a:hover { color: #fff; text-decoration: underline; }
    .nav-brand-home-arrow {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      align-self: flex-start;
      font-size: calc(1.42rem * 0.81 * 0.8);
      font-weight: 700;
      line-height: 1;
      margin-right: calc(0.12rem * 0.81 * 0.8);
      margin-left: 0;
      transform: translateX(50%);
      opacity: 0.9;
      transition:
        opacity 0.22s ease,
        text-shadow 0.32s ease,
        filter 0.32s ease,
        color 0.22s ease;
    }
    .nav a.nav-brand-link:hover .nav-brand-home-arrow,
    .nav a.nav-brand-link:focus-visible .nav-brand-home-arrow {
      opacity: 1;
      color: #fff;
      filter:
        brightness(1.45)
        drop-shadow(0 0 6px rgba(255, 248, 235, 1))
        drop-shadow(0 0 18px rgba(255, 214, 170, 0.95))
        drop-shadow(0 0 28px rgba(196, 112, 58, 0.85));
      text-shadow:
        0 0 10px rgba(255, 255, 255, 1),
        0 0 26px rgba(255, 220, 185, 0.95),
        0 0 48px rgba(196, 112, 58, 0.8),
        0 2px 6px rgba(0, 0, 0, 0.45);
    }
    .nav-brand-link {
      display: inline-flex;
      align-items: center;
      gap: 0.65rem;
      text-decoration: none;
      color: inherit;
      border-radius: 10px;
      padding: 0.16rem 0.28rem 0.16rem 0.12rem;
      margin: -0.16rem -0.28rem -0.16rem -0.12rem;
      transition:
        background 0.22s ease,
        box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .nav a.nav-brand-link:hover {
      color: #fff;
      text-decoration: none;
      background: rgba(255, 255, 255, 0.1);
      box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.22),
        0 6px 24px rgba(0, 0, 0, 0.22);
    }
    .nav a.nav-brand-link:focus-visible {
      color: #fff;
      text-decoration: none;
      outline: none;
      background: rgba(255, 255, 255, 0.12);
      box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.9),
        0 0 0 6px rgba(196, 112, 58, 0.35),
        0 8px 28px rgba(0, 0, 0, 0.25);
    }
    .nav-logo-wrap {
      width: min(3.88rem, 12vw);
      height: min(3.88rem, 12vw);
      min-width: 2.88rem;
      min-height: 2.88rem;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .nav-logo {
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: center;
      display: block;
      transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.28s ease;
    }
    .nav a.nav-brand-link:hover .nav-logo,
    .nav a.nav-brand-link:focus-visible .nav-logo {
      transform: scale(1.07);
      filter: brightness(1.14) drop-shadow(0 0 12px rgba(255, 230, 200, 0.45));
    }
    .nav-brand-text {
      display: flex;
      flex-direction: column;
      align-items: center;
      line-height: 1.15;
      gap: 0.04rem;
      transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .nav a.nav-brand-link:hover .nav-brand-text,
    .nav a.nav-brand-link:focus-visible .nav-brand-text {
      transform: translateY(-2px);
    }
    .nav-brand-interface-title {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
      line-height: 1.15;
      transform: none;
      margin-top: 0;
    }
    .nav-brand-interface-title:empty { display: none; }
    .nav-brand-interface-title .nav-title-sep { display: none; }
    .nav-brand-interface-title .nav-page-title {
      display: inline-block;
      position: relative;
      color: rgba(248, 252, 255, 0.96);
      font-weight: 600;
      letter-spacing: 0.03em;
      /* Casing comes from ``nav_interface_title`` in templates — avoid CSS lowercase, which
         would render ``3D`` as ``3d``. */
      -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.85);
      font-size: calc(0.95rem * 1.25 * 1.2 * 0.5184 * 0.8);
      padding: 0;
      margin: 0;
      border-radius: 0;
      border: 0;
      background:
        radial-gradient(
          circle at 28% 24%,
          rgba(255, 255, 255, 0.52) 0%,
          rgba(255, 255, 255, 0.1) 42%,
          rgba(255, 255, 255, 0) 62%
        ),
        linear-gradient(
          155deg,
          rgba(255, 255, 255, 0.28) 0%,
          rgba(255, 255, 255, 0.07) 42%,
          rgba(255, 255, 255, 0.03) 52%,
          rgba(255, 255, 255, 0.12) 100%
        );
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        inset 0 -1px 0 rgba(20, 35, 52, 0.22),
        0 1px 8px rgba(0, 0, 0, 0.12);
      -webkit-backdrop-filter: blur(6px) saturate(1.1);
      backdrop-filter: blur(6px) saturate(1.1);
      text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.28),
        0 -1px 1px rgba(36, 59, 83, 0.11);
      transition:
        color 0.22s ease,
        text-shadow 0.28s ease;
      background: transparent;
      box-shadow: none;
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }
    .nav-brand-line1,
    .nav-brand-line2 {
      font-family: var(--font-sans);
      font-weight: 700;
      letter-spacing: 0.02em;
      transition:
        color 0.22s ease,
        text-shadow 0.28s ease,
        opacity 0.22s ease;
    }
    .nav-brand-line1-row {
      display: inline-flex;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 0.224rem 0.336rem;
      margin-top: -0.024rem;
      transform: translateY(-5%);
    }
    .nav-brand-line1 {
      font-size: calc(1.12rem * 1.2 * 0.8);
    }
    .nav a.nav-brand-link:hover .nav-brand-line1,
    .nav a.nav-brand-link:focus-visible .nav-brand-line1 {
      color: #fff;
      text-shadow:
        0 0 22px rgba(255, 214, 180, 0.65),
        0 0 2px rgba(255, 255, 255, 0.95);
    }
    .nav-brand-line2 {
      font-size: calc(0.98rem * 1.15 * 0.8);
      font-weight: 600;
      opacity: 0.92;
      position: relative;
      padding-bottom: 0;
      transform: translateY(10%);
      margin-top: -0.0032rem;
    }
    .nav-brand-line2-inner {
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .nav-brand-line2-main {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.02rem;
      position: relative;
      color: rgba(248, 252, 255, 0.96);
      font-weight: 600;
      letter-spacing: 0.03em;
      -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.85);
      padding: 0.1em 0.48em 0.12em;
      margin: 0;
      border-radius: 5px;
      border: 0;
      background:
        radial-gradient(
          circle at 28% 24%,
          rgba(255, 255, 255, 0.52) 0%,
          rgba(255, 255, 255, 0.1) 42%,
          rgba(255, 255, 255, 0) 62%
        ),
        linear-gradient(
          155deg,
          rgba(255, 255, 255, 0.28) 0%,
          rgba(255, 255, 255, 0.07) 42%,
          rgba(255, 255, 255, 0.03) 52%,
          rgba(255, 255, 255, 0.12) 100%
        );
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        inset 0 -1px 0 rgba(20, 35, 52, 0.22),
        0 1px 8px rgba(0, 0, 0, 0.12);
      -webkit-backdrop-filter: blur(6px) saturate(1.1);
      backdrop-filter: blur(6px) saturate(1.1);
      text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.28),
        0 -1px 1px rgba(36, 59, 83, 0.11);
      transition:
        background 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.22s ease,
        text-shadow 0.28s ease;
    }
    .nav a.nav-brand-link:hover .nav-brand-line2-main,
    .nav a.nav-brand-link:focus-visible .nav-brand-line2-main {
      color: #fff;
      background:
        radial-gradient(
          circle at 28% 24%,
          rgba(255, 255, 255, 0.58) 0%,
          rgba(255, 255, 255, 0.12) 42%,
          rgba(255, 255, 255, 0) 62%
        ),
        linear-gradient(
          155deg,
          rgba(255, 255, 255, 0.38) 0%,
          rgba(255, 255, 255, 0.12) 38%,
          rgba(255, 235, 215, 0.08) 52%,
          rgba(255, 255, 255, 0.18) 100%
        );
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.48),
        inset 0 -1px 0 rgba(20, 35, 52, 0.21),
        0 2px 14px rgba(0, 0, 0, 0.12);
      text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35),
        0 -1px 1px rgba(36, 59, 83, 0.11);
    }
    .nav a.nav-brand-link:hover .nav-brand-interface-title .nav-page-title,
    .nav a.nav-brand-link:focus-visible .nav-brand-interface-title .nav-page-title {
      color: #fff;
      background:
        radial-gradient(
          circle at 28% 24%,
          rgba(255, 255, 255, 0.58) 0%,
          rgba(255, 255, 255, 0.12) 42%,
          rgba(255, 255, 255, 0) 62%
        ),
        linear-gradient(
          155deg,
          rgba(255, 255, 255, 0.38) 0%,
          rgba(255, 255, 255, 0.12) 38%,
          rgba(255, 235, 215, 0.08) 52%,
          rgba(255, 255, 255, 0.18) 100%
        );
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.48),
        inset 0 -1px 0 rgba(20, 35, 52, 0.21),
        0 2px 14px rgba(0, 0, 0, 0.12);
      text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35),
        0 -1px 1px rgba(36, 59, 83, 0.11);
      background: transparent;
      box-shadow: none;
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }
    .nav-brand-version {
      font-weight: 600;
      opacity: 0.88;
      letter-spacing: 0.01em;
      line-height: 1.2;
    }
    /* Beside “cryoDRGN”: same smaller size as previous below-title annotation. */
    .nav-brand-version--inline {
      font-size: calc(0.95rem * 1.25 * 1.2 * 0.72 * 0.64);
    }
    .nav-brand-line2::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      height: 1px;
      width: 0;
      border-radius: 1px;
      background: linear-gradient(90deg, var(--accent, #c4703a), #f0b892);
      transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .nav a.nav-brand-link:hover .nav-brand-line2,
    .nav a.nav-brand-link:focus-visible .nav-brand-line2 {
      color: #ffe8d9;
      opacity: 1;
      text-shadow: 0 0 14px rgba(196, 112, 58, 0.55);
    }
    .nav a.nav-brand-link:hover .nav-brand-line2::after,
    .nav a.nav-brand-link:focus-visible .nav-brand-line2::after {
      width: 100%;
    }
    .nav-center {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      justify-content: center;
      gap: 0.08rem;
      min-width: 0;
      justify-self: stretch;
      text-align: center;
      width: 100%;
    }
    .nav-center-row {
      display: grid;
      grid-template-columns: minmax(12.75rem, 19rem) minmax(0, 1fr);
      align-items: center;
      gap: 0.52rem 0.72rem;
      width: 100%;
      min-width: 0;
    }
    .nav-center-row--solo {
      grid-template-columns: minmax(0, 1fr);
    }
    .nav-center-row--outdir-only {
      grid-template-columns: minmax(12.75rem, 22rem);
    }
    .nav-center-row--outdir-only .nav-workdir-field {
      max-width: 22rem;
    }
    .nav-config-field {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0.064rem;
      box-sizing: border-box;
      width: min(calc(52rem * 1.2), calc(88vw * 1.2));
      max-width: min(calc(52rem * 1.2), calc(88vw * 1.2));
      /* ~20% wider; shift left so growth uses space toward the logo. */
      margin-left: clamp(-1rem, -5vw, -5.25rem);
      font-size: 0.56rem;
      font-weight: 600;
      line-height: 1.22;
      opacity: 0.92;
    }
    .nav-center-row .nav-config-field {
      grid-column: 2;
      min-width: 0;
      width: auto;
      max-width: none;
      margin-left: 0;
      align-self: center;
    }
    .nav-center-row--solo .nav-config-field {
      grid-column: 1;
    }
    .nav-workdir-field {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: flex-start;
      gap: 0.36rem;
      grid-column: 1;
      width: 100%;
      min-width: 0;
      max-width: 19rem;
      font-size: 0.656rem;
      font-weight: 600;
      line-height: 1.22;
      opacity: 0.96;
      color: #e8eef4;
      align-self: center;
    }
    .nav-workdir-field--launch-scroll {
      align-items: flex-start;
    }
    .nav-workdir-field label {
      margin: 0;
      font-size: 0.656rem;
      font-weight: 700;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .nav-workdir-scroll-label {
      margin: 0;
      font-size: 0.656rem;
      font-weight: 700;
      white-space: nowrap;
      flex-shrink: 0;
      color: #e8eef4;
    }
    .nav-workdir-field select {
      flex: 1 1 auto;
      min-width: 0;
      max-width: 100%;
      background: rgba(255, 255, 255, 0.12);
      color: #e8eef4;
      border: 1px solid rgba(255, 255, 255, 0.28);
      font-size: 0.64rem;
      font-weight: 600;
      padding: 0.192rem 0.32rem;
    }
    .nav-workdir-field select option {
      color: #1a2332;
      background: #fff;
    }
    /* Launch page (/) when started without outdir: scrollable list of cwd discoveries. */
    .nav-workdir-scroll-list {
      flex: 1 1 auto;
      min-width: 0;
      max-width: 100%;
      max-height: 4.2rem;
      overflow-y: auto;
      overflow-x: hidden;
      border-radius: 3px;
      border: 1px solid rgba(255, 255, 255, 0.28);
      background: rgba(0, 0, 0, 0.18);
      scrollbar-width: thin;
      scrollbar-color: rgba(255, 255, 255, 0.45) rgba(255, 255, 255, 0.08);
    }
    .nav-workdir-scroll-list::-webkit-scrollbar {
      width: 10px;
    }
    .nav-workdir-scroll-list::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.08);
      border-radius: 4px;
    }
    .nav-workdir-scroll-list::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.38);
      border-radius: 4px;
      border: 2px solid transparent;
      background-clip: padding-box;
    }
    .nav-workdir-scroll-list::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.52);
      border: 2px solid transparent;
      background-clip: padding-box;
    }
    .nav-workdir-scroll-ul {
      list-style: none;
      margin: 0;
      padding: 0.12rem 0;
    }
    .nav-workdir-scroll-item {
      display: block;
      width: 100%;
      margin: 0;
      padding: 0.22rem 0.45rem;
      border: none;
      border-radius: 0;
      background: transparent;
      color: #e8eef4;
      font-size: 0.78rem;
      font-weight: 600;
      font-family: var(--font-sans);
      text-align: left;
      cursor: pointer;
      line-height: 1.25;
      word-break: break-word;
    }
    .nav-workdir-scroll-item:hover,
    .nav-workdir-scroll-item:focus-visible {
      background: rgba(255, 255, 255, 0.14);
      outline: none;
    }
    .nav-workdir-scroll-item--selected {
      background: rgba(196, 112, 58, 0.35);
      box-shadow: inset 3px 0 0 0 var(--accent, #c4703a);
    }
    .nav-workdir-scroll-item--selected:hover,
    .nav-workdir-scroll-item--selected:focus-visible {
      background: rgba(196, 112, 58, 0.48);
    }
    .nav-cmd-multiline {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.048rem;
      line-height: 1.2;
      font-size: 0.56rem;
      max-height: min(4.6rem, 19.2vh);
      overflow-y: auto;
      overflow-x: hidden;
      padding: 0.064rem 0;
    }
    .nav-cmd-line {
      max-width: 100%;
      word-break: break-word;
      overflow-wrap: anywhere;
      text-align: center;
    }
    .nav-cmd-line--head {
      font-weight: 800;
      color: var(--accent);
      letter-spacing: 0.03em;
      font-size: 1.25em;
    }
    .nav-cmd-line--tail {
      /* Last three lines should read a bit quieter than the command prefix. */
      font-size: 0.8em;
    }
    .nav-cmd-multiline--fallback {
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .nav-right {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      justify-self: end;
      min-width: 0;
      /* Grid column-gap is 1rem; +4rem => 5rem space between config block and epoch UI. */
      margin-left: 4rem;
    }
    .nav-epoch {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex-direction: row;
      flex-wrap: nowrap;
      gap: 0.36rem;
      flex-shrink: 0;
      min-width: 0;
      max-width: 100%;
    }
    .nav-epoch-meta {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 0.096rem;
      flex: 0 1 auto;
      min-width: 0;
      max-width: min(13.5rem, 28vw);
    }
    .nav-epoch-stamp {
      font-size: calc(0.62rem * 1.13 * 0.8);
      font-weight: 500;
      line-height: 1.2;
      opacity: 0.78;
      color: rgba(232, 238, 244, 0.92);
      min-width: 0;
      width: 100%;
      text-align: right;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .nav-epoch-runlog-version {
      font-size: calc(0.58rem * 1.13 * 0.8);
      font-weight: 500;
      line-height: 1.2;
      opacity: 0.72;
      color: rgba(232, 238, 244, 0.88);
      min-width: 0;
      width: 100%;
      text-align: right;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .nav-epoch-controls {
      display: flex;
      align-items: center;
      gap: 0.28rem;
      flex-shrink: 0;
    }
    .nav-epoch-controls label {
      margin: 0;
      font-size: calc(1.36rem * 0.88 * 1.13 * 0.8);
      font-weight: 600;
      opacity: 0.9;
    }
    .nav-epoch-controls select {
      width: auto;
      min-width: 4rem;
      max-width: 7rem;
      margin: 0;
      padding: 0.16rem 0.304rem;
      font-size: calc(0.74rem * 1.2 * 1.13 * 0.8);
      font-weight: 700;
      background: rgba(255, 255, 255, 0.12);
      color: #e8eef4;
      border: 1px solid rgba(255, 255, 255, 0.28);
    }
    .nav-epoch-controls select option {
      color: #1a2332;
      background: #fff;
    }
    .nav-right-stack {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 0.224rem;
    }
    .nav-kmeans-row {
      font-size: calc(0.68rem * 1.13 * 0.8);
      font-weight: 600;
      line-height: 1.2;
      opacity: 0.88;
      white-space: nowrap;
    }
    .nav-right--with-chimerax {
      display: flex;
      flex-direction: row;
      align-items: flex-end;
      justify-content: flex-end;
      gap: 0.65rem;
    }
    /* ChimeraX left of stamp + Epoch; button ~2× prior chip via min-width clamp. */
    .nav-chimerax-epoch-lane {
      display: inline-flex;
      flex-direction: row;
      align-items: flex-start;
      gap: calc(0.45rem * 0.7);
      max-width: 100%;
    }
    /* ChimeraX left of stamp + Epoch; width stepped down again; vertical padding scales up. */
    .nav-chimerax-epoch-lane .nav-chimerax-btn {
      flex: 0 0 auto;
      min-width: clamp(3.185rem, 8.33vw, 5.88rem);
      max-width: min(6.37rem, 13.475vw);
      box-sizing: border-box;
      text-align: center;
      white-space: pre-line;
      line-height: 1.14;
      padding-block: calc(0.3rem * 1.7 * 1.5 * 1.5 / 2 * 0.7);
      padding-inline: calc(0.45rem * 0.7 * 0.5 * 0.7);
      min-height: 0;
      font-size: calc(0.7 * clamp(0.58rem, 0.18rem + 1.05vw, 0.88rem));
      font-weight: 700;
    }
    .nav-chimerax-epoch-lane .nav-epoch-post-chimerax {
      flex: 0 0 auto;
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 0.096rem;
    }
    .nav-right--with-chimerax > .nav-chimerax-btn {
      white-space: pre-line;
      line-height: 1.14;
      text-align: center;
      padding-block: calc(0.3rem * 1.7 * 1.5 * 1.5 / 2 * 0.7);
      padding-inline: calc(0.55rem * 0.7 * 0.5 * 0.7);
      min-width: clamp(3.185rem, 8.33vw, 5.88rem);
      max-width: min(6.37rem, 13.475vw);
      font-size: calc(0.7 * clamp(0.58rem, 0.18rem + 1.05vw, 0.88rem));
      font-weight: 700;
    }
    .nav-chimerax-btn {
      flex-shrink: 0;
      font-size: calc(0.7 * (0.62rem * 1.13 * 0.8));
      font-weight: 700;
      line-height: 1.15;
      padding: calc(0.22rem * 0.7) calc(0.5rem * 0.7);
      border-radius: 4px;
      border: 1px solid rgba(255, 255, 255, 0.38);
      background: rgba(255, 255, 255, 0.1);
      color: #f8fbff;
      cursor: pointer;
      font-family: inherit;
      letter-spacing: 0.02em;
    }
    .nav-chimerax-btn:hover {
      background: rgba(255, 255, 255, 0.18);
      color: #fff;
      border-color: rgba(255, 255, 255, 0.52);
    }
    .nav-chimerax-btn:focus-visible {
      outline: 2px solid var(--accent, #c4703a);
      outline-offset: 2px;
    }
    .cryo-chimerax-modal[hidden] {
      display: none !important;
    }
    .cryo-chimerax-modal {
      position: fixed;
      inset: 0;
      z-index: 10050;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      box-sizing: border-box;
    }
    .cryo-chimerax-modal__backdrop {
      position: absolute;
      inset: 0;
      background: rgba(26, 35, 50, 0.45);
      cursor: pointer;
    }
    .cryo-chimerax-modal__panel {
      position: relative;
      z-index: 1;
      width: min(32rem, 100%);
      max-height: min(90vh, 28rem);
      overflow: auto;
      background: var(--paper, #fff);
      border-radius: 6px;
      box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
      border: 1px solid rgba(36, 59, 83, 0.14);
      padding: 1.1rem 1.25rem 1.2rem;
      color: var(--ink, #1a2332);
      container-type: inline-size;
      container-name: cryochimeraxdlg;
    }
    .cryo-chimerax-modal__panel h2 {
      margin: 0 0 0.5rem;
      font-size: 1.2rem;
      color: var(--nav-bg, #243b53);
    }
    .cryo-chimerax-modal__panel .cryo-chimerax-modal__actions {
      margin-top: 0.85rem;
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      align-items: stretch;
      width: 100%;
      box-sizing: border-box;
      /* Two gaps between three buttons; cap total gap at 37% of panel inline size. */
      gap: min(calc(0.85rem * 0.7), calc(18.5cqw * 0.7));
    }
    .cryo-chimerax-modal__panel .cryo-chimerax-modal__actions .btn {
      flex: 1 0 0;
      min-width: calc(4.75rem * 0.7);
      min-height: calc(2.75rem / 4 * 0.7);
      font-size: calc(0.7 * clamp(1.02rem, 0.95rem + 0.45vw, 1.18rem));
      padding: calc(0.52rem / 2 * 0.7) calc(0.65rem * 0.7);
      text-align: center;
      white-space: normal;
      line-height: 1.3;
    }
    .cryo-chimerax-modal__panel label {
      margin-top: 0.65rem;
    }
    .cryo-chimerax-modal__panel input[type="text"] {
      max-width: none;
      width: 100%;
      box-sizing: border-box;
      font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
      font-size: 0.88rem;
    }
    .cryo-chimerax-modal__err {
      margin: 0.45rem 0 0;
      font-size: 0.88rem;
      min-height: 1.25em;
    }
    main {
      max-width: 1200px;
      margin: 0 auto;
      padding: 2rem 1.5rem 3rem;
    }
    h1 {
      font-family: var(--font-sans);
      font-weight: 700;
      font-size: 2rem;
      margin: 0 0 0.75rem;
      color: var(--nav-bg);
    }
    h2 {
      font-family: var(--font-sans);
      font-weight: 600;
      font-size: 1.35rem;
      margin: 1.75rem 0 0.75rem;
      color: var(--nav-bg);
    }
    p.lead {
      color: var(--muted);
      font-size: 1.1rem;
      max-width: 52rem;
    }
    a { color: var(--link); }
    .cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1.25rem;
      margin-top: 2rem;
    }
    .card {
      background: var(--paper);
      border-radius: 4px;
      padding: 1.35rem 1.5rem;
      box-shadow: var(--card-shadow);
      border: 1px solid rgba(36, 59, 83, 0.12);
    }
    .card h3 {
      font-family: var(--font-sans);
      font-weight: 600;
      margin: 0 0 0.5rem;
      font-size: 1.2rem;
      color: var(--nav-bg);
    }
    .card p { margin: 0 0 1rem; color: var(--muted); font-size: 0.98rem; }
    .btn {
      display: inline-block;
      background: var(--accent);
      color: #fff !important;
      padding: 0.5rem 1.1rem;
      border-radius: 3px;
      text-decoration: none !important;
      font-weight: 600;
      font-size: 0.95rem;
      border: none;
      cursor: pointer;
      font-family: inherit;
    }
    .btn:hover { background: var(--accent-hover); }
    .btn-secondary {
      background: var(--nav-bg);
    }
    .btn-secondary:hover { background: var(--nav-border); }
    .cryo-btn-with-save-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.38rem;
      text-align: left;
    }
    .cryo-btn-with-save-icon--icon-only {
      gap: 0;
      padding-left: 0.28rem;
      padding-right: 0.28rem;
    }
    .cryo-btn-save-icon-slot {
      display: inline-flex;
      flex-shrink: 0;
      align-items: center;
      justify-content: center;
      line-height: 0;
      width: 1.05em;
      height: 1.05em;
    }
    .cryo-btn-save-icon-slot .cryo-save-floppy-icon {
      width: 100%;
      height: 100%;
      display: block;
    }
    .cryo-btn-with-save-icon--icon-only .cryo-btn-save-icon-slot {
      width: 100%;
      height: 100%;
    }
    label { display: block; font-weight: 600; margin: 0.75rem 0 0.25rem; font-size: 0.92rem; }
    input[type="text"], select, textarea {
      width: 100%;
      max-width: 32rem;
      padding: 0.45rem 0.6rem;
      border: 1px solid #c5cdd6;
      border-radius: 3px;
      font-family: inherit;
      font-size: 0.95rem;
    }
    textarea { min-height: 4rem; }
    .muted { color: var(--muted); font-size: 0.92rem; }
    /* File browser (used by particle explorer save modal, and trajectory creator pickers). */
    .cryo-file-browser-bar {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      padding: 0.45rem 0.55rem;
      border-bottom: 1px solid rgba(36, 59, 83, 0.10);
      background: rgba(36, 59, 83, 0.04);
      flex-shrink: 0;
    }
    .cryo-file-browser-bar button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(36, 59, 83, 0.08);
      border: 1px solid rgba(36, 59, 83, 0.28);
      border-radius: 4px;
      cursor: pointer;
      font-size: 1.05rem;
      font-weight: 600;
      line-height: 1.2;
      min-height: 2.4rem;
      min-width: 4.5rem;
      padding: 0.45rem 1rem;
      color: #243b53;
      flex-shrink: 0;
      box-sizing: border-box;
    }
    .cryo-file-browser-bar button:hover {
      background: rgba(36, 59, 83, 0.14);
    }
    .cryo-file-browser-path {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      direction: rtl;
      text-align: left;
      color: rgba(36, 59, 83, 0.6);
      font-family: "IBM Plex Mono", monospace;
      font-size: 0.85rem;
    }
    .cryo-file-browser-list {
      overflow-y: auto;
      flex: 1;
      margin: 0;
      padding: 0;
      list-style: none;
    }
    .cryo-file-browser-list li {
      padding: 0.22rem 0.45rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.3rem;
      border-bottom: 1px solid rgba(36, 59, 83, 0.04);
    }
    .cryo-file-browser-list li:hover {
      background: rgba(36, 59, 83, 0.06);
    }
    .cryo-file-browser-list .fb-icon {
      flex-shrink: 0;
      width: 1rem;
      text-align: center;
      opacity: 0.5;
    }
    .cryo-file-browser-list .fb-name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .cryo-file-browser-empty {
      padding: 0.6rem 0.45rem;
      color: rgba(36, 59, 83, 0.45);
      text-align: center;
      font-style: italic;
    }
    .cryo-file-browser-save-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 0.3rem;
      align-items: center;
      padding: 0.35rem 0.4rem;
      border-top: 1px solid rgba(36, 59, 83, 0.10);
      background: rgba(36, 59, 83, 0.03);
    }
    .cryo-file-browser-save-input {
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
      font-size: 0.72rem;
      padding: 0.2rem 0.35rem;
      border: 1px solid rgba(36, 59, 83, 0.22);
      border-radius: 3px;
      font-family: "IBM Plex Mono", monospace;
    }
    .cryo-file-browser-save-row .btn {
      font-size: 0.72rem;
      padding: 0.2rem 0.45rem;
      white-space: nowrap;
    }
    /* Overlay file-browser modals (covariate .pkl load, indices save, trajectory GIF, …). */
    .cryo-explorer-save-modal {
      position: fixed;
      inset: 0;
      z-index: 2147482000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      box-sizing: border-box;
    }
    .cryo-explorer-save-modal[hidden] {
      display: none !important;
    }
    body.cryo-explorer-save-modal-open {
      overflow: hidden;
    }
    .cryo-explorer-save-modal__backdrop {
      position: absolute;
      inset: 0;
      background: rgba(26, 32, 44, 0.45);
      cursor: pointer;
    }
    .cryo-explorer-save-modal__dialog {
      position: relative;
      z-index: 1;
      width: min(96vw, 28rem);
      max-height: min(88vh, 26rem);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: #fffdf8;
      border-radius: 10px;
      box-shadow: 0 8px 32px rgba(36, 59, 83, 0.22);
      border: 1px solid rgba(36, 59, 83, 0.14);
      box-sizing: border-box;
    }
    .cryo-explorer-save-modal--wide .cryo-explorer-save-modal__dialog {
      width: min(96vw, 42rem);
      max-height: min(92vh, 36rem);
      overflow: auto;
      padding: 1rem 1.1rem 1.15rem;
    }
    .cryo-explorer-save-modal__header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.65rem 0.75rem 0.55rem;
      border-bottom: 1px solid rgba(36, 59, 83, 0.1);
      flex-shrink: 0;
    }
    .cryo-explorer-save-modal--wide .cryo-explorer-save-modal__header {
      padding: 0;
      border-bottom: none;
    }
    .cryo-explorer-save-modal__title {
      margin: 0;
      font-size: 1.02rem;
      font-weight: 700;
      color: var(--nav-bg, #243b53);
      line-height: 1.25;
    }
    .cryo-explorer-save-modal--wide .cryo-explorer-save-modal__title {
      margin: 0 0 0.65rem;
      font-size: 1.12rem;
    }
    .cryo-explorer-save-modal__close {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.65rem;
      height: 1.65rem;
      padding: 0;
      border: none;
      border-radius: 4px;
      background: transparent;
      color: rgba(36, 59, 83, 0.72);
      font-size: 1.35rem;
      line-height: 1;
      cursor: pointer;
      flex-shrink: 0;
    }
    .cryo-explorer-save-modal__close:hover {
      background: rgba(36, 59, 83, 0.08);
      color: var(--nav-bg, #243b53);
    }
    .cryo-explorer-save-modal__close:focus-visible {
      outline: 2px solid var(--accent, #c4703a);
      outline-offset: 1px;
    }
    .cryo-explorer-save-modal__browser.cryo-file-browser {
      border: none;
      border-radius: 0;
      background: #fff;
      max-height: none;
      flex: 1 1 auto;
      min-height: 0;
      display: flex;
      flex-direction: column;
      font-size: 0.72rem;
      width: 100%;
      box-sizing: border-box;
    }
    .cryo-explorer-save-modal .cryo-file-browser-list {
      max-height: min(42vh, 14rem);
    }
    .cryo-explorer-save-modal__actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      justify-content: flex-end;
      margin-top: 0.75rem;
      flex-shrink: 0;
    }
    .layout-split {
      display: grid;
      grid-template-columns: 1fr 320px;
      gap: 1rem;
      align-items: start;
    }
    .preview-panel {
      position: sticky;
      top: 1rem;
      background: var(--paper);
      padding: 1rem;
      border-radius: 4px;
      box-shadow: var(--card-shadow);
      border: 1px solid rgba(36, 59, 83, 0.12);
    }
    .preview-panel img { width: 100%; height: auto; display: block; border-radius: 2px; }
    .status { margin-top: 0.5rem; font-size: 0.88rem; color: var(--muted); }

    /* Shared analysis layout (pair grid, scatter, filter, 3D): controls | plot (+ optional figure aside). */
    main:has(.cryo-dash-page) {
      max-width: min(100%, 1680px);
      padding-top: 0.85rem;
      padding-bottom: 1rem;
    }
    /* Same pattern as latent 3D volume-landscape: fixed cream fade at the viewport bottom. */
    main:has(.cryo-dash-page--menu-scroll-fade)::after {
      content: "";
      position: fixed;
      left: 1.5rem;
      right: 0;
      bottom: 0;
      height: var(--cryo-dash-menu-scroll-fade-h, 1.35rem);
      pointer-events: none;
      z-index: 20;
      background: linear-gradient(
        to bottom,
        rgba(250, 248, 244, 0),
        rgba(250, 248, 244, 0.55) 42%,
        var(--cream, #faf8f4) 100%
      );
    }
    .cryo-dash-page .cryo-dash-lead {
      margin: 0 0 0.35rem;
      font-size: 0.82rem;
      line-height: 1.35;
      color: var(--muted, #5c6b7a);
      max-width: 56rem;
    }
    .cryo-dash-page .cryo-dash-row {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      gap: 1rem;
      margin-top: 0.35rem;
    }
    /* Pair-plot + 3D: controls (15%) | plot (70%) | legend (15%). */
    .cryo-dash-row.cryo-dash-row--plot-triple {
      display: grid;
      grid-template-columns: minmax(0, 15fr) minmax(0, 70fr) minmax(0, 15fr);
      align-items: stretch;
      gap: 1rem;
    }
    .cryo-dash-row.cryo-dash-row--plot-triple > .cryo-dash-side {
      flex: unset;
      width: auto;
      max-width: none;
      min-width: 0;
    }
    .cryo-dash-row.cryo-dash-row--plot-triple > .cryo-dash-main {
      flex: unset;
      width: auto;
      min-width: 0;
      max-width: none;
      justify-content: stretch;
      align-items: stretch;
    }
    .cryo-dash-row.cryo-dash-row--plot-triple > .pairplot-color-legend-aside,
    .cryo-dash-row.cryo-dash-row--plot-triple > .latent3d-color-legend-aside,
    .cryo-dash-row.cryo-dash-row--plot-triple > .latent3d-volanim-aside {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      align-self: stretch;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      box-sizing: border-box;
    }
    .cryo-dash-row.cryo-dash-row--plot-triple > .pairplot-color-legend-aside {
      justify-content: center;
    }
    /* Top-align so discrete / continuous legends share the same anchor as the plot column
       (centering made tall landscape-full discrete panels sit higher than the latent-3D view). */
    .cryo-dash-row.cryo-dash-row--plot-triple > .latent3d-color-legend-aside {
      justify-content: flex-start;
    }
    .cryo-dash-row.cryo-dash-row--plot-triple > .latent3d-volanim-aside {
      justify-content: flex-start;
    }
    .cryo-dash-row.cryo-dash-row--plot-triple > .pairplot-color-legend-aside .cryo-cc-legend,
    .cryo-dash-row.cryo-dash-row--plot-triple > .latent3d-color-legend-aside .cryo-cc-legend {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    .cryo-cc-legend.cryo-cc-legend--heading-only.cryo-cc-legend--vertical {
      gap: 0;
    }
    /*
     * Discrete covariate toggle legend — invert / “no selection” cell:
     * idle = metallic label plaque; active = glossy button. Typography fills
     * inner box with 7% inset (.cryo-cc-discrete-invert-fitbox).
     */
    .cryo-cc-discrete-cell.cryo-cc-discrete-cell--invert {
      padding: 0;
      overflow: hidden;
      box-sizing: border-box;
    }
    .cryo-cc-discrete-cell--invert .cryo-cc-discrete-switch.cryo-cc-discrete-switch--invert {
      width: 100%;
      height: 100%;
      min-height: 0;
      box-sizing: border-box;
      margin: 0;
      padding: 0 !important;
      border: none !important;
      background: transparent !important;
      gap: 0 !important;
      display: flex;
      align-items: stretch;
      justify-content: stretch;
    }
    .cryo-cc-discrete-invert-fitbox {
      flex: 1 1 auto;
      min-width: 0;
      min-height: 0;
      width: 100%;
      height: 100%;
      box-sizing: border-box;
      padding: 7%;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }
    .cryo-cc-discrete-cell--invert .cryo-cc-discrete-invert-fitbox .cryo-cc-discrete-switch-label {
      display: block;
      width: 100%;
      max-width: 100%;
      max-height: 100%;
      margin: 0 auto;
      align-self: center;
      padding: 0;
      box-sizing: border-box;
      text-align: center;
      white-space: normal;
      overflow: visible;
      text-overflow: unset;
      overflow-wrap: normal;
      word-break: normal;
      hyphens: manual;
      line-height: 1.12;
      font-weight: 700;
      font-size: 0.62rem;
    }
    .cryo-cc-discrete-cell--invert.cryo-cc-discrete-cell--invert-idle {
      cursor: default;
      pointer-events: none;
      border-radius: 6px;
      background: linear-gradient(148deg, #eef3fa 0%, #dce5f2 38%, #cbd6e6 52%, #e8eef6 100%);
      border: 1px solid rgba(54, 74, 98, 0.38);
      box-shadow:
        inset 0 2px 5px rgba(255, 255, 255, 0.72),
        inset 0 -4px 12px rgba(36, 59, 83, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.55);
    }
    .cryo-cc-discrete-cell--invert-idle .cryo-cc-discrete-invert-fitbox .cryo-cc-discrete-switch-label {
      color: #4f5d71;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
    }
    .cryo-cc-discrete-cell--invert.cryo-cc-discrete-cell--invert-action {
      cursor: pointer;
      pointer-events: auto;
      border-radius: 7px;
      background: linear-gradient(180deg, #f6f9fd 0%, #cdd9eb 42%, #b9c8df 58%, #e7eef8 100%);
      border: 1px solid rgba(36, 59, 83, 0.46);
      box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.92),
        inset 0 -3px 10px rgba(36, 59, 83, 0.2),
        0 4px 12px rgba(36, 59, 83, 0.22),
        0 1px 2px rgba(255, 255, 255, 0.55);
    }
    .cryo-cc-discrete-cell--invert-action:hover {
      filter: brightness(1.045);
    }
    .cryo-cc-discrete-cell--invert-action:active {
      transform: translateY(1px);
      filter: brightness(0.97);
    }
    .cryo-cc-discrete-cell--invert-action:focus-visible {
      outline: 2px solid var(--accent, #c4703a);
      outline-offset: 2px;
    }
    .cryo-cc-discrete-cell--invert-action .cryo-cc-discrete-invert-fitbox .cryo-cc-discrete-switch-label {
      color: var(--nav-bg, #243b53);
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
    }
    /* Invert chip beside discrete toggle legend title — ~10 % smaller lh; visible ⇄ beside phrase */
    .cryo-cc-region-invert-slot {
      flex-shrink: 0;
    }
    .cryo-cc-region-invert-slot .cryo-cc-discrete-cell.cryo-cc-discrete-cell--invert-heading {
      box-sizing: border-box;
      width: auto;
      height: auto;
      min-height: calc(0.81 * 1lh);
      max-width: 100%;
      margin: 0;
      align-self: center;
      border-radius: 7px;
    }
    .cryo-cc-region-invert-slot .cryo-cc-discrete-cell--invert-heading
      .cryo-cc-discrete-switch.cryo-cc-discrete-switch--invert {
      width: auto;
      height: auto;
      min-height: calc(0.792 * 1lh);
      justify-content: center;
      align-items: center;
    }
    .cryo-cc-region-invert-slot .cryo-cc-discrete-cell--invert-heading .cryo-cc-discrete-invert-fitbox {
      flex: none;
      width: auto;
      height: auto;
      min-height: calc(0.738 * 1lh);
      max-width: 100%;
      padding: 0.18em 0.558em 0.216em;
    }
    .cryo-cc-region-invert-slot .cryo-cc-discrete-cell--invert-heading
      .cryo-cc-discrete-invert-fitbox .cryo-cc-discrete-switch-label {
      font-size: 0.9em;
      line-height: 1.2;
      width: auto;
      max-width: none;
      font-weight: 700;
    }
    .cryo-dash-page .cryo-dash-side {
      flex: 0 0 min(280px, 28vw);
      max-width: 340px;
      min-width: 240px;
    }
    .cryo-dash-page .cryo-dash-main {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      align-items: flex-start;
      justify-content: center;
    }
    .cryo-dash-main > .cryo-dash-main-split {
      flex: 1 1 auto;
      width: 100%;
      min-width: 0;
    }
    .cryo-dash-viewport--plotly {
      box-sizing: border-box;
      width: 100%;
      min-height: min(520px, 55vh);
      background: var(--cream, #faf8f4);
      border-radius: 2px;
    }
    /* Standard "Rendering…" layer over interactive plots (Plotly + pair grid full refresh). */
    .cryo-plotly-stack {
      position: relative;
      width: 100%;
      min-height: min(520px, 55vh);
      isolation: isolate;
    }
    .cryo-plotly-graph-host {
      position: relative;
      z-index: 0;
      min-height: min(520px, 55vh);
      width: 100%;
    }
    .cryo-plot-rendering-overlay {
      position: absolute;
      inset: 0;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: rgba(250, 248, 244, 0.94);
      color: var(--nav-bg, #243b53);
      z-index: 2147483646;
      pointer-events: none;
      border-radius: 2px;
    }
    .cryo-plot-rendering-overlay.cryo-plot-rendering-overlay--show {
      display: flex;
      pointer-events: auto;
      transform: translateZ(0);
      backface-visibility: hidden;
    }
    /* Small corner badge: previous frame stays visible (3D / pair plot / explorer). */
    .cryo-plot-rendering-overlay--nonblocking.cryo-plot-rendering-overlay--show {
      inset: auto;
      top: calc(0.45rem * 1.35);
      right: calc(0.45rem * 1.35);
      left: auto;
      bottom: auto;
      width: auto;
      min-width: calc(10.5rem * 1.35);
      max-width: min(44vw, calc(17rem * 1.35));
      padding: calc(0.45rem * 1.35) calc(0.6rem * 1.35);
      justify-content: center;
      align-items: stretch;
      background: rgba(250, 248, 244, 0.93);
      box-shadow: 0 2px 14px rgba(36, 59, 83, 0.14);
      border: 1px solid rgba(36, 59, 83, 0.14);
      border-radius: 6px;
      pointer-events: none;
      z-index: 5;
    }
    .cryo-plot-rendering-overlay--nonblocking .cryo-plot-rendering-overlay__inner {
      max-width: none;
      width: 100%;
      flex-direction: row;
      align-items: center;
      gap: calc(0.5rem * 1.35);
    }
    .cryo-plot-rendering-overlay--nonblocking .cryo-plot-rendering-overlay__label {
      font-size: calc(0.8rem * 1.35);
      font-weight: 700;
      line-height: 1.2;
      text-align: left;
      flex: 1 1 auto;
      min-width: 0;
    }
    .cryo-plot-rendering-overlay--nonblocking .cryo-plot-rendering-overlay__track {
      width: calc(3.6rem * 1.35);
      flex: 0 0 auto;
      max-width: 42%;
    }
    .cryo-plot-rendering-overlay__inner {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.55rem;
      max-width: min(90%, 22rem);
    }
    .cryo-plot-rendering-overlay__label {
      font-weight: 800;
      font-size: clamp(1rem, 2.5vw, 1.35rem);
      line-height: 1.2;
      text-align: center;
    }
    /* Full-area overlay (initial load): prominent centred copy; corner badge uses --nonblocking below. */
    .cryo-plot-rendering-overlay.cryo-plot-rendering-overlay--show:not(.cryo-plot-rendering-overlay--nonblocking)
      .cryo-plot-rendering-overlay__inner {
      gap: 1rem;
      max-width: min(94%, 32rem);
    }
    .cryo-plot-rendering-overlay.cryo-plot-rendering-overlay--show:not(.cryo-plot-rendering-overlay--nonblocking)
      .cryo-plot-rendering-overlay__label {
      font-size: clamp(1.55rem, 5.5vw, 2.55rem);
      line-height: 1.15;
      letter-spacing: 0.03em;
    }
    .cryo-plot-rendering-overlay.cryo-plot-rendering-overlay--show:not(.cryo-plot-rendering-overlay--nonblocking)
      .cryo-plot-rendering-overlay__track {
      width: min(20rem, 85vw);
      height: 6px;
    }
    .cryo-plot-rendering-overlay__track {
      width: min(13.5rem, 70vw);
      height: 5px;
      border-radius: 3px;
      background: rgba(36, 59, 83, 0.14);
      overflow: hidden;
      position: relative;
    }
    .cryo-plot-rendering-overlay__indeterminate {
      position: absolute;
      top: 0;
      height: 100%;
      width: 38%;
      border-radius: 3px;
      background: var(--accent, #c4703a);
      opacity: 0.95;
      animation: cryo-dash-render-bar 1.15s ease-in-out infinite alternate;
    }
    @keyframes cryo-dash-render-bar {
      0% {
        left: 0;
        transform: translateX(0);
      }
      100% {
        left: 100%;
        transform: translateX(-100%);
      }
    }
    @media (prefers-reduced-motion: reduce) {
      .cryo-plot-rendering-overlay__indeterminate {
        animation: none;
        left: 0;
        transform: none;
        width: 100%;
        opacity: 0.35;
      }
    }
    /* Continuous palette radios: hidden while the associated plot fetch/render is in progress */
    .cryo-palette-radios.cryo-palette-radios--hidden-during-plot-render {
      display: none;
    }
    .cryo-dash-main-split {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      gap: 1rem;
      width: 100%;
      min-width: 0;
    }
    .cryo-dash-main-split .cryo-dash-viewport--plotly {
      flex: 1 1 auto;
      min-width: 0;
    }
    .cryo-dash-figure-legend {
      flex: 0 0 min(260px, 26vw);
      max-width: 300px;
      min-width: 200px;
      background: var(--paper, #fff);
      padding: 0.85rem 1rem;
      border-radius: 4px;
      box-shadow: var(--card-shadow);
      border: 1px solid rgba(36, 59, 83, 0.12);
      align-self: flex-start;
      position: sticky;
      top: 1rem;
    }
    .cryo-dash-figure-legend strong {
      font-size: 0.88rem;
      color: var(--nav-bg, #243b53);
    }
    .cryo-dash-figure-legend .cryo-dash-legend-note {
      margin: 0.5rem 0 0;
      font-size: 0.8rem;
      color: var(--muted, #5c6b7a);
      line-height: 1.35;
    }
    .cryo-dash-controls.card {
      padding: 0.75rem 0.9rem;
    }
    .cryo-dash-controls fieldset {
      border: 1px solid rgba(36, 59, 83, 0.18);
      border-radius: 3px;
      padding: 0.45rem 0.65rem 0.55rem;
      margin: 0 0 0.55rem;
      background: var(--paper, #fff);
    }
    .cryo-dash-controls legend {
      font-weight: 700;
      font-size: 0.82rem;
      color: var(--nav-bg, #243b53);
      padding: 0 0.25rem;
      width: auto;
    }
    .cryo-dash-controls .legend-row {
      display: flex;
      align-items: center;
      gap: 0.45rem;
    }
    .cryo-dash-controls label.cryo-select-line {
      display: block;
      font-weight: 600;
      margin: 0.35rem 0 0.15rem;
      font-size: 0.82rem;
    }
    .cryo-dash-controls label.cryo-select-line:first-of-type {
      margin-top: 0;
    }
    .cryo-dash-controls select,
    .cryo-dash-controls input[type="text"] {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    .cryo-dash-controls .btn-row {
      margin-top: 0.35rem;
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
    }
    .cryo-dash-controls .btn-row .btn {
      font-size: 0.88rem;
      padding: 0.4rem 0.85rem;
    }
    .cryo-dash-controls .status {
      margin-top: 0.35rem;
      font-size: 0.8rem;
    }
    .cryo-status-error {
      color: var(--error, #b42318) !important;
    }
    /* Image viewer: square plot in flex center; montage shrinks (narrower) as needed. */
    main:has(.cryo-dash-page--image-viewer) {
      padding-top: 0.45rem;
    }
    .cryo-dash-page--image-viewer .cryo-dash-row {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      gap: 1rem;
      height: calc(100svh - var(--cryo-dash-below-nav));
      min-height: calc(100svh - var(--cryo-dash-below-nav));
      max-height: calc(100svh - var(--cryo-dash-below-nav));
    }
    .cryo-dash-page--image-viewer .cryo-dash-side {
      flex: 0 0 auto;
      min-width: 130px;
      max-width: 196px;
      width: min(196px, 14vw);
    }
    .cryo-dash-page--image-viewer .cryo-dash-viewport--plotly {
      flex: 1 1 0;
      min-width: 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      /* Match .cryo-dash-controls.card padding-top so status / plot stack line up with the side & montage panels. */
      padding-top: 0.75rem;
    }
    .cryo-dash-page--image-viewer .cryo-plotly-stack {
      flex: 0 1 auto;
      align-self: center;
      box-sizing: border-box;
      width: 100%;
      max-width: 100%;
      max-height: calc(100% - 2.35rem);
      aspect-ratio: 1 / 1;
      min-height: 0;
      min-width: 0;
      height: auto;
    }
    /* Fixed row height: size the square from both column width and height so the plot is never non-square. */
    .cryo-dash-page--image-viewer .cryo-dash-viewport--plotly {
      container-type: size;
      container-name: cryo-image-viewer-plot;
    }
    .cryo-dash-page--image-viewer .cryo-plotly-stack {
      width: min(100cqw, calc(100cqh - 2.35rem));
      max-width: 100%;
      max-height: calc(100cqh - 2.35rem);
    }
    .cryo-dash-page--image-viewer .cryo-plotly-graph-host {
      flex: 1 1 auto;
      min-height: 0;
      min-width: 0;
      height: 100% !important;
      width: 100% !important;
    }
    .cryo-dash-page--image-viewer .cryo-dash-montage {
      flex: 0 1 auto;
      width: auto;
      max-width: min(28rem, calc(100svh - (var(--cryo-dash-below-nav) + 0.5rem)));
      min-width: 0;
      background: var(--paper, #fff);
      /* Match .cryo-dash-controls.card vertical padding so column tops line up with the menu card. */
      padding: 0.75rem 0.85rem;
      border-radius: 4px;
      box-shadow: var(--card-shadow);
      border: 1px solid rgba(36, 59, 83, 0.12);
      align-self: flex-start;
      position: sticky;
      top: 1rem;
      overflow: auto;
      max-height: calc(100svh - var(--cryo-dash-below-nav));
    }
    .cryo-dash-page--image-viewer .cryo-dash-montage strong {
      font-size: 0.88rem;
      color: var(--nav-bg, #243b53);
    }
    .cryo-dash-page--image-viewer .cryo-dash-montage .cryo-dash-legend-note {
      margin: 0.5rem 0 0;
      font-size: 0.8rem;
      color: var(--muted, #5c6b7a);
      line-height: 1.35;
    }
    .cryo-dash-page--image-viewer .cryo-dash-montage .cryo-dash-legend-note:first-child {
      margin-top: 0;
    }

    /* Particle selection (filter): fill viewport vertically like 3D view. */
    main:has(.cryo-dash-page--filter) {
      padding-top: 0.65rem;
    }
    .cryo-dash-page--filter .cryo-dash-row {
      align-items: stretch;
    }
    .cryo-dash-page--filter .cryo-dash-main {
      align-items: stretch;
    }
    .cryo-dash-page--filter .cryo-dash-main-split {
      align-items: stretch;
    }
    .cryo-dash-page--filter .cryo-dash-viewport--plotly {
      display: flex;
      flex-direction: column;
      min-height: max(22rem, calc(100svh - var(--cryo-dash-below-nav-tall)));
      height: calc(100svh - var(--cryo-dash-below-nav-tall));
    }
    .cryo-dash-page--filter .cryo-plotly-stack {
      flex: 1 1 auto;
      min-height: 0;
      height: 100%;
      width: 100%;
    }
    .cryo-dash-page--filter .cryo-plotly-graph-host {
      flex: 1 1 auto;
      min-height: 0;
      height: 100% !important;
      width: 100%;
    }

    /* 3D latent: tall plot column (remaining viewport under nav + lead + controls).
       Full-bleed to the viewport right so the legend column reaches the window edge;
       keep ~1.5rem left inset to match other dash pages. */
    main:has(.cryo-dash-page--latent3d) {
      max-width: none;
      width: 100%;
      margin-left: 0;
      margin-right: 0;
      padding-top: 0.65rem;
      padding-bottom: 1rem;
      padding-left: 1.5rem;
      padding-right: 0;
      box-sizing: border-box;
    }
    main:has(.cryo-dash-row--latent3d-volanim) {
      --cryo-dash-volanim-nav-h: var(--cryo-dash-below-nav);
      --latent3d-volanim-panel-fade-h: var(--cryo-dash-menu-scroll-fade-h, 1.35rem);
      max-height: none;
      height: calc(100svh - var(--cryo-dash-volanim-nav-h));
      min-height: calc(100svh - var(--cryo-dash-volanim-nav-h));
      overflow: hidden;
      padding-top: 0;
      padding-bottom: 0;
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
    }
    .cryo-dash-page--latent3d .cryo-dash-row {
      align-items: stretch;
    }
    .cryo-dash-page--latent3d .cryo-dash-main {
      align-items: stretch;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }
    .cryo-dash-page--latent3d .cryo-dash-viewport--plotly {
      display: flex;
      flex-direction: column;
      min-height: max(22rem, calc(100svh - var(--cryo-dash-below-nav-tall)));
      height: calc(100svh - var(--cryo-dash-below-nav-tall));
    }
    .cryo-dash-page--latent3d .cryo-plotly-stack {
      flex: 1 1 auto;
      min-height: 0;
      height: 100%;
      width: 100%;
    }
    .cryo-dash-page--latent3d .cryo-plotly-graph-host,
    .cryo-dash-page--latent3d #latent3d {
      flex: 1 1 auto;
      min-height: 0;
      height: 100% !important;
      width: 100%;
    }
